reab5555 commited on
Commit
202c430
·
verified ·
1 Parent(s): 6e235e7

Update face_analysis.py

Browse files
Files changed (1) hide show
  1. face_analysis.py +2 -2
face_analysis.py CHANGED
@@ -33,10 +33,10 @@ def cluster_faces(embeddings):
33
 
34
  return clusters
35
 
36
- def organize_faces_by_person(embeddings_by_frame, clusters, aligned_faces_folder, organized_faces_folder):
37
  for (frame_num, embedding), cluster in zip(embeddings_by_frame.items(), clusters):
38
  person_folder = os.path.join(organized_faces_folder, f"person_{cluster}")
39
  os.makedirs(person_folder, exist_ok=True)
40
- src = os.path.join(aligned_faces_folder, f"frame_{frame_num}_face.jpg")
41
  dst = os.path.join(person_folder, f"frame_{frame_num}_face.jpg")
42
  shutil.copy(src, dst)
 
33
 
34
  return clusters
35
 
36
+ def organize_faces_by_person(embeddings_by_frame, clusters, faces_folder, organized_faces_folder):
37
  for (frame_num, embedding), cluster in zip(embeddings_by_frame.items(), clusters):
38
  person_folder = os.path.join(organized_faces_folder, f"person_{cluster}")
39
  os.makedirs(person_folder, exist_ok=True)
40
+ src = os.path.join(faces_folder, f"frame_{frame_num}_face.jpg")
41
  dst = os.path.join(person_folder, f"frame_{frame_num}_face.jpg")
42
  shutil.copy(src, dst)