Want to have a sample program for object detection and semantic segmentation on jetson nano

Hi all, like the way there is a sample code is present for MNIST hand written digit classification/identification (sample.py and model.py) present in the directory
/usr/src/tensorrt/samples/python/network_api_pytorch_mnist/

In a similar way I want the sample code for object detection and semantic segmentation on jetson nano board.
All these are required for experimenting how the inference of a pretrained model can be accelerated on the NVIDIA GPU

The sample code should be in following flavors

  1. Flavor1 - It should be able to convert any pre-trained model (not being built/created by NVIDIA) to an onnx format and then to tensorrt and perform the inference
  2. Flavor2 - It should create a model like the one present in the directory /usr/src/tensorrt/samples/python/network_api_pytorch_mnist/, get the trained model’s weights, create the network, build the engine and perform inference

If I get sample code for these two requirements then it will be helpful to me to conduct further experiment on this.

Thanks
Nagaraj Trivedi

Hi,

1.
To convert an ONNX model into TensorRT, trtexec is a good tool.
Just run:

$ /usr/src/tensorrt/bin/trtexec --onnx=[input] --saveEngine=[output]

Then you can deploy it by modifying the sample in the below wiki:
https://elinux.org/Jetson/L4T/TRT_Customized_Example#OpenCV_with_PLAN_model

2. TensorRT uses the ONNX model as an intermediate model format.
Most public training frameworks, like PyTorch or TensorFlow, support converting the trained model into ONNX.

You can also check jetson-inference for the transfer learning on Jetson:

Thanks.

OK. Thank you. I will try this and incase any further clarifications are required I will write you back.

Thanks and Regards

Nagaraj Trivedi

Is this still an issue to support? Any result can be shared? Thanks

I have not yet tried it. Please give me some time I will try and get back to you.

Thanks and Regards

Nagaraj Trivedi

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