tetrak_ocr.backends.easyocr

OCR a single image file using EasyOCR and return the extracted text.

EasyOCR uses deep learning models (CRAFT for detection, CRNN for recognition) and works well on complex layouts, curved text, and images where Tesseract struggles. Unlike Tesseract it requires no system-level installation — everything runs through pip.

On first run the model weights are downloaded automatically (~100 MB). They are cached in ~/.EasyOCR/ and reused on subsequent calls.

Requires:

pip install easyocr

Usage (standalone):

tetrak-ocr ocr workspace/scans/my-postcard.jpg –backend easyocr

No preprocessing is applied; EasyOCR handles varied contrast and layouts internally via its neural network pipeline. PDF support is not included; convert PDFs to images first.

Functions

ocr_image(path)

Extract text from an image file using EasyOCR.