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.18k stars 316 forks source link

int8 engine generation failed #163

Open adonishong opened 2 years ago

adonishong commented 2 years ago

Hi, highly appreciate for your work.

Device: AGX Xavier OS: Ubuntu 18.04.6 LTS Jetpack 4.6, CUDA 10.2, CUDNN 8.2.1, TensorRT 8.0.1.6

We have tried FP32 FP16 for yolov5-6.0 n/s/l/m/x and yolov3 also; this project works perfectly for these mode. But int8 mode does not work, we get this error when we do int8 mode for yolov5-6.0 n/s/m/l/x, yolv3 also

ERROR: 2: [reformatRunner.cpp::onShapeChangeNONCONST::104] Error Code 2: Internal Error (Assertion mCombinedScalesSize >= channelDst failed.) yolo-trt: /home/nvidia/Projects/yolo-tensorrt/modules/yolo.cpp:488: void Yolo::createYOLOEngine(nvinfer1::DataType, Int8EntropyCalibrator*): Assertion `m_Engine != nullptr' failed. Aborted (core dumped)

wangxudong-cq commented 2 years ago

how is it now

Lenan22 commented 1 year ago

Hi, highly appreciate for your work.

Device: AGX Xavier OS: Ubuntu 18.04.6 LTS Jetpack 4.6, CUDA 10.2, CUDNN 8.2.1, TensorRT 8.0.1.6

We have tried FP32 FP16 for yolov5-6.0 n/s/l/m/x and yolov3 also; this project works perfectly for these mode. But int8 mode does not work, we get this error when we do int8 mode for yolov5-6.0 n/s/m/l/x, yolv3 also

ERROR: 2: [reformatRunner.cpp::onShapeChangeNONCONST::104] Error Code 2: Internal Error (Assertion mCombinedScalesSize >= channelDst failed.) yolo-trt: /home/nvidia/Projects/yolo-tensorrt/modules/yolo.cpp:488: void Yolo::createYOLOEngine(nvinfer1::DataType, Int8EntropyCalibrator*): Assertion `m_Engine != nullptr' failed. Aborted (core dumped)

Please refer to our open source quantization tool ppq, the quantization effect is better than the calibration of tensorrt, if you encounter issues, we can help you solve them. https://github.com/openppl-public/ppq/blob/master/md_doc/deploy_trt_by_OnnxParser.md