Repository navigation
Occular-OCR 0.5.2
pip install --upgrade occular-ocr==0.5.2Adds svtr_lcnet_wsp, an optional experimental RU/EN recognizer for CPU.
The original svtr_lcnet remains the default. Existing users do not download
or receive the alternative automatically.
from occular import ocr
text = ocr("document.png", recognizer="svtr_lcnet_wsp", gpu=False)ocr document.pdf --model svtr_lcnet_wspThe fixed research edit changes 384 existing weights and one bias, without
training or added operations. Its strongest confirmed benefit is robustness
to white padding. It is not a general OCR accuracy guarantee; natural-width
inference provides comparable accuracy. GPU and multilingual combinations
are rejected explicitly for this variant.
- Exact checkpoint/charset verification and clear optional-download errors.
- Existing detector, recognizers, defaults, preprocessing, batching, decoding,
public signatures and mandatory dependencies are unchanged. - New image/PDF comparison example with shared detector crops, byte-checked
input batches, standalone HTML and optional JSON output. - Separate public scientific reproduction harness, generated test images,
frozen beam wrapper and deterministic weight recipe. - No WSP checkpoint is bundled with the Python distributions. Derivative
weights retain the original model-weights license.
The frozen scientific beam replay matched all recorded answers across 2,048
synthetic records and three input-width conditions. CER at 4× padding was
4.863% → 2.915%; all 2,048 natural-width predictions were preserved.
Release-runtime checks are separate from these scientific measurements.
Validation: 25 new tests passed; full candidate suite 81 passed and one known
pre-existing failure (test_inn_kpp_digits_kept), also reproduced in 0.5.1.
Image/PDF API and CLI were checked with greedy and beam on Linux CPU.
Windows wheel contents and pinned Microsoft runtime hashes were checked;
Windows/macOS execution and WSP CUDA quality are not validated by this release.
Usage and limitations ·
Research reproduction ·
Comparison example
WSP ONNX SHA-256:
24c5db4e64ad0a9bb8859b501670eff68969264ff0bee8af7130e3eb50f565f6.
Published WSP checkpoint and license.
Fresh-cache download, exact checksum and CPU inference have passed validation.