def random_contrast_shift(arr, tf):
img = to_PIL(arr, tf)
if tf: return ImageEnhance.Contrast(img).enhance(np.random.uniform(0.8, 1.2))
return to_theano(ImageEnhance.Contrast(img).enhance(np.random.uniform(0.8, 1.2)))
评论列表
文章目录