|
|
||
|---|---|---|
| .. | ||
| face | ||
| unSelFace_db | ||
| .gitignore | ||
| main.py | ||
| readme.md | ||
| realtime.py | ||
| webmain.py | ||
readme.md
ref: https://github.com/serengil/deepface
model store
model checkpoint 放在了 C:\Users\User\.deepface\weights
installation
$ pip install deepface
Usage:
(deepface_v2) PS path/to/workspace> python
Python 3.7.16 (default, Jan 17 2023, 16:06:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from deepface import DeepFace
Model introduce
Deepface is a hybrid face recognition package. It currently wraps many state-of-the-art face recognition models:
model_name Declared LFW Score
VGG-Face 98.9%
Facenet 99.2%
Facenet512 99.6% drop
OpenFace 92.9%
DeepID 97.4%
Dlib 99.3%
SFace 99.5%
ArcFace 99.5% 阈值调整为1.00 **
GhostFaceNet 99.7% **
Human-beings 97.5%
The default configuration uses VGG-Face model.
backends = {
"opencv": OpenCv.OpenCvClient,
"mtcnn": MtCnn.MtCnnClient,
"ssd": Ssd.SsdClient,
"dlib": Dlib.DlibClient,
"retinaface": RetinaFace.RetinaFaceClient,
"mediapipe": MediaPipe.MediaPipeClient,
"yolov8": Yolo.YoloClient,
"yunet": YuNet.YuNetClient,
"fastmtcnn": FastMtCnn.FastMtCnnClient,
}
distance_metric = ['euclidean_l2','cosine','euclidean']
author: Euclidean L2 form seems to be more stable than cosine and regular Euclidean distance based on experiments.