dusty-nv / jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
https://developer.nvidia.com/embedded/twodaystoademo
MIT License
7.86k stars 2.98k forks source link

Getting individual files' name when running "./detectnet.py "images/peds_*.jpg" images/test/peds_output_%i.jpg" #1772

Closed gyillikci closed 10 months ago

gyillikci commented 10 months ago

Hi Dustin,

I would like to give a folder with jpgs files to the detecnet.py and keep the original name with a modifier at the end of the name of the file such as below: input_name_date_time.jpg -> input_name_date_time_modified.jpg

Can you guide me how can I pull out easily the original name of the each file and pass it to the modified file.

Best,

Giray

dusty-nv commented 10 months ago

Hi @gyillikci, the videoSource interface doesn't retain the image filenames as its an API mostly intended for processing video streams - instead you can make your own version of detectnet.py that uses jetson_utils.loadImage("xyz.jpg") to load the images yourself, and then you will still have their filenames.