Topdu/OpenOCR

OpenOCR: An Open-Source Toolkit for General-OCR Research and Applications, integrates a unified training and evaluation benchmark, commercial-grade OCR and Document Parsing systems, and faithful reproductions of the core implementations from a wide range of academic papers.

OpenOCR – A General‑Purpose Open‑Source OCR Toolkit

What it is – OpenOCR is an open‑source library from Fudan University’s FVL Lab that bundles together state‑of‑the‑art models and pipelines for general optical‑character‑recognition (OCR). It covers the whole document‑understanding stack: layout detection, text line detection, recognition of plain text, mathematical formulas and tables, and end‑to‑end document parsing.

Key components

Component What it does Size / Highlights
OpenDoc‑0.1B Ultra‑lightweight document parser (≈0.1 B parameters). Two‑stage: layout analysis with PP‑DocLayoutV2 + unified recognition with UniRec‑0.1B. Supports Chinese & English and scores 90.57 % on OmniDocBench v1.5. 0.1 B params, demo on HuggingFace/ModelScope
UniRec‑0.1B Single model that recognises plain text, single‑ and multi‑line formulas, and tables. Trained from scratch on the UniRec40M dataset (no pre‑training). 0.1 B params, paper [arXiv 2512.21095]
OpenOCR (SVTRv2) Full OCR system built on the SVTRv2 recognizer. Beats PP‑OCRv4 by 4.5 % on a Baidu AI Studio competition while keeping similar speed. Provides both server‑grade and mobile‑grade checkpoints and ONNX export. Uses SVTRv2 (CTC‑based scene‑text recognizer)
SVTRv2 The underlying recognizer architecture (ICCV 2025). Trained on the large‑scale Union14M‑L‑Filter dataset, delivering 20‑30 % accuracy gains over synthetic‑data baselines and outperforming encoder‑decoder models on arbitrary‑shaped text. Paper [arXiv 2411.15858]

Why it matters

  • Unified handling of mixed content – most OCR toolkits treat text and formulas separately; UniRec‑0.1B processes them together, simplifying pipelines for scientific documents.
  • Lightweight models – sub‑100 M‑parameter checkpoints make deployment on edge devices or low‑resource servers feasible.
  • Research‑ready – the repo ships training scripts, configs, and a benchmark built on Union14M, enabling reproducible experiments for scene‑text and document OCR.
  • Open ecosystem – models are published on HuggingFace and ModelScope, and the code is released under an open license, encouraging community contributions.

Getting started

  1. Clone the repo and install the openocr-python package from PyPI.
  2. Follow the Quick‑Start markdown (QUICKSTART.md) to run a demo locally or via the provided HuggingFace/ModelScope spaces.
  3. For custom data, use the fine‑tuning guides (finetune_det.md, finetune_rec.md).
  4. Export to ONNX if you need framework‑agnostic inference.

Typical use cases

  • Digitising scientific papers (text + formulas + tables).
  • Automating invoice/receipt processing where layout varies.
  • Building searchable document archives with multilingual support.
  • Research on scene‑text recognition, especially arbitrary‑shaped text.

Resources

  • Documentation: docs/ (OpenDoc, UniRec, OpenOCR, SVTRv2).
  • Model cards: HuggingFace and ModelScope links in the README.
  • Datasets: UniRec40M (HF) and Union14M‑L‑Filter (linked from docs).
  • Papers: arXiv links for UniRec‑0.1B and SVTRv2.

All information is taken directly from the repository’s README; no external assumptions have been added.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project