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

L7 Irish: add new dataset/datamodule #1197

Merged
merged 60 commits into from
Apr 12, 2023

Conversation

yichiac
Copy link
Contributor

@yichiac yichiac commented Mar 26, 2023

Overview

Adding Landsat 7 Cloud Cover Assessment Validation Data as a RasterDataset to TorchGeo.

Main changes:

Added functions to initialize the L7 Irish dataset, sample from it, and plot images.
Added data generation script and artificial data corresponding to the same.
Wrote tests to check the functionality of the L7 Irish class.
Integrated L7Irish Data Module and included different splits.
Included dataset details into the docs.

Here is a sample plot of an image and its mask from the dataset:

demo2

adding [Landsat 7 Cloud Cover Assessment Validation Data](https://landsat.usgs.gov/landsat-7-cloud-cover-assessment-validation-data)
from USGS.

The files are .tif format. The naming pattern is slightly different from the Landsat class. Thus, the customized RasterDataset class is used.
@github-actions github-actions bot added the datasets Geospatial or benchmark datasets label Mar 26, 2023
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Obviously still needs documentation and tests

.DS_Store Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
@adamjstewart
Copy link
Collaborator

See https://torchgeo.readthedocs.io/en/stable/user/contributing.html#linters for how to fix the failing tests.

@adamjstewart adamjstewart changed the title Landsat 7 Irisih: add new dataset/datamodule L7 Irish: add new dataset/datamodule Mar 26, 2023
@adamjstewart adamjstewart added this to In progress in SSL4EO-L via automation Mar 26, 2023
@adamjstewart adamjstewart added this to the 0.5.0 milestone Mar 28, 2023
@yichiac yichiac marked this pull request as ready for review March 28, 2023 03:05
#	deleted:    .DS_Store
#	deleted:    torchgeo/.DS_Store
#
# Changes not staged for commit:
#	modified:   .gitignore
#	modified:   torchgeo/datasets/l7irish.py
@yichiac yichiac dismissed a stale review via 1211d33 March 28, 2023 03:24
#	modified:   .gitignore
#	modified:   torchgeo/datasets/l7irish.py
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Still a lot of failing tests. See Contributing docs for how to fix style issues.

.gitignore Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
modify: .gitignore and l7irish.py
@github-actions github-actions bot added the testing Continuous integration testing label Apr 1, 2023
#	modified:   .gitignore
#	new file:   tests/data/l7irish/data.py
#	modified:   torchgeo/datasets/l7irish.py
.gitignore Outdated Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
yichiac and others added 6 commits April 1, 2023 13:01
torchgeo/datasets/__init__.py,
torchgeo/datasets/l7irish.py
Added l7irish to __init__
Added L7Irish details to geo_datasets.csv
Will work on datamodules/l7irish.py
@github-actions github-actions bot added datamodules PyTorch Lightning datamodules documentation Improvements or additions to documentation labels Apr 4, 2023
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Almost done. Just a few last changes. The 2015 version also has cloud shadow, so we should add that back.

docs/api/geo_datasets.csv Outdated Show resolved Hide resolved
tests/conf/l7irish.yaml Outdated Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
yichiac and others added 7 commits April 11, 2023 21:56
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
docs/api/geo_datasets.csv Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Show resolved Hide resolved
tests/data/l7irish/data.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
torchgeo/datasets/l7irish.py Outdated Show resolved Hide resolved
@adamjstewart adamjstewart merged commit a0131ac into microsoft:main Apr 12, 2023
20 checks passed
SSL4EO-L automation moved this from In progress to Done Apr 12, 2023
yichiac added a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
* Landsat 7 Irisih: add new dataset/datamodule
adding [Landsat 7 Cloud Cover Assessment Validation Data](https://landsat.usgs.gov/landsat-7-cloud-cover-assessment-validation-data)
from USGS.

The files are .tif format. The naming pattern is slightly different from the Landsat class. Thus, the customized RasterDataset class is used.

* # Changes to be committed:
#	deleted:    .DS_Store
#	deleted:    torchgeo/.DS_Store
#
# Changes not staged for commit:
#	modified:   .gitignore
#	modified:   torchgeo/datasets/l7irish.py

* # Changes to be committed:
#	modified:   .gitignore
#	modified:   torchgeo/datasets/l7irish.py

* add: test_l7irish.py and data.py
modify: .gitignore and l7irish.py

* # Changes to be committed:
#	modified:   .gitignore
#	new file:   tests/data/l7irish/data.py
#	modified:   torchgeo/datasets/l7irish.py

* modified:   tests/datasets/test_l7irish.py,
torchgeo/datasets/__init__.py,
torchgeo/datasets/l7irish.py

* added data.py, austral.tar.gz, test_l7irish.py
modified l7irish.py

* remove comments in test_l7irish.py

* resolve black and flake8 issues

* Fixed _getitem
Added l7irish to __init__
Added L7Irish details to geo_datasets.csv
Will work on datamodules/l7irish.py

* Added L7 Irish datamodule

* fix flake8 space error

* fix black test error

* chmod +x for data.py

* Update docs/api/datamodules.rst

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update docs/api/datasets.rst

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update docs/api/geo_datasets.csv

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Resolved minor issues in l7irish.py
Added mask assert in test_l7irish.py

* Improved _getitem and plot functions

* Added new artificial data with 5 scenes
Updated test_l7irish.py

* remove comments in l7irish.py

* resolve black, flake8, and isort errors

* add l7irish.yaml and refine test_segmentation.py

* modified l7irish.yaml

* revert a change in .gitignore

* add function test_rgb_bands_absent_plot()

* resolve black test issue

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Updaye l7irish.py and create new test data

* update l7irish.py for style tests

* remove old test data

* Update tests/data/l7irish/data.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* update data.py and l7irish.py

* update md5s, citations, masks, and thermal bands

* update mask mapping

* update formatting

* update mask path

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update torchgeo/datasets/l7irish.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update tests/data/l7irish/data.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update docs/api/geo_datasets.csv

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Update tests/conf/l7irish.yaml

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* resolve issues from comments

* Update L7 Irish link

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* update mask data generation and review changes

* Fix checksums

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
@yichiac yichiac deleted the datasets/l7irish branch February 24, 2024 14:57
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
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants