Function mindspore::dataset::PhotoTour

Function Documentation

inline std::shared_ptr<PhotoTourDataset> mindspore::dataset::PhotoTour(const std::string &dataset_dir, const std::string &name, const std::string &usage = "train", const std::shared_ptr<Sampler> &sampler = std::make_shared<RandomSampler>(), const std::shared_ptr<DatasetCache> &cache = nullptr)

Function to create a PhotoTourDataset.

Note

If usage is ‘train’, the generated dataset has one column [“image”], else three columns [“image1”, “image2”, “matches”].

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

  • name[in] Name of the dataset to load, should be one of ‘notredame’, ‘yosemite’, ‘liberty’, ‘notredame_harris’, ‘yosemite_harris’ or ‘liberty_harris’.

  • usage[in] Part of dataset of PhotoTour, can be train or test (default=”train”).

  • sampler[in] Shared pointer to a sampler object used to choose samples from the dataset. If sampler is not given, a RandomSampler will be used to randomly iterate the entire dataset (default = RandomSampler()).

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

Returns

Shared pointer to the current PhotoTourDataset.