!2753 Fix vocdataset/cocodataset docstring problem

Merge pull request !2753 from xiefangqi/xfq_fix_docstring
pull/2753/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 3cb531435e

@ -4034,8 +4034,8 @@ class VOCDataset(MappableDataset):
A source dataset for reading and parsing VOC dataset. A source dataset for reading and parsing VOC dataset.
The generated dataset has two columns : The generated dataset has two columns :
task='Detection' : ['image', 'annotation']. task='Detection' : ['image', 'annotation'];
task='Segmentation' : ['image', 'target'] task='Segmentation' : ['image', 'target'].
The shape of both column 'image' and 'target' is [image_size] if decode flag is False, or [H, W, C] The shape of both column 'image' and 'target' is [image_size] if decode flag is False, or [H, W, C]
otherwise. otherwise.
The type of both tensor 'image' and 'target' is uint8. The type of both tensor 'image' and 'target' is uint8.
@ -4094,8 +4094,8 @@ class VOCDataset(MappableDataset):
Args: Args:
dataset_dir (str): Path to the root directory that contains the dataset. dataset_dir (str): Path to the root directory that contains the dataset.
task (str): Set the task type of reading voc data, now only support "Segmentation" or "Detection" task (str): Set the task type of reading voc data, now only support "Segmentation" or "Detection"
(default="Segmentation") (default="Segmentation").
mode(str): Set the data list txt file to be readed (default="train") mode (str): Set the data list txt file to be readed (default="train").
class_indexing (dict, optional): A str-to-int mapping from label name to index class_indexing (dict, optional): A str-to-int mapping from label name to index
(default=None, the folder names will be sorted alphabetically and each (default=None, the folder names will be sorted alphabetically and each
class will be given a unique index starting from 0). class will be given a unique index starting from 0).
@ -4114,9 +4114,9 @@ class VOCDataset(MappableDataset):
argument should be specified only when num_shards is also specified. argument should be specified only when num_shards is also specified.
Raises: Raises:
RuntimeError: If xml of Annotations is a invalid format RuntimeError: If xml of Annotations is a invalid format.
RuntimeError: If xml of Annotations loss attribution of "object" RuntimeError: If xml of Annotations loss attribution of "object".
RuntimeError: If xml of Annotations loss attribution of "bndbox" RuntimeError: If xml of Annotations loss attribution of "bndbox".
RuntimeError: If sampler and shuffle are specified at the same time. RuntimeError: If sampler and shuffle are specified at the same time.
RuntimeError: If sampler and sharding are specified at the same time. RuntimeError: If sampler and sharding are specified at the same time.
RuntimeError: If num_shards is specified but shard_id is None. RuntimeError: If num_shards is specified but shard_id is None.
@ -4230,10 +4230,10 @@ class CocoDataset(MappableDataset):
""" """
A source dataset for reading and parsing COCO dataset. A source dataset for reading and parsing COCO dataset.
CocoDataset support four kinds of task: CocoDataset support four kinds of task: 2017 Train/Val/Test Detection, Keypoints, Stuff, Panoptic.
2017 Train/Val/Test Detection, Keypoints, Stuff, Panoptic.
The generated dataset has multi-columns : The generated dataset has multi-columns :
- task='Detection', column: [['image', dtype=uint8], ['bbox', dtype=float32], ['category_id', dtype=uint32], - task='Detection', column: [['image', dtype=uint8], ['bbox', dtype=float32], ['category_id', dtype=uint32],
['iscrowd', dtype=uint32]]. ['iscrowd', dtype=uint32]].
- task='Stuff', column: [['image', dtype=uint8], ['segmentation',dtype=float32], ['iscrowd',dtype=uint32]]. - task='Stuff', column: [['image', dtype=uint8], ['segmentation',dtype=float32], ['iscrowd',dtype=uint32]].
@ -4299,7 +4299,7 @@ class CocoDataset(MappableDataset):
dataset_dir (str): Path to the root directory that contains the dataset. dataset_dir (str): Path to the root directory that contains the dataset.
annotation_file (str): Path to the annotation json. annotation_file (str): Path to the annotation json.
task (str): Set the task type of reading coco data, now support 'Detection'/'Stuff'/'Panoptic'/'Keypoint' task (str): Set the task type of reading coco data, now support 'Detection'/'Stuff'/'Panoptic'/'Keypoint'
(default='Detection') (default='Detection').
num_samples (int, optional): The number of images to be included in the dataset num_samples (int, optional): The number of images to be included in the dataset
(default=None, all images). (default=None, all images).
num_parallel_workers (int, optional): Number of workers to read the data num_parallel_workers (int, optional): Number of workers to read the data

Loading…
Cancel
Save