chuanqi305 / MobileNet-SSD

Caffe implementation of Google MobileNet SSD detection network, with pretrained weights on VOC0712 and mAP=0.727.
MIT License
2k stars 1.18k forks source link

How to setup for object detection with only one class? #165

Open FSet89 opened 4 years ago

FSet89 commented 4 years ago

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:

mentezar commented 4 years ago

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.