Created
June 4, 2019 10:08
-
-
Save peune/382551459406adccda075c074b9c13cd 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
import numpy as np | |
data = np.load('texture.npz') | |
X_train = data['X_train'] | |
Y_train = data['Y_train'] | |
X_test = data['X_test'] | |
Y_test = data['Y_test'] | |
import cv2 | |
import matplotlib.pyplot as plt | |
plt.figure(figsize=(10,5)) | |
plt.subplot(2,4,1) | |
plt.imshow(cv2.cvtColor((X_train[0]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,2) | |
plt.imshow(cv2.cvtColor((X_train[39]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,3) | |
plt.imshow(cv2.cvtColor((X_test[0]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,4) | |
plt.imshow(cv2.cvtColor((X_test[-4]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,5) | |
plt.imshow(cv2.cvtColor((Y_train[0]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,6) | |
plt.imshow(cv2.cvtColor((Y_train[39]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,7) | |
plt.imshow(cv2.cvtColor((Y_test[0]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) | |
plt.subplot(2,4,8) | |
plt.imshow(cv2.cvtColor((Y_test[-4]*255).astype(np.uint8), cv2.COLOR_BGR2RGB)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment