Skip to main content

A data augmentations library for audio, image, text, & video.

Project description

logo


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! We designed AugLy to include many specific data augmentations that users perform in real life on internet platforms like Facebook's -- for example making an image into a meme, overlaying text/emojis on images/videos, reposting a screenshot from social media. While AugLy contains more generic data augmentations as well, it will be particularly useful to you if you're working on a problem like copy detection, hate speech detection, or copyright infringement where these "internet user" types of data augmentations are prelevant.

Visual

To see more examples of augmentations, open the Colab notebooks in the README for each modality! (e.g. image README & Colab)

The library is Python-based and requires at least Python 3.6, as we use dataclasses.

Authors

Joanna Bitton — Software Engineer at Facebook AI

Zoe Papakipos — Research Engineer at FAIR

Installation

AugLy is a Python 3.6+ 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 -e 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

Or if you aren't using conda:

sudo apt-get install python3-magic

Documentation

To find documentation about each sub-library, please see the READMEs in the respective directories.

Assets

We provide various media assets to use with some of our augmentations. These assets include:

  1. Emojis (Twemoji) - Copyright 2020 Twitter, Inc and other contributors. Code licensed under the MIT License. Graphics licensed under CC-BY 4.0.
  2. 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.
  3. 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.

Links

  1. Facebook AI blog post: https://ai.facebook.com/blog/augly-a-new-data-augmentation-library-to-help-build-more-robust-ai-models/
  2. PyPi package: https://pypi.org/project/augly/
  3. Examples: https://github.com/facebookresearch/AugLy/tree/main/examples

Citation

If you use AugLy in your work, please cite:

@misc{bitton2021augly,
  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}
}

License

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

augly-0.1.2-py3-none-any.whl (40.1 MB view details)

Uploaded Python 3

File details

Details for the file augly-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: augly-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 40.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

File hashes

Hashes for augly-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e9727a9f11c74a032e93d312a8e3713dbe0871c57282d02516328bc4ef5b28e2
MD5 3ba16a911122c9282fad0268988836da
BLAKE2b-256 eb2f90a217ee9b4e07db2a7be24d7d9a0ca285adee6225a8540408ed53bb4cab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page