Spaces:
Runtime error
Runtime error
Update video_processing.py
Browse files- video_processing.py +6 -8
video_processing.py
CHANGED
|
@@ -215,21 +215,19 @@ def process_video(video_path, anomaly_threshold, desired_fps, progress=None):
|
|
| 215 |
progress(0.95, desc="Generating video with heatmap")
|
| 216 |
|
| 217 |
output_folder = "output"
|
| 218 |
-
os.makedirs(output_folder, exist_ok=True)
|
| 219 |
heatmap_video_path = create_video_with_heatmap(
|
| 220 |
video_path, df, mse_embeddings, mse_posture, mse_voice,
|
| 221 |
output_folder, original_fps, largest_cluster,
|
| 222 |
progress=progress
|
| 223 |
)
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
if progress is not None:
|
| 231 |
progress(1.0, desc="Video processing complete")
|
| 232 |
-
|
| 233 |
except Exception as e:
|
| 234 |
print(f"Error in create_video_with_heatmap: {str(e)}")
|
| 235 |
import traceback
|
|
|
|
| 215 |
progress(0.95, desc="Generating video with heatmap")
|
| 216 |
|
| 217 |
output_folder = "output"
|
|
|
|
| 218 |
heatmap_video_path = create_video_with_heatmap(
|
| 219 |
video_path, df, mse_embeddings, mse_posture, mse_voice,
|
| 220 |
output_folder, original_fps, largest_cluster,
|
| 221 |
progress=progress
|
| 222 |
)
|
| 223 |
+
|
| 224 |
+
if heatmap_video_path is None:
|
| 225 |
+
print("Failed to create heatmap video")
|
| 226 |
+
else:
|
| 227 |
+
print(f"Heatmap video path from create_video_with_heatmap: {heatmap_video_path}")
|
| 228 |
+
|
| 229 |
if progress is not None:
|
| 230 |
progress(1.0, desc="Video processing complete")
|
|
|
|
| 231 |
except Exception as e:
|
| 232 |
print(f"Error in create_video_with_heatmap: {str(e)}")
|
| 233 |
import traceback
|