Tensorflow Object Detection API, TensorRT and Jetson Nano


I’ve been trying for a while to compress Tensorflow Object Detection API models from the model zoo for TF2 to TensorRT and deploy them in my Jetson Nano.

I’ve been using the official conversion repo . I’ve been able to install and run this repo on my PC, but to either run the resulting .ONNX or .TRT files on Jetson I need to have the TFOD Object Detection API installed.

When trying to install, both tensorflow-addons and tensorflow-text have been impossible to install, even from source. I’ve tried to follow both this issue and this issue, but I guess I’m missing some step.

Could you provide a full guide on how to compress TFOD API models to TensorRT on Jetson?


Have you tried to convert the ONNX model on a desktop environment, and create the engine file from ONNX on Nano?

Yes, I get this error when I try:

Should I retrain the model somehow?


How do you create the engine file?
Could you try it with trtexec binary?

$ /usr/src/tensorrt/bin/trtexec --onnx=[model]



I was using this script (as far as I know the official one) for the engine file.

When I use trtexec I get:


By compressing again the model to ONNX and using trtexec I managed to build a .trt file. No my issue is that I can’t run the model, neither using trtexec nor the inference script. The error is the following:

Hi @AastaLLL , could you please give me a hand on this? Thanks.


Sorry for the late update.
Would you mind running the trtexec tool with --verbose and sharing the output with us?

More, which JetPack version do you use?
If you are not using 4.6.2, would you mind also giving it a try?



I opened a new issue and they helped me out here: Can't execute TRT engine on Jetson Nano - #2 by naisy

I was able to make it run. Sadly now I have JetPack 4.6.1 installed and I can’t go back to 4.6 because my access to the Jetson is limited and I need it to work.

Anyway, thanks for everything. You can close the issue if you want.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.