* fix test coverage in trainers validation step
* add tests for multilabelclassificationtask
* Minimal bug fix for now
* Simpler random code
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Update base.py to fix for custom augmentations
* Allow subclasses to ignore specific arguments
* Fix typing
* Save to self.weights
* pyupgrade
* Add test
* Save weights
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* add file
* Add to init
* refactor
* format
* isort
* match to oscd
* Add test
* remove mean and std
* update docstring with versionadded
* address test issues
* fix init
* fix init dataset
* fix type hint
* import
* add fixture
* import pytest
* make image float
* fix plotting
* isort
* mock download
* fix import
* satisfy mypy
* Fix fixture for TestLEVIRCDPlusDataModule
* fix imports
* Fix test values
* fix test values
* add val_split_pct=0.5
* Prevent divide by zero
* Update torchgeo/datamodules/levircd.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Update torchgeo/datasets/levircd.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* remove cast import
* remove unused parameterization
* Return cast
* address mypy
* try again mypy
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Add check if path is vsi
* Add url to reference for apache vsi syntax
* Add missing check to if
* Copy rasterio SCHEMES definition into torchgeo
* Check all schemes, not only last
* Simplify method path_is_vsi
* Add tests
* Remove print
* Update test names
* Add missing comma in list
* Update torchgeo/datasets/utils.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Update torchgeo/datasets/utils.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Use pytest tmp_path for test
* Warn if some of input paths are invalid
* Update docstring for mocked class
* Handle tests failing due to UserWarning
* Remove unnecessary filterwarning
* Test CustomGeoDataset instead of MockRasterDataset
* Merge two similar tests
* str instead of as_posix
Wait with pathlib syntax
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
---------
Co-authored-by: Adrian Tofting <adrian@vake.ai>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* ssl4eo landsat 18 weights
* add resnet and vit moco weights under new hf repo
* add simclr ssl checkpoint
* add docs
* order models and new csv tablesf for docs
* adjust spacing of table
* lots of numbers and formatting
* missing resnet etm-sr weights
* fix failing tests
* check slow tests
* Fix URL checksum
* fix weight names
* Use 2 digits for all metrics
* hyphen -> en dash
* Use 2 digits for all metrics
* Landsat first
* EOL char before EOF char
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Make RasterDataset accept list of files
* Fix check if str
* Use isdir and isfile
* Rename root to paths and update type hint
* Update children of RasterDataset methods using root
* Fix check to cast str to list
* Update conf files for RasterDatasets
* Add initial suggested test
* Add workaround for lists LandCoverAIBase
* Add method handle_nonlocal_path for users to override
* Raise RuntimeError to support existing tests
* Remove reduntand cast to set
* Remove required os.exists for paths
* Revert "Remove required os.exists for paths"
This reverts commit 84bf62b944326c33d5ba8efdcab615c65b124792.
* Use arg as potitional argument not kwarg
* Improve comments and logs about arg paths
* Remove misleading comment
* Change type hint of 'paths' to Iterable
* Change type hint of 'paths' to Iterable
* Remove premature handling of non-local paths
* Replace root with paths in docstrings
* Add versionadded to list_files docstring
* Add versionchanged to docstrings
* Update type of paths in childred of Raster
* Replace docstring for paths in all raster
* Swap root with paths for conf files for raster
* Add newline before versionchanged
* Revert name to root in conf for ChesapeakeCVPR
* Simplify EUDEM tests
* paths must be a string if you want autodownload support
* Convert list_files to a property
* Fix type hints
* Test with a real empty directory
* Move property `files` up to GeoDataset
* Rename root to paths for VectorDataset
* Fix mypy
* Fix tests
* Delete duplicate code
* Delete duplicate code
* Fix test coverage
* Document name change
---------
Co-authored-by: Adrian Tofting <adriantofting@mobmob14994.hq.k.grp>
Co-authored-by: Adrian Tofting <adrian@vake.ai>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* added functionality for validation split
* Changed "valid" to "val"
* updated docstring & removed redundant lists
* Fixed format with Linters
* Add more testing files
* Simplify regex
* Update datamodule to use new val split
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* outline of dataset class
* outline of dataset class
* test data outline
* setup dataset structure
* load bands
* create test data
* test file outline
* fix data reading
* add unit tests
* try to fix failing windows test
* Fix type hints
* Fix Windows tests
* Fix flake8
* adress comments
* remove left over download stuff and comments
* Minor style changes
* Remove unused import
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Make RasterDataset accept list of files
* Fix check if str
* Use isdir and isfile
* Rename root to paths and update type hint
* Update children of RasterDataset methods using root
* Fix check to cast str to list
* Update conf files for RasterDatasets
* Add initial suggested test
* Add workaround for lists LandCoverAIBase
* Add method handle_nonlocal_path for users to override
* Raise RuntimeError to support existing tests
* Remove reduntand cast to set
* Remove required os.exists for paths
* Revert "Remove required os.exists for paths"
This reverts commit 84bf62b944326c33d5ba8efdcab615c65b124792.
* Use arg as potitional argument not kwarg
* Improve comments and logs about arg paths
* Remove misleading comment
* Change type hint of 'paths' to Iterable
* Change type hint of 'paths' to Iterable
* Remove premature handling of non-local paths
* Replace root with paths in docstrings
* Add versionadded to list_files docstring
* Add versionchanged to docstrings
* Update type of paths in childred of Raster
* Replace docstring for paths in all raster
* Swap root with paths for conf files for raster
* Add newline before versionchanged
* Revert name to root in conf for ChesapeakeCVPR
* Simplify EUDEM tests
* paths must be a string if you want autodownload support
* Convert list_files to a property
* Fix type hints
* Test with a real empty directory
* More diverse tests
* LandCoverAI: don't yet support list of paths
* Black
* isort
---------
Co-authored-by: Adrian Tofting <adriantofting@mobmob14994.hq.k.grp>
Co-authored-by: Adrian Tofting <adrian@vake.ai>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Initial commit
* Fix practically all the problems
* Add docs
* Bruh
* np.typing in quotes because that makes more sense
* make really sure that mosaiks does stuff
* Consolidating RCFs
* Work
* formatting
* coverage
* Update torchgeo/models/rcf.py
* Minor style changes
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* add mapinwild dataset
* add copyright and move the header
* Apply suggestions from code review
accept suggestions
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* add spaces between sections
* test_black
* test_isort
* test_flake8
* dataset instance and test data
Improves the dataset instance and test data script.
* improvements in test script and dataset class
* update test data
* Update mapinwild.py
* Update mapinwild.py
fix typo
* Update mapinwild.py
* improved test coverage and bug fixes
* improved test coverage
* lazy import pandas
* test coverage for pandas
* test coverage for pandas
* Changes after the review
The changes made after the review.
* delete data
* fix mypy
* fix mypy
* delete residual files
* fix type hinting
* Apply suggestions from code review
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Apply suggestions from code review
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Apply suggestions from code review
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* fix RtD
* fix RtD
* fix syntax
* fix RtD
* fix file namings
* modality naming fix
* fix hidden method naming
* Update torchgeo/datasets/mapinwild.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* address reviews
* refactoring and testing
- passing test_download with monkeypatch
- refactoring
- addressing most of the comments
* fix mypy
* syntax and type conversion
* Update torchgeo/datasets/mapinwild.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* addressing the comments
* fix mypy plt.Figure not defined
* make the _merge_parts slimmer
* pandas and reviews
* monkeypatch tvt sets
* Simplify MonkeyPatch import
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Initial commit
* Add to docs
* Pyupgrade
* Pyupgrade
* Added tests
* who actually cares about lines that are 91 characters long
* Using Figure from matplotlib.figure instead of matplotlib.pyplot to make mypy happy even though they are the same thing
* Documentation updates
* Update docs link
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Add command line script
* Label PRs correctly
* Flake8 fix
* Add callbacks
* Update all conf files
* Enforce class of model/data
* Update BYOL tests
* Update all tests
* Use default num workers: 0
* Variable interpolation only supported by omegaconf backend
* Fix regression tests
* Ensure that jsonargparse is installed during testing
* Bump minimimum lightning version
* Workaround for lightning/jsonargparse bugs
* Ignore Python 3.9 warning message
* Add test coverage for __main__.py
* Increase coverage of PixelwiseRegressionTask
* jsonargparse bug fixed in latest release
* Revert "jsonargparse bug fixed in latest release"
This reverts commit 4f38cdfca3.
* Use default logging frequency
* Ensure that metrics are actually logged
* Fix ObjectDetectionTask logging
* Ignore type errors
* Not all need to be ignored
* Ensure that none of our minimum version tests are skipped
* Try pyvista instead
* Try no version
* What is going on
* Try pyvista 0.32.0
* Try pyvista 0.35.0
* Try pyvista 0.35.1
* Try pyvista 0.34.0
* Try pyvista 0.34.2
* Try pyvista 0.34.1
* 0.34.2 is the new min version
* adding seasonet dataset + tests + doc changes
* Fixed docs
* Added tests for missing imports
* Use collections.abc
* Changed some docstrings and comments
* Check parameters using sets
* Changed cmap and interpolation for masks
* Removed requests dependency
* Shortened some lines
* Fixed pandas warning
* Improve documentation of raised error types
---------
Co-authored-by: Viktor Brack <viktor.brack@tu-dortmund.de>
Co-authored-by: Viktor B <39567028+briktor@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Bump matplotlib from 3.7.3 to 3.8.0 in /requirements
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.7.3 to 3.8.0.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](https://github.com/matplotlib/matplotlib/compare/v3.7.3...v3.8.0)
---
updated-dependencies:
- dependency-name: matplotlib
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Use canonical import location
* Use canonical import location
* Use canonical import location
* More type fixes
* More type fixes
* More type fixes
* More type fixes
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Refactor trainers
* Update conf files
* Fix pydocstyle
* Add scheduler monitor
* Update conf files
* Fix BYOL backbone
* Remove broken configure_optimizers out type
* Fix type hints
* No casts
* Increase test coverage
* Better documentation of supported models
* Remove unimportant configuration
* Remove unimportant configuration
* Drop model_kwargs
* Docstring improvements
* Add base class for all torchgeo trainers
* Add configure_* methods for losses/metrics/models
* init must come first
* More type hints
* draft
* add dataset to __init__
* reorganize datasets and datamodules
* fix mypy errors
* draft
* add dataset to __init__
* reorganize datasets and datamodules
* fix mypy errors
* refactor
* Adding docs
* Adding plotting, cleaning up some stuff
* Black and isort
* Fix the datamodule import
* Pyupgrade
* Fixing some docstrings
* Flake8
* Isort
* Fix docstrings in datamodules
* Fixing fns and docstring
* Trying to fix the docs
* Trying to fix docs
* Adding tests
* Black
* newline
* Made the test dataset larger
* Remove the datamodules
* Update docs/api/non_geo_datasets.csv
Co-authored-by: Isaac Corley <22203655+isaaccorley@users.noreply.github.com>
* Update torchgeo/datasets/pastis.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Update torchgeo/datasets/pastis.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Update torchgeo/datasets/pastis.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Updating cmap
* Describe the different band combinations
* Merging datasets
* Handle the instance segmentation case in plotting
* Update torchgeo/datasets/pastis.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Made some code prettier
* Adding instance plotting
---------
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* DataModules: better error messages
* Fix batch size bug
* Fix type hints
* Use in one additional place
* Fix BatchGeoSampler batch size
* Increase test coverage
Avoids ambiguous truth value ValueError when the class_weight input
parameter is either a PyTorch tensor or a NumPy array.
Includes new tests for SemanticSegmentationTask's class_weight
parameter.
* SSL4EO-L: add download support
* Placate pydocstyle
* Meaning of root changed
* Missing one
* Incremental tarball concatenation
* Placate black
* Add download times
* Bump lightning from 2.0.2 to 2.0.3 in /requirements
Bumps [lightning](https://github.com/Lightning-AI/lightning) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/Lightning-AI/lightning/releases)
- [Commits](https://github.com/Lightning-AI/lightning/compare/2.0.2...2.0.3)
---
updated-dependencies:
- dependency-name: lightning
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update datamodule base class
* Check attributes first
* Fix remaining type hints
* More fixes
* Try again
* Try casting
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* Stop the madness
* isort
* flake8
* Repeat for other trainers
* Parentheses not needed
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* add year functionality CDL
* requested changes and test coverage
* removesuffix clearer than strip
* recursive file verify
* Fix versionadded syntax
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
* add simclr and tests
* add lightly to reqs
* pyupgrade
* Copy things from prior implementation
* Add SimCLR v2 projection head
* Remove kwargs
* Call __init__ explicitly
* Fix mypy and docs
* Can't test newer setuptools
* Default to output dim of model
* Add memory bank
* Ignore erroneous warning
* Fix configs, test SSL4EO
* Fix a few layer bugs
* mypy fixes
* kernel_size must be an integer
* Fix SeCo in_channels
* Get more coverage
* Bump min lightly
* Default logging
* Test weights
* mypy fix
* Grab max_epochs from the trainer
* max_epochs param removed
* Use num_features
* Remove classification head
* SimCLR uses LARS, with Adam as a backup
* Add warnings
* Grab num features directly from model
* Check if identity
* Match timm model design
* Capture warnings
* Fix tests
* Increase coverage
* Fix method name
* More typos
* Escape regex
* Newer setuptools now supported
* New batch norm for every layer
* Rename forward arg
* Clarify usage of weights parameter
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>
* Fix flake8
* Check it
* Use hydra
* Track average L2 normed stdev over features
* SimCLR decays lr to 0
* Add lr warmup
* Fix version access
* Fix LinearLR
* isinstance supports tuples
* Comment capitalization
* Require lightly 1.4.3+
* Require lightly 1.4.3+
* Bump lightly version
* Add RandomGrayscale
* Flake8 fixes
* Placate pydocstyle
* Clarify docs
* Pass correct weights
---------
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Caleb Robinson <calebrob6@gmail.com>