Skip to main content

One-command image augmentation

Project description

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 fastaugment

Quick Start

Basic Usage

from fastaugment import FastAugment
import cv2

# Load an image
image = cv2.imread("image.jpg")
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

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

# Augment single image
augmented_image = augmenter.augment_image(image)

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!)

Examples

Before Augmentation After Augmentation
Original Augmented

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

Your Name - @yourtwitter - your@email.com


### To add this to your package:

1. Create `README.md` in your project root
2. Copy the above template
3. Customize sections (especially "Contact" and "Examples")
4. Update your PyPI package:

```bash
# Update version in setup.cfg first
python -m build
twine upload dist/*

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

fast_augment-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

fast_augment-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file fast_augment-0.1.1.tar.gz.

File metadata

  • Download URL: fast_augment-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for fast_augment-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5a708bc8e8e7c1b5e45d6a2d1b0f045cea76e2b0de268b7ef0e614b5508b9cd1
MD5 ca56aa30b0d578628447984f519a2876
BLAKE2b-256 d8dc94ec8d5de5066db69fd30c5f59998b9fd5850eb08a5a8aa62a656d8252be

See more details on using hashes here.

File details

Details for the file fast_augment-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fast_augment-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for fast_augment-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f370117c859b0b44c153f2174bd9ff2bfab6cc83f8043003018bdd4a9a1c3a40
MD5 7a6dd41e564ff159ac623bcd08b38806
BLAKE2b-256 22c6ccd4cd5805abf16f328417d7dceda146010d8581d3ffb6061b4be525d054

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