diff --git a/python/paddle/vision/datasets/cifar.py b/python/paddle/vision/datasets/cifar.py index 7a766828d84d0c9f95a60db99f70dd9c71d0274e..40ad212d203719689e92856b8d4468a90dd011b1 100644 --- a/python/paddle/vision/datasets/cifar.py +++ b/python/paddle/vision/datasets/cifar.py @@ -47,11 +47,10 @@ class Cifar10(Dataset): Args: data_file(str): path to data file, can be set None if - :attr:`download` is True. Default None + :attr:`download` is True. Default None, default data path: ~/.cache/paddle/dataset/cifar mode(str): 'train', 'test' mode. Default 'train'. - transform(callable): transform to perform on image, None for on transform. - download(bool): whether to download dataset automatically if - :attr:`data_file` is not set. Default True + transform(callable): transform to perform on image, None for no transform. + download(bool): download dataset automatically if :attr:`data_file` is None. Default True backend(str, optional): Specifies which type of image to be returned: PIL.Image or numpy.ndarray. Should be one of {'pil', 'cv2'}. If this option is not set, will get backend from ``paddle.vsion.get_image_backend`` , @@ -181,11 +180,10 @@ class Cifar100(Cifar10): Args: data_file(str): path to data file, can be set None if - :attr:`download` is True. Default None + :attr:`download` is True. Default None, default data path: ~/.cache/paddle/dataset/cifar mode(str): 'train', 'test' mode. Default 'train'. - transform(callable): transform to perform on image, None for on transform. - download(bool): whether to download dataset automatically if - :attr:`data_file` is not set. Default True + transform(callable): transform to perform on image, None for no transform. + download(bool): download dataset automatically if :attr:`data_file` is None. Default True backend(str, optional): Specifies which type of image to be returned: PIL.Image or numpy.ndarray. Should be one of {'pil', 'cv2'}. If this option is not set, will get backend from ``paddle.vsion.get_image_backend`` , diff --git a/python/paddle/vision/datasets/flowers.py b/python/paddle/vision/datasets/flowers.py index 8309113b84675340209e1b60622c3fe1154c7f48..4c72ae8369816d8b2196300180a334e93ce516c3 100644 --- a/python/paddle/vision/datasets/flowers.py +++ b/python/paddle/vision/datasets/flowers.py @@ -47,15 +47,14 @@ class Flowers(Dataset): Args: data_file(str): path to data file, can be set None if - :attr:`download` is True. Default None + :attr:`download` is True. Default None, default data path: ~/.cache/paddle/dataset/flowers/ label_file(str): path to label file, can be set None if :attr:`download` is True. Default None setid_file(str): path to subset index file, can be set None if :attr:`download` is True. Default None mode(str): 'train', 'valid' or 'test' mode. Default 'train'. - transform(callable): transform to perform on image, None for on transform. - download(bool): whether to download dataset automatically if - :attr:`data_file` is not set. Default True + transform(callable): transform to perform on image, None for no transform. + download(bool): download dataset automatically if :attr:`data_file` is None. Default True backend(str, optional): Specifies which type of image to be returned: PIL.Image or numpy.ndarray. Should be one of {'pil', 'cv2'}. If this option is not set, will get backend from ``paddle.vsion.get_image_backend`` , diff --git a/python/paddle/vision/datasets/folder.py b/python/paddle/vision/datasets/folder.py index 88706a924a1db9c37d00789caeb03446e9196ef2..06a55b718087e8a7136f89762967f9773b6fba41 100644 --- a/python/paddle/vision/datasets/folder.py +++ b/python/paddle/vision/datasets/folder.py @@ -111,6 +111,9 @@ class DatasetFolder(Dataset): return data_dir temp_dir = make_fake_dir() + # temp_dir is root dir + # temp_dir/class_1/img1_1.jpg + # temp_dir/class_2/img2_1.jpg data_folder = DatasetFolder(temp_dir) for items in data_folder: diff --git a/python/paddle/vision/datasets/mnist.py b/python/paddle/vision/datasets/mnist.py index 0f4d4947aa5f8b5a9cdcbac8642e0ac73e14a905..1b998fd71a62e5bd21545e1548e628042fca833a 100644 --- a/python/paddle/vision/datasets/mnist.py +++ b/python/paddle/vision/datasets/mnist.py @@ -33,11 +33,11 @@ class MNIST(Dataset): Args: image_path(str): path to image file, can be set None if - :attr:`download` is True. Default None + :attr:`download` is True. Default None, default data path: ~/.cache/paddle/dataset/mnist label_path(str): path to label file, can be set None if - :attr:`download` is True. Default None + :attr:`download` is True. Default None, default data path: ~/.cache/paddle/dataset/mnist mode(str): 'train' or 'test' mode. Default 'train'. - download(bool): whether to download dataset automatically if + download(bool): download dataset automatically if :attr:`image_path` :attr:`label_path` is not set. Default True backend(str, optional): Specifies which type of image to be returned: PIL.Image or numpy.ndarray. Should be one of {'pil', 'cv2'}. diff --git a/python/paddle/vision/datasets/voc2012.py b/python/paddle/vision/datasets/voc2012.py index 0604e8e742dad3052bd4ca8a4ada968ed91667f1..323733467e5a49d809103c1915824868f922dc0e 100644 --- a/python/paddle/vision/datasets/voc2012.py +++ b/python/paddle/vision/datasets/voc2012.py @@ -46,10 +46,9 @@ class VOC2012(Dataset): Args: data_file(str): path to data file, can be set None if - :attr:`download` is True. Default None + :attr:`download` is True. Default None, default data path: ~/.cache/paddle/dataset/voc2012 mode(str): 'train', 'valid' or 'test' mode. Default 'train'. - download(bool): whether to download dataset automatically if - :attr:`data_file` is not set. Default True + download(bool): download dataset automatically if :attr:`data_file` is None. Default True backend(str, optional): Specifies which type of image to be returned: PIL.Image or numpy.ndarray. Should be one of {'pil', 'cv2'}. If this option is not set, will get backend from ``paddle.vsion.get_image_backend`` ,