dots-mocr: skip whole batch when an image fails to decode
davanstrien+1: Claude Opus 4.7 (1M context)HF Staff
1bb77ce
Same class of bug as pp-doclayout's (15cd760) and smoldocling's (8b99222)
fixes from yesterday: the list comprehension
`[dataset[i][image_column] for i in batch_indices]` lives outside the
existing try/except, so one PIL.UnidentifiedImageError takes down the
entire run.
Hit by an overnight 5k BHL run on l4x1 — crashed at batch 150/313 (48%)
after ~10h on a corrupt JP2, no output saved.
Now wrapped in its own try/except. On a corrupt image, the whole batch
is marked `[OCR SKIPPED — UNREADABLE IMAGE]` (length-preserving so the
final add_column still aligns) and the run continues.
Smoke-tested via hf jobs uv run on a 50-image clean slice — confirmed
happy path still works end-to-end (14.2 min, dataset pushed cleanly).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
davanstrien+1: Claude Opus 4.6 (1M context)HF Staff
dafc1a9
- dots.mocr is the official final name for what was dots.ocr-1.5
- Model now on HF directly: rednote-hilab/dots.mocr (no ModelScope mirror needed)
- Added SVG prompt mode (--prompt-mode svg) with auto temperature/top_p
- SVG-optimized variant: rednote-hilab/dots.mocr-svg
- Updated README with new model entry and detailed docs
- Tested: OCR mode 3/3 on L4, SVG mode 3/3 on L4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>