yhenon / pytorch-retinanet

Pytorch implementation of RetinaNet object detection.
Apache License 2.0
2.14k stars 664 forks source link

question about loss #225

Open beomgonyu opened 3 years ago

beomgonyu commented 3 years ago

in advance, thanks for your code.

  1. cls loss. I think a value is wrong now a value is assigned 0 (back ground) for 0.75, and 1 for 0.25, i think it should be inversed. 2 reg loss what is [0.1, 0.1, 0.2, 0.2]] and what for 9.0?? targets = targets/torch.Tensor([[0.1, 0.1, 0.2, 0.2]])
regression_loss = torch.where( torch.le(regression_diff, 1.0 / 9.0), 0.5 * 9.0 * torch.pow(regression_diff, 2), regression_diff - 0.5 / 9.0 )

thanks

R-Sadeghi commented 1 year ago

Thanks for your code.

I have the same question and would be thankful if you answer it.

cirorusso2910 commented 1 year ago

Hi, I think that: