Done
- Implemented
xml_utils
. There are two ways taking care of the quad or oriented rectangles.crude_expand_box
is taking the xmax, xmin, ymax, ymin no matter what.- A quad to oriented rectangle to vertical box approach.
Assume we have a quad, we will first use
quad_to_rectangle
to produce an oriented rectangle coordinates from the quad. This step probably produce negative values, need to take care of this bycrop
function.Now we have an oriented rectangle, we will use
oriented_to_vertical
. We will use IoU to decide if the oriented box should go clockwise or counter clockwise. For example, we have three rectangles in the following image, the blue oriented one is the oriented rectangle we want to work on, vertical blue and horizontal red are two possible ways to rotate the blue one. Eventually we want to get red, horizontal one because it has a larger intersection of union.
- Most xml files have been modified.
- Some unexpected bug from creating dataset.
Todo
- There are chances that
quad_to_rectangle
produces negative coordinates which is beyond the image scope, so I need to write acrop
function to take care of that.