Spaces:
Runtime error
Runtime error
Update visualization.py
Browse files- visualization.py +2 -2
visualization.py
CHANGED
|
@@ -229,7 +229,7 @@ def create_heatmap(t, mse_embeddings, mse_posture, mse_voice, video_fps, total_f
|
|
| 229 |
combined_mse[1] = mse_posture_norm
|
| 230 |
combined_mse[2] = mse_voice_norm
|
| 231 |
|
| 232 |
-
fig, ax = plt.subplots(figsize=(video_width /
|
| 233 |
ax.imshow(combined_mse, aspect='auto', cmap='Reds', vmin=0, vmax=1, extent=[0, total_frames, 0, 3])
|
| 234 |
ax.set_yticks([0.5, 1.5, 2.5])
|
| 235 |
ax.set_yticklabels(['Voice', 'Posture', 'Face'], fontsize=8)
|
|
@@ -237,7 +237,7 @@ def create_heatmap(t, mse_embeddings, mse_posture, mse_voice, video_fps, total_f
|
|
| 237 |
|
| 238 |
ax.axvline(x=frame_count, color='black', linewidth=4)
|
| 239 |
|
| 240 |
-
plt.tight_layout(pad=0.5)
|
| 241 |
|
| 242 |
canvas = FigureCanvas(fig)
|
| 243 |
canvas.draw()
|
|
|
|
| 229 |
combined_mse[1] = mse_posture_norm
|
| 230 |
combined_mse[2] = mse_voice_norm
|
| 231 |
|
| 232 |
+
fig, ax = plt.subplots(figsize=(video_width / 30, 1.5))
|
| 233 |
ax.imshow(combined_mse, aspect='auto', cmap='Reds', vmin=0, vmax=1, extent=[0, total_frames, 0, 3])
|
| 234 |
ax.set_yticks([0.5, 1.5, 2.5])
|
| 235 |
ax.set_yticklabels(['Voice', 'Posture', 'Face'], fontsize=8)
|
|
|
|
| 237 |
|
| 238 |
ax.axvline(x=frame_count, color='black', linewidth=4)
|
| 239 |
|
| 240 |
+
plt.tight_layout(pad=0.5)
|
| 241 |
|
| 242 |
canvas = FigureCanvas(fig)
|
| 243 |
canvas.draw()
|