JustinePP commited on
Commit
a941aa5
·
verified ·
1 Parent(s): db979b0

Update modeles/insightface_facialRecognition_livenessVerification.py

Browse files
modeles/insightface_facialRecognition_livenessVerification.py CHANGED
@@ -10,7 +10,7 @@ def get_model():
10
  if model is None:
11
  model_dir = os.path.join(os.path.dirname(__file__), "../") # <-- Chemin local
12
  model = insightface.app.FaceAnalysis(name="buffalo_l", root=model_dir, providers=["CPUExecutionProvider"])
13
- model.prepare(ctx_id=0)
14
  return model
15
 
16
  def verify_face_and_liveness(image_path, template_path, threshold=0.5):
 
10
  if model is None:
11
  model_dir = os.path.join(os.path.dirname(__file__), "../") # <-- Chemin local
12
  model = insightface.app.FaceAnalysis(name="buffalo_l", root=model_dir, providers=["CPUExecutionProvider"])
13
+ model.prepare(ctx_id=0) #pour générer un embedding
14
  return model
15
 
16
  def verify_face_and_liveness(image_path, template_path, threshold=0.5):