Граф коммитов

468 Коммитов

Автор SHA1 Сообщение Дата
Adam J. Stewart e2680b479c
File rename: nwpu.py -> vhr10.py (#1030)
* File rename: nwpu.py -> vhr10.py

* Update more locations

* Name change in several other places

* Add NWPU only to docstring

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2023-01-23 11:45:45 -08:00
Ashwin Nair 7c2868814f
Add plot method for VHR10 dataset (#847)
* Add plot fn & rename nwpu -> vhr10

* Update test data & add data.py

* Add scikit-image dependency

* Move scikit-image dep to extras

* Comment out check for coverage

* Move skimage import

* Update requirements

* Test requirements

* Update requirements

* Update

* Update

* Update

* Update

* Update

* Update min scipy

* Update min scipy

* Update min scipy

* Update min scipy

* Update min scipy

* Update skimage

* Review comments#1

* Update skimage

* Revert rename to nwpu

* Revert renames

* Update min scipy

* Fix data dirname

* More fixes

* Bump numpy minor version

* Update scipy

* Going back to what worked

* Ignore numpy warning

* Edit

* Edit warning

* Ignore another warning

* Insanity

* Fix pooch

* Try older skimage

* Try older scipy

* scipy 1.2.0

* scipy 1.4.0

* scipy 1.5.0

* scipy 1.4.2

* scipy 1.6.0

* scipy 1.5.4

* scipy 1.5.2

* scipy 1.5.1

* scipy 1.5.1 is new min dep version

* Fix skip

* Newer scipy

* scipy 1.6.3

* scipy 1.6.0

* scipy 1.6.1

* scipy 1.6.2

* scipy 1.6.2 is new min

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-01-22 23:37:24 -06:00
Adam J. Stewart 72ea9f853a
Add Sentinel-1 dataset (#821)
* Add Sentinel-1 dataset

* SLC -> GRD

* Color scaling

* Improve image title

* Newline before lists

* New in version 0.4

* Divide before scaling

* Documentation clarifications

* Relax constraints on bands

* One more combo

* Fix syntax

* Fix syntax

* Fix flip

* Fix test name

* pyupgrade

* Clarify co/cross-pol, backscatter coeff, and scale
2023-01-22 23:19:24 -06:00
Adam J. Stewart 6cd3267d78
Convert all index transforms to Kornia (#999)
* Convert all index transforms to Kornia

* Fix tests too

* Fix docs build

* Update tutorial

* Update transforms tutorial

* Kornia augs add new batch dimension

* Expand dims

* Fix one more set of transforms

* Escape quotes

* Remove unneeded transform

* Kornia transforms require float images

* Fix device problems

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2023-01-22 21:05:10 -08:00
Adam J. Stewart e9c305861c
Remove packaging dependency (#1019)
* Remove packaging dependency

* Remove additional references

* Remove unused import
2023-01-22 21:04:42 -08:00
Nils Lehmann 60eb61b5fa
Add Multi-Weight Support API (#917)
* load pretrained weights

* change name millionaid

* restructure and additional weights

* rename sentinel1 weights

* add vit small weights

* forgot to add vit.py

* struggling with test

* wrong name failing test

* feedback on tests

* increase test coverage

* fix failing test

* fix failing test

* fix failing test and add vit tests

* fix failing vit test

* torchgeo.models.utils

* forgot utils file

* typo num channels

* nitpick docs, version torchvision

* another try min dependencies

* add documentation table

* expand pytests to test pretrained weights on tasks

* reverse changes to byol task

* add tests to init pretrained weights from config

* forgot to add the conf files

* change path

* increase test coverage

* vit tests all pass locally including slow

* now remote

* fix tests another one

* add a draft tutorial

* run black on tutorial notebook

* Tutorial typo fixes

* Lower min torch/vision versions

* Fix bad rebase

* Remove dead code

* Flake8 fixes

* Consistent in_chans

* Black fixes

* bison > yacs

* Remove one more reference

* Download modified weights from hugging face

* Add entrypoints

* Add torch.hub support

* progress arg is required

* Fix model loading for resnet18

* Add transforms, update tests

* VIT -> ViT

* add seco weights

* Fix type hints

* Link to timm docs

* Fix pydocstyle

* Try to fix timm docs link

* Fix tests

* Nuke ignores

* Ignore timm links

* Add model API methods

* Add to __init__ and document

* Test model API functions

* fix tests

* Use correct documentation link for intersphinx

* Typos

* Fix Windows tests

* meth -> func

* Explicit function scope

* weight-specific filename

* Support enums in classification trainer

* Update other trainers too

* Fix regression tests

* Fix classification tests

* Fix byol tests

* Fix types

* progress_bar is required arg

* Test weight enums

* Fix pickling

* Fix regression tests

* Improve coverage of classification tests

* Improve coverage of BYOL tests

* Update resnet table

* Update ViT table

* Update get_state_dict usage

* Remove unused YAML files

* Update table widths

* Documentation improvements

* Tweak tables

* Try to fix Windows tests

* Revert "Try to fix Windows tests"

This reverts commit 1325b13ff7.

* Monkeypatch everything

* Revert "Monkeypatch everything"

This reverts commit e3e8d7d042.

* Revert "Revert "Monkeypatch everything""

This reverts commit 9b27bd705b.

* Patch things not at the source

* Fix missing import

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-01-22 14:25:49 -08:00
Nils Lehmann 2bf1a3614b
Add datamodule for GID-15 dataset (#928)
* add datamodule with crop logic

* remove print and fix batch_size

* typo

* Use Kornia augmentations

* Style

* Ignore warning

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-30 11:31:00 -06:00
Nils Lehmann 449656f56c
Add crop logic to Potsdam2D datamodule (#929)
* add crop logic to potsdam

* suggested changes

* Use same style as Vaihingen2D

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-30 10:34:04 -06:00
Nils Lehmann a905983e19
Fix Vaihingen datamodule (#853)
* fix datamodule

* requested changes to vaihingen

* data loader

* fix error an clarity

* fix failing test

* fix failing test crop augmentation

* found a bug

* remove same_batch param

* Trying to get minimum tests to pass

* Formatting

* Formatting again

* Update torchgeo/datamodules/vaihingen.py

* Sort imports

* Isort, yousort, we all sort

* Same logic as deepglobe

* More-specific types

* Missing import

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-29 22:43:28 -06:00
Caleb Robinson 867a3bc52c
Add LoveDADataModule to the trainer tests (#966)
* Add loveda to trainer tests

* Delete direct loveda datamodule test

* Ignoring deprecation warning for lightning

* Remove ignore

* test -> predict

* Fix typo

* Add comment explaining mismatch

* More coverage

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-29 21:46:06 -06:00
Nils Lehmann c62d8321fb
Add random crop logic to DeepGlobeLandCover Datamodule (#876)
* crop logic

* typo

* change train_batch_size logic

* fix failing test

* typos and naming

* return argument train dataloader

* typo

* fix failing test

* suggestions except about test file

* remove test_deepglobe and add test to trainer

* forgot new conf file

* reanme collate function

* move cropping logic to transform and utils

* remove comment

* simplify

* move pad_segmentation to transforms

* another one

* naming and versionadded

* another transforms approach

* typo

* fix read the docs

* some checks for Ncrop

* add unit tests new transforms

* Remove cruft

* More simplification

* Add config file

* Implemented ExtractTensorPatches

* Remove tests

* Remove unnecessary attrs

* Apply to both input and mask

* Implement RandomNCrop

* Fix dimensions

* mypy fixes

* Fix docs

* Ensure that image and mask get the same transformation

* Bump min kornia version

* ignore still needed?

* Remove unneeded hacks

* Fix pydocstyle

* Fix dimensions

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-29 18:08:49 -06:00
Adam J. Stewart 592822a0ed
OSCDDataModule: does not support SemanticSegmentationTask (#983) 2022-12-26 23:31:57 -06:00
Adam J. Stewart f2d311561d
InriaAerialImageLabelingDataModule: fix predict dimensions (#975)
* InriaAerialImageLabelingDataModule: fix predict dimensions

* Record number of patches for reconstruction
2022-12-26 10:20:24 -06:00
Adam J. Stewart 29a9e91d4a
Remove tests/datamodules/test_nasa_marine_debris.py (#979) 2022-12-26 09:52:10 -06:00
Adam J. Stewart fd06985d3e
Remove __module__ hacks (#976)
* Remove __module__ hacks

* Remove unused imports

* Fix typo in reference

* Explicit link
2022-12-26 09:51:30 -06:00
Adam J. Stewart b7add1437e
DataModules: only instantiate when download requested (#974)
* DataModules: only instantiate when download requested

* Fix docs
2022-12-25 12:21:20 -06:00
Adam J. Stewart 89e44035d4
SpaceNet1: add test data to git (#972) 2022-12-24 14:12:57 -06:00
Caleb Robinson 0a44f9ab61
Datamodule for SpaceNet1 (#965)
* Add SpaceNet1 datamodule

* Running black and isort

* version added

* Fix docs

* SpaceNet1 tests

* Testing spacenet datamodule with trainers

* no loveda

* black

* doc fix

* Removing direct datamodule test

* Make sure percent normalization doesn't divide by zero

* Speed up preprocessing

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-24 03:02:38 +00:00
Caleb Robinson 43356ee201
Remove unused param from FAIR1 datamodule (#964) 2022-12-20 18:05:25 +00:00
Adam J. Stewart 064f9c3d52
Datasets: consistent capitalization of band names (#778)
* Datasets: consistent capitalization of band names

* Fix tests too
2022-12-19 11:39:05 -08:00
Isaac Corley b9f0fb2bfe
Replace open3d with pyvista (#663)
* remove open3d add pyvista

* refactor plotting pcl with pyvista

* refactor tests with pyvista

* remove open3d

* remove skipping pcl plot test on mac

* fix

* remove unused import

* add pyvista docs

* use xvfb for pyvista tests

* changes per suggestions

* changes per suggestions x2

* remove bugged test

* Test minimum pyvista version

* mypy fix

* More dep file updates

* Document change

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-17 05:41:19 +00:00
Nils Lehmann 98c50afc92
Change BYOL task argument name and switch to timm models (#918)
* change argument name and supporrt timm

* list_models()

* encoder -> backbone

* fix failing test

* suggested changes
2022-12-15 14:22:59 -06:00
Nils Lehmann d5ff69ca1f
Change segmentation model argument names (#919)
* name change semgmentation model

* chmod evaluate.py

* fix variable name evaluate

* encoder -> backbone

* remove backbone_output_stride from confs

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-12 21:43:25 -06:00
Nils Lehmann 8dc50cdf36
Change argument name Object Detection Task (#920)
* change argument name

* documentation about support
2022-12-09 17:37:29 -06:00
Isaac Corley dc7b932047
add predict_step to SemanticSegmentationTask (#939)
* add segmentation predict step

* add OOM wawrning to docstring
2022-12-08 13:27:54 -06:00
Nils Lehmann d6d568a5e9
Change regression task to timm support (#854)
* change regression task to timm support

* add docstring about available models

* typo again

* failing test

* change name

* change name

* expose all available models

* docstring list_models

* Update torchgeo/trainers/regression.py

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-12-07 10:12:27 -06:00
Nils Lehmann b290f7b392
Change "classification_model" to "model" (#916)
* name change

* fix failing test

* expose all available timm models

* chmod

* imagenet pretrained flag

* remove extra

* docstring list_models
2022-12-04 13:54:25 -06:00
Adam J. Stewart 2203280d90
So2Sat: rename bands (#735) 2022-11-27 15:25:58 -06:00
Ashwin Nair c7e6dbda56
Add SpaceNet6 & data.py (#878)
* Add SpaceNet6 & data.py

* For coverage

* Added SpaceNet6 to docs

* Cleanup

* Docfix

* Move importskip to module level

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-11-17 06:29:52 +00:00
Pablo Mandiola b2bef78b61
Add transforms to UnionDataset and IntersectionDataset (#870)
* add transforms to UnionDataset

* add transforms to IntersectionDataset

* add versionadded to docstring

* transform after collate

* add tests

* fix tests
2022-11-14 20:31:39 -08:00
dependabot[bot] 00eff6836a
Bump torch from 1.12.1 to 1.13.0 in /requirements (#875)
* Bump torch from 1.12.1 to 1.13.0 in /requirements

Bumps [torch](https://github.com/pytorch/pytorch) from 1.12.1 to 1.13.0.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/master/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/compare/v1.12.1...v1.13.0)

---
updated-dependencies:
- dependency-name: torch
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump torchvision from 1.13.1 to 1.14.0 in /requirements

* torch.load now has type hints

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-10-29 04:19:12 +00:00
Pablo Mandiola f20556c294
Allow multilabels in VectorDataset (#862)
* add label_name param to VectorDataset

* small fix by black

* add tests

* reuse CustomVectorDataset

* versionadded in docstring
2022-10-26 11:42:13 -05:00
Adam J. Stewart f752d99c18
Add plot method to (most) DataModules (#814) 2022-10-18 13:25:09 -05:00
Nils Lehmann 6e4ef4ca12
Datamodule naming TropicalCyclone (#846)
* name change for consistency

* name change for consistency

* flake8 style correction

* flake8 style correction

* requested changes
2022-10-14 12:59:22 -05:00
dependabot[bot] d24218b611
Bump torchmetrics from 0.9.3 to 0.10.0 in /requirements (#816)
* Bump torchmetrics from 0.9.3 to 0.10.0 in /requirements

Bumps [torchmetrics](https://github.com/Lightning-AI/metrics) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/Lightning-AI/metrics/releases)
- [Changelog](https://github.com/Lightning-AI/metrics/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Lightning-AI/metrics/compare/v0.9.3...v0.10.0)

---
updated-dependencies:
- dependency-name: torchmetrics
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Drop support for older torchmetrics

* Update evaluate.py as well

* Args no longer valid

* Style fix

* Fix imports

* multiclass -> multilabel

* Fix tests

* Verbose install

* Bump minimum version

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-10-10 13:15:10 -05:00
Caleb Robinson ba966d76cc
Adding plotting to ChesapeakeCVPR dataset (#820)
* Adding plotting to ChesapeakeCVPR dataset

* De for-looping
2022-10-06 18:49:56 +00:00
Isaac Corley 0598975360
add predict_step to BYOLTask (#819)
* add predict_step to BYOLTask and tests

* fixes per suggestions
2022-10-04 21:59:03 -05:00
Isaac Corley a63c73f7db
add predict_step to RegressionTask and tests (#818) 2022-10-04 16:21:57 -05:00
Ashwin Nair a7dbd9cec8
Add support for ObjectDetection (#758)
* Prepare NasaMarineDebris dataset & datamodule

* Filter out invalid boxes
* Add label key to batch
* Add plot function

* Add detection task

* Add tests

* Fix conf arg

* Add test for non pretrained backbones

* Coverage for when datamodule has no plot fn

* Separate out tests

* self.forward(x) -> self(x)

* Add predict_step

* list -> List
2022-10-04 11:26:51 -05:00
Isaac Corley 396b4e3a1f
ClassificationTask predict step (#790)
* add predict_step method to ClassificationTask

* fix mypy error
2022-10-03 12:58:53 -05:00
Adam J. Stewart 598b702a4a
Random GeoSamplers: add default length (#755)
* Random GeoSamplers: add default length

* Document sampler utilities

* Mypy fix

* Fix docs and tests

* Fix import order

* Fix rST link

* Document default length

* More clarification
2022-10-01 16:35:25 -05:00
Adam J. Stewart 6f9589dc07
DataModules: pass kwargs directly to datasets (#730)
* Datamodules: pass kwargs directly to datasets

* Rename root_dir -> root in config files

* Fix datamodule tests

* Fix mypy

* Fix tutorial

* Specify all kwarg keys

* Fix bands vs. band_set

* root_dir -> root

* Document **kwargs
2022-10-01 16:33:38 -05:00
Isaac Corley 079e2e4a86
MultiLabelClassificationTask predict step (#792)
* add predict_step to MultiLabelClassificationTask

* fix docs
2022-09-30 10:01:19 -07:00
Adam J. Stewart a6f0cc78ed
UnionDataset: fix __getitem__ bug (#786) 2022-09-25 14:20:06 -05:00
Ashwin Nair 4b9f8c4e9a
Inria fixes (#780)
* Inria fixes

* Add version doc
2022-09-24 16:03:39 -07:00
Ashwin Nair 43916e058e
Allow band indexing in RasterDataset (#687)
* Allow band indexing

* Add bands attribute to RasterDataset

* Review comments#1

* Remove sentinel2 __init__ & fix landsat test

* Add tests

* Add test for coverage

* Review comments#2

* Review comments#3

* Trigger build
2022-09-14 10:12:40 -05:00
Ashwin Nair f6a9f75416
Fix torchvision constraint (#761) 2022-09-06 11:28:31 -05:00
Adam J. Stewart 30cbdad879
Sentinel-2: add support for files downloaded from USGS EarthExplorer (#754)
* Sentinel-2: add support for files downloaded from USGS EarthExplorer

* Style fix

* Fix driver

* Properly close filehandles

* Sentinel is uint16, not int32

* Fix import order

* Use correct resolution for each image
2022-09-05 14:18:57 -05:00
Rémi Tavon 7fa0fd429e
GridGeoSampler: change stride of last patch to sample entire ROI (#630)
* Adjust minx/miny with a smaller stride for the last sample per row/col and issue warning

* style and mypy fixes

* black test fix

* Adjust minx/miny with a smaller stride for the last sample per row/col and issue warning

* style and mypy fixes

* black test fix

* single.py: adapt gridgeosampler to sample beyond limit of ROI for a partial patch (to be padded)
test_single.py: add tests for multiple limit cases (see issue #448)

* format for black and flake8

* format for black and flake8

* once again, format for black and flake8

* Revert "Adjust minx/miny with a smaller stride for the last sample per row/col and issue warning"

This reverts commit cb554c67

* adapt unit tests, remove warnings

* flake8: remove warnings import

* Address some comments

* Simplify computation of # rows/cols

* Document this new feature

* Fix size of ceiling symbol

* Simplify tests

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-09-03 04:11:14 +00:00
Adam J. Stewart 669a4c0691
Fix float rounding issues (#736)
* Fix rounding bugs

* Mypy fixes

* Undo some changes

* Undo some changes

* mypy fixes

* Fix tests

* Increase size of ETCI2021 fake data

* Undo model changes

* line length fix
2022-09-02 12:08:31 -07:00
Adam J. Stewart a60789bfd7
Test rarfile on Windows (#701)
* Test rarfile on Windows

* Remove unused import

* Add pacman to PATH

* Add flags

* Change shell

* Quotes

* Set PATH for test time too

* Prepend

* Ask Python where to find pytest

* Prepend

* Experiment

* Undo experiment

* No PATH

* Undo more changes

* Revert "Undo more changes"

This reverts commit 42b490041a8b8e1fa2c1cc9c4c731a5cd9ea2072.

* Revert "No PATH"

This reverts commit 2767f07942d81ce9a82ff5de10394c1c882e4f46.
2022-08-31 11:54:25 -07:00
Kendall Smith 7d499562b6
Add Radiant MLHub (REF) Cloud Cover Dataset (#510)
* adding cloud cover dataset class

* Adding Cloud Cover Detection Challenge dataset class and tests

* fixed linter issues and passing pre-commit tests

* resolving linter errors

* addressing failed isort test

* replacing deprecated VisionDataset with NonGeoDataset reference

* removed NDArray import for quoted np.typing.NDArray

* addressing mypy errors

* updated docstring for plot method

* Update docs/api/non_geo_datasets.csv

adding commas to train/test split sizes

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

* Update docs/api/non_geo_datasets.csv

Including total dataset size in api CSV, removing train/test split

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

* updated Cloud Cover Dataset name in dataset.rst

* Update docs/api/datasets.rst

Accepting carrots under text in datasets.rst, sorry forgot to add these in!

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

* Update torchgeo/datasets/cloud_cover.py

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

* Update torchgeo/datasets/cloud_cover.py

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

* Update torchgeo/datasets/cloud_cover.py

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

* flakefreaking8

* Fix duplicate rst link

* adding cloud cover dataset class

* Adding Cloud Cover Detection Challenge dataset class and tests

* fixed linter issues and passing pre-commit tests

* resolving linter errors

* addressing failed isort test

* replacing deprecated VisionDataset with NonGeoDataset reference

* removed NDArray import for quoted np.typing.NDArray

* addressing mypy errors

* updated docstring for plot method

* Update docs/api/non_geo_datasets.csv

adding commas to train/test split sizes

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

* Update docs/api/non_geo_datasets.csv

Including total dataset size in api CSV, removing train/test split

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

* updated Cloud Cover Dataset name in dataset.rst

* Update docs/api/datasets.rst

Accepting carrots under text in datasets.rst, sorry forgot to add these in!

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

* Update torchgeo/datasets/cloud_cover.py

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

* Update torchgeo/datasets/cloud_cover.py

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

* Update torchgeo/datasets/cloud_cover.py

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

* flakefreaking8

* Fix duplicate rst link

* added normalization to plot method for better visual

* CloudCoverDetection is a non-geo dataset

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-08-31 18:03:24 +00:00
dependabot[bot] 50d26ff1cd
Bump kornia from 0.6.6 to 0.6.7 in /requirements (#746)
* Bump kornia from 0.6.6 to 0.6.7 in /requirements

Bumps [kornia](https://github.com/kornia/kornia) from 0.6.6 to 0.6.7.
- [Release notes](https://github.com/kornia/kornia/releases)
- [Changelog](https://github.com/kornia/kornia/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kornia/kornia/compare/v0.6.6...v0.6.7)

---
updated-dependencies:
- dependency-name: kornia
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update bbox coordinate order

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-08-31 01:04:17 +00:00
Adam J. Stewart 9dee4b166c
Add COWC counting experiment (#706)
* Add COWC counting experiment

* Fix tests

* Search event logs for all versions

* Add seed experiments
2022-08-14 17:58:45 -05:00
Adam J. Stewart 0dce631dfe
Make scripts executable 2022-08-06 22:00:59 +00:00
Teo Cherici 67b8b30af0
Fixes VectorDataset rounding bug causing sample mask size mismatch (#675)
* Fixes VectorDataset rounding bug causing sample mask size mismatch

* removes unnecessary casting to int
2022-07-18 16:47:59 -07:00
Adam J. Stewart 76139f60df
0.3.0 release (#664)
* 0.3.0 release

* Slightly different distutils deprecation warning

* Fix release tests

* Escape regex in warning ignore

* Escape characters require literal strings

* Colon was problematic

* Re-escape regex patterns

* Fix tests without optional dependencies

* Fix tests without optional dependencies

* Try older nbmake

* Try older nbmake

* Try explicitly passing key

* Black fixes

* Document when parameters were added

* Document more changes
2022-07-10 22:30:48 -07:00
Adam J. Stewart 7e7443a00f
Landsat: add plot method (#661) 2022-07-09 22:22:51 -07:00
Adam J. Stewart ee657bad62
Rename VisionDataset to NonGeoDataset (#627)
* Rename VisionDataset to NonGeoDataset

* Keep VisionDataset but add DeprecationWarning

* mypy fix

* More fixes

* More fixes

* cast types

* Undo cast

* Fix usage in test

* No idea why...

* Update more datasets
2022-07-09 18:28:24 -07:00
Nils Lehmann 2d1488326e
Million-AID dataset (#455)
* millionaid

* test

* separator

* remove type ignore

* type in test

* requested changes

* typos and glob pattern

* task argument description

* add test md5 hash

* Remove download logic

* Type ignore no longer needed

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-09 22:05:10 +00:00
Nils Lehmann 7cd28ca2f8
Add ReforesTree dataset (#582)
* add ReforesTree dataset

* fix failing test

* suggested changes

* Update download URL

* Change zipfile name

* Minor fixes

* Remove f-string

* Fix dtype, remove unnecessary conversion

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-09 14:10:29 -07:00
Adam J. Stewart 3435ccad72
Fix typo in download error msg 2022-07-09 14:10:05 -07:00
Caleb Robinson db3f183209
Datamodule cleanup (#657)
* Cleaning up preprocessing methods across DataModules

* Decoupled deleting the bbox with the other transforms in the GeoDataset DataModules

* Cleaning up how channel standardization is done

* Changing default conf for ETCI2021 and fixing So2Sat

* Forgot to update the indices.

* Change to use Normalize

* Remove default augs
2022-07-09 13:59:43 -07:00
Adam J. Stewart a2f66b2cd7
DeepGlobe: add uncompressed fake data to repo (#651) 2022-07-05 10:13:28 -07:00
Saumya Sinha d98b58af5b
Add DeepGlobe dataset for land cover (#578)
* add class for Deep Globe Land Cover dataset

* add Lightning data module implementation for deepglobe land cover

* fix formatting errors

* fix urls, formats and add link for paper

* add tests for deepglobe dataset and datamodule

* fix a test case and a few more formatting error

* add data.py and modify error match for data download

* modify draw_semantic_segmentation_masks for cases when mask is a subset of all class labels

* fix mypy error

* add to docs for documentation

* add deepglobe to the dataset lists csv

* fix error in building docs

* Update datamodules.rst

* Update datasets.rst

* Update data.py

* Update utils.py

* change file permissions of non_geo_datasets.csv

* Add versionadded

* Update torchgeo/datasets/deepglobelandcover.py

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

* Change end of line sequence

* Update tests/data/deepglobelandcover/data.py

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

* exist_ok

* Update tests/datasets/test_deepglobelandcover.py

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

* Remove datamodule tests

* Remove split monkeypatch

* Running black

* Add val percent to test conf

* Sort filelist so indices are the same across platforms

* Simplified the file and mask fns

* Re-adding datamodule tests for coverage

* Add sub-configs to test val_split_pct in the datamodule

* Lets try it

* Update tests/conf/deepglobelandcover_0.yaml

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

* nulllllllll

* ingore_zeros -> ignore_index

Co-authored-by: saumyasinha <t-sasinha@microsoft.com>
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-02 19:55:36 +00:00
Caleb Robinson c3e11e48b8
SemanticSegmentationTrainer: ignore_zeros -> ignore_index (#644)
* Clarify the ignore_zeros parameter to the segmentationi trainer

* Black

* Add test

* Added warnings

* Renaming ignore_zeros to ignore_index

* Fixed rest of config and tests

* Update conf/chesapeake_cvpr.yaml

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

* Update torchgeo/trainers/segmentation.py

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

* Update torchgeo/trainers/segmentation.py

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

* Changed warning match

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-02 17:44:37 +00:00
Adam J. Stewart 53ce8c1e29
LandCover.ai: add data.py script (#643)
* LandCover.ai: add data.py script

* monkeypatch trainer tests

* Add output to repo
2022-07-02 12:25:29 -05:00
dependabot[bot] ee6132041b
Bump torchvision from 0.12.0 to 0.13.0 in /requirements (#631)
* Bump torchvision from 0.12.0 to 0.13.0 in /requirements

Bumps [torchvision](https://github.com/pytorch/vision) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/pytorch/vision/releases)
- [Commits](https://github.com/pytorch/vision/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: torchvision
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump PyTorch too

* mypy fixes

* Fix deprecation warning in tests

* Style fixes

* More fixes

* Bump minimum packaging

* Silence mypy

* Fix tests

* Fix tests

* Fix tests

* Improve test coverage

* Improve test coverage

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-30 10:39:03 -07:00
Maciej Kilian 7b5a92b1c1
USAVars: implementing DataModule (#441)
* USAVars: implementing DataModule

* Adding initial version

* add to __init__

* changes

* add transforms argument

* black, isort fix

* fixed shuffle option

* update docs

* fix formatting

* initial split method

* fix formatting

* testing for datamodule

* this is simpler

* testing seed

* fix isort + test seed

* refactor dataset for splits

* black fix

* adding splits to fake data

* change test splits

* working tests locally

* fix black

* fix black

* adapt module to dataset refactor

* complete docstring

* Style fixes

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-27 00:52:15 +00:00
Kaustav Mukherjee d75d3b830f
Added 3 Bands indices AppendRBNDVI , AppendGBNDVI and AppendGRNDVI (#450)
* added GBNDVI and GRNDVI

* added RBNDVI

* Updated for AppendGBNDVI AppendGRNDVI AppendRBNDVI

* added AppendRBNDVI AppendGBNDVI AppendGRNDVI

* Import and style fixes

* Fix tests

* Docstring fixes

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-27 00:04:08 +00:00
Adam J. Stewart 8c5e4d21cd
Test minimum version of deps (#574) 2022-06-18 08:00:45 -07:00
Adam J. Stewart 7a9a9c1d64
Resolve DeprecationWarnings (#567)
* Resolve DeprecationWarnings

* Fix PIL version check

* Add ignores, hide ignores

* Always specify max_epochs

* Re-add one of the ignores that was removed

* Silence ColorJitter behavior change warnings

* Fix num_workers warning on macOS

* Ignore coverage of lines missed by older pillow versions

* Fix support for pre/post versions of PIL

* Wordsmithing

* Remove unused imports
2022-06-13 10:38:17 -07:00
Gaétan Bahl bab8050c71
Fix loading encoder weights trained with BYOL (#524)
* Fix loading encoder weights trained with BYOL

* Update conftest.py

Co-authored-by: BAHL Gaetan <gaetan.bahl@inria.fr>
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-06-13 10:32:23 -07:00
Ashwin Nair d06b103f81
Add Inria datamodule (#498)
* Add Inria Datamodule

* Fix up

* Add predict.py

* Integrate kornia fns for extracting & combining

Requires kornia/kornia#1558 to be merged

* transform creates problem when calculating metrics

* Update

* Use dict.get

* Add tests & update test data

* Add Inria datamodule to docs

* Reduce test data size

* Datamodules always have predict_dataloader

* Remove comments

* Update predict.py

* Add PredictDataset

* Fix tests

* Update inria.yaml

* Clarify predict_on doc

* Refactor

* Update min kornia

* Update inria.yaml

* Remove predict utilities

* Trainer fix

* Use kornia's compute_padding

* kornia docfix

* Use stable docs

* Fixes
2022-05-22 16:51:48 -05:00
Adam J. Stewart 827985ad0a
Add EDDMapS dataset (#533)
* Add EDDMapS dataset

* Mypy hack

* Test fix
2022-05-14 21:29:47 -05:00
Adam J. Stewart 369b36122a
Add iNaturalist dataset (#532) 2022-05-14 21:29:34 -05:00
Adam J. Stewart f53e4b7eef
Add GBIF dataset (#507)
* Add GBIF dataset

* Typo fix

* Add tests

* Style fixes

* Don't ignore CSV files

* Testing...

* Fix coverage bug

* Add note about required dep
2022-05-06 11:16:08 -05:00
Adam J. Stewart 8b3e5812de
Landsat: add support for all Level-1 and Level-2 products (#504)
* Landsat: allow use of non-SR bands

* Fix citation

* The more citation the better
2022-04-20 11:06:04 -05:00
Nils Lehmann 1a35d422f7
Add plot method and data.py to NAIP (#407)
* add plot method and data.py

* add version

* file typo

* forgot data.py

* add version change and larger image size

* requested changes

* test with print

* test geo

* change data to match chesapeake

* fix crs test
2022-04-09 16:33:22 -05:00
Nils Lehmann 4fadc24023
Fix case of missing label in Forest Damage dataset (#499)
* fix case of missing label

* mypy fix
2022-04-08 15:10:21 -05:00
Adam J. Stewart f262b00580
RandomGeoSampler: several bug fixes (#477)
* RandomGeoSampler: prevent area bias

* Use builtin PyTorch random

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-04-05 09:48:33 -07:00
Adam J. Stewart e8474e46e2
Add PreChippedGeoSampler for pre-chipped geospatial datasets (#479)
* Add PreChippedGeoSampler for pre-chipped geospatial datasets

* Add shuffle parameter

* Add tests, fix type hints

* Warn about multi-CRS datasets
2022-04-05 09:10:39 -07:00
Isaac Corley 4659f1e8ae
default fcsiam models to random init for tests (#497) 2022-04-04 02:05:49 +00:00
Nils Lehmann 4c00b65b0c
Add Swedish Forest Damage dataset (#461)
* add dataset

* md5

* added tests and data

* test

* remove type

* fix docs

* fix docs

* requested changes

* fix documentation and pyupgrade

* remove random

* missing license header
2022-04-02 14:05:25 -05:00
Nils Lehmann c8224f4dbf
remove random (#491) 2022-03-31 11:51:47 -05:00
Adam J. Stewart 9f96cdd472
RasterDataset: remove plot method (#476)
* RasterDataset: remove plot method

* Remove RasterDataset plot tests

* Remove plotting tests for landsat/naip
2022-03-30 11:30:25 -05:00
Adam J. Stewart f20f02a93a
Upgrade all files to Python 3.7+ syntax (#486)
* Upgrade all files to Python 3.7+ syntax

* Update contributing guide

* Move pyupgrade to correct section
2022-03-30 11:29:39 -05:00
Adam J. Stewart d84e3178ea
Fix PyTorch Lightning 1.6 type hints (#487) 2022-03-29 21:39:19 -05:00
Ashwin Nair 2e5c2b274e
Add SpaceNet3 (#480)
* Add SpaceNet3

* Fixes

* Replace itertools.product with zip

* Update docstring

* Remove unused options
2022-03-29 14:47:14 +00:00
Nils Lehmann b2e178f1fe
Add own plot method and data.py to CBF (#410)
* add own plot method and data.py

* clean up data.py

* version changed instead of added

* Update cbf.py

* Any instead of Tensor

* Fix VectorDataset tests

* Plot method in base class no longer needed/tested

* Removing unused imports

* Remove type ignore from openbuildings

* Fix tests

* Black formatting

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-20 17:07:03 -05:00
Adam J. Stewart 2cba0fe326
Chesapeake: skip all tests if zipfile_deflate64 missing (#471) 2022-03-20 12:10:39 -05:00
Adam J. Stewart 490666e039
Update train.py integration tests (#472) 2022-03-20 12:10:27 -05:00
Adam J. Stewart a21c80b22f
dos2unix: zuericrop data.py 2022-03-19 15:21:05 -05:00
Adam J. Stewart ed402a04c8
Fix integration tests on macOS/Windows (#468) 2022-03-19 10:30:20 -05:00
Adam J. Stewart 3d1a1e9b08
VectorDataset: fix issue with empty query (#467)
* VectorDataset: fix issue with empty query

* isort
2022-03-19 10:30:02 -05:00
Ashwin Nair 76603f3343
SpaceNet2 update (#469) 2022-03-17 19:39:57 -05:00
Adam J. Stewart 9489b61372
Remove type ignores for PyTorch (#460)
* Remove type ignores for PyTorch

* Mypy fixes for pytest MonkeyPatch

* Black

* Ignore Identity

* Generic fixes

* Remove unused Generator import

* More fixes

* Fix remaining mypy errors

* More typing cleanups

* typing.OrderedDict isn't available until Python 3.7.2+

* Need Python 3.9 to build docs for fancy OrderedDict

* Fix Python 3.8 and earlier support

* Fix BigEarthNet tests

* Fix bug in ETCI 2021 tests

* Remove unused flake8 ignore

* More robust and well-documented trainer steps

* Many functions don't actually use batch_idx

* Store cast hparams in trainers
2022-03-14 20:35:37 +00:00
Nils Lehmann 17792df26d
Add plot method to CDL dataset (#415)
* requested changes

* add colormap to file
2022-03-01 14:05:38 -06:00
Nils Lehmann 06ec364b5f
Add OpenBuildings dataset (#402)
* populate index attempt

* added tests

* correct plot method

* fix test

* fix documentation

* fix docs

* name changes

* lazy import pandas and Any instead of Tensor

* requested changes

* mypy fixes

* Close plot filehandles

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-27 20:33:39 +00:00
Nils Lehmann 4c221dfc49
Add AGB live woody density dataset (#425)
* Add AGB live woody density dataset

* add credit

* Update docs/api/datasets.rst

* Update torchgeo/datasets/agb_live_woody_density.py

* Update torchgeo/datasets/agb_live_woody_density.py

* Update docs/api/datasets.rst

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

* regex

* Update torchgeo/datasets/agb_live_woody_density.py

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

* Remove unused import

* Adding indents to regex

* move extract

* Close plot filehandles

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-27 20:24:16 +00:00
iejMac 051d7f2685
Adding dataset from MOSAIKS paper (#363)
* Adding dataset from MOSAIKS paper

* Name change

* implementing NAIPTileIndex in USAVars

* lookup_point works

* usavars: adding extract + verify

* USAVars: add md5

* initial _load_files function

* adding plotting

* formatting

* add description

* black fix

* flake8 fix

* pydocstyle fix

* mypy fix

* add DS to docs

* black fix

* fake dataset

* add transforms arg

* initial tests

* fix black flake8 isort

* fix black flake8

* fix black

* fix mypy

* test fixes

* testing something

* it finds zip but not csv

* fake csv files didn't get added

* pandas docs fix

* forgot to take out here

* need to add in functions

* round plot labels

* Small edits

* remove Unnamed column

* zipfile change

* i think this solves codecov?

* there needs to be a test

* codecov

* bring back UAR!

* remove intermediate directory

* fix flake8

* No more iteration in load_files

* dont' use Any

* check if all csv files exist

* Add docstring to init

* use index col = ID

* labels in as list

* adjust to only 3 labels + adjust tests

* citation

* remove testing file

* no need to rename zipfile

* adding data.py to test data + adjusting tests

* formatting fixes

* style fix

* docstring

* Docstring

* Fixing docstring

* docstring for labels

* Adding all csv files to data + checking for all 7 labels instead of just 3

* docstrings

* docstring

* ensure labels are valid

* pydocstyle fix

* cast to list

* remove typos

* Requested changes

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-27 20:11:21 +00:00
Nils Lehmann 7bd68e4d12
Add plot method and data.py to Esri2020 dataset (#405)
* add plot method and data.py

* typo missed period

* forgot data.py

* Remove abc, add versionchanged

* Update esri2020.py

* fixed test and requested changes

* Add uncompressed data file

* add test coverage

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-27 20:01:23 +00:00
Nils Lehmann b5171d5c11
plt.close() (#437) 2022-02-27 13:33:39 -06:00
Nils Lehmann 5f8f952df4
Add EUDEM dataset (#426)
* dataset file no test

* add test and data.py

* Update eudem.py

* requested changes

* Update torchgeo/datasets/eudem.py

* Apply suggestions from code review

* rST fix

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-26 23:01:24 +00:00
Nils Lehmann 3cc9ef9a77
Add own plot method to CMSMangroveCanopy (#427)
* add own plot method

* Update torchgeo/datasets/cms_mangrove_canopy.py

* Update cms_mangrove_canopy.py

* whitespace

* Removing versionchanged

* Any instead of Tensor

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-26 16:51:59 -06:00
Nils Lehmann 7e724dc956
Adding the GlobBiomass dataset (#395)
* globBiomass Dataset

* add tests and testdata

* add description and error messages

* doc correction

* added plot method

* orientation plot figure

* fix documentation

* add compression

* camel

* gsv fake data and filename glob

* 2 channel tensor and requested changes
2022-02-26 12:43:46 -06:00
Kaustav Mukherjee 7be61544b0
3band indices (#414)
* added triband normalized difference index to support indices e.g. Green-Blue NDVI

added triband normalized difference index base class to support indices e.g. Green-Blue NDVI

* Formatted

* formatted the comments

* formatted

* Update indices.py

* Update indices.py

* formatted

* formatted

* formatted

* formatted

* formatted

* frmtted

* formatted the init

* added test cases

* removed probelematic code

* formatted

* formatted

* formatted
2022-02-25 16:43:04 -08:00
Nils Lehmann 4bf48cf3ab
Add own data to CDL dataset. (#429)
* add own data

* data.py with cmap

* remove .img test data format
2022-02-25 09:09:00 -08:00
Nils Lehmann d48e10ec15
Add AsterGDEM dataset (#404)
* add astergdem dataset

* add astergdem dataset

* add plot method

* typo

* fix docs

* requested changes

* Update docs/api/datasets.rst

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

* Update torchgeo/datasets/astergdem.py

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

* split regex

* split regex

* split regex

* regex

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-24 15:49:40 -06:00
Caleb Robinson 0164104009
Adding test for cmap in RasterDataset.plot (#430) 2022-02-24 09:57:09 -06:00
Ritwik Gupta cc1a9fb770
Add pixel sampling mode (#294)
* Add pixel sampling mode

* Fix maxy indexing error

Co-authored-by: Ashwin Nair <ash1995@gmail.com>

* Add sample_mode docstrings, default to PIXELS

* Replace sample_mode with units

* Update to use enum

* Fix mypy, tuple, and flake8 issues

* Fix isort and pydocstyle problems

* Update sampler docs to discuss unit sampling mode

* Various fixes

* Add units arg to GridGeoSampler

* Update benchmark script

* Add tests

* Document enum values

* mypy fixes

Co-authored-by: Ashwin Nair <ash1995@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-23 22:57:29 -06:00
Nils Lehmann 6bc3779907
Add plot method and data.py to Sentinel Dataset (#416)
* add plot method and data.py

* Adding normalization for plot

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-21 07:11:37 -08:00
Nils Lehmann 5e54c43b63
Add plot method to base chesapeake (#417)
* plot method to base chesapeake

* fix typo

* Add plotting to Chesapeake datasets

* isort, yousort, weallsort

* putting back the globs

* putting back the geo.py change

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-20 16:55:06 -08:00
Nils Lehmann 9cf36fac12
Add CMS Global Mangrove Canopy dataset (#391)
* CMS dataset

* dynamically set filename

* add warning in documentation

* requested changes and data.py

* single zip file and camel case

* md5 check added

* correct error messages

* compression smaller test file

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-20 12:07:20 -08:00
Nils Lehmann 89277dc325
Add band selection to So2Sat Dataset and adopt plot method (#394)
* add band selection and adopt plot method

* np array typing and raise error doc
2022-02-20 11:47:52 -08:00
Nils Lehmann b36e053ecf
Add band selection to EuroSat and adapt plot method (#397)
* add band selection and adapt plot method to rgb

* keep normalization in plotting method
2022-02-20 11:45:10 -08:00
tritolol daecc90709
Fix forced int32 type conversion in RasterDataset (#384)
* fix forced int32 type conversion

* add fix for numpy dtypes which are not supported by tensors

* delete whitespace

* Adding custom data to test the dtype transform

* Fixed formatting

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-17 06:25:33 -08:00
isaac 2c6e7eea60
FCCD Models refactor (#345)
* remove FCEF model, refactor FCSiamConc and FCSiamDiff to inherit from smp.Unet

* style fixes update tests

* mypy and docstring fixes

* more mypy fixes and add tests

* remove test args

* fix tests

* add smp to intersphinx mapping

* update model DOI

* add the right docs this time

* Removing type ignores

* Testing sphinx fix

* Added parts of SMP to nitpicky ignore

* Fixing docs

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-15 22:54:52 +00:00
Adam J. Stewart bef8f52af1
LandCover.ai: support already-downloaded dataset (#383)
* LandCover.ai: support already-downloaded dataset

* Typo fix
2022-02-15 22:42:41 +00:00
Data Philosopher 16774fb6f4
Add BNDVI/NDRE spectral indices (#386) 2022-02-14 15:53:03 -06:00
Wei Ji 019dc2495d
Fix regex to work with Sentinel-2 Band 8A (#393)
* Fix regex to work with Sentinel-2 Band8A

Regex was only finding numerical bands (e.g. Band 01, 02, ..., 10, 12), but not Band 8A.

* Update test_sentinel to include Band 8A

* Simplify regex

Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-12 16:00:30 -06:00
Adam J. Stewart 9e0e30a155
BoundingBox: add area/volume attributes (#375)
* BoundingBox: add volume attribute

* Style fixes

* BoundingBox: add area attribute
2022-02-10 16:53:17 -06:00
Nils Lehmann fa6e4e11b5
Adding Esri 2020 Land Cover/Land Use Dataset (#390)
* Adding Esri 2020 dataset

* long url string

* requested changes

* Add period at end of sentence

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-09 14:34:22 -06:00
Adam J. Stewart cb20e1abfd
Samplers: avoid bounding boxes smaller than patch size (#376) 2022-01-31 21:23:10 -06:00
Data Philosopher 80ee076f40
Added GNDVI and SWI Indices (#371)
* Update indices.py

Added MNDWI to support modification of normalised difference water index (NDWI) to enhance open water features in remotely sensed imagery.

* Update indices.py

* Update indices.py

* Update indices.py

Added a new Index Soil Water Index

* Update indices.py

Style error fixed

* Update indices.py

* SWI addition

* Update indices.py

* Update indices.py

* Update indices.py

* Update indices.py

Changed the comment to fit in the code accordingly

* Update indices.py

modified

* Update indices.py

corrected the citation

* Update indices.py

* Ubuntu CUDA 11.3 docker for torchgeo

* Update Dockerfile_ubuntu_1804_cuda_11_3_cudnn_8_torchgeo

* Delete Dockerfile_ubuntu_1804_cuda_11_3_cudnn_8_torchgeo

* Added Dockerfile

Added Dockerfile

* deleted docker due to wrong issue number

* Added GNDVI Index

Added GNDVI Index

* corrected docstring

* updated refernce index to doi

* Added Triband Normalized Indexes

* Update indices.py

Saved

* Updated GNDVI

* Delete transforms.ipynb

deleting

* Added the notebook changes

* Delete transforms.ipynb

* Added the notebook changes

* Added the spaces

* Update indices.py

* formatting corrected

* Running black

* Reset transforms

* Clean up docstrings

* Adding tests and adding to list of transforms exported by the module

* Consistency

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-02-01 01:24:11 +00:00
Caleb Robinson d79cd18952
Update tests for bboxes in kornia 0.6.3 (#381)
* Update tests for newest version of kornia

* Comments explaining the bounding box format
2022-01-31 23:56:07 +00:00
Adam J. Stewart 60009b35b6
Fix len for empty GeoDataset (#374) 2022-01-29 12:26:51 -06:00
Adam J. Stewart 27f270b8bb
LandCover.ai: fix test data zip file (#373) 2022-01-28 14:58:54 -06:00
Caleb Robinson d4c8a4bd7b
Add the EnviroAtlas dataset (#364)
* Add dataset

* Add dataset to docs

* Tests for enviroatlas

* Test coverage

* Added numpy type

* Added plotting

* Code review changes

* Propagating code review comments to Chesapeake
2022-01-27 19:16:45 -08:00
Adam J. Stewart f32bc0c858
extract_archive: support deflate64-compressed zip files (#282) 2022-01-14 23:14:51 -06:00
Ashwin Nair 4bd4f2acdc
Run linters on tests/data (#356)
* Run linters on tests/data

* Configuration: use .gitignore for tool skip

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-01-13 19:16:10 +00:00
Ashwin Nair 08a365f55b
Add InriaAerialImageLabeling dataset (#355)
* Add InriaBuildings dataset

* Add tests and test data

* Nit

* Add type-hints

* Image always 3 channel

* Increase coverage

* Update docstring

* Add more tests

* Remove np.typing

* Fix test lbl range

* Fixes

* Fix title underline

* Forgot to add this file

* Fixes2

* Fixes3

* Move download sentence

* toto
2022-01-13 12:39:22 -06:00
isaac 45f370389f
Add DFC2022 dataset (#354)
* add DFC2022 dataset

* plot fix

* mypy fixes

* add tests and tests data

* maximum coverage

* remove local dir

* update per suggestions

* update monkeypatching

* update docstring

* fix indentation in docstring
2022-01-12 22:16:06 +00:00
Adam J. Stewart 5136d819c0
Reorganize configuration files (#352)
* Reorganize configuration files

* Undo changes to tests/conf files
2022-01-08 10:11:49 -06:00
Adam J. Stewart 7f27edef53
0.2.0 release (#348)
* 0.2.0 release

* Fix notebooks

* Fix minimal dependency tests

* Fix integration tests

* Fix integration tests

* Try to avoid running GitHub Actions twice on release PRs

* Revert "Try to avoid running GitHub Actions twice on release PRs"

This reverts commit a1ac7ab4cf.

* GeoDatasets use intersection, not addition

* Adding stack_samples to benchmarks

* Fix zero division error in SEN12MS tests

* Replaces test models with dummy models (#344)

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

* lc values must be < num_classes

* updated indices tutorial with latest indices

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: isaaccorley <22203655+isaaccorley@users.noreply.github.com>
2022-01-01 20:07:43 -06:00
Adam J. Stewart 42b9a6dbd2
Remove dataset-specific trainers (#286)
* Remove dataset-specific trainers

* Collation functions will be new in 0.2.0

* Clarify arg docstring

* Style fixes

* Remove files forgotten in rebase

* Fix bug in unbind_samples, add tests

* Fix bugs in datamodule augmentations

* Increase coverage for datamodules

* Fix bugs in logger plotting, properly test

* Fix tests

* Increase coverage of trainers

* Use datamodule plot instead of dataset plot

* Skip datamodules without tests

* Plot predictions

* Fix ClassificationTask tests

* Fix SemanticSegmentationTask tests

* EAFP -> LBYL

* Ensure that tensors are on the CPU before plotting
2022-01-01 14:14:19 -06:00
Ritwik Gupta 3514724dbd
Refactor all indices to one module. (#285)
* Add compute index helper function + refactor

* Generalize all indices to one function

* Refactor indices to one module

* Fix init imports

* Add docstrings

* Fix transform test

* update to inherit from parent index class

* add nbr index

* forgot self in method

* mypy and dim fixes

* update expected tensor in test

* Update indices.py

* Black

* Update indices.py

* Black again

Co-authored-by: isaaccorley <22203655+isaaccorley@users.noreply.github.com>
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2022-01-01 20:07:47 +00:00
isaac 8fa1b4c65a
ZueriCrop test data update (#343)
* updated zuericrop test data and adds data.py script

* updates per suggestions

* Guard file removal with file existence check

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-01-01 17:09:22 +00:00
Adam J. Stewart de2354960d
Add type hints for numpy (#342)
* Add type hints for numpy

* np.int -> int

* Fix np.int_ usage

* int -> np.int_

* Sequence[int]

* Add link to numpy docs

* Fix type hint in rgb_to_mask

* Update potsdam and vaihingen masks to uint8

* Fixing draw_semantic_segmentation_masks

* Fixing draw_semantic_segmentation_masks

* Unrelated doc spacing fix

* Formatting

* Revert update to kenya crop type dataset

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-12-31 18:07:12 -08:00
Nils Lehmann 7d90045b9b
Add plotting method and band selection to Sen12ms, replacing #320 (#338)
* add plot method to sen12

* tuple
2021-12-31 13:54:01 -06:00
Nils Lehmann 2375a512be
Add plot method to PatternNet dataset (#314)
* Adding plot method to PatternNet dataset

* classes and doc fix

* remove classes and adjust directory

* fix test

* handling directory and documentation

* md5

* md5

* semicolon
2021-12-31 11:00:15 -06:00
Nils Lehmann c90419b38f
Add plot method and band selection to Zueri crop dataset (#334)
* work on adding plotting method

* add band selection and plot method

* plot prediction

* plot mask instead of boxes

* sequence and alternative plot method

* sequence assert

* requested changes

* add comma

* sequence changes
2021-12-31 10:59:09 -06:00
Adam J. Stewart 744078fcff
Refactor datamodule/model testing (#329)
* Refactor RegressionTask testing

* Programmatically determine max value

* Refactor ClassificationTask testing

* Silence warnings

* Refactor SegmentationTask testing

* Fix training mappings

* Fix GeoDataset trainers

* Fix ETCI trainer fake data

* Update OSCD training data

* Get LandCoverAI tests to pass

* Fix OSCD checksum handling

* Fix NAIP-Chesapeake tests

* Fix OSCD tests

* Keep BoundingBox icy

* Fix other datamodules

* Fix chesapeake testing

* Refactor BYOLTask tests

* Style fixes

* Silence pytorch-lightning warnings

* Get coverage for Chesapeake CVPR prior

* Fix trainer tests
2021-12-30 13:54:47 -06:00
Nils Lehmann 61e10f7b5c
Add plot method to Levir, and change directory path (#335)
* add plotting method

* implement test

* axis off

* prediction flag

* requested changes

* indexing fix
2021-12-30 12:05:42 -06:00
Nils Lehmann a9f004e2d3
Add plotting method for CV4A Kenya Crop Type Dataset (#312)
* Add plotting method for CV4A Kenya Crop Type Dataset

* remove print statements, still fix test_plot

* fix rgb plot test

* fix rgb plot test

* requested changes
2021-12-29 11:01:16 -06:00
Caleb Robinson 7ad31942d5
Add plot method to ADVANCE, BeninSmallHolderCashews, and BigEarthNet datasets (#264)
* Adding plot to ADVANCE dataset

* Adding plot to BeninSmallHolderCashews

* Adding plot to BigEarthNet

* Doctstring adjustment for BigEarthNet plot

* Cleaning up ugly test

* Cleaning up bigearthnet classes

* Added time step plot to benin_cashews

* Formatting

* Update benin cashew tests

* Add S1 plotting and type to np.ndarray

* Trying numpy with quotes
2021-12-28 15:01:57 -06:00
estherrolf 0d4811b752
functionality for learning on the prior with QR loss and ChesapeakeCVPR data (#202)
* adding QR loss functions for learning on the prior

* chesapake learn on prior trainer with self-contained code for visualization

* adding prior dataset to the chesapeake datasets; doesn't handle downloading or anything like that yet

* updating init files to include chesapeake CVPR prior

* adding FCNModified for learning on the prior

* changing input to samplers to pass dataset instead of dataset.index

* fixing style issues

* Removing FCN_modified

* Fixing super call and mypy in FCN model

* Added learning on the prior extension

* Update tests

* Formatting

* Adding QR loss

* Added losses to docs

* Removing trainer, moving datamodule

* Combining chesapeake and chesapeake prior datamodules

* Formatting

* Test coverage

* Formatting

* Adding losses

* Re-moving the datamodules around

* Make loss function a torch Module

* Version added

* Fixed some stuff that got messed up in the rebase

* Formatting

* How'd this get there?

* Change qr losses to expect probabilities instead of log-probabilities

* Clean up test

* Rename qr loss file

* Renamed test file

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-12-28 14:56:14 -06:00
Nils Lehmann 45df0f8b98
Add plotting method for COWC dataset (#300)
* plotting method cowc dataset

* boolean label for detection

* restructure plotting method

* typo

* label title not as variable

* single plot method in super class

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-12-28 11:25:50 -06:00
Adam J. Stewart cbebc1e0db
Move DataModules to torchgeo.datamodules (#321)
* Move DataModules to torchgeo.datamodules

* Clean up local imports
2021-12-23 20:10:50 -06:00
Ritwik Gupta a3f559376c
Add custom RasterDataset notebook (#283)
* Add custom RasterDataset notebook

* Update docs index.rst

* Update copyright, fix URL typo, and add verbose description

* Add xview3 sample data

* Update notebook

* Show simple example first, complicated example second

* Remove the second half of the notebook, can expand later
2021-12-21 15:29:15 -08:00