Pytorch-ssd problem

Hi,
I tried what is written here : Re-training SSD-Mobilenet

Downloading the Data

python3 open_images_downloader.py

Training the SSD-Mobilenet Model

python3 train_ssd.py --data=data

Converting the Model to ONNX

python3 onnx_export.py

Processing Images with TensorRT

detectnet --model=models

but while i do the last thing Processing images it shows me an error
usr/bin/local/images image not found
but i download the images one by one from openimages and gave the name as name_1 name_2, name_3 etc.
it’s worked. In the example Re-training SSD-Mobilenet fruit pictures are in the folder.
Do I need to download individual pictures and name them?

Hi @savunmasad, what is the command line you are running to process the images, and what is the working directory of your terminal?

You can cd jetson-inference/build/aarch64/bin first before using detectnet program, and then you should be able to process images under the images/ directory.

jetson-inference/python/training/detection/ssd

OK, if you keep your terminal in that ssd directory, does the below command work?
(substitute the path to your jetson-inference in the IMAGES variable below)

IMAGES=<path-to-your-jetson-inference>/data/images

detectnet --model=models/fruit/ssd-mobilenet.onnx --labels=models/fruit/labels.txt \
          --input-blob=input_0 --output-cvg=scores --output-bbox=boxes \
            "$IMAGES/fruit_*.jpg" $IMAGES/test/fruit_%i.jpg

I’ve update the docs to reflect this and make it more clear.

thank you, but do i have to write that variable each time?

You only have to write the IMAGES variable once per terminal session. If you close that terminal, or switch to a different terminal window, you would need to create the IMAGES variable again.

Or if you prefer, you can just skip the variable and use the full images path in the command:

detectnet --model=models/fruit/ssd-mobilenet.onnx --labels=models/fruit/labels.txt \
          --input-blob=input_0 --output-cvg=scores --output-bbox=boxes \
            "<path-to-your-jetson-inference>/data/images/fruit_*.jpg" <path-to-your-jetson-inference>/data/images/test/fruit_%i.jpg

Thank you, then when I run detectnet.py in the jetson-inference/build/aarch64/bin/detectnet.py folder, will these new objects be recognized? so as 92nd object.

Or this works in jetson-inference/python/training/detection/ssd folder only?

You can run detectnet.py from that folder and adjust the paths in the command above to load your custom model, but it loads only 1 model at a time - so it would just detect the N number of classes in your new model.

while i do this with gemi instead of fruit it shows:

i tried the same thing for fruits and same thing happened

Can you try setting IMAGES=/usr/local/bin/images and re-running the command?

same thing happened

But i tried fruit with

It worked

OK. i solved the problem
I had to add the images to the images folder and number them individually as gemi _1, gemi _2. etc. which means boat_1, boat_2

thank you :D

Hi @savunmasad, no problem, glad you were able to figure out the right paths to use.

1 Like