https://blog.csdn.net/qq_41334243/article/details/107425492
Python 3.7 or later with all requirements.txt
dependencies installed, including torch >= 1.5
. To install run:
$ pip install -U -r requirements.txt
Making database face data,The size of each picture is (160,160),One folder per person
Open main function in recognitiuon/test.py,you can see face2database\ClassifyTrainSVC\detect()
The first step is to run face2database
The second step is to run ClassifyTrainSVC
After running, Annotate the two steps above
The third step is to run detect(setOPT()),In the setOPT() method, you can set parameters.
Get it with yolov5 training.
The dataset uses celeba.
You can replace it with your own weight
This is the weight file for facenet.
rogram and model of downloading facet
Inference can be run on most common media formats.
$ python recognition/test.py --source file.jpg # image
file.mp4 # video
./dir # directory
0 # webcam
rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa # rtsp stream
http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8 # http stream
Download celeba and yolov5, install Apex and run command below. I used yolov5s for training,you can use other weights to train your own model.
yolov5:(https://github.com/ultralytics/yolov5)
blog:(https://blog.csdn.net/ninesky110/article/details/84844307)