why my document is not OCR executed #662
Replies: 1 comment
|
What you’re seeing is usually not a bug in NeMo Retriever, but a consequence of how the pipeline decides whether to run OCR vs treating a page as an image. 1. Key point: OCR is not automatically triggered just because a PDF is scannedIn your config: .extract(
document_type="pdf",
extract_text=True,
extract_images=True,
text_depth="page"
)You enabled:
But you did not explicitly enable a forced OCR / layout parsing path. So the pipeline typically does:
If the document is a scanned PDF, but:
👉 then it may route it into image understanding instead of OCR 2. Why your output shows image_caption instead of OCR textThis line is the key: That means:
So instead of: you got: 3. Most likely cause in your config❗ Missing explicit OCR / parsing strategyYou commented out the key option: # extract_method="nemoretriever_parse"This is important because:
4. Why scanned PDFs get misclassifiedEven if it looks like a scan, the system may classify it as: Case A: Image-only page→ goes to vision captioning Case B: Mixed layout page→ partial OCR + image fallback Case C: Low-confidence text detection→ OCR skipped to avoid garbage extraction So your output suggests:
5. How to fix it✔ Option 1 (recommended): force NemoRetriever parserUncomment: extract_method="nemoretriever_parse"This is specifically designed for:
✔ Option 2: explicitly enable OCR path (if supported by your build)Depending on version, you may need: extract_text=True
ocr=True # if available in your versionor equivalent OCR backend configuration. ✔ Option 3: disable image caption fallback (if you want strict OCR)If your goal is only text extraction, you may want:
Otherwise the system prefers “best semantic understanding” over raw OCR. 6. Why
|
Uh oh!
There was an error while loading. Please reload this page.
I identified a scan using the following configuration:
print the results using
print(ingest_json_results_to_blob(results[0]))The output shows that the pipe line mistook my scan for a picture
Is it my configuration problem?
Sample scanned document:

An example of the output results:
All reactions