def read_data(img_path, image_h=64, image_w=64):
    for filename in os.listdir(img_path):
        if filename.endswith('.jpg'):
            filepath = os.path.join(img_path, filename)
            image = cv2.imread(filepath)
            (top, bottom, left, right) = get_padding_size(image)
            image_pad = cv2.copyMakeBorder(image, top, bottom, left, right, cv2.BORDER_CONSTANT, value=[0, 0, 0])
            image = cv2.resize(image_pad, (image_h, image_w))
            image_data.append(image)
            label_data.append(img_path)
def read_data(img_path, image_h=64, image_w=64):
    for filename in os.listdir(img_path):
        if filename.endswith('.jpg'):
            filepath = os.path.join(img_path, filename)
            image = cv2.imread(filepath)
            (top, bottom, left, right) = get_padding_size(image)
            image_pad = cv2.copyMakeBorder(image, top, bottom, left, right, cv2.BORDER_CONSTANT, value=[0, 0, 0])
            image = cv2.resize(image_pad, (image_h, image_w))
            image_data.append(image)
            label_data.append(img_path)