Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/we0091234/yolov7-face-tensorrt
yolov7-face tensorrt
https://github.com/we0091234/yolov7-face-tensorrt
face-detection face-landmark-detection yolov5-face yolov5-face-landmark yolov7 yolov7-face
Last synced: 3 months ago
JSON representation
yolov7-face tensorrt
- Host: GitHub
- URL: https://github.com/we0091234/yolov7-face-tensorrt
- Owner: we0091234
- Created: 2022-12-10T09:37:23.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T03:45:40.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T16:44:12.938Z (3 months ago)
- Topics: face-detection, face-landmark-detection, yolov5-face, yolov5-face-landmark, yolov7, yolov7-face
- Language: C++
- Homepage:
- Size: 20.3 MB
- Stars: 43
- Watchers: 1
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-yolo-object-detection - we0091234/yolov7-face-tensorrt - face-tensorrt?style=social"/> : yolov7-face TensorRT. (Applications)
- awesome-yolo-object-detection - we0091234/yolov7-face-tensorrt - face-tensorrt?style=social"/> : yolov7-face TensorRT. (Applications)
README
# yolov7-face TensorRT
## yolov7-face
The Pytorch implementation is [yolov7-face](https://github.com/derronqi/yolov7-face).
## **onnx export**
step1. git clone https://github.com/derronqi/yolov7-face
step2. modify models/export.py
```
#line 72
#output_names = None
# modified into:
output_names = ["output"]
```step3. modify models/yolo.py class IKeypoint
```
#line 308
# return x if self.training else (torch.cat(z, 1), x)
# modified into:
return x if self.training else torch.cat(z, 1)
```step4. Export to onnx model
```
cd yolov7-face
python models/export.py --weights yolov7s-face.pt --grid
```## How to Run, yolov7s-face as example
1. Modify the tensorrt cuda opencv path in CMakeLists.txt
```
#cuda
include_directories(/mnt/Gu/softWare/cuda-11.0/targets/x86_64-linux/include)
link_directories(/mnt/Gu/softWare/cuda-11.0/targets/x86_64-linux/lib)#tensorrt
include_directories(/mnt/Gpan/tensorRT/TensorRT-8.2.0.6/include/)
link_directories(/mnt/Gpan/tensorRT/TensorRT-8.2.0.6/lib/)
```
2. build```
1. mkdir build
2. cd build
3. cmake ..
4. make```
3. onnx to tensorrt model```
./onnx2trt/onnx2trt ../onnx_model/yolov7s-face.onnx ./yolov7s-face.trt 1```
4. inference```
./yolov7_face yolov7s-face.trt ../images
```The results are saved in the build folder.

## contact
Tencent qq group: 871797331