Training image classification difficulties

hey everyone,

I’m having some difficulties running some of the code from the training image classification portion of the hello ai world tutorials. From within the container I input:

“mkdir data/cat_dog/test_cat_output data/cat_dog/test_dog_output”

I then tried to follow along by inputting:

“imagenet --model=models/cat_dog/resnet18.onnx --labels=data/cat_dog/labels.txt – input_blob=input_0 --output_blob=output_0 data/cat_dog/test/cat data/cat_dog/test_cat_output”

but then I get this error:

“URI – invalid resource or file path: –
[video] videoOptions – failed to parse input resource URI (–)
[video] videoSource – failed to parse command line options
imagenet: failed to create input stream”

Is my code incorrect? Or is there another problem going on? Any info would be awesome. Thanks!

Hi @nbarrow85, it looks like you are missing the second - before input_blob (and have a dangling space there). It should be --input-blob=input_0

Try it like this:

 imagenet --model=models/cat_dog/resnet18.onnx --labels=data/cat_dog/labels.txt --input_blob=input_0 --output_blob=output_0 data/cat_dog/test/cat data/cat_dog/test_cat_output

hey Dusty,

When I input that updated command I get this error:

“listDir(’/usr/local/bin/data/cat_dog/test/cat’) - found no matches
[image] imageLoader – failed to find ‘data/cat_dog/test/cat’
imagenet: failed to create input stream”

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

What is the current working directory of your terminal when you run this command? Is it jetson-inference/python/training/classification?

Does your data/cat_dog/test/cat directory have image files in it?