Skip to content

Fix MegaDepth train/val split#231

Open
akretz wants to merge 1 commit intonaver:mainfrom
akretz:fix_megadepth_split
Open

Fix MegaDepth train/val split#231
akretz wants to merge 1 commit intonaver:mainfrom
akretz:fix_megadepth_split

Conversation

@akretz
Copy link

@akretz akretz commented Jul 10, 2025

The __init__() function of the MegaDepth data loader has a split parameter. However, it never gets passed to the super initializer and so self.split never gets set. This means self.split is always None for the MegaDepth dataset and training data = validation data.

class MegaDepth(BaseStereoViewDataset):
def __init__(self, *args, split, ROOT, **kwargs):
self.ROOT = ROOT
super().__init__(*args, **kwargs)
self.loaded_data = self._load_data(self.split)
if self.split is None:
pass
elif self.split == 'train':
self.select_scene(('0015', '0022'), opposite=True)
elif self.split == 'val':
self.select_scene(('0015', '0022'))
else:
raise ValueError(f'bad {self.split=}')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant