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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ocrmypdf_easyocr-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 684536282e487e5ba6822b49a78c64b42249b6c7c95c0dfeeddcf546c87e9700 |
|
MD5 | 3cc412c203b2bf0b81a84f48d6557057 |
|
BLAKE2b-256 | 1088bdfce1b8e3365cf72d2fd26b4a435f831f01cfb36e59a1de9c26eb3ee240 |