From 4897bb32ee395d85b0ce7b76e79fdaeacd949f6b Mon Sep 17 00:00:00 2001 From: wang-xinyu Date: Mon, 3 Aug 2020 19:20:03 +0800 Subject: [PATCH] yolov5 m/l/x speed test --- README.md | 4 +++- yolov5/README.md | 5 +++-- yolov5/yolov5.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a9e5d67..b6fc85a 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,6 @@ Some tricky operations encountered in these models, already solved, but might ha |-|-|:-:|:-:|:-:|:-:| | YOLOv3-tiny | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 333 | | YOLOv3(darknet53) | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 39.2 | -| YOLOv3-spp(darknet53) | Xeon E5-2620/GTX1080 | 1 | FP32 | 256x416 | 94 | | YOLOv3-spp(darknet53) | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 38.5 | | YOLOv4(CSPDarknet53) | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 35.7 | | YOLOv4(CSPDarknet53) | Xeon E5-2620/GTX1080 | 4 | FP16 | 608x608 | 40.9 | @@ -95,6 +94,9 @@ Some tricky operations encountered in these models, already solved, but might ha | YOLOv5-s | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 142 | | YOLOv5-s | Xeon E5-2620/GTX1080 | 4 | FP16 | 608x608 | 173 | | YOLOv5-s | Xeon E5-2620/GTX1080 | 8 | FP16 | 608x608 | 190 | +| YOLOv5-m | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 71 | +| YOLOv5-l | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 40 | +| YOLOv5-x | Xeon E5-2620/GTX1080 | 1 | FP16 | 608x608 | 27 | | RetinaFace(resnet50) | TX2 | 1 | FP16 | 384x640 | 15 | | RetinaFace(resnet50) | Xeon E5-2620/GTX1080 | 1 | FP32 | 928x1600 | 15 | | ArcFace(LResNet50E-IR) | Xeon E5-2620/GTX1080 | 1 | FP32 | 112x112 | 333 | diff --git a/yolov5/README.md b/yolov5/README.md index 98255d1..88f69fe 100644 --- a/yolov5/README.md +++ b/yolov5/README.md @@ -2,7 +2,7 @@ The Pytorch implementation is [ultralytics/yolov5](https://github.com/ultralytics/yolov5). -I made a copy of [yolov5s.pt(google drive)](https://drive.google.com/drive/folders/1Yaamfa-t_V3ImxYRBESqGzy7k4Arlt95?usp=sharing). Just in case the yolov5 model updated. +I made a copy of [yolov5-s/m/l/x.pt(google drive)](https://drive.google.com/drive/folders/1Yaamfa-t_V3ImxYRBESqGzy7k4Arlt95?usp=sharing). Just in case the yolov5 model updated. ## Config @@ -25,6 +25,7 @@ git clone https://github.com/ultralytics/yolov5.git // download its weights 'yolov5s.pt' cd yolov5 cp ../tensorrtx/yolov5/gen_wts.py . +// ensure the file name is yolov5s.pt and yolov5s.wts in gen_wts.py python gen_wts.py // a file 'yolov5s.wts' will be generated. @@ -32,7 +33,7 @@ python gen_wts.py mv yolov5s.wts ../tensorrtx/yolov5/ cd ../tensorrtx/yolov5 -ensure the macro NET in yolov5.cpp is s +// ensure the macro NET in yolov5.cpp is s mkdir build cd build cmake .. diff --git a/yolov5/yolov5.cpp b/yolov5/yolov5.cpp index 71f11c3..090c1aa 100644 --- a/yolov5/yolov5.cpp +++ b/yolov5/yolov5.cpp @@ -11,7 +11,7 @@ #define BATCH_SIZE 1 #define NET s // s m l x -#define NETSTRUCT(str) createEngine_##str +#define NETSTRUCT(str) createEngine_##str #define CREATENET(net) NETSTRUCT(net) #define STR1(x) #x #define STR2(x) STR1(x)