Skip to main content

Simple elastic augmentation for ND arrays.

Project description


A simple elastic augmentation for ND arrays.


pip install augment-nd


import augment
import numpy as np
import math

# create some example data
image = np.zeros((100,500,500), dtype=np.float)
image[:] = 0.5
image[:,:10,:] = 0.75
image[:10,:10,:10] = 1
image[:,::10,:] = 1
image[:,:,::10] = 1

transformation = augment.create_identity_transformation(image.shape)

# jitter in 3D
transformation += augment.create_elastic_transformation(
        num_control_points = [3,10,10],
        jitter_sigma = [0.3, 10, 10])

# rotate around z axis
transformation += augment.create_rotation_transformation(

# apply transformation
image = augment.apply_transformation(image, transformation)

Project details

Download files

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

Files for augment-nd, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size augment_nd-0.1.1-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size augment-nd-0.1.1.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page