balancap / SSD-Tensorflow

Single Shot MultiBox Detector in TensorFlow
4.11k stars 1.89k forks source link

How to label your own classes in pascalvoc_common.py? #301

Open aaronhan92 opened 5 years ago

aaronhan92 commented 5 years ago

Could anyone kindly explain to me why do i have to include this 'none': (0, 'Background') in the array named VOC_LABLES . I assume that if i would like to detect facial expression like neural or happy, i should only label these two classes. What is the rational of keeping this 'none': (0, 'Background')?

VOC_LABELS = { 'none': (0, 'Background'), 'neural': (1, 'Face'), 'happy': (2, 'Face'), }

congheng commented 5 years ago

background is negative samples, it purpose to let the model know where is the background different from the targets you want.