simple-faster-rcnn-pytorch
simple-faster-rcnn-pytorch copied to clipboard
calculating localization loss
trafficstars
https://github.com/chenyuntc/simple-faster-rcnn-pytorch/blob/6a538bdd113bab649f388aa48193c1b1ccc48ee6/trainer.py#L257
I find a small issue. why in this line gt_label can be equal to zero? loc_loss /= ((gt_label >= 0).sum().float()) # ignore gt_label==-1 for rpn_loss
But in Line 254, gt_lable can only be greater than 0: in_weight[(gt_label > 0).view(-1, 1).expand_as(in_weight).cuda()] = 1
I am also confused about the code in this place, and if this is modified, mAP will not be as good as before. Have you figured out why it is written here?
Because gt_label has elements as -1.