text_plain_output_1.png
from glob import glob

import cv2

train_data1 = glob('../input/fruits-360_dataset/fruits-360/Training/Raspberry/*')
train_data2 = glob('../input/fruits-360_dataset/fruits-360/Training/Pomelo Sweetie/*')
test_data1 = glob('../input/fruits-360_dataset/fruits-360/Test/Raspberry/*')
test_data2 = glob('../input/fruits-360_dataset/fruits-360/Test/Pomelo Sweetie/*')
x_train = []
x_test = []
def create_data(data, values):
    for i in values:
        im = cv2.imread(i, 0)
        data.append(im)
    return len(values)
train_Rasberry_size = create_data(x_train, train_data1)
train_Pomelo_size = create_data(x_train, train_data2)
print('train_Raspberry_size:{} || train_Pomelo_size:{}'.format(train_Rasberry_size, train_Pomelo_size))
test_Rasberry_size = create_data(x_test, test_data1)
test_Pomelo_size = create_data(x_test, test_data2)
print('test_Raspberry_size:{} || test_Pomelo_size:{}'.format(test_Rasberry_size, test_Pomelo_size))