How to use imagenet-console with multiple images?

Hi,
I used imagenet-console on Jetson Tx2 with my custom lite version of VGG16 trained on cifar10 and it worked fine.
Now i would like to use imagenet-console con a subset of 1000 images in order to obtain top5 classification of each images and then calculate fps for this operation. By the chance, are there any example of modify imagenet-console?

This is the command to run imagenet-console with one image:

cd ~/jetson-inference/build/aarch64/bin
NET=networks/miniVggNet
./imagenet-console airplane_00001.jpg airplane_test.jpg
–prototxt=$NET/deploy_3_miniVggNet.prototxt
–model=$NET/snapshot_3_miniVggNet__iter_40000.caffemodel
–labels=$NET/labels.txt
–input_blob=data
–output_blob=prob

thank you!

Hi c.mor005, imagenet-console is the simple example for you to start from. What you can do is add a loop so that it loads and processes multiple images. Basically you will want to loop over your images starting here:

https://github.com/dusty-nv/jetson-inference/blob/9181361b1fecb4a969b997ac13d01fe44b233e30/imagenet-console/imagenet-console.cpp#L69

Note that this will not be very optimized, as a new image would be loaded at the start of each iteration of the loop. For clarity we have not added extra code into imagenet-console for multi-image processing. However in the future we are looking at adding a new command line program that will have more features like that, without having the restrictions of being a simple source code example.

Alternatively you could write a shell script that runs imagenet-console individually on separate images in a folder. That would probably be the easiest way. Note that the imagenet-camera program is setup for processing an image stream in realtime.