JustinePP commited on
Commit
df162f7
·
verified ·
1 Parent(s): b7fa7ca

Update modeles/insightface_template_utils.py

Browse files
modeles/insightface_template_utils.py CHANGED
@@ -15,14 +15,14 @@ def create_insightface_template(folder_path, output_path):
15
  img = cv2.imread(img_path)
16
  faces = model.get(img)
17
  if not faces:
18
- print(f"⚠️ Aucun visage sur {filename}")
19
  continue
20
  face = faces[0]
21
  embeddings.append(face.embedding)
22
 
23
  if not embeddings:
24
- raise RuntimeError("❌ Aucun embedding extrait.")
25
 
26
  template = np.mean(np.array(embeddings), axis=0)
27
  np.save(output_path, template)
28
- print(f"✅ Template enregistré dans : {output_path}")
 
15
  img = cv2.imread(img_path)
16
  faces = model.get(img)
17
  if not faces:
18
+ print(f"Aucun visage sur {filename}")
19
  continue
20
  face = faces[0]
21
  embeddings.append(face.embedding)
22
 
23
  if not embeddings:
24
+ raise RuntimeError("Aucun embedding extrait.")
25
 
26
  template = np.mean(np.array(embeddings), axis=0)
27
  np.save(output_path, template)
28
+ print(f"Template enregistré dans : {output_path}")