Replies: 2 comments
-
|
Hi @catmanjan! I'm Dosu and I'm helping the IBM Docling team. Docling does come with built-in OCR engines. You don't need to bring your own. The bundled options are:
There's also a KServe v2 option for remote OCR inference servers, and plugin support for external engines like SuryaOCR [4]. How to trigger OCR on an image or scanned PDF: from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions, EasyOcrOptions
from docling.datamodel.base_models import InputFormat
pipeline_options = PdfPipelineOptions(
do_ocr=True,
ocr_options=EasyOcrOptions(lang=["en"])
)
converter = DocumentConverter(
format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)}
)
result = converter.convert("your_file.pdf") # also works with image files
print(result.document.export_to_markdown())OCR is enabled by setting To switch engines, just swap To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
-
|
Can a human verify what is said above? So IBM docling has easyocr as a default dependency? Who is easyocr and how are they related to IBM? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I read the docling site and it mentions OCR - in the sense that you can pick your OCR model to use
does this mean docling doesnt come with an OCR engine? If it does, which ones does it come with and how do you trigger an OCR of an image for example?
Beta Was this translation helpful? Give feedback.
All reactions