MinerU is a powerful open-source document parser by Shanghai AI Lab's OpenDataLab, converting scanned PDFs, academic papers, tables, and formulas into structured Markdown or JSON with high accuracy.
🚀 What is MinerU?
MinerU is a powerful open-source data extraction tool for PDFs, Word, and PPT files, capable of converting complex multimodal documents into structured Markdown or JSON data formats. Whether it's scanned documents, mixed image-text layouts, mathematical formulas, or tables with footnotes, MinerU accurately identifies them all, extracting content while preserving the original hierarchy and ensuring content coherence.
This tool was originally born from the pretraining process of InternLM, focused on solving symbol conversion issues in scientific literature, and has now become a standout in the document parsing field. The latest MinerU 2.5 release, with only 1.2B parameters, has comprehensively surpassed top multimodal large models like Gemini 2.5 Pro and GPT-4o in the OmniDocBench document parsing evaluation.
⚡ Core Features
MinerU's powerful features make it stand out from many document parsing tools:
🔍 Multimodal Content Extraction
MinerU can accurately extract diverse content such as images, tables, and formulas from documents. It automatically recognizes and converts formulas in documents to LaTeX format, converts tables to HTML or Markdown table format, and extracts images along with their descriptions.
📝 Intelligent OCR Recognition
For scanned PDFs and garbled PDFs, MinerU integrates OCR functionality, supporting detection and recognition in 84 languages. Specifying the document language through the -l/--lang parameter can further improve OCR recognition accuracy.
🏗️ Structure Preservation & Semantic Coherence
When extracting content, MinerU can preserve the original heading and paragraph structure of the document, while removing interfering elements such as headers, footers, and page numbers, ensuring coherence of the core content. It also outputs text in human-readable order, adapting to single-column, multi-column, and complex layouts.
💻 Cross-Platform Compatibility & Acceleration Support
MinerU supports major operating system platforms including Windows, Linux, and Mac, running in pure CPU environments while also supporting GPU (CUDA), NPU (CANN), and MPS acceleration to meet the needs of different users.
📊 Comparison with Similar Tools
In the document parsing field, besides MinerU, there are tools like Marker, Docling, and Markitdown. Where does MinerU stand among them?
| Tool | Main Advantages | Limitations | Use Cases |
|---|---|---|---|
| MinerU | High parsing accuracy, enterprise-grade security compliance, supports API and GUI | GPU-dependent, slower table processing, complex configuration | Academic literature management, financial report parsing, and other high-precision structured scenarios |
| Marker | Fast processing speed, open-source and free | Lacks complex layout parsing capability, depends on local GPU resources | Basic PDF conversion needs for research papers, books, etc. |
| Docling | Compatible with IBM ecosystem, supports multi-format hybrid processing | Requires CUDA environment, some features depend on commercial models | Enterprise contract parsing, report automation |
| Markitdown | Most comprehensive format support, developer-friendly | Depends on external APIs, some features require paid models | Multi-format mixed content creation |
MinerU's biggest advantage lies in its multi-model fused high-fidelity parsing capability. It integrates multiple models including LayoutLMv3 and YOLOv8, maximizing the restoration of document structure and content. Compared with other tools, MinerU performs particularly well in layout detection, table parsing, and formula recognition.
🎯 Practical Application Scenarios
MinerU's practical value can be reflected in multiple fields:
📚 Academic Research
Researchers can use MinerU to batch process academic paper PDFs and build academic literature knowledge bases. It can efficiently extract text, tables, and formulas from papers, support intelligent retrieval and analysis, and help quickly build research domain knowledge bases.
💼 Enterprise Document Processing
For enterprise environments, MinerU can process business contracts and reports, extract meeting minutes, training materials, and other content, converting various enterprise documents into structured data for intelligent archiving and knowledge management.
🤖 AI Training & Data Preparation
MinerU can batch process documents to generate high-quality training corpora, extract professional domain documents to build vertical domain knowledge bases, and provide quality learning data for AI models.
⚖️ Legal & Medical Fields
In the legal field, MinerU can extract key information from legal documents and process judgments, contracts, and other paperwork. In the healthcare field, it can process medical records, test reports, and other medical documents, extracting medical literature for research and analysis.
🛠️ Usage Tips & Best Practices
Mastering some usage tips can help you better leverage MinerU's powerful features:
🎨 Optimize OCR Recognition Accuracy
When processing scanned documents, use the -l parameter to explicitly specify the document language, which can significantly improve OCR recognition accuracy. For example, for Chinese documents, add the -l ch parameter.
🔧 Selective Content Parsing
If you only need to parse specific pages of a document, you can use the --start-page and --end-page parameters to specify the page range, saving processing time.
⚡ Backend Selection Strategy
Choose the appropriate backend based on your hardware environment:
- 🖥️ CPU environment: Use the pipeline backend for good compatibility
- 🎮 Single GPU inference: Use the vlm-transformers backend for high accuracy
- 🚀 High-performance needs: Use the vlm-sglang-engine backend for the fastest speed
📦 Batch Processing Tips
When batch processing, it is recommended to control the number of files per group to 10-20 to avoid memory overflow. For complex documents, you can adjust the --timeout parameter, with the default 120 seconds covering 90% of document types.
📥 Download, Installation & Deployment
Official Website: https://mineru.net/
MinerU provides multiple installation methods to suit different user needs:
💾 Hardware Requirements
| Component | Minimum Config | Recommended Config |
|---|---|---|
| CPU | 4 cores | 8+ cores |
| Memory | 16GB | 32GB |
| GPU | Integrated graphics | NVIDIA Turing+ architecture, 8GB VRAM |
| Storage | 20GB HDD | 50GB SSD |
🔩 Software Environment
- Operating System: Linux/Windows 10+/macOS 12+
- Python Version: 3.10-3.13
- CUDA Version: ≥12.1 (if using GPU acceleration)
📋 Installation Methods
Method 1: Standard pip installation (recommended)
pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
pip install uv -i https://mirrors.aliyun.com/pypi/simple
uv pip install -U "mineru[core]" -i https://mirrors.aliyun.com/pypi/simpleMethod 2: Installation using Conda environment
conda create -n mineru_env python=3.10
conda activate mineru_env
pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com -i https://mirrors.aliyun.com/pypi/simpleMethod 3: Docker containerized deployment (suitable for production environments)
# Download Dockerfile
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/Dockerfile
# Build Docker image
docker build -t mineru-sglang:latest -f Dockerfile .
# Start container (GPU supported)
docker run --gpus all --shm-size 32g -p 30000:30000 mineru-sglang:latest🎲 Model Download
After installation, you need to download pretrained models:
# Use default huggingface source
mineru-models-download
# Or use modelscope source (recommended for users in China)
export MINERU_MODEL_SOURCE=modelscope
mineru-models-download✅ Verify Installation
After installation, you can verify success with the following command:
magic-pdf --version🎮 Basic Usage
Basic command-line usage:
# Simplest parsing command
mineru -p input.pdf -o output_dir
# Enable formula and table recognition
mineru -p input.pdf -o output_dir --formula-enable true --table-enable true
# Specify language as Chinese
mineru -p input.pdf -o output_dir --lang ch
# Use OCR method to parse scanned documents
mineru -p scanned.pdf -o output_dir --method ocrLaunch Web Interface:
# Launch Gradio WebUI
mineru-gradio --server-name 127.0.0.1 --server-port 7860After launching, access http://127.0.0.1:7860 in your browser to use the graphical interface.
API Service Deployment:
# Launch FastAPI service
mineru-api --host 0.0.0.0 --port 8000After launching, you can access the API documentation at http://localhost:8000/docs.
💫 Summary
As an excellent domestic document parsing tool, MinerU, with its powerful multimodal parsing capability, precise structured output, and flexible deployment options, is changing the way we handle document data. Whether for academic research, enterprise document digitization, or AI training data preparation, MinerU can significantly improve work efficiency and reduce manual processing costs.
Its open-source nature also means developers can customize and extend it according to their own needs, integrating it into existing workflows. With the release of MinerU 2.5, this tool has surpassed many top international models in accuracy and performance, demonstrating the strength of domestic open-source projects in the AI field.
If you are looking for a tool that can efficiently parse various types of documents, MinerU is definitely worth a try.
Project Address: https://github.com/opendatalab/MinerU
Official Website: https://mineru.net/
Note: This is the English translation of the original Chinese version.