Created
April 25, 2018 16:45
-
-
Save ryanleeallred/bdd19466680d1f98522f2213f9d6fc6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Initialize Generator | |
datagen = ImageDataGenerator(contrast_stretching=True, adaptive_equalization=True, histogram_equalization=True) | |
# fit parameters from data | |
datagen.fit(x_train) | |
# Configure batch size and retrieve one batch of images | |
for x_batch, y_batch in datagen.flow(x_train, y_train, batch_size=9): | |
# Show the first 9 images | |
for i in range(0, 9): | |
pyplot.subplot(330 + 1 + i) | |
pyplot.imshow(x_batch[i].reshape(img_rows, img_cols, 3)) | |
# show the plot | |
pyplot.show() | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment