MonkeyOCRv2  by Yuliang-Liu

Visual-text foundation model for Document AI

Created 2 weeks ago

New!

290 stars

Top 90.6% on SourcePulse

GitHubView on GitHub
Project Summary

MonkeyOCRv2 is a text-centric visual foundation model designed for Document AI, unifying fine-grained text modeling, cross-task representation learning, and cross-lingual generalization. It serves as a versatile backbone for researchers and developers tackling a broad spectrum of OCR and document intelligence tasks, offering significant benefits in multilingual document parsing, understanding, and recognition.

How It Works

MonkeyOCRv2 operates as a unified visual-text foundation model, distinguished by its text-centric approach. This design enables fine-grained text modeling and cross-task representation learning within a single encoder architecture. This unified strategy allows for effective generalization across diverse document AI challenges, including multilingual document parsing, OCR, and document understanding, by learning robust, language-agnostic visual features that are highly relevant to textual content.

Quick Start & Requirements

  • Installation: Requires conda for environment setup, torch (v2.6.0 with CUDA 12.6), transformers, flash-attn, and accelerate. Specific versions are detailed in the README.
  • Model Weights: Downloadable via a download_model.py script from HuggingFace or ModelScope.
  • Dependencies: Python 3.10, PyTorch 2.6.0 with CUDA 12.6, transformers, flash-attn, accelerate, vllm (for parsing), and uv.
  • Demo: An interactive demo is available at http://vlrlabmonkey.xyz:8891/.
  • Setup: Involves downloading large model weights and setting up specific Python environments.

Highlighted Details

  • Multilingual Capabilities: Provides robust document parsing across 17 languages, including major European, Asian, and Middle Eastern languages.
  • Broad Task Applicability: Generalizes effectively across OCR, multilingual document parsing, document understanding, text recognition, formula recognition, document tampering detection, scene text detection, and overlapping text segmentation.
  • Model Variants: Offers multiple sizes (S, B, AS) for vision encoders and specialized models for parsing (MonkeyOCRv2-Parsing) and understanding (MonkeyOCRv2-Und).
  • Performance: Demonstrates competitive or state-of-the-art results on various benchmarks, such as achieving 83.3% overall accuracy on the MDPBench for document parsing with MonkeyOCRv2-B-Parsing.

Maintenance & Community

The project lists multiple authors in its citation, including Yuliang Liu and Xiang Bai. No explicit community channels (like Discord or Slack) or sponsorship information are provided in the README.

Licensing & Compatibility

The models are released under the Apache License 2.0, making them free for both research and commercial use without notable restrictions.

Limitations & Caveats

The README does not explicitly detail known limitations or bugs. The requirement for specific versions of PyTorch (2.6.0) and CUDA (12.6) may pose compatibility challenges for users with different hardware or software setups. The multi-expert labeling pipeline, while ensuring annotation quality, suggests a complex data curation process.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
5
Issues (30d)
5
Star History
290 stars in the last 17 days

Explore Similar Projects

Feedback? Help us improve.