Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnair1 committed Nov 16, 2022
1 parent 635c2b9 commit 94b23a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 46 deletions.
5 changes: 1 addition & 4 deletions tests/datasets/test_spacenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def dataset(

def test_getitem(self, dataset: SpaceNet1) -> None:
x = dataset[0]
_ = dataset[1]
dataset[1]
assert isinstance(x, dict)
assert isinstance(x["image"], torch.Tensor)
assert isinstance(x["mask"], torch.Tensor)
Expand Down Expand Up @@ -363,9 +363,6 @@ def dataset(
) -> SpaceNet6:
radiant_mlhub = pytest.importorskip("radiant_mlhub", minversion="0.2.1")
monkeypatch.setattr(radiant_mlhub.Dataset, "fetch", fetch_dataset)
# test_md5 = {"sn6_AOI_11_Rotterdam": "6ceae7ff8c557346e8a4c8b6c61cc1b9"}

# monkeypatch.setattr(SpaceNet6, "collection_md5_dict", test_md5)
root = str(tmp_path)
transforms = nn.Identity()
return SpaceNet6(
Expand Down
49 changes: 7 additions & 42 deletions torchgeo/datasets/spacenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class SpaceNet(NonGeoDataset, abc.ABC):
datasets that all together contain >11M building footprints and ~20,000 km
of road labels mapped over high-resolution satellite imagery obtained from
a variety of sensors such as Worldview-2, Worldview-3 and Dove.
.. note::
The SpaceNet datasets require the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
"""

@property
Expand Down Expand Up @@ -385,13 +392,6 @@ class SpaceNet1(SpaceNet):
* https://arxiv.org/abs/1807.01232
.. note::
This dataset requires the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
"""

dataset_id = "spacenet1"
Expand Down Expand Up @@ -491,13 +491,6 @@ class SpaceNet2(SpaceNet):
* https://arxiv.org/abs/1807.01232
.. note::
This dataset requires the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
"""

dataset_id = "spacenet2"
Expand Down Expand Up @@ -617,13 +610,6 @@ class SpaceNet3(SpaceNet):
* https://arxiv.org/abs/1807.01232
.. note::
This dataset requires the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
.. versionadded:: 0.3
"""

Expand Down Expand Up @@ -854,13 +840,6 @@ class SpaceNet4(SpaceNet):
* https://arxiv.org/abs/1903.12239
.. note::
This dataset requires the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
"""

dataset_id = "spacenet4"
Expand Down Expand Up @@ -1051,13 +1030,6 @@ class SpaceNet5(SpaceNet3):
Route Travel Time Estimation from Satellite Imagery”,
https://spacenet.ai/sn5-challenge/
.. note::
This dataset requires the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
.. versionadded:: 0.2
"""

Expand Down Expand Up @@ -1299,13 +1271,6 @@ class SpaceNet7(SpaceNet):
* https://arxiv.org/abs/2102.04420
.. note::
This dataset requires the following additional library to be installed:
* `radiant-mlhub <https://pypi.org/project/radiant-mlhub/>`_ to download the
imagery and labels from the Radiant Earth MLHub
.. versionadded:: 0.2
"""

Expand Down

0 comments on commit 94b23a2

Please sign in to comment.