A basic numpy-based image manipulation package. Contains tools for resizing, cropping, blurring, and others.


License
MIT
Install
pip install imgic==0.2.8

Documentation

imgic v0.2.8

imgic is a Python module that contains basic tools for image augmentation. The current version of the module takes numpy ndarrays as inputs and supports the following methods:

  • Crop (fixed size, relative crop, random crop)
  • Resize (fixed/relative)
  • Flip (horizontal/vertical)
  • Dropout (random)
  • Combine (2 images with selected opacity)
  • Blur (Gaussian with selected strength - SLOW!)
  • Color jitter
  • Channel shuffle

The module supports method chaining and outputs numpy ndarrays.

Installation

The module can be downloaded using pip

pip install imgic

Example syntax

import imageio
import matplotlib.pyplot as plt
img = imageio.imread("https://image.shutterstock.com/image-photo/feral-cat-outback-australia-450w-685502620.jpg") plt.imshow(img)
plt.show()

Output:

alt text

import imgic
test_img = imgio.Img(img)
test_img = test_img.resize(height = 200, width = 200).blur().flip(axis=0)

print(test_img)

Output: Image of 200x200

plt.imshow(test_img.image)

Output:

alt text