Docling RapidOCR PP-OCRv6 (ONNX)

This repository provides the missing PP-OCRv6 ONNX model files required by docling-serve (v1.27.0 and later) for RapidOCR document extraction.

When updating docling-serve to version 1.27.0+, the default model cache may only contain PP-OCRv4 weights, resulting in FileNotFoundError crashes when the engine attempts to load the v6 det_small and rec_small ONNX files. This repository consolidates these specific files to restore functionality for document extraction pipelines, such as those integrated with Open WebUI.

πŸ“¦ Model Details

This repository contains two essential ONNX weights:

  1. Text Detection Model: PP-OCRv6_det_small.onnx
  2. Text Recognition Model: PP-OCRv6_rec_small.onnx

These are lightweight, highly optimized versions of the PaddleOCR v6 models, converted to ONNX format by the RapidOCR community for fast, CPU-friendly inference.

πŸš€ How to Use (Fixing docling-serve)

To resolve the FileNotFoundError in your docling-serve environment, you need to place these files into the internal cache directory expected by Docling.

1. File Structure Requirement

The files must be placed in the following exact directory structure within the container or host cache (e.g., /opt/app-root/src/.cache/ or ~/.cache/):

.cache/docling/models/RapidOcr/onnx/PP-OCRv6/
β”œβ”€β”€ det/
β”‚   └── PP-OCRv6_det_small.onnx
└── rec/
    └── PP-OCRv6_rec_small.onnx

2. Installation

2.1. Using docling-tools Installation

Use docling-tools cli command:

#targeting RapidOcr as output directory
docling-tools models download-hf-repo mpribadi/Docling-RapidOcr -o /home/runner/.cache/docling/models/RapidOcr/

2.2. Manual Installation

If you are running the app directly on a host, download the files from this repository and move them to the corresponding path:

# Create the required directories
mkdir -p ~/.cache/docling/models/RapidOcr/onnx/PP-OCRv6/det
mkdir -p ~/.cache/docling/models/RapidOcr/onnx/PP-OCRv6/rec

# Move the downloaded models
mv PP-OCRv6_det_small.onnx ~/.cache/docling/models/RapidOcr/onnx/PP-OCRv6/det/
mv PP-OCRv6_rec_small.onnx ~/.cache/docling/models/RapidOcr/onnx/PP-OCRv6/rec/

πŸ“š Acknowledgments and Sources

This repository does not claim ownership of the original model architectures or weights. It serves solely as a convenient distribution mirror to solve a specific dependency issue in the Docling ecosystem.

Credit goes to the original authors and the communities hosting the specific ONNX exports:

πŸ’‘ Recommendations for Deployment

  • Integration with Open WebUI: This PP-OCRv6 setup is highly recommended as the backbone for Open WebUI's document extraction engine. The "small" variants strike an excellent balance between low-latency inference (crucial for interactive chat) and high-accuracy text extraction, avoiding the memory overhead of larger vision models.
  • Hardware Utilization: Because these are ONNX models, they run exceptionally well on modern CPUs without requiring dedicated VRAM, making them ideal for self-hosted local AI infrastructure or lightweight backend services.
  • Specific on AMD Strix Halo: These model tested and run on production level with docling-serve podman container build for AMD Strix Halo (gfx1151) ➀ muslimpribadi/docling-serve-strix-halo
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support