ONNX Model Zoo

opencv/text_detection_ppocr

By opencv · ↓ 0 · ♥ 2 · Updated 2025-06-20

What's in this repo

This page lists the files in opencv/text_detection_ppocr, including text_detection_cn_ppocrv3_2023may.onnx, text_detection_cn_ppocrv3_2023may_int8.onnx, text_detection_cn_ppocrv3_2023may_int8bq.onnx and more.

  • 6 ONNX models (.onnx files)
  • 16 files, including 6 .onnx, 2 .py, 2 .jpg, 1 .txt, 1 .md, 1 .cpp
  • Last updated 2025-06-20

ONNX files

File Size Download
text_detection_cn_ppocrv3_2023may.onnx — Download
text_detection_cn_ppocrv3_2023may_int8.onnx — Download
text_detection_cn_ppocrv3_2023may_int8bq.onnx — Download
text_detection_en_ppocrv3_2023may.onnx — Download
text_detection_en_ppocrv3_2023may_int8.onnx — Download
text_detection_en_ppocrv3_2023may_int8bq.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

PP-OCRv3 Text Detection

PP-OCRv3: More Attempts for the Improvement of Ultra Lightweight OCR System.

Note:

  • The int8 quantization model may produce unstable results due to some loss of accuracy.
  • Original Paddle Models source of English: here.
  • Original Paddle Models source of Chinese: here.
  • IC15 in the filename means the model is trained on IC15 dataset, which can detect English text instances only.
  • TD500 in the filename means the model is trained on TD500 dataset, which can detect both English & Chinese instances.
  • Visit https://docs.opencv.org/master/d4/d43/tutorial_dnn_text_spotting.html for more information.
  • text_detection_xx_ppocrv3_2023may_int8bq.onnx represents the block-quantized version in int8 precision and is generated using block_quantize.py with block_size=64.

Demo

Python

Run the following command to try the demo:

# detect on camera input
python demo.py
# detect on an image
python demo.py --input /path/to/image -v

# get help regarding various parameters
python demo.py --help

C++

Install latest OpenCV and CMake >= 3.24.0 to get started with:

# A typical and default installation path of OpenCV is /usr/local
cmake -B build -D OPENCV_INSTALLATION_PATH=/path/to/opencv/installation .
cmake --build build
# detect on camera input
./build/opencv_zoo_text_detection_ppocr -m=/path/to/model
# detect on an image
./build/opencv_zoo_text_detection_ppocr -m=/path/to/model -i=/path/to/image -v
# get help messages
./build/opencv_zoo_text_detection_ppocr -h

Example outputs

mask

gsoc

License

All files in this directory are licensed under Apache 2.0 License.

Reference

  • https://arxiv.org/abs/2206.03001
  • https://github.com/PaddlePaddle/PaddleOCR
  • https://docs.opencv.org/master/d4/d43/tutorial_dnn_text_spotting.html

Model info

onnx arxiv:2206.03001 region:us
↓ 0 ♥ 2

Created: 2025-06-09

Updated: 2025-06-20

View on Hugging Face

Files (16)

.gitattributes
.gitignore
CMakeLists.txt
LICENSE
README.md
demo.cpp
demo.py
example_outputs/gsoc.jpg
example_outputs/mask.jpg
ppocr_det.py
text_detection_cn_ppocrv3_2023may.onnx ONNX
text_detection_cn_ppocrv3_2023may_int8.onnx ONNX
text_detection_cn_ppocrv3_2023may_int8bq.onnx ONNX
text_detection_en_ppocrv3_2023may.onnx ONNX
text_detection_en_ppocrv3_2023may_int8.onnx ONNX
text_detection_en_ppocrv3_2023may_int8bq.onnx ONNX

Related models