Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make EasyOCR optional dependency #648

Closed
jaluma opened this issue Dec 23, 2024 · 1 comment
Closed

Make EasyOCR optional dependency #648

jaluma opened this issue Dec 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jaluma
Copy link

jaluma commented Dec 23, 2024

Requested Feature

It would be beneficial to make OCR models optional during installation, with EasyOCR remaining as the default option. In our case, we use TesseractOCR but are required to install EasyOCR since it's currently mandatory, even though we don't use it.

Here's a proposed installation approach:

  1. All OCR models:
    pip install docling[all]

  2. EasyOCR only (default installation):
    pip install docling[easyocr]

  3. Specific OCR models:
    pip install docling[tesseract]

  4. Base installation (no OCR models):
    pip install docling

Alternatives

  1. Install Docling as is - This installs EasyOCR and its dependencies even when they're not needed.
  2. Install Docling without dependencies - This requires significant maintenance effort on our end to ensure version compatibility.
@jaluma jaluma added the enhancement New feature or request label Dec 23, 2024
@cau-git
Copy link
Contributor

cau-git commented Jan 6, 2025

@jaluma We have been considering different options, including no OCR as default, but we decided against that. To have a seamless out-of-the-box experience, EasyOCR is installed always as a dependency but no OCR models are downloaded unless you actually use EasyOCR the first time. This keeps the overhead minimal, since most of EasyOCRs dependencies are anyway shared with other packages we need.

@cau-git cau-git closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants