tetrak_ocr.backends.paddle_vl¶
OCR a file using PaddleOCR-VL and return the extracted text.
PaddleOCR-VL is a document vision-language model: a ~0.9B-parameter NaViT-style vision encoder over a small ERNIE decoder, published by Baidu under Apache 2.0. Unlike the classical paddle backend, which detects glyph boxes and classifies each one, this generates the transcript conditioned on the image.
It ships in the same paddleocr package as paddle and is a separate backend rather than a flag on it, for the same reason tesseract-auto is separate: the harness scores backends, so the difference between the two becomes a measurement instead of a claim.
- Requires:
pip install “tetrak[paddle-vl]”
- Usage (standalone):
tetrak-ocr ocr workspace/scans/my-postcard.jpg –backend paddle-vl
On first run the model weights (~1 GB) download automatically and are cached under ~/.paddlex/official_models/, so the first call is slow and later ones are not. It is slow even warm – on CPU a dense newspaper page took over ten minutes against tesseract’s fraction of a second – which makes it a batch backend rather than an interactive one.
Functions
|
Extract text from an image or PDF using PaddleOCR-VL. |