enazoe / yolo-tensorrt

TensorRT8.Support Yolov5n,s,m,l,x .darknet -> tensorrt. Yolov4 Yolov3 use raw darknet *.weights and *.cfg fils. If the wrapper is useful to you,please Star it.
MIT License
1.19k stars 315 forks source link

detect speed #1

Closed guods closed 4 years ago

guods commented 4 years ago

Thank you for your work, but there are some questions. The speed of the three inference precison (INT8 FP16 FP32) for the one model is the same, I only modify the config.inference_precison?

enazoe commented 4 years ago

@guods Hi,What is your platform?PC or nano?windows or ubuntu?And the INT8 precision need the calibration images.

guods commented 4 years ago
  1. environment:PC, Win10, GeForce GTX TITan X, TensorRT 5.1.5.0, CUDA 10.0, CUDNN7.5.0
  2. I run the INT8 model with the calibration images, but the speed of the three inference precison (INT8 FP16 FP32) for the one model is the same.
enazoe commented 4 years ago

@guods I just test the inference time on my platform(WIN10,GTX1050),the inference time is 200ms(FP32) and 60ms(INT8). How long is the calculation time on your platform?

guods commented 4 years ago

@enazoe yolov3-416x416 | gtx1050 | INT8 | 25ms yolov3-416x416 | gtx1050 | FLOAT32 | 50ms the result on Ubuntu? INT8: the inference time on my platform is 17ms, the time of detection one image is 23ms.

enazoe commented 4 years ago

@guods no ,the time in readme.md is 416416 model, 200ms(FP32) and 60ms(INT8)is 608608 , the detect function include the cv::resize method and other image preprocessing.And the opencv resize() method is slow at first call . In my mind, the tian x is more power to get low differnece detect time . And you can use for loop test one image more times.

guods commented 4 years ago
  1. The time of detection one image is 23ms: get the time by calculating the mean time of the 1000 times on the same image, and it dose not include the time of reading image.
  2. I delete the engine and table files, re-build the engine. I get the same time on INT8 and FP32; I did not find else questions by debugging the code.
enazoe commented 4 years ago

oh,try yolov3 608x608 model ?,I get a different time of int8 and fp32.

enazoe commented 4 years ago

@guods do not average the detect time and print per loop time

guods commented 4 years ago

I try yolov3 608x608 model,I get a different time of int8 and fp32 (difference 2ms2~3ms) on TiTan X; on 940mx: difference 10ms

guods commented 4 years ago

Thanks for your reply, I will try else GPU and PC.