An Open Source library for Data Augmentation for image classification.
With Flips, Square crops and resiszing, and Salt and Pepper Noise.
Β
Currently the library works only for image grouped each in their own class folder.
ββMy_animal_images_folder
βββ Dogs
β βββ dog_img_1.jpg
β βββ dog_img_2.jpg
β βββ ...
β βββ dog_img_n.jpeg
βββ Cats
βββ ...
βββ Elephants
Β
Download the Pip version:
pip install Augmently
Now COPY PASTE this in your code:
from Augmently.Augmently import create_resized_cropped_square_class_images, create_salt_and_pepper_class_images, create_salt_and_pepper_class_images
Β
Creates a new folder with your images both resized and cropped to the square image length of your choice
image_data_path (String) , output_path (string), square_length (Number)
create_resized_cropped_square_class_images_in_new_folder("Desktop/image_folder", "Desktop/image_folder_square_resized_224pixels", 224 )
Β Β Β
Creates a new folder with your images with your desired amount of salt and pepper noise pixels added to your images
image_data_path (String) , output_path (String) , noise_amount (Number)
create_salt_and_pepper_class_images_in_new_folder("Desktop/image_folder", "Desktop/image_folder_salt_pepper_0.05", 0.05 )
Β Β Β
Creates a new folder with your images flipped
image_data_path (String) , output_path (string)
create_flipped_class_images_in_new_folder("Desktop/image_folder", "Desktop/image_folder_flipped")
Creates a new folder with your images with your desired amount of maximum rotation to your images
image_data_path (String) , output_path (String) , max_rotation (Number in degrees)
create_rotated_images_in_new_folder("Desktop/image_folder", "Desktop/image_folder_rotated_360", 360 )
Creates a new folder with your images with your desired amount of gaussian noise to your images
image_data_path (String) , output_path (String) , amount_noise (Number)
create_gaussian_noise_images_in_new_folder("Desktop/image_folder", "Desktop/image_gaussian_0.05", 0.05 )
Β Β Β
Creates a new folder with your images with your desired max size of occluding black squares to your images
image_data_path (String) , output_path (String) , max_square_len (Number in px)
create_occluding_square_images_in_new_folder("Desktop/image_folder", "Desktop/image_black_square_20", 20 )
Β Β Β
Creates a new folder with your images with your desired max zoom (resized to original len) to your images
image_data_path (String) , output_path (String) , max_zoom_square_len (Number in px)
create_zoomed_images_in_new_folder("Desktop/image_folder", "Desktop/image_zoom_120", 120 )
Β Β Β