You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Record what the Paddle/ONNX OCR ecosystem actually supports, how production-oriented projects use hardware backends, and which paths are relevant to light-ocr.
This tracker separates two goals:
Interactive/offload: minimize OCR's process CPU consumption so the foreground application remains responsive.
Batch/throughput: use available CPU/GPU resources to finish a queue faster.
Those goals require different defaults and benchmarks.
Upstream capability matrix
Platform/hardware
Officially supported paths
Common engineering pattern
Relevance to light-ocr
Apple Silicon GPU/ANE
ONNX Runtime CoreML EP; native Core ML
Static/bounded or enumerated shapes, MLProgram specialization/cache, verify compute plan and compute unit
Primary interactive direction. Current models reach GPU only after shape specialization in local probes; ANE is not currently demonstrated.
Apple Silicon via Paddle
Paddle macOS CPU build
CPU threads/MKL-style tuning only; no official macOS GPU Paddle build
Not an offload solution. Paddle upstream currently leaves this gap.
NVIDIA GPU (Linux/Windows)
Paddle Inference CUDA/cuDNN and TensorRT; PaddleX HPI; ORT CUDA/TensorRT
Sequential session constraints, known shapes, broad vendor coverage
Broad compatibility path; DirectML is in sustained engineering and new Windows work should evaluate WinML.
Qualcomm Snapdragon
ORT QNN EP (CPU/GPU/HTP NPU)
Quantized models/context cache plus power/performance profiles
Separate Windows/Android device target; requires quantization and device qualification.
Huawei Ascend
Paddle custom-device/CANN and ORT CANN EP
Explicit device/provider package and graph configuration
Relevant only if Ascend becomes a product target.
Mobile/embedded GPU
Paddle Lite OpenCL; ncnn Vulkan; MNN
Convert models to a mobile engine, FP16/INT8, backend-specific tuning
A separate mobile architecture, not a drop-in desktop ORT switch.
What upstream projects actually do
PaddleOCR / PaddleX
High-performance inference (enable_hpi) automatically selects among Paddle Inference, OpenVINO, ONNX Runtime, and TensorRT where supported, but the documented HPI environment is Linux x86-64 and its gpu path is NVIDIA/CUDA-oriented.
Paddle2ONNX exports OCR models with dynamic shapes to preserve deployment flexibility and parity. That portability choice conflicts with CoreML's best-performance path, so Apple shape specialization must be deliberate and quality-tested.
Execution Providers partition a graph by backend capability and priority. Provider availability is not proof that all expensive nodes execute on that device.
CoreML exposes compute-unit selection, static-shape requirements, specialization strategy, model cache, and compute-plan profiling.
CUDA recommends I/O binding to avoid CPU↔GPU copies; CUDA graphs add stronger fixed-address/fixed-shape constraints.
TensorRT requires optimization profiles for dynamic inputs and relies heavily on engine/timing caches; unsupported subgraphs can fall back to CUDA.
OpenVINO and QNN expose device/performance modes and may fall back when the target accelerator cannot execute a model.
RapidOCR makes the backend an explicit per-model choice. Its current configuration includes ORT CPU/CUDA/DirectML/CANN/CoreML, OpenVINO, Paddle CUDA/NPU, PyTorch CUDA/MPS/NPU, TensorRT, and MNN. Its TensorRT implementation declares detection and recognition min/opt/max shape profiles, defaults to FP16 when supported, and caches the built engine. It also verifies requested-vs-actual ORT providers and warns on fallback.
Only when product targets require them: add separate NVIDIA (CUDA/TensorRT), Intel (OpenVINO), Windows (WinML/DirectML), or mobile backends. Each needs its own binary packaging, model/precision/shape contract, cache policy, and corpus gate.
Cross-backend definition of done
Support matrix identifies OS, architecture, accelerator, runtime/package variant, model precision, and stability level.
Requested and actual device placement are observable; fallback is never silently described as acceleration.
Each backend has cold/warm benchmarks with wall time, process CPU seconds, peak RSS/VRAM, cache size/build time, and per-stage timing.
Each backend passes the same OCR text/confidence/geometry/reading-order corpus, with documented tolerances.
Dynamic/static/bucketed shape policy and supported input limits are explicit.
Quantization/FP16 is opt-in until accuracy gates pass.
Host scheduling distinguishes interactive CPU-preserving mode from batch-throughput mode.
Unsupported platforms fail clearly and retain a documented CPU fallback.
Non-goals
Implement every backend in this tracker.
Assume an upstream backend name implies good performance for these exact models.
Use one benchmark image or average seconds/page as the qualification standard.
Purpose
Record what the Paddle/ONNX OCR ecosystem actually supports, how production-oriented projects use hardware backends, and which paths are relevant to light-ocr.
This tracker separates two goals:
Those goals require different defaults and benchmarks.
Upstream capability matrix
What upstream projects actually do
PaddleOCR / PaddleX
enable_hpi) automatically selects among Paddle Inference, OpenVINO, ONNX Runtime, and TensorRT where supported, but the documented HPI environment is Linux x86-64 and itsgpupath is NVIDIA/CUDA-oriented.References:
ONNX Runtime
References:
RapidOCR / mobile runtimes
RapidOCR makes the backend an explicit per-model choice. Its current configuration includes ORT CPU/CUDA/DirectML/CANN/CoreML, OpenVINO, Paddle CUDA/NPU, PyTorch CUDA/MPS/NPU, TensorRT, and MNN. Its TensorRT implementation declares detection and recognition min/opt/max shape profiles, defaults to FP16 when supported, and caches the built engine. It also verifies requested-vs-actual ORT providers and warns on fallback.
Recommended order for this repository
Cross-backend definition of done
Non-goals