reab5555 commited on
Commit
447af05
·
verified ·
1 Parent(s): e257fc3

Update video_processing.py

Browse files
Files changed (1) hide show
  1. video_processing.py +7 -1
video_processing.py CHANGED
@@ -224,6 +224,11 @@ def process_video(video_path, anomaly_threshold, desired_fps, progress=None):
224
  frame_img_with_timecode = add_timecode_to_image(frame_img, timecode)
225
  anomaly_frames_posture_images.append(frame_img_with_timecode)
226
 
 
 
 
 
 
227
  return (
228
  execution_time,
229
  results,
@@ -241,7 +246,8 @@ def process_video(video_path, anomaly_threshold, desired_fps, progress=None):
241
  anomaly_faces_embeddings,
242
  anomaly_frames_posture_images,
243
  aligned_faces_folder,
244
- frames_folder
 
245
  )
246
 
247
  def is_frontal_face(landmarks, threshold=50):
 
224
  frame_img_with_timecode = add_timecode_to_image(frame_img, timecode)
225
  anomaly_frames_posture_images.append(frame_img_with_timecode)
226
 
227
+ # Create annotated video
228
+ annotated_video_path = os.path.join(output_folder, "annotated_video.mp4")
229
+ create_annotated_video(video_path, df, mse_embeddings, largest_cluster, annotated_video_path)
230
+
231
+
232
  return (
233
  execution_time,
234
  results,
 
246
  anomaly_faces_embeddings,
247
  anomaly_frames_posture_images,
248
  aligned_faces_folder,
249
+ frames_folder,
250
+ annotated_video_path
251
  )
252
 
253
  def is_frontal_face(landmarks, threshold=50):