ssd.pytorch
ssd.pytorch copied to clipboard
Training when images may not have any ground truth bboxes
Hi,
I've a dataset which has images which may or may not have ground truth boxes. I've tweaked the dataloader and MultiboxLoss accordingly. In cases where the image doesn't have any ground truth bbox, loss_l is zero (because all default boxes are negative, and loss_l is computed only for positive default boxes) and I take top 10 negative default boxes (HNM) and compute loss_c. Normally, the loss is averaged out using the number of positive default boxes, what about the case I mentioned, where we don't have any positive default box? or what else I should take into account in such case.
I also meet the same question.Have you solved it?
I set [0,0,0,0] as a box for those cases and it works pretty well. (All the priors come out to be negative, so no loc_loss for them and all of them are expected to be background for cls_loss computation).
That also solved my problem. Thanks.
@pyaf hello, did you ever trained SSD for coco keypoints dataset?
@pyaf can you post the code you used please? i use [0, 0, 0, 0] as a box
and I still get a loc_loss != 0
What are the modifications you implemented in multibox_loss.py?
Thank you!
@pyaf can you post the code you used please? i use
[0, 0, 0, 0]as a box and I still get aloc_loss != 0What are the modifications you implemented in multibox_loss.py? Thank you!
have you tried implementing this?