From 8cca63eef84097e073647be6e503b9710fa33a4b Mon Sep 17 00:00:00 2001 From: wang-xinyu Date: Thu, 20 Aug 2020 11:09:58 +0800 Subject: [PATCH] update readme --- README.md | 1 + yolov5/README.md | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f8950ee..6ded39b 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ All the models are implemented in pytorch or mxnet first, and export a weights f ## News +- `16 Aug 2020`. [upczww](https://github.com/upczww) added a python wrapper for yolov5. - `14 Aug 2020`. Update yolov5 to v3.0 release. - `3 Aug 2020`. [BaofengZan](https://github.com/BaofengZan) implemented yolov5 s/m/l/x (yolov5 v2.0 release). - `6 July 2020`. Add yolov3-tiny, and got 333fps on GTX1080. diff --git a/yolov5/README.md b/yolov5/README.md index 6fb2dfa..884f4a6 100644 --- a/yolov5/README.md +++ b/yolov5/README.md @@ -22,21 +22,21 @@ Currently, we support yolov5 v1.0(yolov5s only), v2.0 and v3.0. ## How to Run, yolov5s as example ``` -1. generate yolov5s.wts from pytorch implementation with yolov5s.pt +1. generate yolov5s.wts from pytorch with yolov5s.pt git clone https://github.com/wang-xinyu/tensorrtx.git git clone https://github.com/ultralytics/yolov5.git // download its weights 'yolov5s.pt' -cd yolov5 -cp ../tensorrtx/yolov5/gen_wts.py . +// copy tensorrtx/yolov5/gen_wts.py into ultralytics/yolov5 // ensure the file name is yolov5s.pt and yolov5s.wts in gen_wts.py +// go to ultralytics/yolov5 python gen_wts.py // a file 'yolov5s.wts' will be generated. -2. put yolov5s.wts into yolov5, build and run +2. build tensorrtx/yolov5 and run -mv yolov5s.wts ../tensorrtx/yolov5/ -cd ../tensorrtx/yolov5 +// put yolov5s.wts into tensorrtx/yolov5 +// go to tensorrtx/yolov5 // ensure the macro NET in yolov5.cpp is s mkdir build cd build @@ -46,6 +46,12 @@ sudo ./yolov5 -s // serialize model to plan file i.e. 'yolov5s.engin sudo ./yolov5 -d ../samples // deserialize plan file and run inference, the images in samples will be processed. 3. check the images generated, as follows. _zidane.jpg and _bus.jpg + +4. optional, load and run the tensorrt model in python + +// install python-tensorrt, pycuda, etc. +// ensure the yolov5s.engine and libmyplugins.so have been built +python yolov5_trt.py ```