- Install the dependencies as required for your inference
- Recommended to use
conda
/virtualenv
for each type of inference to avoid version lock conflicts.
- If you're on Linux, best option:
sudo apt-get install tesseract-ocr-all
- If you're on Windows, use the latest installer from here and install all required languages by choosing that option during installation.
- Ensure it's properly installed by typing
tesseract
on command line. - Then:
pip install pytesseract
- Optional: To manually get language files, go here.
- Ensure PyTorch is installed (Optional: with CUDA+CuDNN for GPU)
- Install the library:
- For stable:
pip install easyocr
- For latest:
pip install git+https://github.com/JaidedAI/EasyOCR
- For stable:
- Sample config:
easy_ocr.json
- Languages supported | Parameters allowed
pip install google-cloud-vision
- Sample config:
google_ocr.json
- Ensure to set
service_account_json
path in config if not using GCP - Pricing
pip install craft-text-detector
- To run on GPU, install CUDA & CuDNN with corresponding PyTorch.
- Sample config:
craft+tesseract.json
OpenCV EAST Detector
- Uses OpenCV's DNN Module (CPU Only)
- Sample config:
east+tesseract.json
DB Text Detector
- Ensure the PyTorchOCR repo is cloned at
libs/PyTorchOCR
. - Sample config:
db+tesseract.json
- Ensure the Clova AI repo is cloned at
libs/clova_ai_recognition
. - (...TODO: Add more )
- Sample config:
craft+clova_ai.json