- Newest
- Most votes
- Most comments
The issues you're experiencing with AWS Textract regarding table orientation and OCR quality are known challenges that can occur during document analysis.
For the table orientation problem, Textract includes rotation information as part of its Geometry object. The service detects rotation angles between 0 and 360 degrees for text elements. In your case, it appears that Textract is incorrectly interpreting the orientation of your table, causing the 90-degree rotation where headers are appearing as a column instead of a row.
There are several potential approaches to address these issues:
-
Image Quality: Ensure your scanned documents have high resolution, good contrast, and are properly aligned. Poor image quality can affect both orientation detection and OCR accuracy.
-
Pre-processing: Consider pre-processing your images before submitting them to Textract. This might include:
- Explicitly correcting the orientation
- Enhancing contrast between text and background
- Removing noise or artifacts
- Post-processing: Implement post-processing logic to:
- Check and correct the orientation based on the rotation angle provided in the Geometry object
- Transpose the table data if needed to correct the orientation
- Apply validation rules to identify and correct common OCR errors
- Table Structure: If possible, ensure your tables have clear borders and consistent formatting, as complex table structures can sometimes confuse Textract's analysis.
For the OCR quality issues, Textract sometimes struggles with certain fonts, handwritten text, or special characters. The quality of the original document significantly impacts recognition accuracy. If the OCR errors persist despite having clear input images, you might need to implement additional validation and correction logic in your application.
If these issues continue despite your best efforts, it might be worth contacting AWS Support for more specific guidance, as they may be able to provide insights into any known limitations or upcoming improvements to the service.
Sources
Textract Layout Response Not In Document Order | AWS re:Post
Recognition of '1' from table filled in by hand | AWS re:Post
Locating Items on a Document Page - Amazon Textract
answered a year ago
Relevant content
asked a year ago
asked a year ago
asked 3 years ago
asked 4 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago
