an-augment

ANAugment (Advanced and Novel Augmentation)

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.


Features

Traditional Data Augmentation

Generative AI-Based Augmentation


Installation

Install ANAugment from source:

git clone https://github.com/lunovian/an-augment.git
cd an_augment
pip install .

Quick Start

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.


Documentation

Detailed documentation is available in the docs folder.


Contributing

We welcome contributions from the community! If you’d like to contribute:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and test them.
  4. Submit a pull request.

Please see our CONTRIBUTING.md for more information.


License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.


Acknowledgments

Special thanks to the open-source projects and pre-trained models that make generative AI augmentation possible.