@Krishtetali wrote:
temp = []
for img_name in train.filename:
image_path = os.path.join(data_dir, ‘Train’, ‘Images’, ‘train’, img_name)
img = imread(image_path, flatten=True)
img = img.astype(‘float32’)
temp.append(img)train_x = np.stack(temp)
temp = []
for img_name in test.filename:
image_path = os.path.join(data_dir, ‘Train’, ‘Images’, ‘test’, img_name)
img = imread(image_path, flatten=True)
img = img.astype(‘float32’)
temp.append(img)test_x = np.stack(temp)
Posts: 1
Participants: 1