Repository navigation
Conversation
Infographic regions found by page elements were not OCR'd unless extract_infographics was set, so their text never reached the index. Default it to True and add --no-extract-infographics to the CLI.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
[Medium impact] The PR appears safe to merge; both previous findings are addressed, and no new actionable issue was found. SummaryEnables infographic extraction by default while preserving an explicit opt-out.
|
jperez999
left a comment
There was a problem hiding this comment.
Reviewed correctness, design/reuse, minimality, scope, tests, and relevant PR dependencies. No additional inline finding, but the existing caption-loss concern remains valid and unresolved: #2863 (comment) . With captioning enabled, automatic dedup can remove an image overlapping an infographic, while caption_infographics=False prevents a replacement caption; an infographic with no OCR text can then contribute no text-search content. The PR description now discloses this behavior, so it is not an undisclosed scope expansion, but the regression still needs an explicit decision before merge. I have not duplicated that inline thread. The default/CLI flag diff is otherwise small and reuses existing routing. Validation: 150 selected planning/CLI tests passed; eight cases were excluded for local help-format and unchanged Ray schema-test failures. Land #2864 first as requested. GPU quality/performance was not rerun.
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
…aption mock Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
There was a problem hiding this comment.
Devin Review found 3 findings. Devin automatically fixed all 3 findings.
Fixed by Devin (3)
- Conflicting infographic caption requirements — The Omni caption targets sentence now includes infographics that replace a deduplicated image crop.
- Caption test lacks a model spec — The replacement-caption tests now use MagicMock(spec_set=["caption_batch"]).
- Batch captioning skips replacement infographics — The caption loop now accepts NumPy-array infographic cells and checks bbox with
is None, so Arrow-backed batches caption replacing infographics. A new Arrow-backed test covers this.
Description
Page elements labels infographic regions on many pages. With
extract_infographics=False(the default), the OCR pass never reads those crops, so text drawn inside the infographic image is not indexed. This PR changes theExtractParams.extract_infographicsdefault toTrue. It also adds--no-extract-infographicsto the CLI, so the flag can still be turned off.Measured on current
main(ebc87c9, which includes #2839), bo10k (10,000 PDFs, 213,538 pages),pdfium_hybrid, page-level text embeddings, dense top-10, no rerank, 2× RTX PRO 6000:extract_infographics=False(current default)extract_infographics=TrueRecall@10 goes up 11.5 points for about 9% fewer pages/s. Almost all of the gain is on infographic queries (356 of 1,347). On an earlier commit without #2839, those went from 0.334 to 0.792, and the other query types moved by at most 1.2 points (chart 0.884 → 0.896, table 0.919 → 0.919, text 0.898 → 0.902). On current
mainwith the flag off, infographic Recall@10 is 0.371, so #2839 recovers only a small part of the gap. ViDoRe v3 (all 8 subsets,text_image, unweighted mean) moves from 0.6360 to 0.6370. The infographic OCR path is untuned, so tuning should win back the pages/s cost.ExtractParamsdefault, the CLI flag pair, caption coverage for infographics that replace deduplicated image crops, the tests that asserted the old default, and the multimodal extraction docs.extract_infographics=Falsekeeps today's behavior.method="nemotron_parse": regions Parse classifies as infographic now go to the infographic channel instead of page text. Not measured in this PR.replaces_image=True, and captioning captions marked infographics even withcaption_infographics=False, writing the VLM text to theircaptionfield. The region keeps a visual description, and unmarked infographics behave as before.pyteston every test file that referencesinfographicorExtractParams: 1,649 passed. New tests intest_dedup.pyandtest_caption.pycover the caption path.pre-commiton the changed files passed.Checklist
Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/f1b18f26cd8b480b883b4fdd5fabab63
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/f1b18f26cd8b480b883b4fdd5fabab63?variant=devin
Requested by: @jioffe502
🟢 Devin fixed all 3 findings · Follow Devin's work