def preprocess_func(images_folder, height, width, size_limit=0):
    unconcatenated_batch_data = []
    import pathlib
    image_filepathes = [str(path) for path in pathlib.Path(images_folder).glob('*.JPEG')]
    for image_filepath in image_filepathes:
        image_data = preprocess_image(image_filepath, height, width)
        unconcatenated_batch_data.append(image_data)
    batch_data = np.concatenate(np.expand_dims(unconcatenated_batch_data, axis=0), axis=0)
    return batch_data
def preprocess_func(images_folder, height, width, size_limit=0):
    unconcatenated_batch_data = []
    import pathlib
    image_filepathes = [str(path) for path in pathlib.Path(images_folder).glob('*.JPEG')]
    for image_filepath in image_filepathes:
        image_data = preprocess_image(image_filepath, height, width)
        unconcatenated_batch_data.append(image_data)
    batch_data = np.concatenate(np.expand_dims(unconcatenated_batch_data, axis=0), axis=0)
    return batch_data