Zzh-tju / CIoU

Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression (AAAI 2020)
GNU General Public License v3.0
319 stars 44 forks source link

the ciou loss vs. computeciou #8

Open ginobilinie opened 4 years ago

ginobilinie commented 4 years ago

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 commented 4 years ago

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

Zzh-tju commented 4 years ago

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

ginobilinie commented 4 years ago

I see. Thanks.

kelvinkoh0308 commented 3 years ago

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 commented 3 years ago

And also which one is suggested to follow

Zzh-tju commented 3 years ago

@kelvinkoh0308 both are ok

kelvinkoh0308 commented 3 years ago

@Zzh-tju thanks for your reply

kelvinkoh0308 commented 3 years ago

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