Function mindspore::dataset::DIV2K

Function Documentation

inline std::shared_ptr<DIV2KDataset> mindspore::dataset::DIV2K(const std::string &dataset_dir, const std::string &usage, const std::string &downgrade, int32_t scale, bool decode, const std::reference_wrapper<Sampler> &sampler, const std::shared_ptr<DatasetCache> &cache = nullptr)

Function to create a DIV2KDataset.

Note

The generated dataset has two columns [“hr_image”, “lr_image”].

Parameters
  • dataset_dir[in] The dataset dir to be read.

  • usage[in] The type of dataset. Acceptable usages include “train”, “valid” or “all”.

  • downgrade[in] The mode of downgrade. Acceptable downgrades include “bicubic”, “unknown”, “mild”, “difficult” or “wild”.

  • scale[in] The scale of downgrade. Acceptable scales include 2, 3, 4 or 8.

  • 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).

Returns

Shared pointer to the current DIV2KDataset.