MerchantryTidbits

doc-parsing / library

dots.mocr

Capability: dots.mocr

Use it when

  • You need scanned or image-based multilingual documents parsed into structured layout JSON and markdown with correct reading order
  • You need tables extracted as HTML and formulas as LaTeX from PDF pages instead of garbled linear text
  • You want a compact self-hosted vision-language model for document parsing instead of a cloud OCR API

What it solves

Not the fit when

  • The retained README does not state code or model-weight license terms; verify both before redistribution or commercial embedding
  • Digitally native text PDFs where direct extraction is sufficient
  • Guaranteed robust extraction of complex tables, formulas, or structured graphics; the README identifies these as continuing limitations
  • Workflows that cannot tolerate occasional parsing failures
  • Model save paths containing periods, pending the documented Transformers integration workaround
  • Running unreviewed model repository code: the documented vLLM and Transformers paths enable trust_remote_code
  • plain text extraction from digital pdfs
  • audio transcription
  • document format conversion without ocr

Install

conda create -n dots_mocr python=3.12 && conda activate dots_mocr && git clone https://github.com/rednote-hilab/dots.mocr.git && cd dots.mocr && pip install -e . && python3 tools/download_model.py

Invoke

Serve with vllm serve rednote-hilab/dots.mocr, then parse: python3 dots_mocr/parser.py demo.pdf --num_thread 64 (outputs layout JSON, markdown, and a visualization)

Alternatives

No reviewed alternatives recorded yet.