MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _face_init_engine

Method _face_init_engine

IntelOSINT.py:10692–10705  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10690 return _load_tg_session()
10691
10692 def _face_init_engine(self):
10693 if self._face_engine is not None:
10694 return self._face_engine
10695 try:
10696 # Import dinamico per evitare warning Pylance quando insightface
10697 # non e' installato nell'interprete usato dall'IDE.
10698 FaceAnalysis = importlib.import_module("insightface.app").FaceAnalysis
10699 app = FaceAnalysis(name="buffalo_l", providers=["CPUExecutionProvider"])
10700 app.prepare(ctx_id=0, det_size=(640, 640))
10701 self._face_engine = app
10702 return app
10703 except Exception:
10704 self._face_engine = None
10705 return None
10706
10707 def _decode_dataurl_to_bgr(self, data_url):
10708 import numpy as np

Callers 1

compare_faces_arcfaceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected