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

130 Коммитов

Автор SHA1 Сообщение Дата
Adam J. Stewart 3d40ecb72b
Style and test fixes 2021-12-19 13:29:38 -06:00
Adam J. Stewart 26343ddc36
Fix GeoDataset pickling (#304)
* Fix GeoDataset pickling

* mypy fixes
2021-12-19 11:14:51 -06:00
Adam J. Stewart 01ae2db287
Rework list of required dependencies (#287)
* Rework list of required dependencies

* Update open3d import error msg

* Style fixes

* Remove extra empty line

* Increase test coverage

* Fix idtrees tests
2021-12-19 11:12:48 -06:00
Adam J. Stewart ae11f10502
Chesapeake: support already downloaded zip files (#281)
* Chesapeake: support already downloaded zip files

* Remove comments, save for a later PR

* Style fix
2021-12-19 11:07:44 -06:00
Caleb Robinson e5bbc738a3
Adding RESISC45 trainer with augmentations (#225)
* Removing some keys from the defaults that were removed in Lightning 1.5

* Adding RESISC45

* Experimenting with different LR decay

* Formatting

* Updating RESISC45 test data to be the same size as the original data

* RESISC45 trainer and tests

* Fix import, add deprecation

* mypy fixes

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-11-07 05:17:57 +00:00
Caleb Robinson b87d2707ae
Adding the SeCo patch datasets (#223)
* Adding the SeCo patch datasets

* Adding tests and incorporating suggestions

* Added benchmark example code link

* Update to new way of downloading

* Formatting

* Test coverage

* Rename dataset

* Add SeCo dataset to docs
2021-11-06 23:58:36 -05:00
Adam J. Stewart 967b4b171f
Trainers: split tasks into separate files, add SemanticSegmentationTask (#224)
* Trainers: split tasks into separate files

* Add SemanticSegmentationTask

* Fix doc tests

* Keep dataset-specific tasks in separate files

* Remove duplicate So2Sat trainer
2021-11-06 23:57:40 -05:00
isaac 4257aec131
BigEarthNet Splits (#221)
* adds split files, new classes, and refactors to speed up loading

* update bigearthnetdatamodule and tests

* update configs

* merge

* force add split files

* fix docstring

* fix docstrings x2

* fix docstrings x3

* Reduce total testing time

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-11-05 16:58:25 +00:00
Adam J. Stewart 4f6e2096c8
Move DataModules from torchgeo.trainers to torchgeo.datasets (#220) 2021-11-04 17:15:29 -05:00
Adam J. Stewart aa4cec8077
Add COWC trainer (#217) 2021-11-04 08:12:29 -05:00
Caleb Robinson de48bd54ad
Adding splits to RESISC45 and EuroSat (#218) 2021-11-02 22:26:39 -05:00
Adam J. Stewart 5a7c80fb0f
TropicalCyclone dataset: use label for sample key 2021-11-02 16:10:50 +00:00
isaac 3cc63def02
BigEarthNet Trainers (#211)
* add additional bigearthnet test data for train/val/test split

* update bigearthnet dataset length test

* add MultiLabelClassificationTask

* add BigEarthNet trainer and datamodule

* add bigearthnet and multilabelclassificationtask tests

* mypy and format

* add estimated band min/max values for normalization

* softmax outputs to correctly compute metrics

* update min/max stats for 100k samples

* organize imports in torchgeo.trainers.__init__.py

* clean up fixtures in test_tasks.py

* added bigearthnet to train.py

* format

* move fixtures into class methods

* consolidate bigearthnet fixtures

* refactor tasks tests

* add scope=class

* style/mypy fixes

* mypy fixes
2021-11-02 10:45:38 -05:00
Caleb Robinson 69598528e6
Add train/val/test splits to UCMerced (#216)
* Added splits to the UCMerced dataset

* adding test files

* Removed random splits from UCMerced trainer
2021-11-01 10:09:36 -05:00
Adam J. Stewart 481e68e8ef
TropicalCyclone dataset: use target for sample key (#213) 2021-10-30 16:35:52 -05:00
Caleb Robinson 20ab8676f3 Fixing the tests now that we have the good broken data 2021-10-28 13:15:22 -07:00
Caleb Robinson 8d5db1556b Adding broken data to the tests 2021-10-28 13:15:22 -07:00
Adam J. Stewart 0eadac4e2c
black: skip magic trailing comma 2021-10-26 16:26:58 -05:00
Adam J. Stewart 10ff8aa99d
Increase coverage of trainers (#109)
* Increase coverage of trainers

* Actually make the tests work

* Updated Cyclone trainer

* Style fix in cyclone tests

* Fixing landcoverai trainer

* Moving mock log to utils

* Fixing the RESISC45 trainer and related

* Skip RESISC45 trainer tests if Windows

* Removing some stupid docstrings from the RESISC45 trainer

* Adding So2Sat trainer tests

* isort

* Adding RESISC45 test data

* Use os.path.join for paths

* Remove unused import

* Add tests for ChesapeakeCVPR trainer

* mypy fixes

* Fix most Chesapeake tests

* Fixed test batching issue in the test dataset

* Get 100% coverage of Chesapeake trainer

* use a FakeTrainer instead of pl.Trainer

* Add naive BYOL trainer tests

* Style fixes

* Add 100% test coverage for BYOL trainer

* Get 100% coverage for LandCover.ai trainer

* Simplify tests

* Add tests for NAIP + Chesapeake trainer

* Fix tests

* Add tests for checkpoint loading

* Reorganize fixtures and specify scope

* Fix various test bugs

* Mypy fixes

* Reduce patch sizes

* Test fewer possible combinations of params

* Prevent warnings in tests

* Restore missing line of coverage in So2Sat trainer

* Silence resampling warning

* Ignore difference in output classes

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-10-26 16:17:50 -05:00
isaac 7d1ff80649
Add BigEarthNet dataset (#197)
* add bigearthnet dataset

* add dummy data for bigearthnet tests

* add bigearthnet unit tests

* updated bigearthnet dataset and tests with s1 imagery

* add bigearthnet to docs

* mypy fixes

* updated docstrings
2021-10-17 11:19:57 -05:00
Adam J. Stewart 173de92ac8
Remove non-geospatial transforms (#198) 2021-10-15 23:59:17 -05:00
Adam J. Stewart 24c3f70f5f
ChesapeakeCVPR: fix non-existing dir support, add unit tests (#195) 2021-10-12 22:20:45 -07:00
Adam J. Stewart 074c5d53d9
Increase test coverage for disambiguate_timestamp (#189) 2021-10-12 18:02:49 -05:00
Ashwin Nair 73215d27d7
Spacenet 4 (#185)
* Add SpaceNet4

* Add tests

* Update docs

* Add option to choose angle subset

* Remove AssertionError and update docs

* Coverage fix

* Fixes
2021-10-12 15:39:49 -05:00
isaac 142835cede
Add RESISC45 Trainer (#179)
* add RESISC45 trainer

* update working locally

* Adding ability to choose the random split sizes via config

* If you don't have a val or test split, then return the train split so the Trainer doesn't break by default. If you actually want to train without val/test though, then you should set the appropriate Trainer args.

* RESISC experiments

* Reverting accidental changes

* mypy fix

* add dataset_split unit tests

* Document dataset_split

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-10-11 15:35:38 -07:00
Adam J. Stewart 7ac915b765
Add __len__ method to GeoDataset and ZipDataset (#175)
* Add __len__ method to GeoDataset and ZipDataset

* Fix type hints
2021-09-30 22:36:53 -05:00
Isaac Corley 1a49cfffbe update tests 2021-09-28 12:43:27 -07:00
Ashwin Nair 1c833d5d7e
SpaceNet 2 (#155)
* Add Spacenet2

* Fix logical errors

* Use label_glob

* Refactor Spacenet

* Add tests and test data for SpaceNet2

* Make SpaceNet an ABC

* Bugfix

* Add docstring for SpaceNet metaclass

* Formatting

* Add metaclass to docs

* Hack for sn2_AOI_2_Vegas

* Add missing tests

* Change md5 hash for test data

* Update spacenet.py

* Fix regex pattern

* Update regex pattern

* Fixes

* Indent-fix

* Remove nested list

* Cleanup

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-09-28 10:55:56 -05:00
isaac a3b636fe99
Add VisionClassificationDataset (#171)
* updated docs

* added VisionClassificationDataset

* refactor PatternNet and RESISC45 to inherit VisionClassificationDataset

* added unit tests and sample data

* refactor PatternNet and RESISC45 to new download/verify checks and fix code coverage

* remove override of __str__

* set default_loader as loader default

* removed loader arg from datasets

* update tests

* format

* remove duplicate code

* updated docstrings
2021-09-27 20:55:50 -05:00
Caleb Robinson 79476bb42a
Added the UC Merced dataset (#169)
* Added UC Merced dataset

* Added UC Merced dataset

* Adding docs and classes to docstring

* Addressing review
2021-09-27 20:14:02 -05:00
Caleb Robinson 489ffdc2bd
Added EuroSat dataset (#167)
* Added EuroSat dataset

* Cleaning up

* Removing unzipped data

* Added to docs

* EuroSat --> EuroSAT to match paper

* Changing class listing to use bullets

* Update torchgeo/datasets/eurosat.py

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

* Addressing review

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-27 20:13:17 -05:00
Ashwin Nair 30a082d33c
Add download_radiant_mlhub_collection (#152)
* Add download_radiant_mlhub_collection

* Add tests

* Rename download_radiant_mlhub -> download_radiant_mlhub_dataset

* Update test_utils.py

* Update test_utils.py

* Update test_utils.py

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
2021-09-20 07:23:42 +00:00
isaac 459524fedc
Add ZueriCrop dataset (#147) 2021-09-19 23:25:09 +00:00
isaac 77094c21fa
Add ADVANCE dataset (#133)
* updated docs

* added torchaudio as optional dependency

* added sample data for tests

* added dataset

* added advance unit tests

* replaced torchaudio with scipy.io.wavefile.read

* Revert "added torchaudio as optional dependency"

This reverts commit 960d94f67533e83facc080d9a6f9b965a8820294.

* updated to lazy import scipy, updated docstring

* add pytest.importorskip check for scipy

* add sample audio wav file creation details

* add scipy dependency

* downgrading scipy dep to scipy>=1.5.4

* fix pytest.importorskip to return none

* update scipy import error message

* fixed dummy audio data dims

* downgrading scipy dep to scipy>=0.9.0

* added tests for missing h5py

* format

* fixed missing import test

* Update tests/datasets/test_advance.py

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-19 23:00:56 +00:00
Adam J. Stewart 8a02183f62
CDL: don't re-download dataset if zip files are missing (#138)
* CDL: don't re-download dataset if zip files are missing

* Fix pydocstyle

* Reword checksum parameter
2021-09-16 16:22:10 +00:00
Adam J. Stewart 8c49b2a906
Proposal: better handling of partial timestamps (#134)
* Proposal: better handling of partial timestamps

* Parse format string directly

* Add unit tests

* Windows is broken

* Windows is still broken

* Fix mypy

* Simplify logic

* Fix bug for month 12, add details to docstring
2021-09-16 11:07:09 -05:00
Caleb Robinson a82d3f47b4
Cleaning up ChesapeakeCVPR (#131)
* Implemented way to test if ChesapeakeCVPR has been downloaded

* Cleaned up the way transforms are used in ChesapeakeCVPRDataModule and changed the test dataloader to use a GridGeoSampler

* Adding other transforms and cleaning up style

* Changing masks to mask throughout

* Organize the way metrics are logged

* Formatting

* Adding rasterio data loadering best practices and fixing trainer a bit

* Script for evaluating trained models over all states

* Forgot to update the MD5 after changing the dataset nodata masks

* Update test_chesapeakecvpr_models.py

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

* Changes recommended by Adam

* Idon'tsort

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-15 11:52:51 -05:00
Ashwin Nair 0ce0a591b6
Add Spacenet 1: Building Detection v1 (#129)
* Add Spacenet 1

* Add test data

* Style fixes

* Convert Spacenet1 to VisionDataset

* Add option for selecting imagery

* Consolidate spacenet

* Create single spacenet.py for all spacenet datasets
* Create single spacenet directory for all spacenet test data
* Create single test_spacenet.py for testing all spacenet datasets

* Add copyright

* Reorder Spacenet in docs

* Test both rgb & 8band

* Rename Spacenet -> SpaceNet
2021-09-15 11:35:15 -05:00
isaac f60cbee39b
Add RESISC45 Dataset (#126)
* updated docs

* added sample data for tests

* added unit tests

* added dataset

* updated tests to not run on windows due to rar
2021-09-12 10:50:15 -05:00
isaac 67f7d8a520
Add ETCI2021 Dataset (#119)
* add dataset to docs

* add sample test data

* add dataset unit tests

* add etci2021 dataset

* updated tests

* updated dataset to download only desired split file

* removed flood mask from file list for test set and other formatting

* Update torchgeo/datasets/etci2021.py

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

* fixed doc formatting

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-11 20:05:38 -05:00
Isaac Corley 7de01364c9 added tests 2021-09-10 14:49:19 -05:00
Isaac Corley 928ca701ec added dataset tests 2021-09-07 21:51:53 -05:00
Adam J. Stewart 15903975ad
Increase coverage of RasterDataset 2021-09-06 20:58:01 -05:00
Isaac Corley b35a2027ce check image for temporal dim t=2 (t, c, h, w) 2021-09-05 14:58:18 -05:00
Isaac Corley 5c3371aa94 updated tests to work with dummy data and reformatted to pass pipeline 2021-09-05 14:58:18 -05:00
Isaac Corley d4f6268ac9 formatted 2021-09-05 14:58:18 -05:00
Isaac Corley 647c95bf2b added dataset tests 2021-09-05 14:58:18 -05:00
Adam J. Stewart 174ddfc15d Flake8 fixes 2021-08-31 13:25:05 -05:00
Adam J. Stewart da7e120350 Add license header to all files 2021-08-31 13:25:05 -05:00
Adam J. Stewart c0e0dcf49e Remove real data from CBF tests 2021-08-31 10:52:24 -07:00