imagecorruptions
imagecorruptions copied to clipboard
Most corruptions fail on Cifar dataset with size 32 x 32 x 3
I'm trying to create corrupted version of Cifar-10 train set and I noticed that this library fails for most of the corruptions. I have attached example images of some noises at severity level 5 where the object in the image is barely visible anymore.
And here's the code I'm using to create them:
for corruption_name in ['motion_blur', 'gaussian_noise', 'snow',
'pixelate', 'shot_noise', 'impulse_noise', 'defocus_blur',
'glass_blur', 'zoom_blur', 'frost', 'fog',
'brightness', 'contrast', 'elastic_transform', 'jpeg_compression',
'speckle_noise', 'gaussian_blur', 'spatter', 'saturate']:
print(corruption_name)
img = img.astype('uint8')
corrupted_img = corrupt(img, corruption_name=corruption_name, severity=5)
plt.figure(figsize=(2,2))
plt.imshow(corrupted_img)
plt.show()
I remember reading that this library supports images as small as 32x32. Am I missing something?