# DeepSeek-OCR-2-Studio-Web **Repository Path**: sclarkca/DeepSeek-OCR-2-Studio-Web ## Basic Information - **Project Name**: DeepSeek-OCR-2-Studio-Web - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-30 - **Last Updated**: 2026-01-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

🔮 DeepSeek-OCR-2-Studio-Web

Intelligent Document Parsing Studio based on DeepSeek-OCR 2

English | 中文
--- ## ⚡ Project Overview **DeepSeek-OCR-2-Studio-Web** is a multimodal document parsing tool based on the DeepSeek-OCR 2 model, featuring a React frontend + FastAPI backend architecture. ![Project Screenshot](assets/项目图片.png) This tool efficiently processes PDF documents and images, providing powerful OCR capabilities including multi-language text recognition, table parsing, chart analysis, and more. --- ## 🧠 DeepSeek-OCR 2 Technical Highlights ### Core Concept: Visual Causal Flow Traditional VLMs process images using a fixed "raster scan" order. DeepSeek-OCR 2 simulates human visual **causal flow**—intelligently determining reading order based on semantic logic, performing **dynamic reordering** of visual tokens at the encoder stage. ### Architecture Innovation: DeepEncoder V2 | Feature | Description | |---------|-------------| | **LLM-based Encoder** | Replaced CLIP with Qwen2-0.5B, giving the encoder stronger logical reasoning capabilities | | **Dual-Stream Attention** | Visual tokens maintain bidirectional attention; Causal Flow Queries use causal attention | | **Cascade Causal Reasoning** | Encoder handles visual logic sorting; Decoder handles content generation | ### Four Major Upgrades - 🎯 **Improved Reading Order Understanding**: R-order Edit Distance reduced from 0.085 to **0.057** - ⚡ **Extreme Token Compression**: Visual tokens limited to **256~1120** (competitors typically >6000) - 📊 **Leading Overall Performance**: OmniDocBench v1.5 score of **91.09%** (3.73% improvement) - 🔧 **Enhanced Production Robustness**: PDF repetition rate reduced from 3.69% to **2.88%** --- ## ✨ Key Features - **Multi-format Document Parsing**: Supports PDF, images, and various other formats - **Intelligent OCR Recognition**: High-precision text recognition powered by DeepSeek-OCR 2 - **Layout Analysis**: Intelligent document structure recognition with precise content extraction - **Multi-language Support**: Supports Chinese, English, and other languages - **Table & Chart Parsing**: Professional table recognition and chart data extraction - **Professional Drawing Recognition**: Semantic recognition for CAD, flowcharts, and more - **Data Visualization Parsing**: Reverse parsing of data visualization charts - **Markdown Conversion**: Convert PDF content to structured Markdown format --- ## 👀 Demo
**PDF Document Parsing - Supports complex content including images and tables** Document Parsing
| Multi-language Text Parsing | Chart & Table Parsing | |:---:|:---:| | Multi-language Parsing | Table Parsing |
| Professional Drawing Recognition
(CAD, Flowcharts, etc.) | Data Visualization
Reverse Parsing | |:---:|:---:| | CAD Drawing Recognition | Chart Reverse Parsing |
--- ## 🚀 Getting Started ### System Requirements ⚠️ **Important Notes**: - **Operating System**: Linux required - **GPU**: ≥ 7 GB VRAM (16–24 GB recommended for large images/multi-page PDFs) - **Compatibility**: RTX 50 series GPUs are currently not compatible - **Python**: 3.10–3.12 (3.10/3.11 recommended) - **CUDA**: 11.8 or 12.1/12.2 (must match GPU driver) - **PyTorch**: Requires pre-compiled version matching CUDA ### Quick Start #### Method 1: One-Click Script (Recommended) ```bash # Install model weights and dependencies bash install.sh # Start services bash start.sh ``` #### Method 2: Manual Installation ##### Step 1: Download Model Weights Download DeepSeek-OCR 2 model weights from **Hugging Face** or **ModelScope**: ```bash pip install modelscope mkdir ./deepseek-ocr-2 modelscope download --model deepseek-ai/DeepSeek-OCR-2 --local_dir ./deepseek-ocr-2 ``` ##### Step 2: Environment Setup Create virtual environment: ```bash conda create -n deepseek-ocr python=3.12.9 -y conda activate deepseek-ocr ``` Install PyTorch: ```bash pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118 ``` Install vLLM: ```bash pip install ./packages/vllm-0.8.5+cu118-cp38-abi3-manylinux1_x86_64.whl ``` Install project dependencies: ```bash cd ./DeepSeek-OCR/ pip install -r requirements.txt ``` Install flash-attn (optional): ```bash pip install flash-attn==2.7.3 --no-build-isolation ``` Configure model path by creating `.env` file in project root: ``` MODEL_PATH=/your/path/to/deepseek-ocr-2 ``` ##### Step 3: Start Backend ```bash cd backend uvicorn main:app --host 0.0.0.0 --port 9002 ``` ##### Step 4: Start Frontend ```bash cd frontend npm install npm run dev ``` After successful startup, access the frontend URL in your browser. --- ## 🏗️ Project Structure ``` DeepSeek-OCR-2-Studio-Web/ ├── frontend/ # React frontend ├── backend/ # FastAPI backend ├── workspace/ # Working directory (uploads, results) ├── install.sh # One-click install script ├── start.sh # One-click start script └── .env # Environment config (MODEL_PATH) ``` --- ## 🙈 Contributing We welcome contributions via GitHub PRs or Issues. Any form of contribution is appreciated, including feature improvements, bug fixes, or documentation updates. --- ## 😎 Community Scan to add our assistant, reply "DeepSeekOCR" to join the technical discussion group.
QR Code
--- ## 📚 References - [DeepSeek-OCR 2 Technical Report](https://github.com/deepseek-ai/DeepSeek-OCR) - [OmniDocBench Benchmark](https://github.com/opendatalab/OmniDocBench) ---
Made with ❤️ by 赋范空间