Skip to main content

FastAugment 🚀

One-command image augmentation for computer vision pipelines. Apply transformations with a single function call.

PyPI version Python versions License

Features

  • 🛠️ Preset-based augmentations - Choose between "simple" or "advanced" augmentation strategies
  • 🖼️ Supports multiple input types - Works with image paths, numpy arrays, and PyTorch datasets
  • ⚡ Efficient processing - Optimized OpenCV backend
  • 📁 Automatic saving - Optionally save augmented images to directory

Installation

pip install fast_augment

Quick Start

Basic Usage

from fast_augment import FastAugment
import cv2

# Load an image
from fast_augment import FastAugment
import cv2
import numpy as np
from google.colab.patches import cv2_imshow

# Load an image black image
pixels = 255 * np.ones((512, 512, 3), dtype=np.uint8)
image = cv2.cvtColor(pixels, cv2.COLOR_BGR2RGB)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

# Initialize augmenter
augmenter = FastAugment(preset="advanced")

# Augment single image
augmented_image = augmenter.augment_image(image, n = 10)
for i in range(len(augmented_image)):
  cv2_imshow(augmented_image[i])

Dataset Augmentation

from torchvision.datasets import CIFAR10

# Load dataset
dataset = CIFAR10(root="./data", train=True)

# Augment entire dataset
augmenter = FastAugment(preset="advanced")
augmented_data = augmenter.augment_dataset(
    dataset=dataset,
    output_dir="./augmented_data",
    target_size=10000
)

Presets

Preset Transformations
simple Horizontal flips, rotations
advanced Adds cutout and brightness/contrast

Advanced Configuration

Customize individual augmentation probabilities:

# Coming in v1.1 (create feature request!)

Documentation

Full API reference available at fastaugment.readthedocs.io

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Aryan Patil - aryanator01@gmail.com


Metadata

Release files for fast-augment 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-augment 0.1.6
File Size Uploaded
fast_augment-0.1.6.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fast-augment 0.1.6
File Interpreter ABI Platform
fast_augment-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / fast_augment-0.1.6.tar.gz

Download URL fast_augment-0.1.6.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ae794c990811a8f25ad732747a6bbaba57c9747692c7bcf7fba5bd1e5fc594bf
BLAKE2b-256 checksum
How to use checksums
82a0f2f61102d043a490ae7cb9e89dad75706e7ea0c80499b2bc48aa61ae1884
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / fast_augment-0.1.6-py3-none-any.whl

Download URL fast_augment-0.1.6-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
246e5117f6ff0e73722f59b3f2f4764af9e0d883e99948deb7009a1bd2e7ada9
BLAKE2b-256 checksum
How to use checksums
dbaedd39205ec8dc3dfd2e4bda11b7d5262df59ae06b18a1452099626bd9af74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page