-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: box angle rectification according to the quadrant #667
Conversation
@charlesmindee there is still a failing job for the analysis script :/ |
Yes I need to debug everything, I'll tell you when it's ready! |
Codecov Report
@@ Coverage Diff @@
## main #667 +/- ##
==========================================
- Coverage 96.35% 96.25% -0.10%
==========================================
Files 117 117
Lines 4466 4485 +19
==========================================
+ Hits 4303 4317 +14
- Misses 163 168 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
It should be OK! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added a few comments, could you add an illustration in the PR?
It's hard without drawing the reasoning behind this 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
This PR provides an heuristic to determine the quadrant of the document (only 2 quadrants are allowed, +90 and -90 with respect to the horizontal). The quadrant is determined with the median aspect ratio of cv2 min area rect, and then we can rectify boxes knowing the quadrant.
This is not a long-term fix, we should add a classifier to resolve the angle of each box perfectly, but for the moment I couldn't find anything else to fix this issue.
Any feedback is welcome!