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

37 Коммитов

Автор SHA1 Сообщение Дата
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
isaac 33efc2c0ca
fix imports in train.py (#332) 2021-12-26 19:54:30 -06:00
Adam J. Stewart 9bc0bdb62e
Move imports out of global namespace (#325) 2021-12-24 12:47:54 -08:00
Caleb Robinson b67c7115ef
Adding eval script (#244)
* Adding eval script

* Update evaluate.py

* New eval script

* resisc fix

* Factor out the task to datamodule mapping used by train.py and evaluate.py to the torchgeo namespace

* Add eurosat
2021-11-14 21:32:44 -08:00
Caleb Robinson bb2771fcc8
Add EuroSAT datamodule (#246) 2021-11-14 22:19:41 -06:00
Caleb Robinson fca579a112
Adding ETCI2021 datamodule and trainer (#234)
* Adding ETCI2021 datamodule and trainer

* Fixing confs

* Update torchgeo/datasets/etci2021.py

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

* Update torchgeo/trainers/etci2021.py

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

* Update conf.py

* Reverting trainer init

* plot method

* Update ETCI2021 test data

* Test trainer

* Fix train.py

* Fix test

* Adding matplotlib intersphinx

* Remove ignore

* Revert "Update ETCI2021 test data"

This reverts commit 502a3785e4.

* Remove stuff

* Reset

* Add plot tests

* Unzipping test data

* Test datamodule

* Add datamodule to docs

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-11-14 14:31:42 -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
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 187d910afd
Refactor Classification Tasks (#222) 2021-11-05 00:04:11 -05: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
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
Adam J. Stewart 3446ea5f47
Refactoring: RegressionTask trainer (#215)
* Refactoring: RegressionTask trainer

* Fix import sorting

* Update trainer tutorial

* Use torchmetrics for metric logging
2021-11-01 12:53:09 -05:00
Caleb Robinson 8ac1817866 Adding UC Merced trainer 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
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
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
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
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
Adam J. Stewart 5ff5a02027 Add trainer for NAIP + Chesapeake 2021-09-03 14:18:50 -05:00
Caleb Robinson c27f0f4e5c Removing useless TODOs 2021-09-02 15:17:03 -05:00
Caleb Robinson 13be61440f File permissions? 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
Caleb Robinson a54359dcde
Refactor trainer logic (#54)
* Moving task specific configuration logic from train.py into respective classes

* Small fixes

* Adding basic FCN model for benchmarking

* Adding simple FCN model

* Removing OrderedDict from model definitions

* Adding torchgeo.models to docs

* Adding model tests

* Making all the formatters happy

* Adding optimizer options to landcoverai

* Fixing conda environment I think

* How do you feel about a Makefile, Adam?

* Formatting

* Adding some documentation to the readme

* Sanity check command in README

* Fixes in the landcoverai datamodule to make multi-GPU training possible

* Closing figures that we send to Tensorboard

* Fix sphinx missing target warning

* Fix pytest coverage

* Fix flake8

* Update torchgeo/models/__init__.py

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-07-30 20:58:49 -05:00
Caleb Robinson aeaffb1dbc Initial commit for the landcoverai trainer 2021-07-26 15:32:26 -05:00
Adam J. Stewart 13b360dc83 Add tests for sen12ms trainer 2021-07-25 18:56:00 -04:00
Adam J. Stewart 0bc26a667d Add tests for train.py 2021-07-25 18:02:30 -04:00
Caleb Robinson 5d2dc8f96e Updated test_train to match new way of passing arguments. Fixed mypy problem. 2021-07-23 22:14:09 -05:00
Caleb Robinson 34769f9f6c Changing all configuration definitions to be in YAML files 2021-07-23 22:14:09 -05:00
Caleb Robinson ee7b3c779b Adding accuracy reporting to SEN12MS task
Finishing up OmegaConf based configuration
2021-07-23 22:14:09 -05:00
Caleb Robinson ac14409d85 Revamp of train.py to use OmegaConf based configs 2021-07-23 22:14:09 -05:00
Adam J. Stewart e399a51ce3 Mypy fixes 2021-07-21 12:23:35 -05:00
Adam J. Stewart 90ba939135 Add tests for SEN12MS task 2021-07-21 12:23:35 -05:00
Caleb Robinson 38e85378e8 Fixed mypy and made loss argument actually work 2021-07-21 12:23:35 -05:00
Caleb Robinson 1a67b02a4c Formatting updates 2021-07-21 12:23:35 -05:00
Caleb Robinson c799eb9d04 Adding SEN12MS training task 2021-07-21 12:23:35 -05:00
Caleb Robinson e460d5af23
Pytorch lightning based training framework (#42)
* Initial commit of lightning based model training framework

* Made save directories work correctly

* Add pytorch-lightning dependency and some comments

* More documentation and cosmetic tweaks

* Typo fix

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

* Fix some style issues

* Fix pydocstyle

* Add missing sklearn dependency

* Try to get conda environment working

* Add documentation

* Ignore missing target reference

* Make train.py executable

* Ignore logs and output dirs

* Raise exceptions instead of returning

* Move all argparse stuff to set_up_parser

* Add tests for train.py

* Fix Python 3.6 compatibility

* Fix support for older versions of pytorch-lightning

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-07-17 16:57:18 -07:00