26 lines
742 B
Python
26 lines
742 B
Python
from deepface import DeepFace
|
||
|
||
"""
|
||
Deepface is a hybrid face recognition package. It currently wraps many state-of-the-art face recognition models:
|
||
Model Declared LFW Score
|
||
VGG-Face 98.9%
|
||
Facenet 99.2%
|
||
Facenet512 99.6%
|
||
OpenFace 92.9%
|
||
DeepID 97.4%
|
||
Dlib 99.3%
|
||
SFace 99.5%
|
||
ArcFace 99.5%
|
||
GhostFaceNet 99.7%
|
||
Human-beings 97.5%
|
||
|
||
The default configuration uses VGG-Face model.
|
||
"""
|
||
|
||
DeepFace.stream(
|
||
db_path='./face',
|
||
model_name = 'Facenet512',
|
||
enable_face_analysis = True,
|
||
time_threshold=2,
|
||
frame_threshold=20, # Given frame_threshold = 20, 如果其在连续的20帧中都检测到人脸,则对第20帧的face进行操作(如:age 分析,人脸识别等等)
|
||
) |