-
Notifications
You must be signed in to change notification settings - Fork 58
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
Rectify text lines before recognition #33
Comments
Example of an image where this comes up (source): Text line images from the slides currently look like this when input to the recognition model (see output of If the line were rectified first, the accuracy should improve a lot. |
Reference implementation using OpenCV's image transform functions. Usage:
Note the coordinate order is clockwise from top left. This produces From the rectified image, Ocrs is able to correctly extract the text, whereas from the original the output is garbage. |
Ocrs does not currently apply any perspective correction to extracted text lines before applying recognition. The recognition model is trained to handle skewed and rotated inputs, but this only works for moderate rotation. Text lines with significant rotation will have their characters squashed in the vertical direction during preprocessing, as recognition inputs have a fixed height of 64px. This harms recognition accuracy.
The library should rectify line images before recognition to better handle rotated/skewed inputs.
The text was updated successfully, but these errors were encountered: