New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
文档中提供的自动压缩后RT-DETR模型的准确率很低 #1862
Comments
感谢关注,我们找相关同事看下。 |
你好由于这个模型是经过量化后的模型,故采用fp32模式跑是精度不对的,因为已经插入了量化算子。应改成指令 python3 paddle_inference_eval.py --model_path=output/rtdetr_r50vd_6x_coco_quant --reader_config=configs/rtdetr_reader.yml --device=GPU --use_trt=True --precision=int8 --benchmark=True |
另外 RT-DETR模型可能需要更高版本的paddlepaddle-gpu |
@xiaoluomi 我在aistudio上重新部署了一套新的环境,paddlepaddle-gpu的版本为2.6.0
是GPU无法用Int8模式吗? |
不启用Paddle-trt,使用原生GPU来推理量化模型,现在版本的paddle是不支持的,这里报错是算子数据类型不匹配,目前paddle的原生gpu推理也尚未支持量化的模型进行推理,所以需要开启--use_trt=True 来开启Paddle-trt进行量化模型的int8推理。 |
环境:
paddledet 2.6.0
paddlepaddle-gpu 2.4.2
paddleslim 2.6.0
复现步骤:
尝试使用文档中提供的已自动压缩的RT-DETR-R50,下载并解压
PaddleSlim/example/auto_compression/detection/README.md
Line 52 in cbc4d1d
使用GPU和fp32模式推理图片,具体指令:
python3 paddle_inference_eval.py --model_path=output/rtdetr_r50vd_6x_coco_quant --reader_config=configs/rtdetr_reader.yml --image_file=000000144941.jpg --device=GPU --precision=fp32
推理结果是:
使用图片为
结果与图片明显不符
另外也尝试用coco的一个子数据集进行批量测试,tiny_coco_dataset
指令为:
python3 paddle_inference_eval.py --model_path=output/rtdetr_r50vd_6x_coco_quant --reader_config=configs/rtdetr_reader.yml --device=GPU --precision=fp32 --benchmark=True
结果为:
mAP为0
请问是什么原因?谢谢!
The text was updated successfully, but these errors were encountered: