Signature Detection

As of November 21st, Textract now supports signature detection as part of its document analysis API. This allows you to programmatically verify that a document is signed before proceeding with your data processing workflow.

Installation

To begin, install the amazon-textract-textractor package using pip.

pip install amazon-textract-textractor

There are various sets of dependencies available to tailor your installation to your use case. The base package will have sensible default, but you may want to install the PDF extra dependencies if your workflow uses PDFs with pip install amazon-textract-textractor[pdf]. You can read more on extra dependencies in the documentation

Examples of queries

[1]:
from PIL import Image
Image.open("../../../tests/fixtures/signature.jpg")
[1]:
../_images/notebooks_signature_detection_1_0.png

This form was signed by “John Doe” on January 1st 2022. Lets see if we can detect it with Textractor.

Calling Textract

[3]:
import os
from textractor import Textractor
from textractor.data.constants import TextractFeatures

extractor = Textractor(region_name="us-west-2")
document = extractor.analyze_document(
    file_source=Image.open("../../../tests/fixtures/signature.jpg"),
    features=[TextractFeatures.SIGNATURES],
)
[5]:
document.signatures[0].visualize()
[5]:
../_images/notebooks_signature_detection_5_0.png

Conclusion

Signature detection allows you to quickly verify that a document is signed while provided