def __init__(self, root=os.path.expanduser('~/.cvss/data'), split='train', mode=None, transform=None, target_transform=None, **kwargs):
    super(NYUv2Segmentation, self).__init__(root, split, mode, transform, target_transform, **kwargs)
    root = os.path.join(root, self.BASE_DIR)
    assert os.path.exists(root), ('Please setup the dataset using' + 'cvss/scripts/prepare_nyuv2.py')
    (self.images, self.masks) = _get_nyuv2_pairs(root, split)
    if (split != 'test'):
        assert (len(self.images) == len(self.masks))
    if (len(self.images) == 0):
        raise RuntimeError((('Found 0 images in subfolders of:                 ' + root) + '\n'))
def __init__(self, root=os.path.expanduser('~/.cvss/data'), split='train', mode=None, transform=None, target_transform=None, **kwargs):
    super(NYUv2Segmentation, self).__init__(root, split, mode, transform, target_transform, **kwargs)
    root = os.path.join(root, self.BASE_DIR)
    assert os.path.exists(root), ('Please setup the dataset using' + 'cvss/scripts/prepare_nyuv2.py')
    (self.images, self.masks) = _get_nyuv2_pairs(root, split)
    if (split != 'test'):
        assert (len(self.images) == len(self.masks))
    if (len(self.images) == 0):
        raise RuntimeError((('Found 0 images in subfolders of:                 ' + root) + '\n'))