CIoU icon indicating copy to clipboard operation
CIoU copied to clipboard

the ciou loss vs. computeciou

Open ginobilinie opened this issue 4 years ago • 8 comments

Thanks for sharing the code.

I have noticed that in your other repositories (for example, https://github.com/Zzh-tju/DIoU-pytorch-detectron), you implement the computeciou function as the ciou loss, which is different from the implementation in this repository. I'm wondering why the implementation is different and which one do you suggest to use?

ginobilinie avatar Jun 24 '20 06:06 ginobilinie

OR ciou is only for ssd/yolact and computeciou for faster-rcnn/mask-rcnn?

ginobilinie avatar Jun 24 '20 06:06 ginobilinie

The difference is due to the different variables feed in the function. You just choose them according to your basic model.

Zzh-tju avatar Jun 24 '20 11:06 Zzh-tju

I see. Thanks.

ginobilinie avatar Jun 26 '20 07:06 ginobilinie

Hi, In compute_ciou function, you implemented as with torch.no_grad(): S = 1 - iouk alpha = v / (S + v) But in ciou function, you implemented as with torch.no_grad(): S = (iou>0.5).float() alpha= S*v/(1-iou+v) Can I know what is the difference between these two?

kelvinkoh0308 avatar Aug 05 '20 06:08 kelvinkoh0308

And also which one is suggested to follow

kelvinkoh0308 avatar Aug 05 '20 06:08 kelvinkoh0308

@kelvinkoh0308 both are ok

Zzh-tju avatar Aug 05 '20 10:08 Zzh-tju

@Zzh-tju thanks for your reply

kelvinkoh0308 avatar Aug 06 '20 01:08 kelvinkoh0308

@Zzh-tju can I know what is the reason that you add S = (iou>0.5).float() ?

kelvinkoh0308 avatar Aug 10 '20 12:08 kelvinkoh0308