Skip to main content

A lightweight image augmentation package

Project description

Image Augmentation Library

Created by Dylan Tran

This library is implements an image processing and augmentation pipeline for model training purposes. It has a few key features:

Geometric Augmentation

Geometric Augmentation

  • From one image, various rotations and reflections are applied to generate additional images.
  • Transformations include 90, 180, and 270 degree rotation, as well as reflection across x and y axes.

Rectangular Patch Augmentation

Rectangular Augmentation

  • This type of transformation occludes part of an original image for use with unet segmentation/prediction models. This is useful in cases where the ground truth is known, and pairs of incomplete/complete images are needed for training.
  • Rectangle generation is random, meaning that the user can specify how many images can be generated from one source image.
  • The color of the rectangular patch can be modified. In this case, it is white for display purposes.

Contrast Adjustment

The original image A high contrast image.

  • This image processing step increases contrast between pixels, making features more visually apparent.

Example usage:

  • Note that, when possible, the pipe-and-filter style is implemented.
  • This also means that various augmentations can be mixed and matched to vastly increase the training data.
imageArr = readImageDirIntoArr(r"C:\Augmentation\test_images\msk_3_7")
startIdx = 0
for augArr in rectangleCrop(imageArr, 5):
    saveOutputs(r"C:\Augmentation\sample_output", augArr, startIdx)
    startIdx += len(augArr)

Project details


Download files

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

Source Distribution

imageaugmentationpipeline-0.2.4.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imageaugmentationpipeline-0.2.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file imageaugmentationpipeline-0.2.4.tar.gz.

File metadata

File hashes

Hashes for imageaugmentationpipeline-0.2.4.tar.gz
Algorithm Hash digest
SHA256 5bb2cdfffe686c2894ee92d07652cf28c6e2d8745a46161bb987b71137d1d60b
MD5 c1361e55ecf6b0a758d52a64609dcdde
BLAKE2b-256 6d7728ac5716de0ccd52c28365e4a6e419d7c950d5db45d2a19143fceb7ca91b

See more details on using hashes here.

File details

Details for the file imageaugmentationpipeline-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for imageaugmentationpipeline-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2b016dd042ed85fb6e8b1dd9e134647703c01bde12a55c9c3d38d92420d795c6
MD5 d67da269babf568563c9e8a6ecd3e3ce
BLAKE2b-256 ded5bcc23e853a5cb86d3b0a58cefd74ac5fd2d1e4cdcf6adfa9ad4e99d491ea

See more details on using hashes here.

Supported by

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