AugLy is a data augmentations library that currently supports four modalities (audio, image, text & video) and over 100 augmentations. Each modality’s augmentations are contained within its own sub-library. These sub-libraries include both function-based and class-based transforms, composition operators, and have the option to provide metadata about the transform applied, including its intensity.
AugLy is a great library to utilize for augmenting your data in model training, or to evaluate the robustness gaps of your model!
The library is Python-based and requires at least Python 3.7, as we use dataclasses.
Joanna Bitton — Software Engineer at Facebook AI
Zoe Papakipos — Research Engineer at FAIR
AugLy
is a Python 3.7+ library. It can be installed with:
pip install augly
Or clone AugLy if you want to be able to run our unit tests, contribute a pull request, etc:
git clone git@github.com:facebookresearch/AugLy.git
[Optional, but recommended] conda create -n augly && conda activate augly && conda install pip
pip install -r requirements.txt
export PYTHONPATH="${PYTHONPATH}:/<absolute_path_to_AugLy>/AugLy"
NOTE: In some environments, pip
doesn't install python-magic
as expected. In that case, you will need to additionally run:
conda install -c conda-forge python-magic
To find documentation about each sub-library, please review the READMEs in their respective directories.
We provide various media assets to use with some of our augmentations. These assets include:
- Emojis (Twemoji) - Copyright 2020 Twitter, Inc and other contributors. Code licensed under the MIT License. Graphics licensed under CC-BY 4.0.
- Fonts (Noto fonts) - Noto is a trademark of Google Inc. Noto fonts are open source. All Noto fonts are published under the SIL Open Font License, Version 1.1.
- Screenshot Templates - Images created by a designer at Facebook specifically to use with AugLy. You can use these with the
overlay_onto_screenshot
augmentation in both the image and video libraries to make it look like your source image/video was screenshotted in a social media feed similar to Facebook or Instagram.
If you use AugLy in your work, please cite:
@misc{bitton2020augly,
author = {Bitton, Joanna and Papakipos, Zoe},
title = {AugLy: A data augmentations library for audio, image, text, and video.},
howpublished = {\url{https://github.com/facebookresearch/AugLy}},
year = {2021}
}
AugLy is MIT licensed, as found in the LICENSE file. Please note that some of the dependencies AugLy uses may be licensed under different terms.