aws-samples / aws-samples/amazon-textract-textractor

Access Non-Axis-Aligned Bounding Boxes

Open
#359 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
493
Forks
163
PR merge metrics
No merged PRs in 30d

Description

Hi all,

Based on my understanding, Textract provides an axis-aligned BoundingBox object and a Polygon object which is composed of more specific points (https://docs.aws.amazon.com/textract/latest/dg/text-location.html). It seems that Textractor only provides the BoundingBox object.

When documents contain significant skew or rotation, axis-aligned boxes will be much larger than non-axis-aligned boxes, and they won't neatly match up with the actual position of the text.

I've attached an example input document, an output text layer using Textractor results, and an output text layer from a different OCR inference that provided non-axis-aligned bounding boxes to hopefully make this easy to visualize.

[input_document.pdf](https://github.com/aws-samples/amazon-textract-textractor/files/15004804/input_document.pdf)
[text_layer_non-aabb.pdf](https://github.com/aws-samples/amazon-textract-textractor/files/15004805/text_layer_non-aabb.pdf)
[text_layer_textractor_aabb.pdf](https://github.com/aws-samples/amazon-textract-textractor/files/15004806/text_layer_textractor_aabb.pdf)

Is it possible to add the Polygon object in Textractor? It would be a big help!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.