RepositoryJupyter NotebookUSUnited States
imedslab

imedslab/solt

Streaming over lightweight data transformations

269stars
21forks
3issues
0views

slide

PyPI version CI/CD Pipeline codecov License DOI

Description

A data augmentation library for Deep Learning that supports images, segmentation masks, labels, and keypoints. Furthermore, SOLT is fast and has OpenCV in its backend. Full auto-generated docs and examples are available at https://imedslab.github.io/solt/.

Features

  • Support of Images, masks, and keypoints for all the transforms (including multiple items at the time)
  • Fast and PyTorch-integrated
  • Convenient and flexible serialization API
  • Excellent documentation
  • Easy to extend
  • 100% Code coverage

Examples

Images: Cats Images + Keypoints: Cats Medical Images + Binary Masks: Brain MRI Medical Images + Multiclass Masks Knee MRI

E.g. the last row is generated using the following transforms stream.

stream = solt.Stream([
    slt.Rotate(angle_range=(-20, 20), p=1, padding='r'),
    slt.Crop((256, 256)),
    solt.SelectiveStream([
        slt.GammaCorrection(gamma_range=0.5, p=1),
        slt.Noise(gain_range=0.1, p=1),
        slt.Blur()    
    ], n=3)
])

img_aug, mask_aug = stream({'image': img, 'mask': mask})

If you want to visualize the results, you need to modify the execution of the transforms:

img_aug, mask_aug = stream({'image': img, 'mask': mask}, return_torch=False).data

Installation

The most recent version is available in pip:

pip install solt

You can fetch the most fresh changes from this repository:

pip install git+https://github.com/imedslab/solt

Benchmark

We propose a fair benchmark based on the refactored version of the one proposed by albumentations team. Still, here, we also convert the results into a PyTorch tensor and do the ImageNet normalization. The following numbers support a realistic and honest comparison between the libraries (number of images per second, the higher - the better):

albumentations
0.4.3
torchvision (Pillow-SIMD backend)
0.5.0
augmentor
0.2.8
solt
0.1.9
HorizontalFlip2253254925613530
VerticalFlip2380255725723740
RotateAny147913896702070
Crop2242566196619814281
Crop1285467573857207186
Crop6492859112904910345
Crop3211979105501060712348
Pad3001642109-2631
VHFlipRotateCrop157413346161889
HFlipCrop2391194319173572

Python and library versions: Python 3.7.0 (default, Oct 9 2018, 10:31:47) [GCC 7.3.0], numpy 1.18.1, pillow-simd 7.0.0.post3, opencv-python 4.2.0.32, scikit-image 0.16.2, scipy 1.4.1.

The code was run on AMD Threadripper 1900. Please find the details about the benchmark here.

How to contribute

Follow the guidelines described here.

Author

Aleksei Tiulpin, Research Unit of Health Sciences and Technology Faculty of Medicine University of Oulu, Finland.

How to cite

If you use SOLT and cite it in your research, please, don't hesitate to send an email to Aleksei Tiulpin. All the papers that use SOLT are listed here.

@misc{solt2019,
  author       = {Aleksei Tiulpin},
  title        = {SOLT: Streaming over Lightweight Transformations},
  month        = jul,
  year         = 2019,
  version      = {v0.1.9},
  doi          = {10.5281/zenodo.3702819},
  url          = {https://doi.org/10.5281/zenodo.3702819}
}

Similar Projects

Discover other similar projects and AI models.

RepositoryJupyter Notebook
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

109.4k
Nov 26, 2026
Modelimage-segmentation
briaai/RMBG-1.4

BRIA Background Removal v1.4 Model Card RMBG v1.4 is our state-of-the-art background removal model, designed to effectively separate foreground from background in a range of categories and image types. This model has been trained on a carefully sele...

♥0
208.7k
Nov 16, 2026
Modelimage-segmentation
briaai/RMBG-2.0

BRIA Background Removal v2.0 Model Card ✨ Discover FIBO on Hugging Face 💜 Bria AI&nbsp&nbsp | &nbsp&nbsp🤗 Hugging Face &nbsp&nbsp | &nbsp&nbsp 📑 Blog &nbsp&nbsp 🖥️ Demo&nbsp&nbsp| &nbsp&nbsp Github&nbsp&nbsp RMBG v2.0 is our new state-of-the-art...

♥0
376.7k
Nov 16, 2026
Modelimage-segmentation
ZhengPeng7/BiRefNet

Bilateral Reference for High-Resolution Dichotomous Image Segmentation Peng Zheng 1,4,5,6,  Dehong Gao 2,  Deng-Ping Fan 1,  Li Liu 3,  Jorma Laaksonen 4,  Wanli Ouyang 5,  Nicu Sebe 6 1 Nankai University&ens...

♥0
952.2k
Feb 4, 2026
Modelimage-segmentation
mattmdjaga/segformer_b2_clothes

Segformer B2 fine-tuned for clothes segmentation SegFormer model fine-tuned on ATR dataset(https://github.com/lemondan/HumanParsing-Dataset) for clothes segmentation but can also be used for human segmentation. The dataset on hugging face is called...

♥0
325.7k
Sep 19, 2025
Modelimage-segmentation
PramaLLC/BEN2

BEN2: Background Erase Network !arXiv(https://img.shields.io/badge/arXiv-2501.06230-b31b1b.svg)(https://arxiv.org/abs/2501.06230) !GitHub(https://img.shields.io/badge/GitHub-BEN2-black.svg)(https://github.com/PramaLLC/BEN2/) !Website(https://img.shi...

♥0
131.7k
Dec 31, 2025
Modelimage-segmentation
nvidia/segformer-b0-finetuned-ade-512-512

SegFormer (b0-sized) model fine-tuned on ADE20k SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers(https://arxiv.org/abs/2105....

♥0
268.8k
Jan 14, 2024
Modelimage-segmentation
jonathandinu/face-parsing

Face Parsing !example image and output(demo.png) Semantic segmentation(https://huggingface.co/docs/transformers/tasks/semanticsegmentation) model fine-tuned from nvidia/mit-b5(https://huggingface.co/nvidia/mit-b5) with CelebAMask-HQ(https://github.c...

♥0
136.2k
Nov 20, 2026
Modelimage-segmentation
briaai/RMBG-3.0

BRIA Background Removal v3.0 Model Card 🏆 1 in background removal in our head-to-head benchmark against Photoroom, remove.bg (Canva), Ideogram, BiRefNet and RMBG-2.0, on 234 hard images at full resolution. Background removal, reimagined as image ed...

♥0
736
Nov 17, 2026