Skip to content

Release 0.2.2

Latest

Choose a tag to compare

@lext lext released this 25 Oct 01:05
a0c8d08

SOLT 0.2.2

A large update: new data types for distance maps and bounding boxes, many bug fixes, modern tooling and self-contained examples.

pip install -U solt

Breaking changes

  • Python 3.12+ is required. Minimum versions: numpy 2.4, scipy 1.17, opencv-python-headless 4.13, torch 2.9, torchvision 0.24, pyyaml 6.0.3.
  • Per-item transform_settings (interpolation, padding) now apply to every transform of a Stream, not only to the first one.
  • to_torch returns HxWxC masks as CxHxW (was 1xHxWxC).
  • Resize keeps keypoints as floats aligned with the image (they were truncated to integers); Rotate90 maps keypoints exactly (they were 1 px off on even image sizes).
  • Resize(keep_ar=True) gives the correct shape (width and height were swapped).
  • GridMask drops the intended part of the image, about (1 - ratio)² (it dropped ~94%). "reverse" is the inverse mode; "reserve" still works.
  • Stream(ignore_fast_mode=...) always overrides its transforms, including nested streams.
  • Unknown modes of Blur, CvtColor and GridMask are rejected when the transform is created.
  • Stream(shuffle=True) now actually shuffles the transforms.

New

  • Distance maps ('D', dict key distancnce fields: float16/float32/float64,HxWorHxWxC. Bilinear interpolation, values rescaled by scaling transforms, and no false boundaries from zero padding. solt.utils.mask_to_sdf` computes sisks.
  • Bounding boxes ('B', dict key bboxes): solt.BoundingBoxes accepts and exports VOC, COCO, YOLO and cxcywh,
    with a label per box. Boxes are clipped to thorm; Stream drops the ones mostly outside ofthe image or much smaller relative to it, together with their labels. to_torch gives the torchvision detection
    target. (#42)
  • Stream(in_place=True): transforms do not copy data unless necessary; in_place=False copies the input once.
  • Crop corner modes 'lt', 'rt', 'lb',entation (#97).
  • Random cutout sizes in CutOut (#37).
  • Brightness(relative=True): brightness chaintensity (#60).
  • BrightnessContrast: brightness and contrast in one step (#43).
  • Keypoints in RandomResizedCrop; tuple n

Fixes

  • DataContainer no longer modifies the giveansforms without data_indices apply to allitems of every call.
  • RandomResizedCrop resizes masks, accepts , and no longer produces empty crops of thinimages.
  • optimize_stack=True no longer loses trans, no longer changes the transforms of thestream, keeps the perspective of a fused Projection, and works with Rotate90.
  • Projection keeps the warped image inside e cut off).
  • from_dict no longer modifies the given configuration, and rejects malformed ones.
  • CvtColor raises a clear error for unsuppoorchacceptsHxW grayscale images;DTYPES_MAXforuint16` is 65535.

Tooling and documentation

  • The project uses uv: pyproject.toml and uv.lock replace setup.py and the conda setup.
  • CI tests Python 3.12–3.14 and the lowest suads coverage to Codecov.
  • The documentation uses the Furo theme. The example notebooks use only scikit-image sample data, including new
    examples for distance maps and bounding boxes
  • The code is reorganized into smaller modules; the public API and the serialized names are unchanged.
  • License: MIT, Copyright (c) 2018-2026 Aleksei Tiulpin & SOLT contributors, with a DISCLAIMER regarding WeillCornell Medicine.

Full changelog: v0.2.1...v0.2.2
The "Full changelog" link works once the v0.2.2 tag exists, which publishing the release creates. Publishing it on master runs the PyPI workflow.