Function mindspore::dataset::WIDERFace

Function Documentation

inline std::shared_ptr<WIDERFaceDataset> mindspore::dataset::WIDERFace(const std::string &dataset_dir, const std::string &usage, bool decode, const Sampler *sampler, const std::shared_ptr<DatasetCache> &cache = nullptr)

Function to create a WIDERFace Dataset.

Note

When usage is “train”, “valid” or “all”, the generated dataset has eight columns [“image”, “bbox”, “blur”, “expression”, “illumination”, “occlusion”, “pose”, “invalid”]. When usage is “test”, it only has one column [“image”].

Parameters
  • dataset_dir[in] Path to the root directory that contains the dataset.

  • usage[in] The type of data to be read, can be “train”, “test”, “valid” or “all”. “all” will read samples from “train” and “valid”.

  • decode[in] The option to decode the images in dataset.

  • sampler[in] Raw pointer to a sampler object used to choose samples from the dataset.

  • cache[in] Tensor cache to use (default=nullptr, which means no cache is used).

Returns

Shared pointer to the WIDERFaceDataset.