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

Add possibility to deactivate OCR #2467

Open
thomascerbelaud opened this issue Jan 29, 2024 · 1 comment · May be fixed by #3839
Open

Add possibility to deactivate OCR #2467

thomascerbelaud opened this issue Jan 29, 2024 · 1 comment · May be fixed by #3839
Labels
enhancement New feature or request

Comments

@thomascerbelaud
Copy link

Is your feature request related to a problem? Please describe.
I am working on large text-based PDF files, and would like to parse them as fats as possible, while keeping a high resolution (strategy="hi_res"). I am interested in extracting tables, and tables from pictures, however I would like to deactivate OCR for images detected as such. The first obvious reason is speed. But also images do not matter much.

Describe the solution you'd like
A keyword argument that would enable or disable OCR would be the most easy thing to code I guess and would be a nice additional feature, especially if it can differentiate between tables and images. Another nice feature would be to not perform OCR on tables for text-based regions, in order to speed the partition process.

Describe alternatives you've considered
Adding a new OCRMode.NO_OCR

Additional context
I am not interested in images s.a. graphs or photos.

@dhdaines
Copy link

dhdaines commented Dec 17, 2024

Yes, not only is OCR super slow, but table contents are frequently mangled because infer_table_structure uses OCR rather than any existing text.

This seems like an important problem for people who care about the quality of their data (so, I guess, not anyone using Generative AI, but...)

The Aryn partitioner does not insist on OCRing everything, but unfortunately it is tightly bound to a different framework which is not as nice as Unstructured for casual use cases...

dhdaines pushed a commit to dhdaines/unstructured that referenced this issue Dec 17, 2024
dhdaines pushed a commit to dhdaines/unstructured that referenced this issue Dec 17, 2024
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

Successfully merging a pull request may close this issue.

2 participants