Skip to main content

OCRmyPDF EasyOCR

This is a plugin to run OCRmyPDF with the EasyOCR engine instead of Tesseract OCR, the default OCR engine for OCRmyPDF. Since EasyOCR is based on PyTorch, it makes use of Nvidia GPUs. Hopefully it will be more performant and accurate than Tesseract OCR.

It is currently experimental and does not implement all of the features of OCRmyPDF with Tesseract, and still relies on Tesseract for certain operations.

Requirements

  • OCRmyPDF 17 or newer. As of 0.3.0, this plugin returns structured OCR results to OCRmyPDF, which renders the text layer itself using its built-in renderer. (For OCRmyPDF 14–16, use a < 0.3.0 release of this plugin.)
  • Python 3.11 or newer.

Installation

To use this plugin, first install PyTorch according to the official instructions, which may differ for your platform.

Then install OCRmyPDF-EasyOCR into the same virtual environment or conda environment as you installed PyTorch:

pip install git+https://github.com/ocrmypdf/OCRmyPDF-EasyOCR.git

Once installed, the plugin is discovered automatically through its entry point, and OCRmyPDF uses EasyOCR for OCR by default (i.e. for --ocr-engine auto). You can also select it explicitly with --ocr-engine easyocr, or fall back to the built-in engines with --ocr-engine tesseract / --ocr-engine none. OCR still depends on Tesseract for some non-OCR tasks (see below).

Development

This project uses uv for package management.

uv sync --group test   # create the virtual environment and install dependencies
uv run pytest          # run the test suite

The tests need poppler's pdftotext and a Tesseract installation available on PATH, and will download EasyOCR's models on first run.

Troubleshooting

If you see a log message Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU then PyTorch is not installed with GPU support.

Pass --easyocr-no-gpu to force CPU mode, or --easyocr-batch-size to tune the EasyOCR batch size.

To do

Contributions, especially pull requests, are quite welcome!

This plugin is experimental and is missing some features:

  • Tesseract is still required to determine page orientation.
  • EasyOCR is effectively single-threaded, to eliminate race conditions; OCRmyPDF still parallelizes other stages of the pipeline across pages.

Metadata

Release files for ocrmypdf-easyocr 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ocrmypdf-easyocr 0.3.0
File Size Uploaded Provenance Actions
ocrmypdf_easyocr-0.3.0.tar.gz 188.2 kB With provenance Details for ocrmypdf_easyocr-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ocrmypdf-easyocr 0.3.0
File Interpreter ABI Platform Actions
ocrmypdf_easyocr-0.3.0-py3-none-any.whl Python 3 none any Details for ocrmypdf_easyocr-0.3.0-py3-none-any.whl

Total release size: 197.7 kB

Release files / ocrmypdf_easyocr-0.3.0.tar.gz

Download URL ocrmypdf_easyocr-0.3.0.tar.gz
Size 188.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0f9d2d28ca6eb5e32f07133bf8c94c0990c7f73af50d0480f6ec48b6bc6456a9
BLAKE2b-256 checksum
How to use checksums
a8002dd828cd51b38f72f570cd17c80bddca5c1bab55ccb5fa07b6ad44ad995c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / ocrmypdf_easyocr-0.3.0-py3-none-any.whl

Download URL ocrmypdf_easyocr-0.3.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22ebb336a70f9d0d598034fb52314a60b624d748759a140ab84be3d03697ba52
BLAKE2b-256 checksum
How to use checksums
3eaec7a20ae350d9d8d66f8f9e96036c54dc28b83463dba8f0372148ae3bb958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Security for ocrmypdf-easyocr 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ocrmypdf_easyocr-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page