Albumentations Example Notebooks

Explore these interactive examples to learn how to use Albumentations in various scenarios. Each notebook provides step-by-step instructions and code samples.

example

This example shows how you can use Albumentations to define a simple augmentation pipeline.

View notebook

example OverlayElements

Code for the transform is based on the code from https://github.com/danaaubakirova/doc-augmentation by Dana Aubakirova

View notebook

example bboxes

The visualization function is based on https://github.com/facebookresearch/Detectron/blob/master/detectron/utils/vis.py

View notebook

example bboxes2

Some augmentations like `RandomCrop` and `CenterCrop` may transform an image so that it won't contain all original bounding boxes. This example sho...

View notebook

example chromatic aberration

plt.figure(figsize=(15, 10))

View notebook

example d4

Geomatric transforms are the most widely used augmentations. Mainly becase they do not get data outside of the original data distribution and becau...

View notebook

example documents

Load the image from the disk

View notebook

example domain adaptation

It is possible to perform style transfer without the use of Neural networks.

View notebook

example gridshuffle

This transformation divides the image into a grid and then permutes these grid cells based on a random mapping.

View notebook

example hfhub

Source

View notebook

example kaggle salt

We will use images and data from the TGS Salt Identification Challenge.

View notebook

example keypoints

In this notebook we will show how to apply Albumentations to the keypoint augmentation problem. Please refer to A list of transforms and their supp...

View notebook

example multi target

Sometimes you want to apply the same set of augmentations to multiple input objects of the same type. For example, you might have a set of frames f...

View notebook

example textimage

Note: - Code for the transform is based on the code from https://github.com/danaaubakirova/doc-augmentation by Dana Aubakirova - Many thanks to Sa...

View notebook

example weather transforms

This notebook demonstrates weather augmentations that are supported by Albumentations.

View notebook

example xymasking

This transform is a generalization of the TimeMasking and FrequencyMasking from torchaudio.

View notebook

migrating from torchvision to albumentations

This notebook shows how you can use Albumentations instead of torchvision to perform data augmentation.

View notebook

pytorch classification

This example shows how to use Albumentations for image classification. We will use the `Cats vs. Dogs` dataset. The task will be to detect whether ...

View notebook

pytorch semantic segmentation

This example shows how to use Albumentations for binary semantic segmentation. We will use the The Oxford-IIIT Pet Dataset . The task will be to cl...

View notebook

replay

An augmentation pipeline has a lot of randomness inside it. It applies augmentations with some probabilities, and it samples parameters for those a...

View notebook

serialization

Reproducibility is very important in deep learning. Data scientists and machine learning engineers need a way to save all parameters of deep learni...

View notebook

showcase

import albumentations as A import cv2 import numpy as np from matplotlib import pyplot as plt from skimage.color import label2rgb ```

View notebook