Hi NVIDIA experts,
I am currently using the JETSON NANO DEVELOPER KIT to try out AI demos. I have understood how to run AI models by following the “HELLO AI World” tutorial. However, I’m unsure about how to run demos with the other AI model. I would like to run object detection demo using the AI model based on YOLOX. Could you please guide me on how to run an object detection demo with YOLOX on JETSON NANO, specifically using a USB camera?
Thank you in advance.
Keisuke Koseki
Hi,
YOLOX is deployed with PyTorch.
So you can follow the instructions below to install PyTorch on Nano and run the authors’ code.
Below are pre-built PyTorch pip wheel installers for Jetson Nano, TX1/TX2, Xavier, and Orin with JetPack 4.2 and newer.
Download one of the PyTorch binaries from below for your version of JetPack, and see the installation instructions to run on your Jetson. These pip wheels are built for ARM aarch64 architecture, so run these commands on your Jetson (not on a host PC). You can also use the pre-built l4t-pytorch and l4t-ml container images and Dockerfiles .
PyTorch pip wheels
JetPack 5
PyTo…
Thanks.
Hi NVIDIA experts,
Thank you for your reply.
I have an additional question.
If I want to implement own ONNX model and run the AI demo, what steps should I take?
Thank you in advance.
Keisuke Koseki
Hi,
You can customize an ONNX model (retrain or transfer learning) in the same way as the desktop environment.
Do you want to build a model with custom architecture or train with custom data?
For custom data, you can find an example below:
<img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-header.jpg" width="100%">
<p align="right"><sup><a href="depthnet.md">Back</a> | <a href="pytorch-cat-dog.md">Next</a> | </sup><a href="../README.md#hello-ai-world"><sup>Contents</sup></a>
<br/>
<sup>Transfer Learning</sup></s></p>
# Transfer Learning with PyTorch
Transfer learning is a technique for re-training a DNN model on a new dataset, which takes less time than training a network from scratch. With transfer learning, the weights of a pre-trained model are fine-tuned to classify a customized dataset. In these examples, we'll be using the <a href="https://arxiv.org/abs/1512.03385">ResNet-18</a> and [SSD-Mobilenet](pytorch-ssd.md) networks, although you can experiment with other networks too.
<p align="center"><a href="https://arxiv.org/abs/1512.03385"><img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/pytorch-resnet-18.png" width="600"></a></p>
Although training is typically performed on a PC, server, or cloud instance with discrete GPU(s) due to the often large datasets used and the associated computational demands, by using transfer learning we're able to re-train various networks onboard Jetson to get started with training and deploying our own DNN models.
<a href=https://pytorch.org/>PyTorch</a> is the machine learning framework that we'll be using, and example datasets along with training scripts are provided to use below, in addition to a camera-based tool for collecting and labeling your own training datasets.
## Installing PyTorch
If you are [Running the Docker Container](aux-docker.md) or optionally chose to install PyTorch back when you [Built the Project](building-repo-2.md#installing-pytorch), it should already be installed on your Jetson to use. Otherwise, if you aren't using the container and want to proceed with transfer learning, you can install it now:
``` bash
This file has been truncated. show original
Thanks.
Hi NVIDIA experts,
Thank you for your reply.
Sorry, I didn’t explain the question enough.
I do not need to do any training, I want to run the inference of a pre-trained YoloX ONNX model.
Do you have any reference python script I can reuse?
Alternatively, is there a way to compile my own trained ONNX model so that it can be run with the Jetpack SDK?
Thank you in advance.
Hi,
You can deploy it with PyTorch directly.
Please refer to the below link to run the ONNX model with TensorRT.
https://elinux.org/Jetson/L4T/TRT_Customized_Example#OpenCV_with_ONNX_model
You might need some customized pre-processing/post-processing for the YOLOX model.
Thanks.
system
Closed
January 2, 2024, 6:46am
10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.