Created
April 23, 2020 12:17
-
-
Save miki998/f74c682e650a1aab758d66600a54cd97 to your computer and use it in GitHub Desktop.
This file contains 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
AGE_CLASS = {'(0,2)':0,'(4,6)':1 | |
,'(8,13)':2,'(15,20)':3 | |
,'(25,32)':4,'(38,43)':5 | |
,'(48,53)':6,'(60,100)':7} | |
#load images | |
X_train, y_train = [], [] | |
X_test, y_test = [], [] | |
for image in os.listdir('train'): | |
y_train.append(image.split('_')[1].split('.')[0]) | |
X_train.append(cv2.imread('train/'+image)) | |
for image in os.listdir('test'): | |
y_test.append(image.split('_')[1].split('.')[0]) | |
X_test.append(cv2.imread('test/'+image)) | |
X_train, y_train = np.array(X_train), np.array(y_train) | |
X_test, y_test = np.array(X_test), np.array(y_test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment