MUAD#

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

The MUAD Dataset.

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

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

  • version (str, optional) – The version of the dataset to use, small or full. Defaults to full.

  • 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. Defaults to semantic.

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

  • 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. Defaults to False.

  • use_train_ids (bool, optional) – If True, uses the train ids instead of the original ids. Defaults to True. Note that this is only used for the semantic target type.

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 the target tensor to the train ids.

Parameters:

target (torch.Tensor) – Target tensor.

Returns:

Encoded target tensor.

Return type:

torch.Tensor