Update visualization.py
Browse files- visualization.py +0 -16
visualization.py
CHANGED
@@ -319,20 +319,4 @@ def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, mse_v
|
|
319 |
print(f"Failed to create heatmap video at: {heatmap_video_path}")
|
320 |
return None
|
321 |
|
322 |
-
This version of the function:
|
323 |
-
|
324 |
-
Uses MoviePy for all video operations, avoiding OpenCV codec issues.
|
325 |
-
Creates the heatmap for each frame on-the-fly.
|
326 |
-
Combines the original video frame with the heatmap.
|
327 |
-
Adds the timecode to each frame.
|
328 |
-
Preserves the original audio.
|
329 |
-
|
330 |
-
Make sure you have the necessary dependencies installed:
|
331 |
-
|
332 |
-
pip install moviepy Pillow matplotlib numpy
|
333 |
-
|
334 |
-
This approach should resolve the codec issues and create a video with the heatmap, original audio, and correct playback speed. If you still encounter any issues, please provide the new error message, and I'll be happy to help further.
|
335 |
-
Claude does not have the ability to run the code it generates yet.
|
336 |
-
Claude can make mistakes. Please double-check responses.
|
337 |
-
|
338 |
|
|
|
319 |
print(f"Failed to create heatmap video at: {heatmap_video_path}")
|
320 |
return None
|
321 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
|