argman / EAST

A tensorflow implementation of EAST text detector
GNU General Public License v3.0
3.01k stars 1.05k forks source link

Does normalize_poly in lanms have a bug in calculating the square distance? #312

Open minizon opened 5 years ago

minizon commented 5 years ago

As the code comment says that normalize_poly is used to find the right ordering for the vertices, it should fix the ref vertices while looping the p's ordering to calculate the minimum distance. However, the code seems to loop the ref's and p's ordering simultaneously, so the square distance may not work properly. ` for (size_t start = 0; start < 4; start ++) { size_t j = start; std::int64_t d = ( sqr(ref.poly[(j + 0) % 4].X - p.poly[(j + 0) % 4].X) #always 0-0, missing 0-1, 0-2, 0-3

d = ( sqr(ref.poly[(j + 0) % 4].X - p.poly[(j + 3) % 4].X) #0-3 or 0-1

SakuraRiven commented 4 years ago

I agree with you. Do you have a new fixed .whl ? @minizon