Skip to content

Instantly share code, notes, and snippets.

@Svtter
Created January 17, 2019 10:55
Show Gist options
  • Save Svtter/bbe8bc2dbb2004b8e280a23e48edc692 to your computer and use it in GitHub Desktop.
Save Svtter/bbe8bc2dbb2004b8e280a23e48edc692 to your computer and use it in GitHub Desktop.
[img enhance] image enhance checker #keras
import matplotlib.pyplot as plt
from keras.preprocessing import image
inx = 5000
x = x_train[inx]
x = x.reshape((1, ) + x.shape)
i = 1
for batch in datagen.flow(x, batch_size=1):
plt.figure(i)
imgplot = plt.imshow(image.array_to_img(batch[0]))
i += 1
if i % 20 == 0:
break
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment