def get_dataset(data_set_path, shuffle=True):
    img_shape = [256, 256, 1]

    def _map_func(img, label):
        img = tf.image.resize_images(img, [img_shape[0], img_shape[1]], method=tf.image.ResizeMethod.BICUBIC)
        img = (tf.clip_by_value(tf.cast(img, tf.float32), 0, 255) / 255)
        return (img, label)
    kneeosteo_train = KneeOsteoarthritsDataset(data_path=data_set_path)
    labels = list(kneeosteo_train.dict_url_class.values())
    paths = list(kneeosteo_train.dict_url_class.keys())
    assert (len(paths) == len(labels))
    print(('The dataset %s has %f elements. ' % (data_set_path, len(labels))))
    Dataset = partial(DiskImageData, img_paths=paths, labels=labels, repeat=1, map_func=_map_func, shuffle=shuffle)

    def get_imgs(batch):
        return batch
    return (Dataset, img_shape, get_imgs)
def get_dataset(data_set_path, shuffle=True):
    img_shape = [256, 256, 1]

    def _map_func(img, label):
        img = tf.image.resize_images(img, [img_shape[0], img_shape[1]], method=tf.image.ResizeMethod.BICUBIC)
        img = (tf.clip_by_value(tf.cast(img, tf.float32), 0, 255) / 255)
        return (img, label)
    kneeosteo_train = KneeOsteoarthritsDataset(data_path=data_set_path)
    labels = list(kneeosteo_train.dict_url_class.values())
    paths = list(kneeosteo_train.dict_url_class.keys())
    assert (len(paths) == len(labels))
    print(('The dataset %s has %f elements. ' % (data_set_path, len(labels))))
    Dataset = partial(DiskImageData, img_paths=paths, labels=labels, repeat=1, map_func=_map_func, shuffle=shuffle)

    def get_imgs(batch):
        return batch
    return (Dataset, img_shape, get_imgs)