Train ssd-mobilenet: Add background images to custom dataset


I am currently trying the object detection training (ssd-mobilenet) from the hello ai world tutorial. I created my own dataset and i have added a few background images to the training dataset. Each background images has its own xml file and contain no label. Below is an example of the xml-file of the background image.

selected images prüfstand.jpg /selected images/prüfstand.jpg Unknown 4032 3024 3 0

When I executed the, I noticed there were warnings about images that has no bounding box/labels annotations. The warnings look like these:
2023-10-26 12:32:47 - Prepare training datasets.
warning - image pruefstand has no box/labels annotations, ignoring from dataset
warning - image bilder00511 has no box/labels annotations, ignoring from dataset
2023-10-26 12:32:47 - VOC Labels read from file: (‘BACKGROUND’, ‘felge’)
2023-10-26 12:32:47 - Stored labels into file models/f_v2/labels.txt.
2023-10-26 12:32:47 - Train dataset size: 26

And I realized that the background images were not included in the training. The training itself works and didnt produce any errors.
My question is how can I add background images into the training. I read that background images can help an object detection model to reduce its false positive.

Hi @anasri89, negative training examples are automatically extracted from the dataset by in a balanced way, so you needn’t manually do it. You should probably add significantly more than 25 images in your dataset though.

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