Skip to main content

Plugin to run OCRmyPDF with the EasyOCR engine

Project description

OCRmyPDF EasyOCR

This is 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.

Installation

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

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

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

The OCRmyPDF-EasyOCR will override Tesseract for OCR; however, OCR still depends on Tesseract for some tasks.

If Celery's multiprocessing is installed in the virtual environment, it will be used instead of the standard Python multiprocessing. This allows paperless-ngx, which uses Celery, to function correctly.

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.

To do

Contributions, especially pull requests are quite welcome!

At the moment this plugin is alpha status and missing some essential features:

  • Tesseract is still required for determine page skew and for orientation correction
  • EasyOCR is effectively single threaded, to eliminate race conditions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocrmypdf_easyocr-0.2.1.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

ocrmypdf_easyocr-0.2.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file ocrmypdf_easyocr-0.2.1.tar.gz.

File metadata

  • Download URL: ocrmypdf_easyocr-0.2.1.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for ocrmypdf_easyocr-0.2.1.tar.gz
Algorithm Hash digest
SHA256 48853f3b79b064021e0b00a8e374153483d1dbd2ffc243e9e75104a7237f1094
MD5 8ef46f7bb4d506e7a6142b57400bb295
BLAKE2b-256 63b642425d1ae13bead922da79b6d66e3f48a684e37ee745a0a94c4ce518e6a4

See more details on using hashes here.

File details

Details for the file ocrmypdf_easyocr-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ocrmypdf_easyocr-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 684536282e487e5ba6822b49a78c64b42249b6c7c95c0dfeeddcf546c87e9700
MD5 3cc412c203b2bf0b81a84f48d6557057
BLAKE2b-256 1088bdfce1b8e3365cf72d2fd26b4a435f831f01cfb36e59a1de9c26eb3ee240

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page