Python library for document image augmentation
Top 68.4% on sourcepulse
Augraphy is a Python library designed to generate realistic synthetic document distortions simulating paper printing, faxing, scanning, and copying processes. It targets AI/ML researchers and engineers working on document analysis tasks like OCR, form recognition, and document restoration, enabling the creation of large, diverse training datasets from clean source documents.
How It Works
Augraphy employs a pipeline-based approach. It first extracts text and graphics ("ink") from a clean document, then applies a series of distortions to this ink layer. Simultaneously, a "paper factory" provides a base paper layer, which can also undergo distortions. The processed ink and paper layers are merged, and further augmentations like folds or physical deformations are applied. This layered, multi-stage process allows for the creation of highly varied and realistic degraded document images.
Quick Start & Requirements
pip install augraphy
opencv-python
).from augraphy import *
pipeline = default_augraphy_pipeline()
augmented = pipeline(image)
doc
directory.Highlighted Details
Geometric
and SectionShift
achieving high image throughput.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 week ago
1 day