augment
A simple elastic augmentation for ND arrays.
Installation
pip install augment-nd
Usage
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(
image.shape,
num_control_points = [3,10,10],
jitter_sigma = [0.3, 10, 10])
# rotate around z axis
transformation += augment.create_rotation_transformation(
image.shape,
math.pi/4)
# apply transformation
image = augment.apply_transformation(image, transformation)
Metadata
Release files for augment-nd 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| augment-nd-0.1.3.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| augment_nd-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / augment-nd-0.1.3.tar.gz
| Download URL | augment-nd-0.1.3.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
198ea2d9d95fbed0a7763c30e7ad098a82be906ab97902f863253d94f01c2da5
|
|
BLAKE2b-256 checksum How to use checksums |
87f35afbd693e79c2c714e44f833f7f453d5ce797b7f439389596fb86ff4bad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / augment_nd-0.1.3-py3-none-any.whl
| Download URL | augment_nd-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
871e5bcd19ef0366977e9fe66c392fb6a9cf914850c858360ac9db72650aa70d
|
|
BLAKE2b-256 checksum How to use checksums |
2d1b0a42b6c1a2e88196aea003162149220c546f301611a462a0d86ebb92590c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|