Skip to content

Commit

Permalink
Add metadata dict
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Feb 19, 2025
1 parent 4c38d76 commit d727e47
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions torchgeo/datasets/ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,13 @@ def __getitem__(self, index: int) -> dict[str, Tensor]:

sample = {
'image': torch.cat(images),
'x': torch.tensor(xs),
'y': torch.tensor(ys),
't': torch.tensor(ts),
'wavelength': torch.tensor(wavelengths),
'res': torch.tensor(10),
'metadata': {
'x': torch.tensor(xs),
'y': torch.tensor(ys),
't': torch.tensor(ts),
'wavelength': torch.tensor(wavelengths),
'res': torch.tensor(10),
},
}

if self.transforms is not None:
Expand Down

0 comments on commit d727e47

Please sign in to comment.