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

159 Коммитов

Автор SHA1 Сообщение Дата
isaac 9b1ecb24e4
Remove Kornia master install inside Github Actions (#203)
* remove kornia master install in tests action

* removed unused ignore comments

* removed unused ignore comments x2
2021-10-22 16:10:37 -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
isaac c0afbf9b6b
add tests for trainer utils (#200) 2021-10-16 23:51: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
Adam J. Stewart e14980a3eb
Improve sampler performance for pixel-aligned files (#181)
* Improve sampler performance for pixel-aligned files

* Skip merge if only a single file

* Undo changes to hyperparams

* Fix shape, read all bands

* Remove manual single-file reading

* Always keep workers alive

* Various changes in a desperate attempt to improve performance

* Increase epoch size

* Add missing import, fix model name

* Fix tests

* Persistent workers not used unless entire dataset is consumed
2021-10-12 15:34:08 -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 9631a8b1e0
Skip slow sampler tests (#187) 2021-10-11 10:11:37 -05:00
Caleb Robinson 699dfecc0a
Added RCF model to implement the MOSAIKs method (#176)
* Added RCF model

* Rename to RCF

* Update tests/models/test_rcf.py

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-10-08 21:13:50 +00: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
Caleb Robinson bcf30fc97d
Adding new trainers (#145)
* Added support for training on different splits to Chesapeake trainer

* Fixed test script

* Specifying test splits in the test script

* Removing useless prepare_data function from SEN12MS trainer

* Updating LandCoverAI trainer to reflect Chesapeake trainer changes

* Remove verbose in Chesapeake trainer

* Remove adamw in conf files

* Black

* Added experiment run script

* Add augmentation to the landcoverai trainer

* Add augmentation to the landcoverai trainer

* Adding So2Sat trainer

* Fixing style

* Adding So2Sat trainer

* Adding So2Sat trainer

* Adding to so2sat

* Fixing tests

* Add kornia dependency

* Test coverage for GridGeoSampler length

* Added tests for so2sat

* Cleaning up

* Isort

* Adding capability to reindex So2Sat

* Renaming gpu to device

* Setting up so2sat trainer for paper experiments

* So2Sat training sweep

* Idontsort

* Call trainer.tune() step if auto_lr_find is set

* So2Sat trainer work

* Adding SSL method (#162)

* Added support for training on different splits to Chesapeake trainer

* Fixed test script

* Specifying test splits in the test script

* Removing useless prepare_data function from SEN12MS trainer

* Updating LandCoverAI trainer to reflect Chesapeake trainer changes

* Remove verbose in Chesapeake trainer

* Remove adamw in conf files

* Black

* Added experiment run script

* Add augmentation to the landcoverai trainer

* Add augmentation to the landcoverai trainer

* Adding So2Sat trainer

* Fixing style

* Adding So2Sat trainer

* starting SSL trainers

* starting SSL trainers

* Adding BYOL as SSL method, it is fully functional and works for any encoder, next steps includes adding other SSL aproaches like Seasonal Contrast and SSL evaluation at large

* Adding BYOL as SSL method, it is fully functional and works for any encoder, next steps includes adding other SSL aproaches like Seasonal Contrast and SSL evaluation at large

* Making pydocstyle happy

Co-authored-by: Anthony O <anthony.ortiz@microsoft.com>

* Working on experiments

* Updates to So2Sat

* Experiments

* Experiments

* Review changes

* Review changes

* Grabbing the kornia mypy workaround

* updating BYOL to support resnet 50 and updating some docstring

* updating BYOL to support resnet 50 and updating some docstring

* addressing flake8 concerns

* trying to address mypy issues

* mypy

* mypy

* mypy

* adding byol documentation corrections

* Updating byol default and moving experiment scripts to experiments subdir

* Setting up experiment scripts

* Working

* Moving landcoverai seed experiment script

* Fixing formatting in the experiment scripts

* Update torchgeo/trainers/so2sat.py

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

* Update torchgeo/trainers/so2sat.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Update torchgeo/trainers/byol.py

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

* Black formatting

* Reorganizing and documenting BYOL code

* Formatting

* BYOL trainer is not Chesapeake specific

* Updating docstrings

* changing to input_channels uniformly

* Fixing BYOL

* Formatting fixes

* Update experiments/run_landcoverai_experiments.py

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

* Update experiments/run_landcoverai_experiments.py

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

* Update experiments/run_landcoverai_experiments.py

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

* Update torchgeo/trainers/byol.py

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

* Docstring changes

* Docstring fixes

* Black formatting

* Forward slashes have been judiciously eliminated and I threw in some comments for free

* flake8

* flake8

Co-authored-by: Anthony O <anthony.ortiz@microsoft.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-29 15:48:40 -05:00
isaac c9a788a666
Indices Transforms (#127)
* draft indices transform

* import sort

* added AugmentationSequential wrapper for dicts

* updated indices

* fix dim concat bugs

* format

* add kornia dependency

* add augmentationsequenal unit tests

* add augmentationsequential support for boxes and mask dtypes

* add indices tests

* Draft indices tutorial notebook

* move notebook to tutorials folder

* mypy fixes

* fix bug when only image key used in AugmentationSequential

* Created using Colaboratory

* added tutorial to docs

* format

* added kornia master branch dependency'

* refactor notebook to use % cell magic and python to download files

* revert kornia version

* install kornia master branch for mypy checks

* update mypy github action install order

* fix divide by zero error in indices

* Created using Colaboratory

* fix nbsphinx errors

* add TODO to remove kornia in tests action

* format setup.cfg

* minor fixes to indices

* remove unecessary variable

* update mask to cast to original dtype

* removed unused ignore comment

* added gray/rgb/multispectral unit tests

* added tests with boxes

* Created using Colaboratory

* Created using Colaboratory

* fix mypy issues

* updated notebooks in docs

* Updates to tutorials

* Created using Colaboratory

* Created using Colaboratory

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-28 17:04:56 -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
Zhuo Zheng 78fe113ce5
Adding ChangeStar model (#157)
* add FarSeg model

* Revised.

* Ran black and working on mypy fixes

* Fixed other mypy issues

* try to fix mypy issues

* Fixing rest of mypy issues

* try to fix mypy issues

* Fixed issue with in_channels and backbone_pretrained

* Removing change to in_channels, formatting doc

* revised.

- improving the docstring of FarSeg
- removing the scale_aware_proj option in FSRelation class
- removing the in_channels option in FarSeg class
- improving the test_farseg.py by parametrization

* changestar

* removing the function `backbone_forward`

* update ChangeStar

* update changestar

* fixed a typo in docstring

* fixing mypy, pytest, sphinx issues

* revised.

major:
- removing unused import
- split the testing case
- removing the redundant docstring

* fixing mypy and sphinx issues

major:
- adding more description for docstring of ChangeStar

* fixing mypy and sphinx issues

* fixing mypy and sphinx issues

* fixing mypy issues

* Update torchgeo/models/changestar.py

Co-authored-by: isaac <22203655+isaaccorley@users.noreply.github.com>

* Update torchgeo/models/changestar.py

Co-authored-by: isaac <22203655+isaaccorley@users.noreply.github.com>

* revised.

* fixing flake8 issues

* fixing mypy issues.

- replacing Tensor with Any, because a list of tensor as value stored in dictionary.

* update ChangeStar

* fixing mypy issues

* fixing mypy issues

* fixing mypy issues

* Adding more docstring about how to use ChangeStar for multi-class change detection

* Adding missing test cases

* revised.

- replacing Dict[str, Any] with Dict[str, Tensor]

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: isaac <22203655+isaaccorley@users.noreply.github.com>
2021-09-24 03:36:11 +00:00
Zhuo Zheng 53ff5ffbe5
Add FarSeg model (#150)
* add FarSeg model

* Revised.

* Ran black and working on mypy fixes

* Fixed other mypy issues

* try to fix mypy issues

* Fixing rest of mypy issues

* try to fix mypy issues

* Fixed issue with in_channels and backbone_pretrained

* Removing change to in_channels, formatting doc

* revised.

- improving the docstring of FarSeg
- removing the scale_aware_proj option in FSRelation class
- removing the in_channels option in FarSeg class
- improving the test_farseg.py by parametrization

* removing the function `backbone_forward`

* Various improvements

Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-09-21 17:21:13 -05:00
Ashwin Nair 1298706aa7
Set src properties (#156) 2021-09-21 13:54:40 -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 ba4cd3f75d added dummy sample test data 2021-09-10 14:49:19 -05:00
Caleb Robinson c8a811fbae Fixing tests 2021-09-09 15:12:22 -07:00
Caleb Robinson ccb7f1912d Refactoring how the trainer modules are called from train.py and how the configuration files are structured 2021-09-09 15:12:22 -07:00
Isaac Corley 46e7050361 updated unit tests 2021-09-07 21:59:22 -05:00
Isaac Corley 0d5d69605c added fccd models unit tests 2021-09-07 21:59:22 -05:00
Isaac Corley 928ca701ec added dataset tests 2021-09-07 21:51:53 -05:00
Isaac Corley 64e3ecdab4 added sample data for 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 8ad7f4eb41 replaced dataset samples with dummy data 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
Isaac Corley d038cde1d3 added test sample dataset of 2 image pairs 2021-09-05 14:58:18 -05:00
Caleb Robinson 04355ecc2f Formatting 2021-09-03 17:43:41 -05:00
Caleb Robinson c28d31df70 Formatting 2021-09-03 17:43:41 -05:00
Caleb Robinson b848935301 Added test to make sure pyproj and shapely work 2021-09-03 17:43:41 -05:00
Adam J. Stewart 174ddfc15d Flake8 fixes 2021-08-31 13:25:05 -05:00