DIoU-pytorch-detectron icon indicating copy to clipboard operation
DIoU-pytorch-detectron copied to clipboard

CIou

Open alicera opened this issue 4 years ago • 4 comments

Hi, tju Thanks for your project. I try to use the ciou loss and add it to the project https://github.com/biubug6/Pytorch_Retinaface But it seem to get the same precision AP. Do you have any idea?

alicera avatar Jun 04 '21 16:06 alicera

Which loss is your baseline? BBox reg loss just facilitates the model training. Label assignment is also an important indicator. Better label assignment will ease the training difficulty, making the CIoU loss obtain less improvement.

Zzh-tju avatar Jun 04 '21 16:06 Zzh-tju

I directly use the ciou function, because the project also use the multibox of ssd. So it can easy to add it. And I get the same good result when change the SmoothL1 loss to ciou loss on location(x,y,w,h). Do you have any idea? https://github.com/Zzh-tju/CIoU/blob/master/layers/modules/multibox_loss.py#L11

alicera avatar Jun 05 '21 04:06 alicera

what is your reg loss weight when switching to CIoU?

Zzh-tju avatar Jun 05 '21 04:06 Zzh-tju

I test the two reg loss weight. One is 2. The other is 16. https://github.com/biubug6/Pytorch_Retinaface/blob/master/data/config.py#L29

Loc

''' Epoch:97/100 || Epochiter: 716/1010 || Iter: 97676/101000 || Loc: 0.1373 Cla: 0.5106 Landm: 0.3921 prop: 0.4671|| LR: 0.00005000 || Batchtime: 1.0305 s || ETA: 0:57:06 torch.Size([21, 3, 640, 640]) Epoch:97/100 || Epochiter: 717/1010 || Iter: 97677/101000 || Loc: 0.1677 Cla: 0.9701 Landm: 1.3356 prop: 0.4434|| LR: 0.00005000 || Batchtime: 1.0676 s || ETA: 0:59:08 torch.Size([21, 3, 640, 640]) Epoch:97/100 || Epochiter: 718/1010 || Iter: 97678/101000 || Loc: 0.1707 Cla: 0.8567 Landm: 0.6479 prop: 0.3464|| LR: 0.00005000 || Batchtime: 1.0307 s || ETA: 0:57:05 torch.Size([21, 3, 640, 640]) Epoch:97/100 || Epochiter: 719/1010 || Iter: 97679/101000 || Loc: 0.1552 Cla: 0.5850 Landm: 0.5912 prop: 0.3076|| LR: 0.00005000 || Batchtime: 1.0605 s || ETA: 0:58:42 torch.Size([21, 3, 640, 640]) Epoch:97/100 || Epochiter: 720/1010 || Iter: 97680/101000 || Loc: 0.1616 Cla: 0.8731 Landm: 0.7896 prop: 0.4784|| LR: 0.00005000 || Batchtime: 1.0446 s || ETA: 0:57:49 torch.Size([21, 3, 640, 640]) Epoch:97/100 || Epochiter: 721/1010 || Iter: 97681/101000 || Loc: 0.1620 Cla: 0.7691 Landm: 0.7850 prop: 0.6087|| LR: 0.00005000 || Batchtime: 1.0502 s || ETA: 0:58:06 torch.Size([21, 3, 640, 640]) '''

alicera avatar Jun 05 '21 04:06 alicera