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

816 Коммитов

Автор SHA1 Сообщение Дата
isaac f15d8be099
Trainers Refactor: ClassificationTask (#207) 2021-10-28 09:32:48 -05:00
isaac 786ccc7bea
BigEarthNet Test Data Update (#206)
* add geospatial metadata to bigearthnet dummy data

* update bigearthnet data x2
2021-10-27 20:34:40 -05: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
Ashwin Nair 025ff43d53
Update pre-commit config (#204) 2021-10-23 02:07:38 -05:00
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
Caleb Robinson f68cec5a2e
Docs/models (#199)
* Making sphinx build in parallel

* Cleaning up the model docs
2021-10-17 12:14:26 -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
Ashwin Nair 09d4df9efa
Minor correction (#196) 2021-10-12 23:49:57 -05:00
Adam J. Stewart 074c5d53d9
Increase test coverage for disambiguate_timestamp (#189) 2021-10-12 18:02:49 -05:00
Adam J. Stewart c05f05193b
ETCI2021: remove unneeded/untested code (#191)
* ETCI2021: remove unneeded/untested code

* Remove unneeded import
2021-10-12 17:44:29 -05:00
Adam J. Stewart 26cf1bb18e
DriverError is subclass of FionaValueError 2021-10-12 15:40:30 -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 84696d2b2c
Use torch.clamp instead of torch.clip (#188) 2021-10-11 15:25:14 -07:00
isaac 13aa631bfc
Merge pull request #183 from isaaccorley/trainers/extract_encoder
Load Pretrained Weights in Trainer
2021-10-11 15:23:52 -07:00
Adam J. Stewart 9631a8b1e0
Skip slow sampler tests (#187) 2021-10-11 10:11:37 -05:00
Adam J. Stewart 5b77ded218
Add scripts to generate plots from paper (#186)
* Add scripts to generate plots from paper

* Style fix
2021-10-10 18:31:23 -05:00
Adam J. Stewart b578cb73a2
Ignore PDF figures 2021-10-09 11:58:19 -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
Caleb Robinson a5b3099490
Update conf.py 2021-09-30 22:00: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
Adam J. Stewart bc6d0358ca
Fix various bugs in data loader benchmarking script (#177)
* Fix various bugs in data loader benchmarking script

* Flake8 fix

* Mypy fixes

* Uniform epoch size
2021-09-30 22:36:40 -05:00
Caleb Robinson 99e785f0ba Removing duplicate kornia in setup.cfg 2021-09-29 23:19:45 +00: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
Ashwin Nair c29d3c8f6e
Fix SpaceNet 1px diff (#174)
* Fix SpaceNet 1px diff

* Remove obsolete warnings
2021-09-29 15:38:32 +00: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 6b4bf67ed6 renamed default_loader to pil_loader 2021-09-28 12:43:27 -07:00
Isaac Corley b4f8a25514 add raises to docstring 2021-09-28 12:43:27 -07:00
Isaac Corley a7df25bdc6 changed numpy typing 2021-09-28 12:43:27 -07:00
Isaac Corley 78dbe5676b move rasterio_loader to datasets.utils and fix mypy typing to work with all Python versions 2021-09-28 12:43:27 -07:00
Isaac Corley 1a49cfffbe update tests 2021-09-28 12:43:27 -07:00
Isaac Corley 2ff7d776e7 refactor to inherit VisionClassificationDataset 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
Adam J. Stewart 5d4ad430d2
nbsphinx in-line code links are broken 2021-09-26 11:25:28 -05:00
Caleb Robinson 98f6af7757 Formatting 2021-09-26 01:55:56 -07:00
Caleb Robinson aff8bd31e2
Disabling requirejs in nbsphinx to fix docs 2021-09-26 01:49:28 -07:00
Caleb Robinson a86dbe6f7e
Tutorials: use pip install torchgeo (#164) 2021-09-25 15:25:30 -05:00
Ashwin Nair 68d9d4a43d
blk-fix (#165) 2021-09-25 00:43:06 -07:00
Caleb Robinson fcd7279dbd Making the Colab badge actually work 2021-09-24 23:39:42 -07:00
Caleb Robinson f14d5986ca The big colab badge had to go 2021-09-24 23:34:25 -07:00
Adam J. Stewart 9911afef89 Minor grammar fixes 2021-09-24 16:56:47 -07:00
Caleb Robinson 10508dcad4 Renamed trainer tutorial 2021-09-24 16:56:47 -07:00