marsena/paddleocr-test
By marsena · ↓ 0 · ♥ 0 · Updated 2025-09-05
What's in this repo
This page lists the files in marsena/paddleocr-test, including PP-LCNet_x1_0_doc_ori_infer.onnx, PP-LCNet_x1_0_textline_ori_infer.onnx, PP-OCRv5_server_det_infer.onnx and more.
- 5 ONNX models (.onnx files)
- 8 files, including 5 .onnx, 1 .yml, 1 .md
- Last updated 2025-09-05
ONNX files
| File | Size | Download |
|---|---|---|
| PP-LCNet_x1_0_doc_ori_infer.onnx | — | Download |
| PP-LCNet_x1_0_textline_ori_infer.onnx | — | Download |
| PP-OCRv5_server_det_infer.onnx | — | Download |
| PP-OCRv5_server_rec_infer.onnx | — | Download |
| UVDoc_infer.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
PaddleOCR ONNX Models
🔥 ONNX format models converted from PaddleOCR for easy deployment and testing
📖 Model Description
This repository contains ONNX format models converted from PaddleOCR, a practical ultra-lightweight OCR system. These models are optimized for production deployment and cross-platform compatibility.
📦 Model Files
| File Name | Size | Description |
|---|---|---|
PP-OCRv5_server_det_infer.onnx |
84MB | Text detection model - locates text regions in images |
PP-OCRv5_server_rec_infer.onnx |
81MB | Text recognition model - recognizes text content |
UVDoc_infer.onnx |
30MB | Document rectification model - corrects document perspective |
PP-LCNet_x1_0_doc_ori_infer.onnx |
6.5MB | Document orientation detection |
PP-LCNet_x1_0_textline_ori_infer.onnx |
6.5MB | Text line orientation detection |
PP-OCRv5_server_rec_infer.yml |
145KB | Recognition model configuration file |
Total Size: ~208MB
🚀 Quick Start
Installation
pip install huggingface_hub onnxruntime
Download Models
from huggingface_hub import hf_hub_download
import os
def download_paddleocr_models():
"""Download all PaddleOCR ONNX models"""
model_files = [
"PP-OCRv5_server_det_infer.onnx",
"PP-OCRv5_server_rec_infer.onnx",
"UVDoc_infer.onnx",
"PP-LCNet_x1_0_doc_ori_infer.onnx",
"PP-LCNet_x1_0_textline_ori_infer.onnx",
"PP-OCRv5_server_rec_infer.yml"
]
cache_dir = "models"
os.makedirs(cache_dir, exist_ok=True)
for file in model_files:
print(f"Downloading {file}...")
hf_hub_download(
repo_id="marsena/paddleocr-test",
filename=file,
local_dir=cache_dir
)
print("All models downloaded!")
# Download models
download_paddleocr_models()
Basic Usage
import onnxruntime as ort
import numpy as np
from PIL import Image
# Load detection model
det_session = ort.InferenceSession("models/PP-OCRv5_server_det_infer.onnx")
# Load recognition model
rec_session = ort.InferenceSession("models/PP-OCRv5_server_rec_infer.onnx")
# Your OCR pipeline implementation here...
🏷️ Model Tags
- Framework: ONNX
- Task: Computer Vision, OCR
- Language: Multi-language support
- Domain: Text Detection, Text Recognition
🔧 Technical Details
Conversion Process
These models were converted from PaddlePaddle format to ONNX format for broader compatibility:
- Source: Original PaddleOCR models from PaddlePaddle Hub
- Conversion: PaddlePaddle → ONNX format
- Optimization: Model optimization for inference speed
- Validation: Output consistency verification
System Requirements
- Runtime: ONNX Runtime
- Python: 3.7+
- Memory: Minimum 2GB RAM recommended
- Platform: Cross-platform (Windows, Linux, macOS)
📄 License
This project follows the Apache 2.0 License, consistent with the original PaddleOCR project.
Original PaddleOCR License
Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
🙏 Acknowledgments
- Original Project: PaddleOCR by PaddlePaddle Team
- Framework: PaddlePaddle
- Conversion Tools: ONNX ecosystem
📚 Citation
If you use these models in your research, please cite the original PaddleOCR paper:
@misc{paddleocr2020,
title={PaddleOCR: Awesome multilingual OCR toolkits},
author={PaddlePaddle Authors},
year={2020},
howpublished={\url{https://github.com/PaddlePaddle/PaddleOCR}}
}
❓ Issues & Support
For issues related to:
- Model conversion: Create an issue in this repository
- Original PaddleOCR: Visit PaddleOCR Issues
- ONNX Runtime: Visit ONNX Runtime Issues
Note: This is a community contribution for easier deployment of PaddleOCR models. For production use, please ensure compliance with your specific requirements and test thoroughly.
Model info
Created: 2025-09-05
Updated: 2025-09-05
View on Hugging Face