tianzhi0549 / FCOS

FCOS: Fully Convolutional One-Stage Object Detection (ICCV'19)
https://arxiv.org/abs/1904.01355
Other
3.28k stars 630 forks source link

pos_inds #125

Closed mama110 closed 5 years ago

mama110 commented 5 years ago

My dataset only has 1 class, and labels from targets are zeros, so if i run the code bellow: pos_inds = torch.nonzero(labels_flatten > 0).squeeze(1)

the result is empty, hence, centerness_loss and reg_loss are empty too.

What should I do to fix it?

Baby47 commented 5 years ago

Hi @ mama110, I have encountered the same problem , the pos_inds is all zero. Have you figured out this question and give me some suggestions? Thank you

mama110 commented 5 years ago

Because my dataset only has one label, and the label index is 0, so all the pos_inds is 0. I've modify the label index to 1, and I solved it.