Errors in converting yolov3 to TensorRT

When i test the demo in /usr/src/tensorrt/samples/python/yolov3_onnx, got errors as follows

Reading engine from file yolov3.trt
Segmentation fault (core dumped)

and i have set up virtual memory,but it doesn’t work.

Hi niuniu_niu1,

Do you follow the steps shared in our document?



This is a know issue.

The default workspace size it too big for Jetson platform.
Please decrease the number from 1G into 256Mb with the comment here:


it doesn’t work on jetson TX2

Thanks for your feedback.
We will check this and update more information with you asap.


We can run the sample without any issue.
Here is some update for your reference:

1. Make sure your onnx is v1.4.1

$ pip install onnx==1.4.1

2. Update workspace size into 256Mb

Please try it again and let us know the result.

when i use yolov3-416 i get this error
ValueError: cannot reshape array of size 43095 into shape (1,255,19,19)

also i have modified as follows

Two-dimensional tuple with the target network’s (spatial) input resolution in HW ordered

input_resolution_yolov3_HW = (416, 416)

so how to modify output_shapes in

Output shapes expected by the post-processor

output_shapes = [(1, 255, 19, 19), (1, 255, 38, 38), (1, 255, 76, 76)]


it works when i modify output_shapes = [(1, 255, 13, 13), (1, 255, 26, 26), (1, 255, 52, 52)]

Thanks a lot!

is there any demo for video?