FastAugment 🚀
One-command image augmentation for computer vision pipelines. Apply transformations with a single function call.
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
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/AmazingFeature) - 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_augment-0.1.6.tar.gz | 3.9 kB | Without provenance | Details for fast_augment-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_augment-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for fast_augment-0.1.6-py3-none-any.whl |
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
|
Security for fast-augment 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.