Jiale/proj_deepface
DiaosWang 4892d78b8e add folder to origin 2024-07-31 15:56:59 +08:00
..
deepface web service version 2024-05-24 17:07:11 +08:00
face web service version 2024-05-24 17:07:11 +08:00
log web service version 2024-05-24 17:07:11 +08:00
unSelFace_db first commit 2024-05-15 18:06:07 +08:00
.gitignore first commit 2024-05-15 18:06:07 +08:00
main.py add java adapter to call faceReg(python version) 2024-05-21 18:52:47 +08:00
readme.md change readme.md 2024-05-24 17:12:04 +08:00
realtime.py add func updateFaceDB and apply enum to func 2024-05-21 09:24:23 +08:00
webmain.py add folder to origin 2024-07-31 15:56:59 +08:00
人脸识别web端使用说明V2.docx web service version 2024-05-24 17:07:11 +08:00

readme.md

origin github rep: https://github.com/serengil/deepface (推荐:直接使用我提交的仓库代码,并按照教程安装。如果需要查看更改原作者的仓库,请注意: 我拉取的作者仓库的commit版本是: commit SHA: 09f325bc3706b8be70ab509a5a00843a6b6c5cdb ,请拉取或查看相同commit版本的原作者代码)

model store

model checkpoint 放在了 C:\Users\User\.deepface\weights

installation and setup (安装并启动)

$ conda create -n [your-env-name] python=3.7.16 
$ conda activate [your-env-name]
$ cd ./deepface 
$ pip install -e .
$ pip install "uvicorn[standard]"

$ cd .. 
$ uvicorn webmain:app --port [your-port] --host [your-host]

web服务的url路径

http://your-host:your-port/docs#/

Model introduce

人脸识别所用的模型
推荐使用(推荐优先级同顺序)GhostFaceNet, ArcFace
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%             可用     效果似乎不好
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 GhostFaceNet model.
推荐(优先级同顺序)retinaface, mtcnn, opencv, ssd
backends = {
    "opencv": OpenCv.OpenCvClient,  可用,效果一般,容易找不到人脸
    "mtcnn": MtCnn.MtCnnClient,   可用,效果挺好
    "ssd": Ssd.SsdClient,   可用,容易找到太多人脸
    "dlib": Dlib.DlibClient,  不可用Dlib is an optional detector, ensure the library is installed.Please install using 'pip install dlib'
    "retinaface": RetinaFace.RetinaFaceClient,  可用,效果挺好
    "mediapipe": MediaPipe.MediaPipeClient,  未知MediaPipe is an optional detector, ensure the library is installed.Please install using 'pip install mediapipe'
    "yolov8": Yolo.YoloClient,    不可用Yolo is an optional detector, ensure the library is installed.                 Please install using 'pip install ultralytics'
    "yunet": YuNet.YuNetClient,  未知没下载model ck
    "fastmtcnn": FastMtCnn.FastMtCnnClient,  不可用FastMtcnn is an optional detector, ensure the library is installed.Please install using 'pip install facenet-pytorch'
}
这是计算不同人脸相似度时使用的函数,直接使用代码中默认的既可,无需更改
distance_metric = ['euclidean_l2','cosine','euclidean']
author: Euclidean L2 form seems to be more stable than cosine and regular Euclidean distance based on experiments.