All Projects → albumentations-team → Albumentations

albumentations-team / Albumentations

Licence: mit
Fast image augmentation library and an easy-to-use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about the library: https://www.mdpi.com/2078-2489/11/2/125

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Albumentations

Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (-89.93%)
Mutual labels:  object-detection, segmentation, image-classification, image-segmentation, augmentation, image-processing
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (-95.17%)
Mutual labels:  segmentation, image-classification, image-segmentation, augmentation, image-processing
Rectlabel Support
RectLabel - An image annotation tool to label images for bounding box object detection and segmentation.
Stars: ✭ 338 (-96.39%)
Mutual labels:  object-detection, segmentation, image-classification, detection
Catalyst
Accelerated deep learning R&D
Stars: ✭ 2,804 (-70.02%)
Mutual labels:  object-detection, image-classification, image-segmentation, image-processing
Segmentation
Catalyst.Segmentation
Stars: ✭ 27 (-99.71%)
Mutual labels:  segmentation, image-segmentation, augmentation, image-processing
Cvpr2021 Paper Code Interpretation
cvpr2021/cvpr2020/cvpr2019/cvpr2018/cvpr2017 论文/代码/解读/直播合集,极市团队整理
Stars: ✭ 8,075 (-13.66%)
Mutual labels:  object-detection, image-classification, image-segmentation
Neural Pipeline
Neural networks training pipeline based on PyTorch
Stars: ✭ 315 (-96.63%)
Mutual labels:  object-detection, image-classification, image-segmentation
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-99.75%)
Mutual labels:  image-classification, image-segmentation, image-processing
Medicaldetectiontoolkit
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Stars: ✭ 917 (-90.2%)
Mutual labels:  object-detection, segmentation, detection
Computer Vision Guide
📖 This guide is to help you understand the basics of the computerized image and develop computer vision projects with OpenCV. Includes Python, Java, JavaScript, C# and C++ examples.
Stars: ✭ 244 (-97.39%)
Mutual labels:  object-detection, image-classification, image-processing
Medpy
Medical image processing in Python
Stars: ✭ 321 (-96.57%)
Mutual labels:  image-classification, image-segmentation, image-processing
Dmsmsgrcg
A photo OCR project aims to output DMS messages contained in sign structure images.
Stars: ✭ 18 (-99.81%)
Mutual labels:  object-detection, image-classification, image-processing
Segmentation models.pytorch
Segmentation models with pretrained backbones. PyTorch.
Stars: ✭ 4,584 (-50.99%)
Mutual labels:  segmentation, image-segmentation, image-processing
Sipmask
SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation (ECCV2020)
Stars: ✭ 255 (-97.27%)
Mutual labels:  object-detection, segmentation, detection
Eccv2020 Code
ECCV 2020 论文开源项目合集,同时欢迎各位大佬提交issue,分享ECCV 2020开源项目
Stars: ✭ 827 (-91.16%)
Mutual labels:  object-detection, image-classification, image-segmentation
coursera-ai-for-medicine-specialization
Programming assignments, labs and quizzes from all courses in the Coursera AI for Medicine Specialization offered by deeplearning.ai
Stars: ✭ 80 (-99.14%)
Mutual labels:  image-classification, segmentation, image-segmentation
Face recognition
🍎 My own face recognition with deep neural networks.
Stars: ✭ 328 (-96.49%)
Mutual labels:  object-detection, image-classification, image-processing
Pyimsegm
Image segmentation - general superpixel segmentation & center detection & region growing
Stars: ✭ 213 (-97.72%)
Mutual labels:  object-detection, image-segmentation, image-processing
Sianet
An easy to use C# deep learning library with CUDA/OpenCL support
Stars: ✭ 353 (-96.23%)
Mutual labels:  object-detection, image-classification, image-processing
Cvpr2021 Papers With Code
CVPR 2021 论文和开源项目合集
Stars: ✭ 7,138 (-23.68%)
Mutual labels:  object-detection, image-segmentation, image-processing

Albumentations

PyPI version CI

Albumentations is a Python library for image augmentation. Image augmentation is used in deep learning and computer vision tasks to increase the quality of trained models. The purpose of image augmentation is to create new training samples from the existing data.

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

Why Albumentations

  • Albumentations supports all common computer vision tasks such as classification, semantic segmentation, instance segmentation, object detection, and pose estimation.
  • The library provides a simple unified API to work with all data types: images (RBG-images, grayscale images, multispectral images), segmentation masks, bounding boxes, and keypoints.
  • The library contains more than 70 different augmentations to generate new training samples from the existing data.
  • Albumentations is fast. We benchmark each new release to ensure that augmentations provide maximum speed.
  • It works with popular deep learning frameworks such as PyTorch and TensorFlow. By the way, Albumentations is a part of the PyTorch ecosystem.
  • Written by experts. The authors have experience both working on production computer vision systems and participating in competitive machine learning. Many core team members are Kaggle Masters and Grandmasters.
  • The library is widely used in industry, deep learning research, machine learning competitions, and open source projects.

