hukaixuan19970627 / yolov5_obb

yolov5 + csl_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)基于yolov5的旋转目标检测
GNU General Public License v3.0
1.82k stars 425 forks source link

I found a bug that severely affects your model #315

Closed 18112330636 closed 2 years ago

18112330636 commented 2 years ago

You are using the giou of the outer frame during training, but this is obviously a problem. If the center of a square is rotated ten degrees to the left and ten degrees to the right, the poly IOU difference is very large, and the IOU difference of the outer frame is very small, which will affect For the convergence of the model, it is recommended to change the IOU of the outer frame to poly IOU or rotate IOU

18112330636 commented 2 years ago

Can you put the angle directly into the IOU and use the latest KF IOU

18112330636 commented 2 years ago

Moreover, it is wrong to use the IOU of the outer frame when calculating the map, and the IOU of the two identical frames with a certain angle to the center left and the center right is problematic.

hukaixuan19970627 commented 2 years ago

In validation yolov5_obb caculate the HBB mAP for faster training, you can get the obb mAP by using DOTA_devkit/dota_evaluation_task1.py. For example: image

hukaixuan19970627 commented 2 years ago

And I think you may have some misconceptions about this repo. In yolov5_obb:

    CIoU Loss -> (cx, cy, w, h)
    Circular Smooth Label+BCELoss -> (θ)
    BCELoss(pred, detached CIoU ×gt) -> (obj)

Yours:

    R-IoU/R-GIoU/.../KFIoU Loss -> (cx, cy, w, h, θ)
    BCELoss(pred, detached R-IoU ×gt) -> (obj)

Both can be used to detect oriented objects.