Skip to content

About

Flexible data augmentation library for machine and deep learning

Resources

Code of conduct

Stars

47 stars

Watchers

3 watching

Forks

Latest commit

 

History

378 Commits

Folders and files

Repository files navigation

DataAugmentation.jl

Documentation Stable Documentation Dev CI Coverage Aqua QA

Compose data augmentation pipelines for image classification, segmentation, object detection, and 3D volumes in Julia.

A lighthouse photo followed by a flipped, rotated crop and a color-jittered version

Quickstart

Install the registered package and the sample images used below.

using Pkg
Pkg.add(["DataAugmentation", "TestImages"])

Compose a random rotation and crop with |>. Use itemdata to get the resulting pixel array.

using DataAugmentation, TestImages

image = Image(testimage("lighthouse"))
tfm = Rotate(15) |> RandomResizeCrop((192, 256))
pixels = itemdata(tfm(image))

Feature showcase

Keep annotations aligned

Pass aligned items as a tuple with tfm((image, mask, boxes)) to share the random geometry. Here FlipX and RandomIoUCrop move the segmentation mask and labeled boxes with the image.

Before and after a shared flip and crop, with masks and bounding boxes aligned to the lighthouse and the house

Mix images and labels

MixUp blends paired images. CutMix copies a rectangular patch from one image into another. Both return an ImageBatch with class weights that reflect the mix.

A cat and a cup of coffee as source images, a MixUp blend with 55% cat and 45% coffee, and a CutMix sample with 65% cat and 35% coffee

Documentation

  • Browse crops, warps, color transforms, and policies such as RandAugment and AutoAugment. Transformations
  • Run complete examples for masks, keypoints, boxes, and volumes. Pipelines
  • Prepare image tensors, load batches, and train a model. Using with Flux

About

Flexible data augmentation library for machine and deep learning

Resources

Code of conduct

Stars

47 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages