zhreshold / mxnet-ssd

MXNet port of SSD: Single Shot MultiBox Object Detector. Reimplementation of https://github.com/weiliu89/caffe/tree/ssd
MIT License
764 stars 337 forks source link

Why number of labels has to be greater than 2 in MultiBoxTarget? #210

Open nttstar opened 6 years ago

nttstar commented 6 years ago

I saw one piece of code in MultiBoxTarget.cu below:

const int num_labels = labels.size(1);
CHECK_GT(num_labels, 2);

But why? I think one or two ground truth boxes are also valid for training.

zhreshold commented 6 years ago

Just to make reuse of some temporary buffer without malloc new space.

nttstar commented 6 years ago

So we have to append '-1's if there are only 1 or 2 labels?

zhreshold commented 6 years ago

correct

rkpandya commented 6 years ago

I am also training on a different dataset and face this issue. Where do I append '-1'?