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

Added substation segementation dataset #2352

Open
wants to merge 87 commits into
base: main
Choose a base branch
from
Open

Conversation

rijuld
Copy link

@rijuld rijuld commented Oct 17, 2024

No description provided.

@github-actions github-actions bot added documentation Improvements or additions to documentation datasets Geospatial or benchmark datasets testing Continuous integration testing labels Oct 17, 2024
@adamjstewart adamjstewart added this to the 0.7.0 milestone Oct 17, 2024
@adamjstewart
Copy link
Collaborator

Hi @rijuld, thanks for the contribution! If you're new to creating PyTorch datasets, I highly recommend reading the following tutorials:

The only difference between datasets in torchvision and NonGeoDatasets in TorchGeo is that our __getitem__ returns a dictionary instead of a tuple. Other than that, they share all the same basic components.

Most of your issues seem to be due to the use of args. I think you just need to remove this and explicitly list all parameters in the function signature. This will also simplify your testing code. Take a look at other existing datasets, we have about 75 examples to choose from. If you find one that is similar to your dataset, it shouldn't actually require that many changes to get them working.

@rijuld
Copy link
Author

rijuld commented Oct 22, 2024

Hi @adamjstewart , thanks a ton for the feedback! I will go through this tutorial.

@rijuld rijuld requested a review from adamjstewart January 22, 2025 11:57
@@ -53,6 +53,7 @@ Dataset,Task,Source,License,# Samples,# Classes,Size (px),Resolution (m),Bands
`SSL4EO`_-S12,T,Sentinel-1/2,"CC-BY-4.0",1M,-,264x264,10,"SAR, MSI"
`SSL4EO-L Benchmark`_,S,Lansat & CDL,"CC0-1.0",25K,134,264x264,30,MSI
`SSL4EO-L Benchmark`_,S,Lansat & NLCD,"CC0-1.0",25K,17,264x264,30,MSI
`Substation`_,S,OpenStreetMap & Sentinel-2, "CC-BY-SA 2.0", 27K, 2, 228x228, 10, MSI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you find the license? I don't see anything on GitHub or in the paper.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change the links to hugging face links; we have updated the license there.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/datasets/test_substation.py Outdated Show resolved Hide resolved
num_of_timepoints=4,
)

@pytest.mark.parametrize(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you parametrize the fixture instead of the unit test? Then all other unit tests will also be parametrized.

tests/datasets/test_substation.py Outdated Show resolved Hide resolved
torchgeo/datamodules/substation.py Outdated Show resolved Hide resolved
torchgeo/datasets/substation.py Outdated Show resolved Hide resolved
torchgeo/datasets/substation.py Outdated Show resolved Hide resolved
torchgeo/datasets/substation.py Show resolved Hide resolved
torchgeo/datasets/substation.py Outdated Show resolved Hide resolved
torchgeo/datasets/substation.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodules PyTorch Lightning datamodules datasets Geospatial or benchmark datasets documentation Improvements or additions to documentation testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants