I’m new to the Jetson Nano system and would like some guidance on training a model to detect small objects in 1080p images, specifically objects around 100x100 pixels in size. I’ve experimented with Jetson Inference training, but the resulting model only recognizes objects that are close to the camera. I also tested the detectnet.py
script with the FaceDetect network, which seems to be more suitable for my needs, but I’m unsure how to train it for this specific task. Could you provide some advice?
Hi,
Please find the below link for retraining a model for detectnet:
<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="pytorch-collect.md">Back</a> | <a href="pytorch-collect-detection.md">Next</a> | </sup><a href="../README.md#hello-ai-world"><sup>Contents</sup></a>
<br/>
<sup>Transfer Learning - Object Detection</sup></s></p>
# Re-training SSD-Mobilenet
Next, we'll train our own SSD-Mobilenet object detection model using PyTorch and the [Open Images](https://storage.googleapis.com/openimages/web/visualizer/index.html?set=train&type=detection&c=%2Fm%2F06l9r) dataset. SSD-Mobilenet is a popular network architecture for realtime object detection on mobile and embedded devices that combines the [SSD-300](https://arxiv.org/abs/1512.02325) Single-Shot MultiBox Detector with a [Mobilenet](https://arxiv.org/abs/1704.04861) backbone.
<a href="https://arxiv.org/abs/1512.02325"><img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/pytorch-ssd-mobilenet.jpg"></a>
In the example below, we'll train a custom detection model that locates 8 different varieties of fruit, although you are welcome to pick from any of the [600 classes](https://github.com/dusty-nv/pytorch-ssd/blob/master/open_images_classes.txt) in the Open Images dataset to train your model on. You can visually browse the dataset [here](https://storage.googleapis.com/openimages/web/visualizer/index.html?set=train&type=detection).
<img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/pytorch-fruit.jpg">
To get started, first make sure that you have [JetPack 4.4](https://developer.nvidia.com/embedded/jetpack) (or newer) and [PyTorch installed](pytorch-transfer-learning.md#installing-pytorch) for **Python 3** on your Jetson. JetPack 4.4 includes TensorRT 7.1, which is the minimum TensorRT version that supports loading SSD-Mobilenet via ONNX. Newer versions of TensorRT are fine too.
## Setup
The PyTorch code for training SSD-Mobilenet is found in the repo under [`jetson-inference/python/training/detection/ssd`](https://github.com/dusty-nv/pytorch-ssd). If you aren't [Running the Docker Container](aux-docker.md), there are a couple steps required before using it:
This file has been truncated. show original
Thanks.
Thank you, but I’ve already tried it, I would like to use Resnet18 for the re-training not mobilenet, there is any method where I can switch model on this training?
Hi
Resent-18 is a classifier rather than a detector.
Do you want to train a classifier instead?
Thanks.
system
Closed
October 9, 2024, 3:27am
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.