Skip to content

Commit 2923026

Browse files
authored
Update README.md
1 parent 297916c commit 2923026

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

retinaface/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@
22

33
## Notice
44

5-
- Only tested on TensorRT4.1.3
5+
- Only tested on TensorRT4
6+
- The pytorch implementation is [biubug6/Pytorch_Retinaface](https://github.com/biubug6/Pytorch_Retinaface), I forked it into
7+
[wang-xinyu/Pytorch_Retinaface](https://github.com/biubug6/Pytorch_Retinaface) and add genwts.py
68

9+
## Run
710

11+
```
12+
1. generate retinaface.wts from pytorch implementation https://github.com/wang-xinyu/Pytorch_Retinaface
13+
14+
git clone https://github.com/wang-xinyu/Pytorch_Retinaface.git
15+
// download its weights 'Resnet50_Final.pth', put it in Pytorch_Retinaface/weights
16+
cd Pytorch_Retinaface
17+
python detect.py --save_model
18+
python genwts.py
19+
// a file 'retinaface.wts' will be generated.
20+
21+
2. put retinaface.wts into tensorrtx/retinaface, build and run
22+
23+
git clone https://github.com/wang-xinyu/tensorrtx.git
24+
cd tensorrtx/retinaface
25+
// put retinaface.wts here
26+
mkdir build
27+
cd build
28+
cmake ..
29+
make
30+
sudo ./retina_r50 -s // build and serialize model to file i.e. 'retina_r50.engine'
31+
wget https://github.com/TencentYoutuResearch/FaceDetection-DSFD/raw/master/data/worlds-largest-selfie.jpg
32+
sudo ./retina_r50 -d // deserialize model file and run inference.
33+
34+
3. check the images generated, as follows. result.jpg
35+
```
36+
37+
<p align="center">
38+
<img src="https://user-images.githubusercontent.com/15235574/78887294-2d2d9f80-7a92-11ea-90a5-38e84a87282e.jpg">
39+
</p>

0 commit comments

Comments
 (0)