PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.57k stars 2.86k forks source link

在jetson xavier nx上使用trt_int8出现段错误 #2953

Open dengxinlong opened 3 years ago

dengxinlong commented 3 years ago

说明:这里是使用的paddleDetection版本是 release 2.0。paddlepaddle:2.0.0。 这里下载好官方的已经训练好的模型参数yolov3_mobilenet_v3_large_270e_coco.pdparams。 使用export_model.py 导出模型:python tools/export_model.py -c configs/yolov3/yolov3_mobilenet_v3_large_270e_coco.yml --output_dir=./inferModel/ -o weights=./model/yolov3_mobilenet_v3_large_270e_coco.pdparams。 使用deploy/python/infer.py 预测模型:python deploy/python/infer.py --model_dir=./inferModel/yolov3_mobilenet_v3_large_270e_coco/ --image_fil=dataset/000000502910.jpg --run_mode=trt_int8。 错误信息:

C++ Traceback (most recent call last):
--------------------------------------
0   paddle::framework::SignalHandle(char const*, int)
1   paddle::platform::GetCurrentTraceBackString[abi:cxx11]()

----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
  [TimeInfo: *** Aborted at 1620737053 (unix time) try "date -d @1620737053" if you are using GNU date ***]
  [SignalInfo: *** SIGSEGV (@0x0) received by PID 31569 (TID 0x7f812c0010) from PID 0 ***]

Segmentation fault (core dumped)

上面我使用了tensorRT_int8,但是出现了段错误,不知道什么原因??

liuhuiCNN commented 3 years ago

你好,tensorRT_int8请参考文档: (1)https://paddle-inference.readthedocs.io/en/latest/optimize/paddle_trt.html (2)https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.0/deploy/TENSOR_RT.md (3)如果您使用量化前的模型,需要使用校准功能; (4)如果您使用量化后的模型,需要输入量化后的模型,PaddleDetection提供模型:https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.0/configs/slim

dengxinlong commented 3 years ago

你好,tensorRT_int8请参考文档: (1)https://paddle-inference.readthedocs.io/en/latest/optimize/paddle_trt.html (2)https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.0/deploy/TENSOR_RT.md (3)如果您使用量化前的模型,需要使用校准功能; (4)如果您使用量化后的模型,需要输入量化后的模型,PaddleDetection提供模型:https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.0/configs/slim

您提到校准,怎么校准,有文档吗??