reab5555 commited on
Commit
8e662fb
·
verified ·
1 Parent(s): 8573236

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +2 -2
visualization.py CHANGED
@@ -231,8 +231,8 @@ def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, outpu
231
  mse_posture_norm = (mse_posture - np.min(mse_posture)) / (np.max(mse_posture) - np.min(mse_posture))
232
 
233
  combined_mse = np.zeros((2, total_frames, 3))
234
- combined_mse[0] = np.array([1, 1 - mse_embeddings_norm, 1 - mse_embeddings_norm]).T # More reddish for facial
235
- combined_mse[1] = np.array([1, 1 - mse_posture_norm, 1 - mse_posture_norm]).T # More reddish for posture
236
 
237
  fig, ax = plt.subplots(figsize=(width/100, 2))
238
  im = ax.imshow(combined_mse, aspect='auto', extent=[0, total_frames, 0, 2])
 
231
  mse_posture_norm = (mse_posture - np.min(mse_posture)) / (np.max(mse_posture) - np.min(mse_posture))
232
 
233
  combined_mse = np.zeros((2, total_frames, 3))
234
+ combined_mse[0] = np.array([1 - mse_embeddings_norm, 1 - mse_embeddings_norm, 1 - mse_embeddings_norm]).T.reshape(-1, 3) # More reddish for facial
235
+ combined_mse[1] = np.array([1 - mse_posture_norm, 1 - mse_posture_norm, 1 - mse_posture_norm]).T.reshape(-1, 3) # More reddish for posture
236
 
237
  fig, ax = plt.subplots(figsize=(width/100, 2))
238
  im = ax.imshow(combined_mse, aspect='auto', extent=[0, total_frames, 0, 2])