Repository navigation
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 aStream, not only to the first one. to_torchreturnsHxWxCmasks asCxHxW(was1xHxWxC).Resizekeeps keypoints as floats aligned with the image (they were truncated to integers);Rotate90maps keypoints exactly (they were 1 px off on even image sizes).Resize(keep_ar=True)gives the correct shape (width and height were swapped).GridMaskdrops 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,CvtColorandGridMaskare rejected when the transform is created. Stream(shuffle=True)now actually shuffles the transforms.
New
- Distance maps (
'D', dict keydistancnce 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 keybboxes):solt.BoundingBoxesaccepts and exports VOC, COCO, YOLO and cxcywh,
with a label per box. Boxes are clipped to thorm;Streamdrops the ones mostly outside ofthe image or much smaller relative to it, together with their labels.to_torchgives the torchvision detection
target. (#42) Stream(in_place=True): transforms do not copy data unless necessary;in_place=Falsecopies the input once.Cropcorner 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; tuplen
Fixes
DataContainerno longer modifies the giveansforms withoutdata_indicesapply to allitems of every call.RandomResizedCropresizes masks, accepts , and no longer produces empty crops of thinimages.optimize_stack=Trueno longer loses trans, no longer changes the transforms of thestream, keeps the perspective of a fusedProjection, and works withRotate90.Projectionkeeps the warped image inside e cut off).from_dictno longer modifies the given configuration, and rejects malformed ones.CvtColorraises a clear error for unsuppoorchacceptsHxWgrayscale images;DTYPES_MAXforuint16` is 65535.
Tooling and documentation
- The project uses uv:
pyproject.tomlanduv.lockreplacesetup.pyand 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 aDISCLAIMERregarding 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.