YOLOv4-pytorch icon indicating copy to clipboard operation
YOLOv4-pytorch copied to clipboard

CIoU computation

Open a-haja opened this issue 3 years ago • 1 comments

I would like to ask about the computation of the CIoU. Based on https://www.programmersought.com/article/33648955485/ CIoU is defined as follows:

CIoU = 1 - IoU + dist(b, b_gt) / c**2 + alpha*v

However in the code: https://github.com/argusswift/YOLOv4-pytorch/blob/a0627679f38af811a8311a3d12213fe789ce1e6b/utils/tools.py#L283

Can you please explain why the formel looks different?

I found an implementation for the correct CIoU here https://github.com/VCasecnikovs/Yet-Another-YOLOv4-Pytorch/blob/2e18612e1852abbf35b4dac55a00f2a3b2d814ed/model.py#L527-L561

a-haja avatar Jul 14 '21 12:07 a-haja

I also found different variations of the ciou measurement but i also found that it is pretty much similar to what is done in the scaled yolov4 (https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/utils/general.py).

faresbs avatar Aug 30 '21 16:08 faresbs