Repository navigation
0.4.6 — Stability, dependency fixes, and ONNX-only inference
0.4.6 — Stability, dependency fixes, and ONNX-only inference
This release focuses on reliable installation, fewer dependency conflicts, and a consistent runtime across CPU and GPU.
-
All models now run through ONNX Runtime. PyTorch is no longer required for inference, including table structure recognition, merged cells, and UVDoc document dewarping. CPU and GPU use the same ONNX model files, with no separate GPU weights to download.
-
Fewer NumPy dependency conflicts. Replaced
pyctcdecodewith a bundled beam-search implementation that preserves its output without imposingnumpy<2. OpenCV versions are constrained to avoid forcing a NumPy 2 upgrade and breaking existing environments. This also resolves the dependency chain that triggered failing NumPy source builds on Python 3.13 and 3.14. -
Better support for Docker and headless servers. Switched to
opencv-python-headless, removing the GUI-relatedlibGLrequirement that caused import failures in minimal containers. -
Simpler GPU setup. The appropriate ONNX Runtime package is selected automatically for each supported platform. The
[gpu]extra installs CUDA and cuDNN libraries through pip. If CUDA cannot be loaded, Occular explains the issue and falls back to CPU. -
Stable table ordering. Tables are now returned from top to bottom, then left to right, instead of being sorted by detection confidence. Small floating-point differences no longer reshuffle tables on the page.
-
Performance improvements. Internal benchmarks show approximately 4× faster table structure inference and 25% faster pure-Python beam decoding. Table grids and merged cells were checked against the previous PyTorch implementation.
-
Improved compatibility checks and diagnostics. Dependency minimums were verified across Python 3.8–3.14. Conflicting ONNX Runtime/OpenCV installations now receive clearer diagnostics and repair guidance, while PyMuPDF import errors report the underlying cause.
Upgrade:
pip install -U occular-ocr==0.4.6With GPU dependencies:
pip install -U "occular-ocr[gpu]==0.4.6"