dlib==19.20.0
opencv_python==4.2.0.34
onnxruntime==1.2.0
fastapi==0.61.0
numpy==1.19.1
Put all target pictures in a directory (data/mask_nomask in this project), one person with some of pictures (masked and none-masked is recommended), the way of file naming is name.index.jpg
you can download the all weight files from
- baiduyunpan passwd:60ri (need a baidu account)
- lanzhoucloud (no restriction to download)
and put them in data directory
python demo_video.py --face_db_root data/mask_nomask --input_video_path 0.mp4 --output_video_path output.mp4
uvicorn main:app --reload --host 0.0.0.0
you can upload a picture from http://127.0.0.1:8000/docs, and retrive the face recognition information [name,box,mask or not]
https://blog.csdn.net/jiangpeng59/article/details/107986046
https://github.com/sgrvinod/a-PyTorch-Tutorial-to-Object-Detection https://github.com/AIZOOTech/FaceMaskDetection https://github.com/davisking/dlib