Skip to content
Snippets Groups Projects
Commit 568fb6be authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

introduce new mu map dataset consisting of patches

parent eed88628
No related branches found
No related tags found
No related merge requests found
from mu_map.data.datasets import MuMapDataset
class MuMapPatchDataset(MuMapDataset):
def __init__(self, dataset_dir, patches_per_image=100, patch_size=32):
super().__init__(dataset_dir)
self.patches_per_image=patches_per_image
self.patch_size=patch_size
def __getitem___(self, index:int):
return super()[index]
def __len__(self):
return super().__len__() * self.patches_per_image
if __name__ == "__main__":
dataset = MuMapPatchDataset("data/initial/")
print(f"Images {len(dataset)}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment