PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

trt_int8预测时间和CPU差不多,并且没有结果

Open GZHUZhao opened this issue 5 years ago • 3 comments

环境: 1、paddle-gpu: 2.0.0rc1,jetson nano源码编译的python包,已经编译TensorRT。 2、PaddleDetection: develop分支(新增了trt_int8那个) 使用命令: cd PaddleDetection python3 static/deploy/python/infer.py --model_dir=./export_model/lianghua/float/int/ssd_mobilenet_v1_voc/ --camera_id=0 --use_gpu=1 --run_mode=trt_int8 说明: 模型由量化训练产生:用的是PaddleDetection=2.0rc下的slim/quantization/train.py训练,然后导出的。 量化训练命令:(PaddleDetection=2.0rc,aistudio notebook) #量化训练 !python slim/quantization/train.py --not_quant_pattern yolo_output
--eval
-c ./configs/ssd/ssd_mobilenet_v1_voc.yml
-o max_iters=15000
save_dir=./output/quantization
LearningRate.base_lr=0.0001
LearningRate.schedulers="[!PiecewiseDecay {gamma: 0.1, milestones: [5000]}]"
pretrain_weights=https://paddlemodels.bj.bcebos.com/object_detection/ssd_mobilenet_v1_voc.tar

模型文件: 链接:https://pan.baidu.com/s/1QocR2BJRgbMEVtOyFx5XKA 提取码:x5ii

报错: 11 22 33

问题: 1、量化训练后的模型float和int文件夹下的模型只有 模型和参数 两个文件,没有infer_cfg.yml这个文件,但是预测的时候提示没有infer_cfg.yml文件,我这里直接用的这个 ssd_mobilenet_v1_voc.yml导出后生成的infer_cfg.yml,请问这样可以吗?还是如何使用? 2、模型预测时间达1s多,但是使用没有量化训练的ssd_mobilenet_v1_voc.yml模型是可以使用trt_fp16和trt_fp32的。 麻烦有空的时候跟进下,谢谢!!!

GZHUZhao avatar Apr 17 '21 10:04 GZHUZhao

您好,感谢反馈,已反馈给相关同学,我们确认下。

liuhuiCNN avatar Apr 17 '21 15:04 liuhuiCNN

@GZHUZhao infer_cfg.yml文件可以直接使用ssd_mobilenet_v1_voc.yml导出后生成的文件,trt_int8预测速度问题我们定位下,感谢反馈。

yghstill avatar Apr 18 '21 12:04 yghstill

@yghstill 请问有最新消息了吗

GZHUZhao avatar Apr 26 '21 07:04 GZHUZhao