How to convert horizontal bounding box coordinates to oriented bounding box coordinates
I am trying to detect oriented bounding boxes with faster rcnn for a long time, but I could not make it to do so. I aim to detect objects in the DOTA dataset. I was using built-in faster rcnn model in pytorch, but realized that it does not support OBB. Then I found another library named detectron2 that is built on the pytorch framework. Built-in faster rcnn network in detectron2 is actually compatible with OBB but I could not make that model work with DOTA. Because I could not convert DOTA box annotations to (cx, cy, w, h, a)
. In DOTA, objects are annotated by coordinates of 4 corners which are (x1,y1,x2,y2,x3,y3,x4,y4)
.
I can't come up with a solution that converts these 4 coordinates to (cx, cy, w, h, a)
, where cx
and cy
are the center point of OBB and w
, h
, and a
are width, height and angle respectively.
Is there any suggestion?
Topic faster-rcnn object-detection pytorch deep-learning python
Category Data Science