selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
dots.ocr logo

Self-host dots.ocr

Multilingual OCR and document layout parsing model

BetaOpen SourceMIT
Updated7 months ago
LanguagePython
Setup difficultyAdvanced
Stars
9 187
Docker
rednotehilab/dots.ocr
Install with Python

What is dots.ocr?

dots.ocr alternatives

Should you self-host dots.ocr?

dots.ocr scores 64/100 on selfhost.directory (how scoring works) and ranks #2 of 4 in OCR. It has 9 187 GitHub stars, +10 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is PaddleOCR (86/100, 92 515 stars). It scores higher overall, so compare the two before you pick. See dots.ocr vs PaddleOCR side by side.

Features

  • CPU inferencePointed to a GitHub issue rather than first-class support.
  • Document layout parsing
  • Formula recognition (LaTeX)
  • Image-to-SVG parsingRobustness still limited; a dedicated dots.mocr-svg variant exists.
  • Layout detection only mode
  • Layout visualisation
  • Markdown export
  • Multilingual OCR
  • OpenAI-compatible model serving
  • PDF parsing
  • Scene text spotting
  • Structured JSON output
  • Table recognition (HTML)Complex tables and formulas remain difficult for the compact model.
  • Visual question answering
  • Web page parsing

dots.ocr README

Introduction

dots.ocr Designed for universal accessibility, it possesses the capability to recognize virtually any human script. Beyond achieving state-of-the-art (SOTA) performance in standard multilingual document parsing among models of comparable size, dots.ocr-1.5 excels at converting structured graphics (e.g., charts and diagrams) directly into SVG code, parsing web screens and spotting scene text.

News

How to install dots.ocr

Install dots.ocr with Python

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

# Install pytorch, see https://pytorch.org/get-started/previous-versions/ for your cuda version
# pip install torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0 --index-url https://download.pytorch.org/whl/cu128
# install flash-attn==2.8.0.post2 for faster inference
pip install -e .

Weights fetched with python3 tools/download_model.py.

How to configure dots.ocr

  • CUDA_VISIBLE_DEVICESGPU selection used in the documented vllm serve commands
  • --typeWeight download source for tools/download_model.py; use modelscope instead of the default

    values: modelscope

  • --tensor-parallel-sizevLLM tensor parallel size used when launching the model server
  • --gpu-memory-utilizationvLLM fraction of GPU memory the server may use
  • --chat-template-content-formatvLLM chat template content format (string in the documented command)

More in OCR

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…