This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, glob | |
import imageio | |
from PIL import Image | |
def mkdir(path): | |
if not os.path.isdir(path): | |
os.mkdir(path) | |
def folder_to_quick_gif(infolder, outpath): | |
if not outpath.endswith('.gif'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import os | |
input_folder = '/data/xiang/ddd/' | |
img_list = [] | |
for root, _, file_list in sorted(os.walk(input_folder)): | |
path = [os.path.join(root, x) for x in file_list] # assume only images in the input_folder | |
# print(path) | |
for item in path: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This script contains following image augementation methods: | |
# Random Horizontal Flip | |
# Random Crop | |
# Random Sized Crop | |
# Random Rotation | |
# Gaussian Noise | |
# Random Grayscale | |
# Random Lightning | |
# Random Contrast | |
# Multiply |