Skip to content

Commit

Permalink
add date after transform in cashew (#168)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Gomes <[email protected]>
  • Loading branch information
CarlosGomes98 authored Sep 24, 2024
1 parent 7ae0125 commit 4640128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terratorch/datasets/m_cashew_plantation.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ def __getitem__(self, index: int) -> dict[str, torch.Tensor]:
date = self._get_date(h5file)
mask = np.array(h5file["label"])

output = {"image": image.astype(np.float32), "date": date, "mask": mask}
output = {"image": image.astype(np.float32), "mask": mask}

output = self.transform(**output)
output["date"] = date
output["mask"] = output["mask"].long()

return output
Expand Down

0 comments on commit 4640128

Please sign in to comment.