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

Warning - could not find image #1874

Closed Apep-sys closed 4 months ago

Apep-sys commented 4 months ago

warning - could not find image yoto10383 - ignoring from dataset warning - could not find image yoto10412 - ignoring from dataset warning - could not find image yoto10441 - ignoring from dataset warning - could not find image yoto10499 - ignoring from dataset warning - could not find image yoto10557 - ignoring from dataset warning - could not find image yoto10586 - ignoring from dataset warning - could not find image yoto10702 - ignoring from dataset warning - could not find image yoto10731 - ignoring from dataset warning - could not find image yoto10760 - ignoring from dataset warning - could not find image yoto10789 - ignoring from dataset warning - could not find image yoto10818 - ignoring from dataset warning - could not find image yoto10847 - ignoring from dataset warning - could not find image yoto10876 - ignoring from dataset warning - could not find image yoto10905 - ignoring from dataset warning - could not find image yoto10934 - ignoring from dataset warning - could not find image yoto10963 - ignoring from dataset warning - could not find image yoto10992 - ignoring from dataset warning - could not find image yoto11021 - ignoring from dataset warning - could not find image yoto11050 - ignoring from dataset warning - could not find image yoto11079 - ignoring from dataset warning - could not find image yoto11108 - ignoring from dataset warning - could not find image yoto11485 - ignoring from dataset warning - could not find image yoto11920 - ignoring from dataset 2024-07-12 16:34:48 - VOC Labels read from file: ('BACKGROUND', '', 'drone') 2024-07-12 16:34:48 - Stored labels into file data/images/labels.txt. 2024-07-12 16:34:48 - Train dataset size: 0 Traceback (most recent call last): File "/home/jetson-orin/jetson-inference/python/training/detection/ssd/pytorch-ssd/train_ssd.py", line 284, in train_loader = DataLoader(train_dataset, args.batch_size, File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 349, in init sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/sampler.py", line 140, in init raise ValueError(f"num_samples should be a positive integer value, but got num_samples={self.num_samples}") ValueError: num_samples should be a positive integer value, but got num_samples=0

Hello. As I see, there has already been a thread on this, but my problem doesn't quite solve as easily (I think). I've been trying to get the paths right for the past few hours and nothing is working. For some reason it still won't see my images. There are plenty more images than that, but I am not going to post the whole spam block.

I have been following this tutorial, for doing transfer learning on the SSD-Mobilenet model.

Could it be that I am missing a folder or .txt file? If so, what should be inside them, and where should I place them? All the tutorials regarding re-training this model involve using the camera capture, which I am not, so maybe this has something to do with it.

My .xml files (in VOC format) point correctly to at least 1 of the images. As I downloaded my data from the internet, along with .xml files and images, I did not use the camera capture, and so I jumped directly to training the model.

I have the labels.txt file, the Annotations folder, the ImageSets folder, which contains Main folder with train.txt file, all inside my images folder. They weren’t inside the images folder prior to this, but the errors led me to adding them there,

So, do you have any idea why it won't work?? If you could tell me every folder and file that needs to exist, and where, it would be great. I feel like I'm missing an important file.

Thank you.

SOLVED: The solution was to add all my images inside of JPEGImages folder. Seems to be mandatory to have that folder.