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

int8预测结果不对 #98

Open gentlebreeze1 opened 3 years ago

gentlebreeze1 commented 3 years ago

yolov5s trt float16可以准确的预测框,但是int8预测效果很差,该怎么解决呢 @enazoe

enazoe commented 3 years ago

int8是会有精度损失,要用训练集的子集作为校准图片

PowerDi commented 3 years ago

int8是会有精度损失,要用训练集的子集作为校准图片

用ubuntu的TensorRT7.0.0 量化是没问题的。用Agx的TensorRT7.1.3(只有这个版本),int8校准后结果不对了,fp32正常。代码上有什么需要注意的地方吗?

persuelx commented 1 year ago

@PowerDi 请问后来你在Agx上这个int8的问题解决了吗?

PowerDi commented 1 year ago

没有解决,可以转成onnx并使用端到端推理,不采用层api的形式

------------------ 原始邮件 ------------------ 发件人: persuelx @.> 发送时间: 2022年10月23日 22:44 收件人: enazoe/yolo-tensorrt @.> 抄送: PowerDi @.>, Mention @.> 主题: Re: [enazoe/yolo-tensorrt] int8预测结果不对 (#98)

@PowerDi 请问后来你在Agx上这个int8的问题解决了吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

persuelx commented 1 year ago

@PowerDi 好的,谢谢,那用onnx 端对端推理的话,可以解决上述那个问题了么?

Lenan22 commented 1 year ago

yolov5s trt float16可以准确的预测框,但是int8预测效果很差,该怎么解决呢 @enazoe

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