pypi / rapidocr
rapidocr
What changed in rapidocr 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
2 breaking1 security8 new APIs and options1 performance2 behavior and defaults6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initrapidocr 320 changes
Breaking changes 2
OpenCV is headless by default, with GUI support available optionally.
PyTorch 1.13+ is required for secure model loading.
Security 1
Torch weights load with weights_only=True to prevent code execution.
New APIs and options 8
Images can be decoded from memory addresses.
Adds multilingual model routing and licensing metadata.
Image loading can use raw memory buffers with format and stride metadata.
Adds the use_apply_vertical_padding parameter for controlling vertical padding.
Adds the use_preprocess_img parameter for controlling image preprocessing.
Adds MNN backend support for PP-OCrv6.
Adds PaddlePaddle backend support for PP-OCRv6, allowing developers to use this inference backend.
Adds PyTorch as an inference engine for PP-OCRv6.
Performance 1
OCR models are initialized lazily.
Behavior and default changes 2
Lazy model loading is locked so first use constructs the model once.
Routes are centralized in YAML, and supported languages are exposed.
Fixes and other changes 6
The function now uses the device it is given.
The detector now honors limit_side_len when limit_type is max.
MNN output extraction uses getNumpyData() instead of getData().
The torch engine now honors model_root_dir for recognition dictionary and string paths.
Arabic OCR initialization validates python-bidi before proceeding.
Adjusts the PP-OCRv6 Paddle model key names in the YAML config.