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

332 Коммитов

Автор SHA1 Сообщение Дата
Caleb Robinson 94960bbcf6
Adds the LandCoverAI100 dataset and datamodule for use in semantic segmentation notebooks (#2262)
* Add dataset and datamodule

* Add docs

* Tests

* Ran ruff one time

* Fixture needs a params kwarg

* Make dataset work

* Add versionadded to datamodule

* Add conf file to test new datamodule

* Test datamodule

* Changing dataset URL

* Update main hash
2024-09-11 13:48:24 -07:00
Adam J. Stewart a6f8169982
Docs: installation-agnostic prettier usage (#2279) 2024-09-10 17:27:26 +02:00
Adam J. Stewart d4a7b7286f
pytest: set default --cov, --cov-report (#2275)
* pytest: set default --cov, --cov-report

* Prevent ambiguity between packages and directories
2024-09-10 17:15:24 +02:00
Adam J. Stewart ecead0e197
Docs: move dataset CSV files to subdir (#2281) 2024-09-04 10:36:03 -07:00
Adam J. Stewart bcb959ab2d
0.6.0 release (#2265)
* 0.6.0 release

* Fix versionadded

* Update docs on ruff

* EuroCrops: consistent citation message

* Attempt to remove fully qualified type hints

* Silence test warnings

* Undo digital typhoon changes

* Undo sphinx req changes

* Automatically delete downloaded models after successful tests to avoid OOM

* Silence mypy warning

* Skip dependabot in auto-generated release notes
2024-09-01 12:06:26 +02:00
Adam J. Stewart 03faab9c5c
DOFA: fix bug in patch embedding (#2256)
* DOFA: fix bug in patch embedding

* Update checkpoints
2024-09-01 11:43:07 +02:00
Adam J. Stewart c5380abe28
Docs: fix broken links and redirects (#2267) 2024-08-31 14:38:28 +02:00
Adam J. Stewart 16d90f29c8
Alternatives: update metrics (#2259)
* Alternatives: update metrics

* Add TerraTorch

* Don't include coverage of test files
2024-08-30 11:40:24 +02:00
Nils Lehmann b9a09f5711
Add Digital typhoon dataset (#1748)
* analysis task dataset

* implement sequence sampling

* add outline datamodule

* add datamodule with two way splitting capabilities

* add plotting function

* download and verify

* add unit tests but they fail

* fix tests

* fix style

* trainer testing yaml

* test split logic

* fix tests

* fix tests2

* found bug

* try to fix mypy

* h5py error docs

* fix docs

* fix one mypy error

* mypy on test file

* fix coverage

* fix tests for trainers

* fix mypy

* try typed dict

* try to fix docs

* fix pytest

* linters

* suggested changes and normalization procedure

* regression target normalization

* update dataset splitting

* fix test

* quotes

* strings

* ruff

* quotes

* ruff format on all

* docs

* lazy import

* h5py

* h5py datamodule

* typo

* tests

* review

* pass tests

* fix tests

* list -> tuple

* mypy fix

* rename

* tests

* Remove Analysis

* min pandas 2.2.0

* resolve tests

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-08-29 11:29:04 +02:00
Daniele Rege Cambrin ccc314cd88
Add CaBuAr dataset (#2235)
* 🆕 Added CaBuAr dataset

* 🆕 Added CaBuAr datamodule

* 🔨 Added CaBuAr datamodule test

* 🔨 Corrected CaBuAr typing and datamodule test

* 🔨 updated test, corrected docs, minor fixes to dataset and datamodule

* 🔨 CaBuAr test fixes
2024-08-28 15:57:58 +02:00
Adam J. Stewart 451b5a5919
SkyScript: add new dataset (#2253)
* SkyScript: add new dataset

* Remove print statements

* Fix bug

* 100% coverage

* text -> caption

* Simpler tests

* Reformat
2024-08-27 16:38:45 +02:00
Adam J. Stewart 7ad9df8f32
Docs: emphasize multi-modal foundation models (#2236)
* Docs: emphasize multi-modal foundation models

* Subdirectory for weights files

* Update col widths
2024-08-27 16:20:18 +02:00
Yi-Chia Chang a757cf14fb
SatlasPretrain: ResNet50/152 and Swin_V2_T Weights (#2038)
* add SENTINEL2_MS_MI_SATLAS

* add SENTINEL2_MS_SI_SATLAS

* fix style

* ruff

* Add all SatlasPretrain models

* Get local tests passing

* Get local tests passing

* Fix remote tests

* Mock input channels in testing too

* Fix license

* Fix band order

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-08-27 15:58:49 +02:00
Nils Lehmann 2d6e27ebd0
Add GeoNRW dataset (#2209)
* dataset and module

* test with training

* add tests

* start the fight with mypy

* kick off tests

* class var ruff

* don't download

* forgot tests data

* already downloaded

* coverage

* review

* mypy

* docs

* docs

* suggestion

* plotting

* versionadded: 2 digits

* Type hint unnecessary

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-08-27 15:57:14 +02:00
Isaac Corley 8d137526f7
Scale-MAE model (#2057)
* add scale-mae model and pretrained weights

* fix docs, mypy, and code coverage

* add scalemae to torch hub

* make res optional instead of required

* Remove ViT from the name

* Alphabetical order

* Doc bugs

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-08-19 18:50:36 +02:00
Yi Wang 2d0557f645
Add DeCUR RN50 weights (#2191)
* add resnet50 weights from decur

* update decur rn50 weights

* Alphabetical order

* Remove unneeded ignores

* update data transform for loading resnet50 sentinel 1 weights

* update formatting

* update formatting

* update ssl4eo-s12 transforms and naming

* update formatting

* update transforms definition comments

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-08-19 17:53:16 +02:00
Adam J. Stewart 067ae1af75
Ruff: enable ruff-specific rules (#2218)
* Ruff: enable ruff-specific rules

* Static class variables

* String colormap must be list

* String colormap must be list
2024-08-19 15:07:21 +02:00
Adam J. Stewart 880593e7ef
SpaceNet: add SpaceNet 8, radiant mlhub -> aws (#2203) 2024-08-17 20:49:48 +02:00
Adam J. Stewart 17b5ccf5ff
Redistribute NWPU datasets on Hugging Face (#2210)
* Redistribute NWPU datasets on Hugging Face

* unrar no longer needed in CI

* VHR-10: md5 monkeypatching is required
2024-08-17 17:01:44 +02:00
Adam J. Stewart 294a59b4ff
Chesapeake: update to 2022 edition (#2214)
* Chesapeake: update to 2022 edition

* Hard-code cmap, don't want to write yet another test file

* Update tests

* Update datamodule

* Bug fix

* Update test config

* Fix plotting

* More classes

* Fix docs
2024-08-17 10:10:02 +02:00
Adam J. Stewart e973c1e3ca
Ruff: ensure all functions have type hints (#2217)
* Ensure all functions have type hints

* Fix Callable

* Undo notebook changes
2024-08-12 14:32:31 +02:00
Adam J. Stewart 95f0b0b161
Custom raster datasets tutorial: download before super (#2177) 2024-07-26 10:39:36 +02:00
Adam J. Stewart 87f866dcf4
Tutorials: add Open in Studio badge (#2146)
* Tutorials: add Open in Studio badge

* Keep CSS name the same

* Remove custom CSS

* Revert "Remove custom CSS"

This reverts commit 85c3159c50.

* Single badge (to prove a point)

* Revert "Single badge (to prove a point)"

This reverts commit e9d781fdff.

* Move jinja code to separate file
2024-07-22 13:21:42 -07:00
Adam J. Stewart e84b50c44e
Tutorials: remove button for Planetary Computer Hub (#2107) 2024-07-01 10:23:44 +02:00
Burak b9b9ab45cd
host PatternNet on HF (#2100)
* host PatternNet on HF

* patternnet license
2024-05-31 11:07:52 +02:00
Burak 1268993bc0
EuroSAT Subclass with Longitude-Based Splits (#2074)
* spatialspliteurosat

* address the comments

* make ruff happy

* make ruff happier

* ruff-ing

* address comments

* add test

* missing comma

* add to init

* make ruff happy

* ruff-ing

* fix a silly mistake

* Update torchgeo/datasets/eurosat.py

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

* Update torchgeo/datamodules/eurosat.py

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

* raw to resolve

* spatial mean and std

* eurosat dataset and datamodule rst

* add the datamodule to rst

* corect the typo in rst

* lots of typos before morning coffee

* add dataloader to init

* make isort  happy

* swap order spatial and 100

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-05-29 15:51:43 +02:00
Adam J. Stewart 189dabd0b6
Datasets: improve lazy import error msg for missing deps (#2054)
* Datasets: improve lazy import error msg for missing deps

* Add type annotation

* Use lazy imports throughout datasets

* Fix support for older scipy

* Fix support for older scipy

* CI: test optional datasets on every commit

* Update minversion and fix tests

* Double quotes preferred over single quotes

* Undo for now

* Fast-fail during dataset initialization

* Remove extraneous space

* MissingDependencyError -> DependencyNotFoundError
2024-05-15 18:03:54 +02:00
Adam J. Stewart 25fb9ccfb9
RasterDataset: add control over resampling algorithm (#2015)
* RasterDataset: add control over resampling algorithm

* Fix type hints

* cubic -> bilinear

* Ruff: single quotes
2024-05-13 17:00:45 +02:00
Adam J. Stewart b09122f3e4
Ruff: prefer single quotes over double quotes (#2001)
* Ruff: prefer single quotes over double quotes

* Apply ruff format
2024-05-03 19:30:14 +02:00
Slawek Bierwiaczonek bd9c75798e
Prettier formatter (#2018)
* Formatted with Prettier

* Added package-lock.json

* Removed the .idea folder

* Removed version

* Added .prettierignore with tests/data/*

* Added npm updates

* Updated prettier

* Update style.yaml

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

* Updated linters section

* Added Prettier hook

* Added Prettier hook

* Added exclude regex

* Update .prettierignore

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

* Added package.json and package-lock.json

* Added npm ci flag

* Formatted with Prettier

* Updated .gitignore

* Reverted changes in data folder

* Added .idea to ignored entries

* Delete package-lock.json from root

* Added cache dependency path

* Formatted with Prettier

* Updated tests.yaml

* Updated regex

* Updated actions/checkout to v4.1.4

* Updated SECURITY and dependabot

* Removed .idea and requirements/node_modules

* Updated package files

* Changed .yaml files format

* Added EOL

* Updated contributing.rst

* Updated style.yaml

* Updated style CI

* Added node_modules to ignored entries

* Updated npm install command

* Added *.json root files to ignored entries

* Updated prettier version range

* Updated prettier install command

* Relocated # Node stuff

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-05-03 15:35:34 +02:00
George Huber 02402794ee
Add South Africa Crop Type DataModule (#1970)
* initial commit

* correct channels and classes

* fixed dataloader

* mypy

* pyupgrade

* flake8

* fix docs

* Add more aug

* revert testing changes

* Filter out s1 bands temporarily

* fix docs

* Simplify regex

* 100% test coverage

* Test plotting s1

---------

Co-authored-by: georgehuber <“georgehuber8@gmail.com”>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-04-25 20:58:17 +02:00
Adam J. Stewart c9da52ad90
Docs: fix I/O bench table (#2016) 2024-04-20 21:54:43 +02:00
Isaac Corley 0f063916cc
QuakeSet dataset (#1997)
* add quakeset dataset

* add datamodule and tests

* update plot

* add plot title spacing

* fix tests

* fix tests finally

* fix mypy

* fix url

* fix mypy

* pin hf url to commit

* fix docs

* update dataset docs

* add missing h5py test

* fixes per suggestions

* updates per suggestions x3

* add setup method to define validation split

* undo split renaming

* update docstring
2024-04-19 22:27:43 +02:00
Adam J. Stewart 04a85a593a
I/O Bench: add new dataset (#1972)
* I/O Bench: add new dataset

* Add tests

* IOBenchDataModule: add new data module

* Style fixes

* Style fixes

* RandomGeoSampler == RandomBatchGeoSampler when 1 scene

* IOBenchDataModule: add tests

* Add API docs

* Smaller class size

* Fix typo

* Add config file

* Add IOBenchTask

* Add tests

* pyupgrade

* Fix support for older PyTorch

* Add another config file

* Add usage documentation
2024-04-19 18:21:56 +02:00
Adam J. Stewart d9991ed154
Use ruff (#1994)
* Update config files

* Fix deviations

* Update requirements files

* Update CI

* Update devcontainer

* Update pre-commit

* Check Jupyter notebooks too

* Better safe than sorry

* Update docs

* Undo removal of mypy

* Test a bug

* Also format

* pre-commit: fix indentation

* Test a bug

* Fix the bug

* Run format too

* Fix typo

* mypy requires pytest

* Fix docs link
2024-04-15 23:46:00 +02:00
Burak 4c22df7ea3
minor typo in custom_raster_dataset.ipynb (#1987) 2024-04-13 19:15:11 +02:00
Favyen Bastani 83353b038f
Add eurocrops data module. (#1869)
* Add eurocrops data module.

It is based on NAIPChesapeakeDataModule which splits bounding box of dataset
into 1/2 train, 1/4 val, and 1/4 test. This may not be the best way to train
an actual model.

* misc fixes

* various fixes per discussion

* update eurocrops test data

* fix

* fix version added placement

* fix failing test by forcing integrity test when checksum is requested

* Clarify SIZE setting in eurocrops test data

* fix currently remaining issues with eurocrops data module

* fix style

* more style fix

* Add documentation

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-04-12 15:16:31 +02:00
Adam J. Stewart 8d2e2b5e6f
Docs: allow horizontal scrolling of wide tables (#1958) 2024-04-04 09:16:27 +02:00
Adam J. Stewart ea57469b0b
Drop Python 3.9 support (#1966) 2024-04-04 09:15:56 +02:00
Jingtong 5d253c55d8
Add South America Soybean DataModule (#1959)
* Add South America Soybean DataModule

* Add train_aug

* Regenerate data

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-25 17:34:13 +00:00
XShadow 2849944a02
Add DOFA model (#1903)
* adding DOFA-Net model

* Convert git submodule to single file

* Get rid of __main__ code blocks

* Add WeightsEnum

* Add documentation

* Add CSV file

* Update link to transform implementation

* Add unit tests

* Test model forward function

* Complete test coverage

* Add type hints

* Solve most type issues

* Solve remaining type issues

* Undo sorting

* Simplifed docs

* Fix loading of real weights

* OFAViT -> DOFA

* Remove redundant helper function

* Add units for wavelengths

* wave_list -> wavelengths

* wvs -> wavelengths

* img_feat -> x

* Sorting

* inter_dim is not used

* Rename embedding layer

* Simpler name for position embedding

* wv_planes -> dynamic_embed_dim

* make weight init a hidden method

* Simpler model init

* Use permalink

* Document GEO-Bench performance

* Simpler test

* More columns

* Update correct column numbers

* Modified datasets

* Add large weights

* Update __all__

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-25 11:44:31 +00:00
Yi-Chia Chang d0300449c6
Add AgriFieldNet datamodule (#1873)
* add agrifieldnet datamodule

* fix codecov

* extra_args not needed

* Bigger default batch size

* Revert "extra_args not needed"

This reverts commit f690d8b1f8.

* Same split as everyone else

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-22 22:15:30 +00:00
shreyakannan1205 bd48efe988
sentinel2nccm datamodule on new branch (#1950)
* sentinel2nccm datamodule

* Fixed style errors

* added 2019 to sentinel2, removed 2022 from nccm

* fixed error

* Use matching split size

---------

Co-authored-by: shreya28 <“shreya28@illinois.edu”>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-22 22:05:01 +00:00
Yi-Chia Chang 5a7b9e58bc
Add Sentinel2_CDL Datamodule (#1889)
* cdlsentinel2

* update kwargs

* style

* arg type

* add cov

* kwargs

* update cdl data.py for intersection

* style

* create 2022 cdl for intersection

* test roi method

* style

* test_cdl year update

* intersection

* random_grid_cell_assignment

* add comments and line

* add description

* add doc

* Update SIZE variable in sentinel2/data.py and test stage in datamodules/cdlsentinel2.py

* merge val_aug and test_aug to aug

* rename cdlsentinel2 to sentinel2cdl

* fix isort

* No need to monkeypatch CDL

* Smaller backbone == faster tests

* Sort docs alphabetically

* Smaller Sentinel-2 test files

* Smaller CDL files, don't delete directory

* Sort imports alphabetically

* Fix doc names

* extra_args not needed

* center crop doesn't do anything

* blacken

* Revert "extra_args not needed"

This reverts commit 859f24ef15.

* Add underscore to filename

* Add plot method

* import Figure

* split 80-10-10

* style

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-22 17:03:01 +01:00
Adam J. Stewart fe9ee15469
Docs: fix link in Landsat weights table (#1956) 2024-03-20 19:41:44 +01:00
George Huber 1f6e974571
Add South Africa Crop Type Competition Dataset (#1840)
* initial commit

* add init description

* correct scanning of files in init

* added random data generation

* remove test directory

* Update metadata

* fix formatting

* add s1 data and update regex

* fix dataset and add tests

* formatting

* mypy

* add timeseries test and take images from july

* fix bug in merging files across dates

* mypy

* Bump lightly from 1.4.25 to 1.5.0 in /requirements (#1894)

* Additional Satlas pretrained models (#1884)

* Documentation, satellite-specific transform and weights for additional Satlas single-image rgb&multispectral Swin-v2 models. Tests pass.

* Address 3 of comments

* Address comments, fix readmydocs and isort, mypy still unhappy

* update

* Add bands to meta dicts

* Add comment about Satlas S2 RGB using TCI product

* linting

---------

Co-authored-by: Piper Wolters <piperw@allenai.org>
Co-authored-by: Piper Wolters <piperw@prior-cirrascale-79.reviz.ai2.in>

* Update tests/data/south_africa_crop_type/data.py

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

* Update tests/data/south_africa_crop_type/data.py

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

* Update torchgeo/datasets/south_africa_crop_type.py

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

* Update torchgeo/datasets/south_africa_crop_type.py

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

* Update torchgeo/datasets/south_africa_crop_type.py

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

* Update torchgeo/datasets/south_africa_crop_type.py

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

* refactor gettitem and bug fixes

* typo

* data.py style

* Update torchgeo/datasets/south_africa_crop_type.py

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

* Update torchgeo/datasets/south_africa_crop_type.py

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

* added comments for nonstandard functionality

* Update torchgeo/datasets/south_africa_crop_type.py

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

* small change

* add verbose documentation

---------

Co-authored-by: georgehuber <“georgehuber8@gmail.com”>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piper Wolters <46272042+piperwolters@users.noreply.github.com>
Co-authored-by: Piper Wolters <piperw@allenai.org>
Co-authored-by: Piper Wolters <piperw@prior-cirrascale-79.reviz.ai2.in>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-15 12:21:02 +01:00
Adam J. Stewart 193a9b7592
SSL4EO-L: update link to paper to cite (#1942)
* SSL4EO-L: update link to paper to cite

* Update datasets too

* Ignore long line
2024-03-11 05:04:51 -05:00
Adam J. Stewart e40c78d7f2
Docs: fix trainer metric definitions (#1924)
* Docs: fix trainer metric definitions

* Link to torchmetrics docs

* Teach Sphinx where docs live
2024-03-03 12:45:08 -06:00
David Meaux 1eaade2747
Clarify RasterDataset documentation for is_image and dtype (#1811)
* Change DEMs from mask to image (is_image=True)

* fix to revert to upstream file

* fix unused type: ignore comment

* Update torchgeo/datasets/geo.py

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

* Update documentation to explain is_image and dtype. Update asterdem to override dtype.

* fix linting errors

* Made comment for is_image more succint.

* change asterdem dtype back to float32 (same as RasterDataset)

* removed integer images from documentation

* change Digital Elevation Model to DEM

* Clarify is_image and dtype.
Revert DEMs to masks

* Finish reverting DEMs to masks

* address review comments

* Changed Aster Global DEM and EU-DEM Dataset types to "DEM"

* Reorganize some information

* Use better formatting

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2024-03-02 14:33:51 -06:00
Piper Wolters ad2ef7aed0
Additional Satlas pretrained models (#1884)
* Documentation, satellite-specific transform and weights for additional Satlas single-image rgb&multispectral Swin-v2 models. Tests pass.

* Address 3 of comments

* Address comments, fix readmydocs and isort, mypy still unhappy

* update

* Add bands to meta dicts

* Add comment about Satlas S2 RGB using TCI product

* linting

---------

Co-authored-by: Piper Wolters <piperw@allenai.org>
Co-authored-by: Piper Wolters <piperw@prior-cirrascale-79.reviz.ai2.in>
2024-02-21 09:41:48 -08:00