MCPcopy Index your code
hub / github.com/albumentations-team/AlbumentationsX

github.com/albumentations-team/AlbumentationsX @2.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.3.1 ↗ · + Follow
4,186 symbols 11,084 edges 189 files 1,913 documented · 46%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AlbumentationsX

PyPI version CI PyPI Downloads

📣 Stay updated! Subscribe to our newsletter for the latest releases, tutorials, and tips.

License: AGPL v3 Commercial License

Docs Discord Twitter LinkedIn Reddit

AlbumentationsX is a Python library for image augmentation. It provides high-performance, robust implementations and cutting-edge features for computer vision tasks. Image augmentation is used in deep learning and computer vision to increase the quality of trained models. The purpose of image augmentation is to create new training samples from the existing data.

GitAds Sponsored

Sponsored by GitAds

📢 Important: AlbumentationsX Licensing

AlbumentationsX offers dual licensing:

  • AGPL-3.0 License: Free for open-source projects
  • Commercial License: For proprietary/commercial use (contact for pricing)

Quick Start

# Install AlbumentationsX with OpenCV
pip install albumentationsx[headless]

# Or if you already have OpenCV installed
pip install albumentationsx
import albumentations as A

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

For commercial licensing inquiries, please visit our pricing page.


Here is an example of how you can apply some pixel-level augmentations to create new images from the original one: parrot

Why AlbumentationsX

Table of contents

Authors

Current Maintainer

Vladimir I. Iglovikov | Kaggle Grandmaster

Emeritus Core Team Members

Mikhail Druzhinin | Kaggle Expert

Alex Parinov | Kaggle Master

Alexander Buslaev | Kaggle Master

Eugene Khvedchenya | Kaggle Grandmaster

Installation

AlbumentationsX requires Python 3.10 or higher. To install the latest version from PyPI:

Basic Installation

If you already have OpenCV installed (any variant), simply install AlbumentationsX:

pip install -U albumentationsx

Installation with OpenCV

If you don't have OpenCV installed yet, choose the appropriate variant:

# For servers/Docker (no GUI support, lighter package)
pip install -U albumentationsx[headless]

# For local development with GUI support (cv2.imshow, etc.)
pip install opencv-python && pip install -U albumentationsx

# For OpenCV with extra algorithms (contrib modules)
pip install opencv-contrib-python && pip install -U albumentationsx

# For contrib + headless
pip install -U albumentationsx[contrib-headless]

Note: AlbumentationsX works with any OpenCV variant:

  • opencv-python (full version with GUI)
  • opencv-python-headless (no GUI, smaller size)
  • opencv-contrib-python (with extra modules)
  • opencv-contrib-python-headless (contrib + headless)

Choose the one that fits your needs. The library will detect whichever is installed.

Other installation options are described in the documentation.

Documentation

The full documentation is available at https://albumentations.ai/docs/.

A simple example

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"]

AlbumentationsX collects anonymous usage statistics to improve the library. This can be disabled with ALBUMENTATIONS_OFFLINE=1 or ALBUMENTATIONS_NO_TELEMETRY=1.

List of augmentations

Pixel-level transforms

Pixel-level transforms will change just an input image and will leave any additional targets such as masks, bounding boxes, and keypoints unchanged. For volumetric data (volumes and 3D masks), these transforms are applied independently to each slice along the Z-axis (depth dimension), maintaining consistency across the volume. The list of pixel-level transforms:

Spatial-level transforms

Spatial-level transforms will simultaneously change both an input image as well as additional targets such as masks, bounding boxes, and keypoints. For volumetric data (volumes and 3D masks), these transforms are applied independently to each slice along the Z-axis (depth dimension), maintaining consist

Core symbols most depended-on inside this repo

check_range_bounds
called by 163
albumentations/core/pydantic.py
get
called by 159
albumentations/core/analytics/settings.py
update
called by 78
albumentations/core/label_manager.py
set_random_seed
called by 74
albumentations/core/composition.py
items
called by 69
tests/utils.py
resize
called by 45
albumentations/augmentations/geometric/_functional_images.py
keys
called by 40
tests/utils.py
obb_to_polygons
called by 40
albumentations/core/bbox_utils.py

Shape

Function 1,824
Method 1,725
Class 503
Route 134

Languages

Python100%

Modules by API surface

tests/functional/test_functional.py192 symbols
tests/test_core.py181 symbols
tests/test_bbox.py149 symbols
tests/test_custom_transform_apply.py147 symbols
albumentations/core/composition.py142 symbols
tests/test_instance_binding.py140 symbols
tests/test_transforms.py100 symbols
tests/test_new_transforms.py91 symbols
albumentations/core/transforms_interface.py84 symbols
tests/test_mixing.py73 symbols
tests/test_augmentations.py71 symbols
albumentations/augmentations/pixel/transforms.py68 symbols

For agents

$ claude mcp add AlbumentationsX \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page