According to find_min_rect_angle
Closed this issue · 3 comments
Hi dear @SakuraRiven, great thanks for your practical re-implement. It's much more clearer than the other version.
I wanna know why you're doing find_min_rect_angle? Are you doing something like finding a best-matched AABB (Axis Aligned Bounding Box) by rotating each BBOX? (like below)
THANKS in advance!
For a text boundary with 8 vertices, we want to find its best matched rotated bbox so that the model learning (distance + angle) would be more easier. So we search and find the best angle with min error, i.e., the min optimization for model.
In cal_error():
err = cal_distance(x1, y1, x_min, y_min) + cal_distance(x2, y2, x_max, y_min) + cal_distance(x3, y3, x_max, y_max) + cal_distance(x4, y4, x_min, y_max)
You actually calculating the distance in my first image. I think you may want to calculate the below one? In which x1y1 corresponds to xmin ymax
For a text boundary with 8 vertices, we want to find its best matched rotated bbox so that the model learning (distance + angle) would be more easier. So we search and find the best angle with min error, i.e., the min optimization for model.
thanks, I think you are right. I forgot that the x y are coordinate from left-top.