Python code for Image Crawler, Preprocesser and Augmentation.
Threre are three separate python program for each image crawling, image preprocessing and image augmentation.
-
Before using this Image cralwer, you need to install Chrome Driver.
-
Type in the name of image you would like to search for.
-
Type in the path to chrome driver
usage: Main.py [-h] [--image_name IMAGE_NAME] [--chrome_driver_path CHROME_DRIVER_PATH]
-h, --help show this help message and exit
--image_name IMAGE_NAME Type in the name of images that you would like to search
--chrome_driver_path CHROME_DRIVER_PATH Type in the path to chrome Driver
--image_name pancake --chrome_driver_path C:\Users\ASUS\Pictures\Desktop\Chromedriver
It crops out the center image and discards unnecesary image segment such as letters and it resizes the images to predefined image size.
-
Type in the path to the directory where all the images are saved.
-
Type in the image size you would like to resize (default is 220 x 220)
usage: Main.py [-h] [--data_dir DATA_DIR] [--image_size IMAGE_SIZE]
-h, --help show this help message and exit
--data_dir DATA_DIR path of directory
--image_size IMAGE_SIZE resize image size
--data_dir C:\Users\ASUS\Programming\Deep_learning\Image_preprocessing\code\Crawler\pumpkin --image_size 220
It flips the image left to right and rotates it by 90, 180, and 270 degree.
-
Type in the path to the directory where all the images are saved.
-
Type in the image size you would like to resize (default is 220 x 220)
usage: Main.py [-h] [--image_directory_path IMAGE_DIRECTORY_PATH]
-h, --help show this help message and exit
--image_directory_path IMAGE_DIRECTORY_PATH Type in the path to the directory of images
--image_directory_path C:\Users\ASUS\Programming\Deep_learning\Image_preprocessing\code\Crawler\pumpkin
http://pythonstudy.xyz/python/article/406-%ED%8C%8C%EC%9D%B4%EC%8D%AC-%EC%9D%B4%EB%AF%B8%EC%A7%80-%EC%B2%98%EB%A6%AC-Pillow https://pythonexamples.org/python-pillow-flip-image-vertical-horizontal/