ZeroE04 / R-CenterNet

detector for rotated-object based on CenterNet/基于CenterNet的旋转目标检测
398 stars 97 forks source link

bbox annotation format? #5

Open edwardnguyen1705 opened 4 years ago

edwardnguyen1705 commented 4 years ago

Dear @ZeroE04 , Thank you for sharing your work. I am not clear about the bbox annotation of your dataset. I guess it is in xc, yc, w, h, ang, but I do not know how w, h are measured, parallel to the image coordinates or from the cv2.minAreaRect? https://github.com/ZeroE04/R-CenterNet/blob/828184bb8d7f93b0ed5199009234bda1c1a02c17/dataset.py#L221

For my dataset

     rect = cv2.minAreaRect(hull)
     xc, yc = rect[0][0], rect[0][1]
     w, h = rect[1][0], rect[1][1]
     angle = rect[2]
     angle = ange_to_0_180(angle)
     rbbox = [xc, yc, w, h, angle]

So, with my bbox annotation, I do not have to use the coco_box_to_bbox function right? Thank for your time.

ZeroE04 commented 4 years ago

Dear @ZeroE04 , Thank you for sharing your work. I am not clear about the bbox annotation of your dataset. I guess it is in xc, yc, w, h, ang, but I do not know how w, h are measured, parallel to the image coordinates or from the cv2.minAreaRect? https://github.com/ZeroE04/R-CenterNet/blob/828184bb8d7f93b0ed5199009234bda1c1a02c17/dataset.py#L221

For my dataset

     rect = cv2.minAreaRect(hull)
     xc, yc = rect[0][0], rect[0][1]
     w, h = rect[1][0], rect[1][1]
     angle = rect[2]
     angle = ange_to_0_180(angle)
     rbbox = [xc, yc, w, h, angle]

So, with my bbox annotation, I do not have to use the coco_box_to_bbox function right? Thank for your time.

I'm very sorry to hear from you so late. For the concept of w and h, please refer to the original project of CenterNet: https://github.com/xingyizhou/centernet

and, i am push the labelGenerator of this work, you can have a look, good luck for you!

gengyanlei commented 3 years ago

这个和opencv版本有关,不同版本的opencv角度定义不一样,需要注意 https://blog.csdn.net/LEILEI18A/article/details/115006688

zhaozhiyi11 commented 3 years ago

这个和opencv版本有关,不同版本的opencv角度定义不一样,需要注意 https://blog.csdn.net/LEILEI18A/article/details/115006688

请问博主知道怎样从minAreaRect函数标记的box转换到Rcenternet可用的box