Skip to content

Commit

Permalink
SeCo newer version bug fix (microsoft#1235)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaccorley authored Apr 14, 2023
1 parent 265a236 commit 7d3e16b
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/data/seco/seco_100k.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/datasets/test_seco.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def dataset(
monkeypatch.setitem(
SeasonalContrastS2.metadata["100k"],
"md5",
"4d3e6e4afed7e581b7de1bfa2f7c29da",
"6f527567f066562af2c78093114599f9",
)
monkeypatch.setitem(
SeasonalContrastS2.metadata["1m"],
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/seco.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __getitem__(self, index: int) -> Dict[str, Tensor]:
root = os.path.join(
self.root, self.metadata[self.version]["directory"], f"{index:06}"
)
subdirs = os.listdir(root)
subdirs = [f for f in os.listdir(root) if os.path.isdir(os.path.join(root, f))]
subdirs = random.sample(subdirs, self.seasons)

images = [self._load_patch(root, subdir) for subdir in subdirs]
Expand Down

0 comments on commit 7d3e16b

Please sign in to comment.