Retraining SSD Mobilenet using custom dataset annotated in Roboflow (dusty-nv/pytorch-ssd)

Good day, I am struggling to execute the training script with my custom dataset. I have just over 3000 images that have been annotated using Roboflow and my goal is to deploy the trained model to my Jetson nano.

I am training on google colab and have ensured that my dataset was exported in Pascal VOC format (as required for custom datasets) with train, test and validate sets.

When I execute the following command:
!python train_ssd.py --dataset-type=voc --data=Project-3/ --model-dir=models/ --batch-size=4 --num-epochs=1

I get the following error message:
OSError: missing ImageSet file Project-3/ImageSets/Main/trainval.txt

It does appear that datasets exported from Roboflow do not have text files for labels. How could I alter my current dataset to ensure that it works with the code?

Hi, I saw this post: Having trouble setting up pytorch code for training ssd-mobilenet - #5 by francis.tse

It sounds like you’ll just need to copy all lines in the train.txt and val.txt files into a new trainval.txt file. The answer linked above also demonstrates the directory structure you’ll have the files end up in, so you know where to house trainval.txt

1 Like

Hi, thanks for the suggestion. I had resolved the issue a while ago. Turned out that my directory structure was not correct. After moving things around a bit, it worked. Best regards.

1 Like

Thank you for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.