PaddleOCR
by PaddlePaddle
OCR toolkit that reads text from PDFs and images and turns documents into structured data for AI.
- Stars
- 93,157 stars
- Forks
- 12k forks
- Last push
- 2 months ago
- Activity
- Active
# Install the inference engine (CPU)$ python -m pip install paddlepaddle==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/# Install PaddleOCR$ python -m pip install "paddleocr[all]"Commands from the project's README. Run them after installing (see below).
Overview
Understand PaddleOCR in 60 seconds
- What it does
- PaddleOCR is an OCR and document AI toolkit that turns images and PDFs into text and structured data such as JSON and Markdown. It recognises text in 100+ languages and can parse tables, formulas and layouts.
- The problem it solves
- Getting usable data out of scanned documents, photos and complex PDFs is hard, and language models need clean text. PaddleOCR detects and recognises text and converts whole documents into structured, LLM-ready output.
- Why choose it
- Choose it for accurate, multilingual OCR and document parsing that runs locally on CPU or GPU, with small models for edge use. It integrates with tools like Dify and RAGFlow.
- Who should use it
- Developers building document processing or RAG pipelines
- Teams digitising scanned documents
- Apps that read text from photos, IDs or screens
- AI agent platforms needing document parsing
- Setup difficulty
You'll need:
- Python
- An inference engine: PaddlePaddle 3.0+ or Hugging Face Transformers
- Optional: an NVIDIA GPU with the matching CUDA build
How PaddleOCR works
PaddleOCR covers two main jobs. Text recognition (PP-OCR) finds and reads text in images, including natural scenes, IDs, street views and industrial labels, with PP-OCRv6 covering 50 languages in one model in tiny, small and medium sizes. Document parsing (PaddleOCR-VL and PP-StructureV3) converts complex PDFs and images into Markdown or JSON, including tables and formulas.
You can run it from the command line or Python, with PaddlePaddle or Transformers as the inference engine. It also supports ONNX export, OpenVINO and TensorRT acceleration, multi-GPU inference, serving for other languages, and a browser SDK.
Recent releases add converting Word, Excel and PowerPoint to Markdown and exporting parsed results to DOCX. An official website offers an online experience centre and APIs if you don't want to install anything.
Features
Key features
Multilingual OCR
100+ languages; PP-OCRv6 covers 50 in one model.
Document parsing
PDFs and images to Markdown or JSON with tables and formulas.
Small models
Tiny, small and medium tiers for edge to server.
Two engines
PaddlePaddle or Hugging Face Transformers.
CLI and Python API
paddleocr command and Python classes.
Deployment options
ONNX, OpenVINO, TensorRT, serving and browser SDK.
Strengths
- Strong accuracy across many languages
- Runs locally on CPU or GPU
- Widely integrated in AI tools
- Apache-2.0 license
Limitations
- GPU installs need the right CUDA build
- Some Transformers-engine features are still being added
- Large documentation spread across many pages
Practical use cases
Digitise scanned documents
Convert scans into searchable text.
Prepare PDFs for RAG
Parse PDFs into Markdown with tables.
Read text from photos
Extract text from receipts, signs or screens.
Installation
Install PaddleOCR
Commands come from PaddleOCR's README and quick start guide. AIRepoHub hasn't run them yet. View source
Prerequisites
- Python
- pip
Supported systems
- Windows
- macOS
- Linux
- 1
Install the inference engine
Shellpython -m pip install paddlepaddle==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/ - 2
Install PaddleOCR
Shellpython -m pip install "paddleocr[all]"
- 1
Install the GPU engine
Example for Linux with CUDA 11.8; other setups need a matching build.
Shellpython -m pip install paddlepaddle-gpu==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/ - 2
Install PaddleOCR
Shellpython -m pip install "paddleocr[all]"
- 1
Install Transformers
Shellpython -m pip install "transformers>=5.8.0" - 2
Install PaddleOCR
Shellpython -m pip install "paddleocr[all]"
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Run OCR on an image
Shellpaddleocr ocr -i ./general_ocr_002.png \ --use_doc_orientation_classify False \ --use_doc_unwarping False \ --use_textline_orientation False \ --engine paddle
PaddleOCR's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Read text from an image and parse a document
Run OCR on an image, then convert a document page to structured output.
Before you start
- PaddlePaddle and paddleocr[all] installed
- An image file and a document page image
- 1
Run OCR
Shellpaddleocr ocr -i ./general_ocr_002.png \ --use_doc_orientation_classify False \ --use_doc_unwarping False \ --use_textline_orientation False \ --engine paddle - 2
Parse a document with PP-StructureV3
Shellpaddleocr pp_structurev3 -i ./pp_structure_v3_demo.png \ --use_doc_orientation_classify False \ --use_doc_unwarping False \ --engine paddle
What to expect
Recognised text with positions for the image, and structured output for the document page.
Next steps
- Use the PaddleOCR class from Python
- Try PaddleOCR-VL for full document parsing
- Speed up inference with OpenVINO or TensorRT
Costs and requirements
What it costs to run
- License
- Apache-2.0. Free to use, modify and use commercially.Free
- Software and models
- Free.Free
- Official website APIs
- Online experience centre and APIs are offered by the project; check their terms.Depends
Troubleshooting
Common setup issues
GPU install fails
GPU builds depend on your CUDA version; follow the PaddlePaddle install instructions for your platform.
Version errors with PaddlePaddle
PaddleOCR 3.x needs PaddlePaddle 3.0 or above.
Some features fail with the Transformers engine
Some models are still being supported; for PP-StructureV3 disable formula recognition as the quick start shows.
Alternatives
Similar AI repositories
dify
langgenius
Visual workspace for building agentic workflows and RAG pipelines, self-hosted or in the cloud.
graphify
Graphify-Labs
Agent skill that turns a codebase and its docs into a searchable knowledge graph for Claude Code, Cursor, Codex and Gemini CLI.
hello-agents
datawhalechina
Chinese-language tutorial that teaches how AI agents work and how to build one from scratch.
crawl4ai
unclecode
Open-source web crawler that extracts clean data from websites for AI agents and language models.