Shortcuts

MUAD

class torch_uncertainty.datasets.MUAD(root, split, min_depth=None, max_depth=None, target_type='semantic', transforms=None, download=False)[source]

The MUAD Dataset.

Parameters:
  • root (str) – Root directory of dataset where directory ‘leftImg8bit’ and ‘leftLabel’ or ‘leftDepth’ are located.

  • split (str, optional) – The image split to use, ‘train’ or ‘val’.

  • min_depth (float, optional) – The maximum depth value to use if target_type is ‘depth’. Defaults to None.

  • max_depth (float, optional) – The maximum depth value to use if target_type is ‘depth’. Defaults to None.

  • target_type (str, optional) – The type of target to use, ‘semantic’ or ‘depth’.

  • transforms (callable, optional) – A function/transform that takes in a tuple of PIL images and returns a transformed version.

  • download (bool, optional) – If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.

Reference:

https://muad-dataset.github.io

Note

MUAD cannot be used for commercial purposes. Read MUAD’s license carefully before using it and verify that you can comply.

encode_target(target)[source]

Encode target image to tensor.

Parameters:

target (Image.Image) – Target PIL image.

Returns:

Encoded target.

Return type:

torch.Tensor