simple-faster-rcnn-pytorch icon indicating copy to clipboard operation
simple-faster-rcnn-pytorch copied to clipboard

calculating localization loss

Open daodaofr opened this issue 6 years ago • 2 comments
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

daodaofr avatar Dec 03 '18 09:12 daodaofr

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?

pangkun248 avatar Feb 12 '20 16:02 pangkun248

Because gt_label has elements as -1.

CloudShen-107 avatar Jun 04 '20 06:06 CloudShen-107