MobileNet-SSD
MobileNet-SSD copied to clipboard
How to setup for object detection with only one class?
I am trying to train a network from scratch on a database with just one class. My labelmap includes class 0 (none_of_the_above) and class 1 (my class). A couple of questions:
- Should I specified 1 or 2 for num_classes, considering that I kept the 0?
- Should I include images with only background? How to manage the xml annotation in this case?
you have to consider your actual classes + 1
for background
. So, in your case, num_classes
is 2
.
Background annotation is not needed in ssd as of negative samples do exist implicitly though. All region of your images that do not correspond to a bounding box is a "negative sample".
There are some exceptions to the above with different frameworks and implementations but here we are talking about caffe_ssd
, so no background annotations are needed.