PaddleOCR

Multilingual OCR and document-parsing toolkit that turns PDFs and images into structured data.

Library
PyPI
v3.7.0
87,891stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
85/100Excellent
Development Activity80
Maintenance84
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture86
Code Quality80
Innovation86
Learning Curve74

PaddleOCR is a powerful, lightweight OCR and document-parsing toolkit built on the PaddlePaddle deep-learning framework. It recognizes text in 100+ languages and goes beyond plain OCR with full document understanding: layout analysis, tables, key-information extraction, and conversion of PDFs and images into structured Markdown suited to LLM and RAG pipelines.

The library packages the PP-OCR and PP-Structure model families, along with newer document-parsing and chat-with-document pipelines, behind a Python API and a paddleocr command-line tool. It supports server and mobile-optimized models, GPU and CPU inference, and model training and export, making it one of the most widely used open-source OCR stacks.

What You Get

  • PP-OCR text detection and recognition across 100+ languages
  • PP-Structure document analysis: layout, tables, formulas, and key-information extraction
  • PDF and image to structured Markdown/JSON conversion for RAG and LLM pipelines
  • Both a Python API and a paddleocr command-line interface
  • Server and mobile-optimized model variants with training and export tooling

Common Use Cases

  • Turning scanned PDFs and images into structured Markdown for LLM ingestion
  • Recognizing Chinese, English, and other multilingual text at scale
  • Extracting tables and key fields from invoices, forms, and reports
  • Building document-parsing and chat-with-document (PP-ChatOCR) applications

Under The Hood

Architecture - PaddleOCR is organized as a pipeline toolkit over the PaddleX runtime. The paddleocr package exposes an API client (_api_client), model registry (_models), and pipeline entry points, with CLI wiring in _cli.py/main.py. Legacy training and inference code lives under ppocr/ (detection, recognition, postprocessing) and document analysis under ppstructure/, while deploy/, mcp_server/, langchain-paddleocr/, and api_sdk/ provide serving, MCP, LangChain, and SDK integrations. High-level pipelines (PP-OCR, PP-Structure, document parsing, PP-ChatOCR) select and chain the underlying detection, recognition, and layout models.

Tech Stack - Python (requires 3.8+) built on the PaddlePaddle deep-learning framework via the paddlex[ocr-core] dependency, with PyYAML, requests, aiohttp, and typing-extensions. Optional extras pull in document-parsing, information-extraction, and GenAI-client stacks. Models are distributed separately and downloaded on demand, and the toolkit supports both CPU and GPU inference plus mobile-optimized variants.

Code Quality - The repository is large and mature with a substantial tests/ tree (conftest.py, pipelines, models, ppocr, security, and a TEST_REPORT.md), TIPC test infrastructure (test_tipc/), benchmarks, and extensive MkDocs documentation. It is actively developed with frequent releases, reflecting strong maintenance discipline for a project of its scale.

API Design - The everyday API is concise: construct PaddleOCR(…) and call predict()/ocr() on an image or PDF, or run the paddleocr CLI. The breadth of pipelines, models, and configuration options adds power at the cost of a steeper learning curve than single-purpose OCR libraries, but the README, per-pipeline docs, and CLI defaults give newcomers a working path quickly before they reach for advanced document-parsing features.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search