Skip to main content

Fork of Albumentations in direct support of NRTK (Natural Robustness Toolkit). Fast, flexible, and advanced augmentation library for deep learning, computer vision, and medical imaging. Offers a wide range of transformations for both 2D (images, masks, bboxes, keypoints) and 3D (volumes, volumetric masks, keypoints) data, with optimized performance and seamless integration into ML workflows.

Project description

Albumentations (NRTK Fork)

CI License: MIT

This is a fork of Albumentations maintained by Kitware in direct support of NRTK (Natural Robustness Toolkit).

Fork Information:

  • Last upstream version: Albumentations v2.0.8
  • Forked: October 2025

About

Albumentations is a Python library for fast and flexible image augmentation. This fork is maintained specifically for integration with NRTK and includes modifications to support NRTK's natural robustness evaluation workflows.

Image augmentation is used in deep learning and computer vision tasks to increase the quality of trained models by creating new training samples from existing data through various transformations.

Key Features

  • Complete Computer Vision Support: Works with all major CV tasks including classification, segmentation (semantic & instance), object detection, and pose estimation
  • Simple, Unified API: One consistent interface for all data types - RGB/grayscale/multispectral images, masks, bounding boxes, and keypoints
  • Rich Augmentation Library: 70+ high-quality augmentations to enhance your training data
  • Fast: Optimized for production use with consistently high performance
  • Deep Learning Integration: Works with PyTorch, TensorFlow, and other frameworks
  • 3D Support: Volumetric data transformations for medical imaging and other 3D applications

Installation

This package is designed to be installed as a dependency of NRTK. For standalone installation, use:

pip install nrtk-albumentations

A Simple Example

This package is intended for use with NRTK's AlbumentationPerturber. For direct usage:

import albumentations as A
import cv2

# Declare an augmentation pipeline
transform = A.Compose([
    A.RandomCrop(width=256, height=256),
    A.HorizontalFlip(p=0.5),
    A.RandomBrightnessContrast(p=0.2),
])

# Read an image with OpenCV and convert it to the RGB colorspace
image = cv2.imread("image.jpg")
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

# Augment an image
transformed = transform(image=image)
transformed_image = transformed["image"]

Documentation

For detailed documentation on available transforms and usage patterns, see:

Available Transformations

Albumentations provides 70+ transforms across several categories:

Pixel-level Transforms

Transforms that modify pixel values without changing image geometry (masks, bboxes, keypoints remain unchanged):

  • Color adjustments: RandomBrightnessContrast, HueSaturationValue, ColorJitter
  • Noise addition: GaussNoise, ISONoise, MultiplicativeNoise
  • Blur effects: GaussianBlur, MotionBlur, MedianBlur, Defocus
  • Compression: ImageCompression
  • And many more...

Spatial-level Transforms

Transforms that modify image geometry (automatically applied to masks, bboxes, keypoints):

  • Cropping: RandomCrop, CenterCrop, RandomResizedCrop
  • Flipping: HorizontalFlip, VerticalFlip
  • Rotation: Rotate, RandomRotate90, SafeRotate
  • Resizing: Resize, LongestMaxSize, SmallestMaxSize
  • Distortions: ElasticTransform, GridDistortion, OpticalDistortion
  • And many more...

3D Transforms

Transforms for volumetric data (medical imaging, etc.):

  • RandomCrop3D, CenterCrop3D
  • Pad3D, PadIfNeeded3D
  • CoarseDropout3D
  • CubicSymmetry

For a complete list with detailed parameters, see the transform reference.

Maintainer

Kitware, Inc. nrtk@kitware.com

Original Authors

This library was originally created by:

  • Vladimir I. Iglovikov
  • Alexander Buslaev
  • Alex Parinov
  • Eugene Khvedchenya
  • Mikhail Druzhinin

Contributing

This fork is maintained specifically for NRTK integration. We are not accepting general contributions at this time. For issues or questions related to NRTK integration, please open an issue on the NRTK repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use this library in your research, please consider citing the original Albumentations paper:

@Article{info11020125,
    AUTHOR = {Buslaev, Alexander and Iglovikov, Vladimir I. and Khvedchenya, Eugene and Parinov, Alex and Druzhinin, Mikhail and Kalinin, Alexandr A.},
    TITLE = {Albumentations: Fast and Flexible Image Augmentations},
    JOURNAL = {Information},
    VOLUME = {11},
    YEAR = {2020},
    NUMBER = {2},
    ARTICLE-NUMBER = {125},
    URL = {https://www.mdpi.com/2078-2489/11/2/125},
    ISSN = {2078-2489},
    DOI = {10.3390/info11020125}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nrtk_albumentations-2.1.0.tar.gz (330.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nrtk_albumentations-2.1.0-py3-none-any.whl (367.1 kB view details)

Uploaded Python 3

File details

Details for the file nrtk_albumentations-2.1.0.tar.gz.

File metadata

  • Download URL: nrtk_albumentations-2.1.0.tar.gz
  • Upload date:
  • Size: 330.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.19 Linux/6.11.0-1018-azure

File hashes

Hashes for nrtk_albumentations-2.1.0.tar.gz
Algorithm Hash digest
SHA256 927276e9c1cae092fb84b93cbbe7e7c1e49bf2f2582ffb893f241ef4e13aa4d5
MD5 2a047130f7c085ad9c4dd5f0ea462dfc
BLAKE2b-256 171710164c1ed6fcc65ce4f199cd6742705229673f051f294cf2d9c70341ba51

See more details on using hashes here.

File details

Details for the file nrtk_albumentations-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: nrtk_albumentations-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 367.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.19 Linux/6.11.0-1018-azure

File hashes

Hashes for nrtk_albumentations-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71a5b4d16c00df6db8d174a450e68961c4440f5e6de393a3ec47e3b072fe91d4
MD5 f59e98f01862f24f46990548a00806b8
BLAKE2b-256 35730ca8a6736f70e8d1a29b93453fe7b3795f8313ab241547a5c92b48441e7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page