Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7a1b55b
chore: Code formatting and comments
nikos-livathinos Jun 26, 2026
74a5656
fix: Refactor the LayoutModel to decouple logic that sets the ocr_sco…
nikos-livathinos Jun 26, 2026
75f277c
feat: Refactor the pipelines to decouple the LayoutPostprocessor as a…
nikos-livathinos Jun 26, 2026
d434db5
feat: Re-order the stages in StandardPdfPipeline to do the layout bef…
nikos-livathinos Jun 26, 2026
ac148c0
chore: Code comments
nikos-livathinos Jun 26, 2026
092ef5a
feat: Basic implementation of OCR modes
nikos-livathinos Jun 29, 2026
b0eb74d
fix: Fix bug in the visualisation of the PDF cells for debugging
nikos-livathinos Jun 30, 2026
b76bfd4
fix: Fix scaling in OCR debugging visualisations
nikos-livathinos Jun 30, 2026
d2938fd
feat: Extend the debugging visualization of the PDF cells to draw bit…
nikos-livathinos Jun 30, 2026
e4ecaf4
feat: Interim debug block to generate report with counts of layout/pd…
nikos-livathinos Jun 30, 2026
fa0aa97
feat: Introduce _combine_clusters_and_cells() to combine layout and p…
nikos-livathinos Jul 1, 2026
3f7df24
fix: Remove the LAYOUT_OR_PDF mode from OCR
nikos-livathinos Jul 1, 2026
d0d8195
fix: Fix various issues in base_ocr_model.py
nikos-livathinos Jul 1, 2026
32ea8e8
feat: Refactor base_ocr_model.py and introduce ocr_rects deduplicatio…
nikos-livathinos Jul 1, 2026
1998def
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 2, 2026
f8df286
chore: Code styling
nikos-livathinos Jul 2, 2026
19987df
feat: Improve the logic for generating OCR rects around 3 OCR modes:
nikos-livathinos Jul 2, 2026
c965056
chore: Code naming
nikos-livathinos Jul 2, 2026
3b04945
fix: Modify the logic in the collection of ocr_rects out of the layou…
nikos-livathinos Jul 3, 2026
37a70f6
doc: Improve code comments
nikos-livathinos Jul 3, 2026
7041b0a
feat: Extend the logic of ocr_rect selection in BaseOcrModel to inclu…
nikos-livathinos Jul 3, 2026
a9450fd
fix: Refactor to deprecate the `OcrOptions.force_full_page_ocr` param…
nikos-livathinos Jul 3, 2026
33297d6
feat: Introduce OcrMode.FORCE_FULL_PAGE_OCR and deprecate the OcrOpti…
nikos-livathinos Jul 6, 2026
a437da6
chore: Code comments and names for base_ocr_model.py
nikos-livathinos Jul 6, 2026
863259c
feat: Rename the OCR modes and private code
nikos-livathinos Jul 6, 2026
c12347e
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 6, 2026
18b82de
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 6, 2026
9aea326
chore: Refactor the OcrMode to remove the PDF_AUGMENTED_LAYOUT. Comme…
nikos-livathinos Jul 6, 2026
a10323a
fix: Remove commented out code. Fix broken tests
nikos-livathinos Jul 6, 2026
1de8c7d
fix: Fix issues introduced after merging with main
nikos-livathinos Jul 6, 2026
18e3387
chore: Code comments
nikos-livathinos Jul 6, 2026
048c6a7
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 7, 2026
8b0c45e
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 7, 2026
2dd3b64
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 7, 2026
0c106c4
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 7, 2026
6efa217
chore: Rename the OcrModes as FULL_PAGE_OCR and CLUSTER_OCR
nikos-livathinos Jul 7, 2026
a515f28
feat: Introduce the OcrMode.PDF_CLUSTER_OCR and sunset the PDF_BITMAP…
nikos-livathinos Jul 8, 2026
f20bd12
chore: Code comments
nikos-livathinos Jul 8, 2026
51eb9d5
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 8, 2026
ada9519
refactor: Rename test GT files for OCR and nemotron-ocr. Refactor gro…
nikos-livathinos Jul 8, 2026
46da31d
chore: Rename general OCR GT files and refactor the groundtruth_paths…
nikos-livathinos Jul 8, 2026
230f5c8
chore: Generate GT for OCR for the PDF_CLUSTER_OCR mode
nikos-livathinos Jul 8, 2026
fe03362
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 9, 2026
1b814d7
chore: Rename the tests/data/scanned dir as tests/data/ocr
nikos-livathinos Jul 9, 2026
d0b0d3a
chore: Sunset the general OCR GT files
nikos-livathinos Jul 9, 2026
c512ee0
refactor: Reactor the GT files for OCR and organize them by engine/OC…
nikos-livathinos Jul 9, 2026
45d0690
chore: Generate GT for nemotron ocr
nikos-livathinos Jul 9, 2026
06a38e2
chore: Clean up code
nikos-livathinos Jul 9, 2026
5d0d454
chore: Clean up unused code
nikos-livathinos Jul 9, 2026
c64d619
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 13, 2026
a919cf3
docs: Update cli.md
nikos-livathinos Jul 13, 2026
66f7bbb
Merge branch 'main' into nli/layout_driven_pipelines
nikos-livathinos Jul 13, 2026
b917dc1
chore: Code clean up
nikos-livathinos Jul 13, 2026
cae07ea
feat: Introduce MergeCellsPriority parameter in BaseOcrModel. Current…
nikos-livathinos Jul 13, 2026
969ae93
feat: Introduce the OcrMode.Auto. Make the MergeCellsPriority private…
nikos-livathinos Jul 14, 2026
7a6ca10
chore: Clean up unused GT files
nikos-livathinos Jul 14, 2026
eebb782
chore: Rename the OcrModes
nikos-livathinos Jul 14, 2026
802d7c0
feat: Add more OCR tests to cover the LAYOUT_REGIONS OCR mode
nikos-livathinos Jul 14, 2026
ed96aa5
feat: Add more tests for the nemotron OCR model to cover the LAYOUT_R…
nikos-livathinos Jul 14, 2026
9841716
fix: Introduce OCR engine/mode specific GT for the webp tests. Fix bu…
nikos-livathinos Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions docling/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
AsrPipelineOptions,
ConvertPipelineOptions,
OcrAutoOptions,
OcrMode,
OcrOptions,
PdfBackend,
PdfPipelineOptions,
Expand Down Expand Up @@ -768,9 +769,19 @@ def convert( # noqa: C901
bool,
typer.Option(
...,
help="Replace any existing text with OCR generated text over the full content.",
help=(
"DEPRECATED: use `--ocr-mode full_page` instead. "
"Replace any existing text with OCR generated text over the full content."
),
),
] = False,
ocr_mode: Annotated[
OcrMode,
typer.Option(
...,
help="Which document regions are fed to the OCR engine.",
),
] = OcrMode.DEFAULT,
tables: Annotated[
bool,
typer.Option(
Expand Down Expand Up @@ -1095,9 +1106,20 @@ def convert( # noqa: C901
export_flags = _export_flags_from_formats(to_formats)

ocr_factory = get_ocr_factory(allow_external_plugins=allow_external_plugins)
# Deprecated --force-ocr wins over --ocr-mode; warn when used.
if force_ocr:
warnings.warn(
"`--force-ocr` is deprecated; use "
f"`--ocr-mode {OcrMode.FULL_PAGE.value}` instead.",
DeprecationWarning,
stacklevel=2,
)
resolved_ocr_mode = OcrMode.FULL_PAGE
else:
resolved_ocr_mode = ocr_mode
ocr_options: OcrOptions = ocr_factory.create_options( # type: ignore
kind=ocr_engine,
force_full_page_ocr=force_ocr,
mode=resolved_ocr_mode,
)

ocr_lang_list = _split_list(ocr_lang)
Expand Down
Loading
Loading