README.md

June 1, 2026 Β· View on GitHub

ABot-OCR

High-precision conversion of document page images to structured Markdown


arXiv Python HuggingFace vLLM

δΈ­ζ–‡ζ–‡ζ‘£


πŸ“– Overview

ABot-OCR is an end-to-end vision-language model that transcribes a document page image directly into clean Markdown in a single forward passβ€”no brittle modular orchestration. It recognizes and preserves text, mathematical formulas (LaTeX), tables (HTML), and related layout elements.

πŸ“° News

[2026-5-29] πŸ₯³πŸ₯³ ABot-OCR's technical report and weights have been released. πŸŽ‰πŸŽ‰

Table of Contents


πŸ† Benchmark

The figure below shows overall evaluation results on OmniDocBench v1.5. See the technical report for full benchmark setup and comparisons (including v1.6).

ABot-OCR Benchmark Results

πŸ“¦ Model Zoo

Model weights are large and are not bundled in this repository. Download them from Hugging Face and place them locally:

ModelPlatformLink
ABot-OCRπŸ€— Hugging Faceacvlab/ABot-OCR
repo/
└── abot-ocr/          # Extract / place downloaded weights here
    β”œβ”€β”€ config.json
    β”œβ”€β”€ model.safetensors
    └── ...

πŸš€ Quick Start

Inference script: abot-ocr-infer.py

Requirements

We recommend Python 3.11+ and the following dependencies:

pip install vllm==0.18.0 torch==2.10.0

Note: Inference loads the model with vLLM and requires sufficient GPU memory (~4GB weights; actual usage depends on batch_size and image resolution).

Run

  1. Download model weights to ./abot-ocr/ (see ModelZoo)
  2. Prepare images to recognize (a single file or a directory)
  3. Run:
python abot-ocr-infer.py

By default, images are read from images/ and Markdown results are written to ./abot-ocr-infer-output/.

Configuration

Model path β€” loaded from the repo directory by default; to change:

MODEL_PATH = str(Path(__file__).resolve().parent / "abot-ocr")

Input / output β€” edit the __main__ block at the bottom of abot-ocr-infer.py:

run_infer(
    input_path="images",                  # Single image or directory (nested subdirs supported)
    llm=llm,
    processor=processor,
    sampling_params=sampling_params,
    batch_size=8,                         # Images per batch; 0 = infer all at once
    output_dir="./abot-ocr-infer-output"  # Omit to write .md next to each image
)
BehaviorDescription
Default outputOne .md file per image (same basename)
output_dir setWrite to the given directory, preserving relative subpaths
ResumeImages that already have a matching .md are skipped
FailuresUnreadable images are logged to failed_images.log

πŸ“„ Citation

If you find ABot-OCR useful, please cite our technical report:

@article{jiang2026abotocr,
  title   = {ABot-OCR Technical Report},
  author  = {Jiang, Kaitao and Gong, Ruiyan and Cheng, Xiaolong and Niu, Kangning and Li, Tianlun and Xu, Mu},
  journal = {arXiv preprint arXiv:2605.27978},
  year    = {2026},
  url     = {https://arxiv.org/abs/2605.27978},
}

πŸ™ Acknowledgments

Our work is inspired by many excellent open-source projects. We sincerely thank the developers of Qwen-VL, PaddleOCR-VL, MinerU, and the broader OCR community.