Image augmentation library
This image augmentation library can be used to crop, flip, blur, sharpen, mix channels, overlay images. The main idea is to use only numpy library to perform these tasks. Augmented images can be used for Machine Learning projects
Getting it
To download augmentation_lib, either fork this github repo or simply use Pypi via pip.
$ pip install augmentation-lib
Features
This library performs different types of augmentation.
Crops:
center_crop_px takes an image, width and height in pixels and returns center cropped image.
center_crop_percents takes an image and size in percents (0 - 1) and returns center cropped image.
crop_px takes an image starting point for cropping, width and height in pixels and returns cropped image.
crop_percents takes an image starting point (height_coordinate, width_coordinate) in px, and size (height, width) in percents for cropping.
random_crop_px takes a cropping size in pixels and randomly crops an image.
random_crop_percents takes a cropping size in percents (0 - 1) and randomly crops an image.
Flips:
flip_horizontal takes an image and flips it horizontally.
flip_vertical takes an image and flips it vertically.
Padding:
zero_pad takes an image and pads it with zeros by specified number of pixels.
Convolution:
conv_one_step performs convolution for specified slice.
convolution_one_layer performs one image layer convolution.
full_convolution performs image convolution by specified kernel.
Dropouts:
dropout_random performs random dropout of image pixels.
dropout performs dropout of image pixels by specified intensity in percents (0 - 1).
Other augmentation:
shuffle performs shuffle of image layers by specified order.
jitter performs color jitter of one specified or random image layer. One of the color channels of the image is modified adding or subtracting a random and bounded value.
opacity makes an image transparent.
opacity_object makes an image background transparent, works better with object images.
overlay2_images overlay 2 images with applied transparency.
resize_np resize image using numpy and Nearest Neighbor Interpolation.
Showcase
More info about using this library you can find in: https://github.com/laume/augmentation_lib/blob/master/augmentation_lib/showcase.ipynb
Metadata
Release files for augmentation-lib 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| augmentation_lib-0.0.4.tar.gz | 6.1 kB | Without provenance | Details for augmentation_lib-0.0.4.tar.gz |
Release files / augmentation_lib-0.0.4.tar.gz
| Download URL | augmentation_lib-0.0.4.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b7bd39c82a2ef962e88dc8dcce318623a6261d227130edc295c9443632c1415
|
|
BLAKE2b-256 checksum How to use checksums |
95c0ef326799f792c46ea044b4161d4149e9142e455b8b7f8effd26f6609bcea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.0
|
Security for augmentation-lib 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.