Table of contents

Authors

Alexander Buslaev — Computer Vision Engineer at Mapbox | Kaggle Master

Alex Parinov — Tech Lead at SberDevices | Kaggle Master

Vladimir I. Iglovikov — Staff Engineer at Lyft Level5 | Kaggle Grandmaster

Evegene Khvedchenya — Computer Vision Research Engineer at Piñata Farms | Kaggle Grandmaster

Mikhail Druzhinin — Computer Vision Engineer at ID R&D | Kaggle Expert

Installation

Albumentations requires Python 3.6 or higher. To install the latest version from PyPI:

pip install -U albumentations

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

Getting started

I am new to image augmentation

Please start with the introduction articles about why image augmentation is important and how it helps to build better models.

I want to use Albumentations for the specific task such as classification or segmentation

If you want to use Albumentations for a specific task such as classification, segmentation, or object detection, refer to the set of articles that has an in-depth description of this task. We also have a list of examples on applying Albumentations for different use cases.

I want to know how to use Albumentations with deep learning frameworks

We have examples of using Albumentations along with PyTorch and TensorFlow.

I want to explore augmentations and see Albumentations in action

Check the online demo of the library. With it, you can apply augmentations to different images and see the result. Also, we have a list of all available augmentations and their targets.

Who is using Albumentations

See also:

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. 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. The following table shows which additional targets are supported by each transform.

Transform Image Masks BBoxes Keypoints
Affine
CenterCrop
CoarseDropout
Crop
CropAndPad
CropNonEmptyMaskIfExists
ElasticTransform
Flip
GridDistortion
GridDropout
HorizontalFlip
Lambda
LongestMaxSize
MaskDropout
NoOp
OpticalDistortion
PadIfNeeded
Perspective
PiecewiseAffine
RandomCrop
RandomCropNearBBox
RandomGridShuffle
RandomResizedCrop
RandomRotate90
RandomScale
RandomSizedBBoxSafeCrop
RandomSizedCrop
Resize
Rotate
SafeRotate
ShiftScaleRotate
SmallestMaxSize
Transpose
VerticalFlip

A few more examples of augmentations

Semantic segmentation on the Inria dataset

inria

Medical imaging

medical

Object detection and semantic segmentation on the Mapillary Vistas dataset

vistas

Keypoints augmentation

Benchmarking results

To run the benchmark yourself, follow the instructions in benchmark/README.md

Results for running the benchmark on the first 2000 images from the ImageNet validation set using an Intel(R) Xeon(R) Gold 6140 CPU. All outputs are converted to a contiguous NumPy array with the np.uint8 data type. The table shows how many images per second can be processed on a single core; higher is better.

albumentations
1.1.0
imgaug
0.4.0
torchvision (Pillow-SIMD backend)
0.10.1
keras
2.6.0
augmentor
0.2.8
solt
0.1.9
HorizontalFlip 10220 2702 2517 876 2528 6798
VerticalFlip 4438 2141 2151 4381 2155 3659
Rotate 389 283 165 28 60 367
ShiftScaleRotate 669 425 146 29 - -
Brightness 2765 1124 411 229 408 2335
Contrast 2767 1137 349 - 346 2341
BrightnessContrast 2746 629 190 - 189 1196
ShiftRGB 2758 1093 - 360 - -
ShiftHSV 598 259 59 - - 144
Gamma 2849 - 388 - - 933
Grayscale 5219 393 723 - 1082 1309
RandomCrop64 163550 2562 50159 - 42842 22260
PadToSize512 3609 - 602 - - 3097
Resize512 1049 611 1066 - 1041 1017
RandomSizedCrop_64_512 3224 858 1660 - 1598 2675
Posterize 2789 - - - - -
Solarize 2761 - - - - -
Equalize 647 385 - - 765 -
Multiply 2659 1129 - - - -
MultiplyElementwise 111 200 - - - -
ColorJitter 351 78 57 - - -

Python and library versions: Python 3.9.5 (default, Jun 23 2021, 15:01:51) [GCC 8.3.0], numpy 1.19.5, pillow-simd 7.0.0.post3, opencv-python 4.5.3.56, scikit-image 0.18.3, scipy 1.7.1.

Contributing

To create a pull request to the repository, follow the documentation at https://albumentations.ai/docs/contributing/

Comments

In some systems, in the multiple GPU regime, PyTorch may deadlock the DataLoader if OpenCV was compiled with OpenCL optimizations. Adding the following two lines before the library import may help. For more details https://github.com/pytorch/pytorch/issues/1355

cv2.setNumThreads(0)
cv2.ocl.setUseOpenCL(False)

Citing

If you find this library useful for your research, please consider citing Albumentations: Fast and Flexible Image Augmentations:

@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}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].