Jiale/proj_deepface/exp_stream.py

26 lines
742 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 分析,人脸识别等等)
)