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.
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:
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.