opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

100+ data augmentations across audio, image, text, and video, in Python
GitHub RepoImpressions3

Project Description

View on GitHub

AugLy: 100+ Data Augmentations for Audio, Image, Text, and Video

You're training a model and your dataset just isn't cutting it. Maybe you need more variety, or maybe you want to know how your model holds up when someone reposts a screenshot, slaps a meme caption on an image, or overlays text on a video. Building that kind of augmentation pipeline from scratch is tedious. AugLy, an open-source library from Meta AI researchers, offers over 100 ready-made augmentations across four modalities so you can spend less time writing transforms and more time training.

What It Does

AugLy is a Python-based data augmentation library that supports four modalities: audio, image, text, and video. Each modality lives in its own sub-library, and each one includes both function-based and class-based transforms, composition operators, and the option to return metadata about the transform applied—including its intensity. That last part matters more than it sounds. If you're running a robustness experiment, knowing how strongly you perturbed an input is useful for analysis.

The library requires Python 3.6 or higher (it uses dataclasses), and you can install it in one shot with pip install augly[all] or pick just the modality you need—say, pip install augly[audio]. There's also a note about backwards compatibility: in versions up to 0.2.1, dependencies weren't separated by modality, so if you're working with older code, the install pattern looks different.

What sets AugLy apart from generic augmentation libraries is its focus on augmentations that mirror what real users do on internet platforms. We're talking about turning an image into a meme, overlaying text or emojis on images and videos, reposting a screenshot from social media. These aren't synthetic noise injections—they're the kinds of transformations that happen organically when content spreads across the web.

Why It's Cool

  • It targets a real gap in the augmentation ecosystem. Most libraries focus on geometric transforms, color jitter, or noise. AugLy goes after the messy, human-driven transformations that break models in production. If you're working on copy detection, hate speech detection, or copyright infringement, these are exactly the kinds of augmentations you'd want to test against.

  • Metadata about transforms is built in. Being able to retrieve the intensity of a transform isn't just a nice-to-have. It lets you build controlled experiments—you can gradually increase augmentation strength and measure where your model starts to fail. That's a much cleaner setup than eyeballing outputs.

  • Both functional and class-based APIs. Some people prefer chaining functions; others want composable transform objects. AugLy gives you both, plus composition operators, so you're not locked into one style.

  • Modality-specific installs keep things lean. You don't need to pull in audio and video dependencies if you're only working with text. The pip install augly[text] pattern is a small thing, but it adds up when you're managing environments.

  • Colab notebooks for each modality. The README links to example notebooks (like the one for image augmentations) so you can see the transforms in action before committing to anything. That lowers the barrier to entry considerably.

  • Backed by real research and active maintenance. The project has a DOI, GitHub Actions for testing, and welcomes pull requests. It's not a weekend hack—it's a maintained library with a paper behind it.

How to Try It

Getting started is straightforward. If you want everything:

pip install augly[all]

Or just one modality:

pip install augly[image]

If you prefer to clone the repo (useful if you want to run unit tests or contribute):

git clone [email protected]:facebookresearch/AugLy.git && cd AugLy
conda create -n augly && conda activate augly && conda install pip
pip install -e .[all]

One gotcha to watch for: in some environments, pip doesn't install python-magic correctly, and you'll need to run conda install -c conda-forge python-magic as a workaround. The README flags this, so it's worth checking if you hit import errors.

Once installed, you can start applying transforms. The Colab notebooks linked in each modality's README are the fastest way to see what's available—open the image notebook, for example, and you'll get a tour of the augmentations with visual outputs. From there, you can copy the patterns into your own pipeline.

The repository is at github.com/facebookresearch/AugLy, and each sub-library has its own README with modality-specific details.

Final Thoughts

AugLy is best suited for people working on robustness, content moderation, or any problem where data comes from the wild and gets mangled in predictable-but-messy ways. It's not trying to replace torchvision or albumentations—it's filling a different niche. If your augmentations need to simulate what happens when content spreads across social platforms, this library saves you from reinventing that wheel. If you're doing standard image classification with clean data, you might not need it. But for the specific problems it targets, it's a practical, well-maintained tool with a clear point of view. Worth a look if your data pipeline touches user-generated content.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: 58d39ff9-c044-476c-94cf-16a0995fe34dLast updated: September 13, 2026 at 06:32 AM