This is a face detection and recognition app build on Deepstream.
- Deepstream 6.0+
- GStreamer 1.14.5+
- Cuda 11.4+
- NVIDIA driver 470.63.01+
- TensorRT 8+
- Python 3.6+
Follow deepstream official doc to install dependencies.
Deepstream docker is more recommended.
Please refer to links below for pretrained models and serialized TensorRT engine. Or download from Google driver.
there should be a face alignment before arcface. Use a custom-gst-nvinfer to preprocess the tensor-meta of retinaface.
set a larger face detection bbox so that we can do alignment better later.
cd models/retinaface
make
- all path in src/config/face/
- line 24 in src/kbds/app/face.py
- video path in test script
Then set "ip;port;topic" in codes. e.g.
DSFace("localhost;9092;deepstream")
you can recieve result messages on deepstream topic and error messages on error topic in same ip&port.
cd test
python3 face_test_demo.py
Notice that only support RTSP stream and Gstreamer format.
images before and after alignment will be stored in images.
modify codes in test/cal_sim.py. replace with your own face-feature npy file.
python3 test/cal_sim.py
it will outputs all score.