ANAugment is a Python library for advanced and novel data augmentation, blending traditional techniques such as cropping and blurring with cutting-edge generative AI methods like style transfer, image inpainting, and latent space interpolation. It empowers users to enhance data diversity, improving the training and performance of machine learning models across images, text, and tabular datasets.
- Blur
- Crop
- Elastic Deformation
- Flip
- Intensity
- Noise
- Random rotation
- Rotation
- Scale
- Style Transfer: Apply artistic or domain-specific styles to images.
- Image Inpainting: Fill missing regions or simulate occlusions with AI-generated content.
- Latent Space Interpolation: Generate intermediate samples using GANs or VAEs.
- Synthetic Data Generation: Create new samples for image, text, or tabular datasets using generative models.
Install ANAugment from source:
git clone https://github.com/lunovian/an-augment.git
cd an_augment
pip install .
Here is an example of how to use ANAugment:
from anaug import default, generative as d, g
# Apply basic transformations
cropped_image = d.crop(image, box=(50, 50, 200, 200))
blurred_image = d.blur(image, sigma=2)
# Apply generative AI augmentation
styled_image = g.style_transfer(image, style="VanGogh")
inpainted_image = g.inpaint(image, mask)
For more examples, check the examples
folder.
Detailed documentation is available in the docs
folder.
We welcome contributions from the community! If you'd like to contribute:
- Fork the repository.
- Create a new branch.
- Make your changes and test them.
- Submit a pull request.
Please see our CONTRIBUTING.md for more information.
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Special thanks to the open-source projects and pre-trained models that make generative AI augmentation possible.