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