Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhouyuchong/face-recognition-deepstream
Deepstream app use retinaface and arcface for face recognition.
https://github.com/zhouyuchong/face-recognition-deepstream
arcface deepstream face-recognition retinaface
Last synced: 3 months ago
JSON representation
Deepstream app use retinaface and arcface for face recognition.
- Host: GitHub
- URL: https://github.com/zhouyuchong/face-recognition-deepstream
- Owner: zhouyuchong
- License: mit
- Created: 2022-02-24T09:21:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-24T08:56:38.000Z (over 2 years ago)
- Last Synced: 2024-02-12T23:13:18.601Z (12 months ago)
- Topics: arcface, deepstream, face-recognition, retinaface
- Language: Python
- Homepage:
- Size: 568 KB
- Stars: 44
- Watchers: 0
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-face-detection-and-recognition - zhouyuchong/face-recognition-deepstream - recognition-deepstream?style=social"/> : Deepstream app use YOLO, retinaface and arcface for face recognition. (Face Recognition)
- awesome-yolo-object-detection - zhouyuchong/face-recognition-deepstream - recognition-deepstream?style=social"/> : Deepstream app use YOLO, retinaface and arcface for face recognition. (Applications)
- awesome-yolo-object-detection - zhouyuchong/face-recognition-deepstream - recognition-deepstream?style=social"/> : Deepstream app use YOLO, retinaface and arcface for face recognition. (Applications)
README
# Face recognition with Deepstream 6.1
This is a face detection and recognition app build on Deepstream.## Requirements
+ Deepstream 6.0+
+ GStreamer 1.14.5+
+ Cuda 11.4+
+ NVIDIA driver 470.63.01+
+ TensorRT 8+
+ Python 3.6+Follow [deepstream](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#dgpu-setup-for-ubuntu) official doc to install dependencies.
Deepstream docker is more recommended.
## Pretrained
Please refer to links below for pretrained models and serialized TensorRT engine. Or download from [Google driver](https://drive.google.com/drive/folders/1HTdIhGrKP7JnKY6n8F95mI7SBnx7-4R3).
+ ~~[yolov5](https://github.com/wang-xinyu/tensorrtx/tree/master/yolov5)~~
+ [retinaface](https://github.com/wang-xinyu/tensorrtx/tree/master/retinaface)
+ [arcface](https://github.com/wang-xinyu/tensorrtx/tree/master/arcface)## Alignment
there should be a face alignment before arcface. Use a custom-gst-nvinfer to preprocess the tensor-meta of retinaface.[Demo custom-gst-nvinfer](https://github.com/zhouyuchong/gst-nvinfer-custom)
## Usage
### 1 - compile retinaface parse function
set a larger face detection bbox so that we can do alignment better later.
```
cd models/retinaface
make
```
### 2 - modify all path in config and codes
+ all path in src/config/face/
+ line 24 in src/kbds/app/face.py
+ video path in test script### 3 - Start kafka service before everything.
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.
### 4 - start app
```
cd test
python3 face_test_demo.py
```
Notice that only support RTSP stream and Gstreamer format.### 5 - check result
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.## References
+ [wang-xinyu/tensorrtx](https://github.com/wang-xinyu/tensorrtx)
+ [NVIDIA-AI-IOT/deepstream_python_apps](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps)