Skip to content

v0.3.0: New models, text recognition and training fixes

Latest

Choose a tag to compare

@frgfm frgfm released this 03 Oct 20:36
f63a4c2

Holocron 0.3.0 brings new classification and text-recognition models, expanded training tools, and correctness fixes across detection, segmentation, optimizers, and checkpoint loading.

This release includes the changes merged since 0.2.1. Unmerged work, including the proposed research-workbench PR, is not part of 0.3.0.

Requirements and installation

  • Python 3.11 or newer, below Python 4.
  • PyTorch 2.x and torchvision 0.24 or newer, below torchvision 1.0. Install a compatible PyTorch/torchvision pair for your platform.
  • Updated runtime requirements include Hugging Face Hub 1.x and Pillow 12.3 or newer, below Pillow 13.
pip install pylocron==0.3.0

The distribution is named pylocron; the Python import remains holocron. Python 3.8–3.10 are no longer supported by this release.

New models and training components

  • Classification: ConvNeXt, MobileOne, and RepViT M0.9/M1.0/M1.1 implementations, plus expanded pretrained classification checkpoints and checkpoint metadata. RepViT deployment conversion preserves evaluation mode, rejects training-mode batch-normalization fusion, and has trained checkpoint-reload and ONNX export checks. See #251, #252, #271, #520, and #550.
  • Text recognition: reusable CharacterBackbone, CharacterClassifier, and CTCRecognizer APIs, with CTCCodec and lexicon-free prefix beam decoding. Synthetic rendering and reference training support glyph pretraining, backbone transfer, and variable-width text lines. See #523, #524, and #552.
  • Training tools: Adan and AdEMAMix optimizers, gradient accumulation, dataset analysis, top-loss inspection, Resize and RandomZoomOut transforms, GlobalMaxPool2d, optional CodeCarbon tracking, and updated classification training recipes.
  • Export and deployment: ONNX export utilities and latency evaluation, updated ONNX-based API/demo templates, and reduced training/container overhead.

Correctness and security

  • Detection: repaired YOLOv4 target assignment, BCE/CIoU losses, initialization, AMP box geometry, and custom-anchor checkpoint loading. Shared confidence filtering, class-aware NMS, and evaluation matching are corrected with YOLOv1/v2 regression coverage. LR finder bounds and recorded-range plotting are also fixed. #505, #549.
  • Segmentation: restored UNet, UNet++, and UNet3+ training with aligned odd/rectangular image outputs, preserved encoder weights, corrected ignored-label losses and metrics, finite losses for all-ignored batches, and current torchvision-compatible reference training. #551.
  • Checkpoint loading: remote checkpoints use weights_only=True, with model configuration and weights resolved from the same immutable Hugging Face revision. #540.
  • Additional fixes cover soft-target PolyLoss, LARS, ConvNeXt, and current dependency compatibility. Dependency management now uses uv with locked library and API environments.

Validation and model maturity

The released commit passed the complete library CI suite on Linux/Python 3.11: 314 passed, 2 skipped, alongside backend tests and documentation checks. The 0.3.0 wheel and source distribution were built and their versions, Python requirement, and packaged library modules checked before publication. Post-publication installation and import checks passed on Linux and macOS with Python 3.11–3.13, and Windows with Python 3.11–3.12. The published wheel contents match the released source, and the published source archive matches the preflight build.

Classification has published checkpoints; RepViT has no published pretrained checkpoint. Detection and text recognition remain experimental, and no pretrained detection or text-recognition checkpoints are published. YOLOv3 is not implemented as a detector. Full CUDA/VOC validation of the repaired detector, full controlled RepViT dataset runs, and text recognition on real scans/general document layouts remain pending. The segmentation learning checks do not establish full VOC accuracy.

See the model support matrix and recognition API for task-specific guidance.

Full changelog: v0.2.1...v0.3.0