Function mindspore::dataset::VOC
Defined in File datasets.h
Function Documentation
Function to create a VOCDataset.
Note
The generated dataset has multi-columns :
task=’Detection’, column: [[‘image’, dtype=uint8], [‘bbox’, dtype=float32], [‘label’, dtype=uint32], [‘difficult’, dtype=uint32], [‘truncate’, dtype=uint32]].
task=’Segmentation’, column: [[‘image’, dtype=uint8], [‘target’,dtype=uint8]].
- Parameters
dataset_dir – [in] Path to the root directory that contains the dataset.
task – [in] Set the task type of reading voc data, now only support “Segmentation” or “Detection”.
usage – [in] The type of data list text file to be read.
class_indexing – [in] A str-to-int mapping from label name to index, only valid in “Detection” task.
decode – [in] Decode the images after reading.
sampler – [in] Sampler object used to choose samples from the dataset.
cache – [in] Tensor cache to use (default=nullptr which means no cache is used).
extra_metadata – [in] Flag to add extra meta-data to row (default=false).
- Returns
Shared pointer to the VOCDataset.