reab5555 commited on
Commit
1329575
·
verified ·
1 Parent(s): 79bd6b6

Update video_processing.py

Browse files
Files changed (1) hide show
  1. video_processing.py +3 -3
video_processing.py CHANGED
@@ -18,13 +18,13 @@ import mediapipe as mp
18
 
19
 
20
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
- mtcnn = MTCNN(keep_all=False, device=device, thresholds=[0.95, 0.95, 0.95], min_face_size=80)
22
 
23
  mp_face_mesh = mp.solutions.face_mesh
24
- face_mesh = mp_face_mesh.FaceMesh(static_image_mode=False, max_num_faces=1, min_detection_confidence=0.7)
25
 
26
  mp_pose = mp.solutions.pose
27
- pose = mp_pose.Pose(static_image_mode=False, min_detection_confidence=0.7, min_tracking_confidence=0.7)
28
 
29
  def extract_frames(video_path, output_folder, desired_fps, progress_callback=None):
30
  os.makedirs(output_folder, exist_ok=True)
 
18
 
19
 
20
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
21
+ mtcnn = MTCNN(keep_all=False, device=device, thresholds=[0.9, 0.9, 0.9], min_face_size=50)
22
 
23
  mp_face_mesh = mp.solutions.face_mesh
24
+ face_mesh = mp_face_mesh.FaceMesh(static_image_mode=False, max_num_faces=1, min_detection_confidence=0.5)
25
 
26
  mp_pose = mp.solutions.pose
27
+ pose = mp_pose.Pose(static_image_mode=False, min_detection_confidence=0.6, min_tracking_confidence=0.6)
28
 
29
  def extract_frames(video_path, output_folder, desired_fps, progress_callback=None):
30
  os.makedirs(output_folder, exist_ok=True)