Skip to content

Instantly share code, notes, and snippets.

View Mukosame's full-sized avatar
💻
Working

Xiaoyu Xiang Mukosame

💻
Working
View GitHub Profile
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'):
@Mukosame
Mukosame / bic.py
Last active May 15, 2019 23:32
bic.py
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 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