Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom disaster-based train/test splits for xView2 dataset #2416

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ xView2
^^^^^^

.. autoclass:: XView2
.. autoclass:: XView2DistShift

ZueriCrop
^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions tests/datasets/test_xview2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from _pytest.fixtures import SubRequest
from pytest import MonkeyPatch

from torchgeo.datasets import DatasetNotFoundError, XView2

from torchgeo.datasets import DatasetNotFoundError, XView2, XView2DistShift

class TestXView2:
@pytest.fixture(params=['train', 'test'])
Expand All @@ -27,6 +26,7 @@ def dataset(self, monkeypatch: MonkeyPatch, request: SubRequest) -> XView2:
'md5': '373e61d55c1b294aa76b94dbbd81332b',
'directory': 'train',
},

'test': {
'filename': 'test_images_labels_targets.tar.gz',
'md5': 'bc6de81c956a3bada38b5b4e246266a1',
Expand Down
3 changes: 2 additions & 1 deletion torchgeo/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
from .vaihingen import Vaihingen2D
from .vhr10 import VHR10
from .western_usa_live_fuel_moisture import WesternUSALiveFuelMoisture
from .xview import XView2
from .xview import XView2, XView2DistShift
from .zuericrop import ZueriCrop

__all__ = (
Expand Down Expand Up @@ -258,6 +258,7 @@
'VHR10',
'WesternUSALiveFuelMoisture',
'XView2',
'XView2DistShift',
'ZueriCrop',
# Base classes
'GeoDataset',
Expand Down
Loading