chuanqi305 / MobileNetv2-SSDLite

Caffe implementation of SSD and SSDLite detection on MobileNetv2, converted from tensorflow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check failed: label < num_classes

FSet89 opened this issue · comments

I have a dataset with just one class. I run the following command

python gen_model.py -s train -d ../data/trainval/ -l ../data/labelmap.prototxt  --size 0.25  -c 1 --nobn > train.prototx
./train.sh

But I got the error
Check failed: label < num_classes (1 vs. 1)

I tried two different labelmap files:

item {
  name: "none_of_the_above"
  label: 0
  display_name: "background"
}
item {
  name: "myclass"
  label: 1
  display_name: "myclass"
}

and without background:

item {
  name: "myclass"
  label: 0
  display_name: "myclass"
}

But the error is the same.

Before you start to train your MobileNetSSD, u need to start gen_model.sh N (where N is numbers of your classes)
If you have only one class, u should make this:
sh gen_model.sh 2
(2 - because u have 2 classes - 1 for background, 1 your own class)