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

816 Коммитов

Автор SHA1 Сообщение Дата
Adam J. Stewart 29edfe8adb
gitattributes: allow diff of test data (#470)
* gitattributes: allow diff of data.py files

* Allow diffs of all text files, not just data.py
2022-03-19 10:31:03 -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
Ashwin Nair 1d8e010442
Update hook (#464) 2022-03-15 08:36:51 -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
Caleb Robinson c933694ddc
I think RESISC45 statistics were wrong (#440) 2022-03-01 08:43:29 -08: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
Caleb Robinson d132c329d8
Fixed bug in trainer notebook (#434) 2022-02-27 14:12:04 -06: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
Nils Lehmann 8256619ce9
Replace Typing from Tensor to Any in plot methods (#433)
* Tensor to Any

* Tensor to Any

* Tensor to Any

* corrections

* corrections

* corrections
2022-02-26 11:51:46 -06:00
Adam J. Stewart 3e9cc650b1
CDL: don't pick up .tif.ovr files (#424) 2022-02-25 17:03:46 -08: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
Caleb Robinson 6c95918d2d
Updating md5 for new version of the dataset 2022-02-24 19:01:56 -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
Alexandre Lacoste 26b6917306
BeninSmallHolderCashews: return geospatial metadata in sample (#377)
* exposing geoinformation

* restoring white spaces

* Returns tile_transform and crs
instead of storing it in self.
Adapt docstring

* adding types

* adjust line length

* fixing formatting

* remove auto-format from another auto-pep8 tool

* adjust order of import

* radjust autopep8

* passes pre-commit hook

* Add Oxford comma

* tile_transform -> transform

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-02-24 15:42:31 -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
Caleb Robinson ab57a896f9
Remove "train" pip install extra from RTD config (#432) 2022-02-23 15:43:12 -06:00
Adam J. Stewart f134088e97
CDL: update checksums (#428) 2022-02-23 08:49:19 -08: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
Caleb Robinson 644fb0537a
Make RasterDataset not override custom cmaps (#422)
* Make RasterDataset not override custom cmaps

Fixes #421

* Move if check outside of try for speed
2022-02-20 20:12:07 -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
Adam J. Stewart 2246507576
CDL: add MD5 for 2021 data (#418) 2022-02-20 16:37:32 -08:00
Adam J. Stewart 3bff2d51bc
Chesapeake: allow multiple datasets to share same root (#420)
* Chesapeake: allow multiple datasets to share same root

* Set filename_glob directly
2022-02-20 15:18:51 -08:00
Adam J. Stewart 170d595845
Add formulas to indices docs (#400)
* Add formulas to indices docs

* Use math text mode
2022-02-20 12:09:39 -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
Adam J. Stewart 78a8d93ff8
Move flake8 configuration to setup.cfg (#398) 2022-02-15 10:53:56 -06: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
Ethan White (he/him) 34e4dfb0c3
Use proper citation for IDTReeS dataset (#389)
The included citation was for an older version of the competition that does
not match the dataset. This updates it to the correct DOI for the data.
2022-02-03 07:39:03 -08: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 92897d96cd
Fixing torchmetrics deprecations (#382) 2022-02-01 00:23:20 +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