TorchGeo: datasets, samplers, transforms, and pre-trained models for geospatial data
Перейти к файлу
mtrazzak bae8d0e979 Merge branch 'main' of https://github.com/microsoft/torchgeo into feature/ssl_experiments_sampling 2021-10-21 15:02:21 +01:00
.github/workflows Indices Transforms (#127) 2021-09-28 17:04:56 -05:00
conf Merge branch 'main' of https://github.com/microsoft/torchgeo into feature/ssl_experiments_sampling 2021-10-21 15:02:21 +01:00
docs Docs/models (#199) 2021-10-17 12:14:26 -05:00
experiments Merge branch 'main' of https://github.com/microsoft/torchgeo into feature/ssl_experiments_sampling 2021-10-21 15:02:21 +01:00
logo Add favicon to ReadTheDocs 2021-09-08 16:08:04 -05:00
tests Add BigEarthNet dataset (#197) 2021-10-17 11:19:57 -05:00
torchgeo Merge branch 'main' of https://github.com/microsoft/torchgeo into feature/ssl_experiments_sampling 2021-10-21 15:02:21 +01:00
.codecov.yml Remove Codecov annotations from PRs 2021-09-19 11:07:39 -05:00
.flake8 Removing some headers 2021-08-31 13:25:05 -05:00
.gitattributes Removing some headers 2021-08-31 13:25:05 -05:00
.gitignore Ignore PDF figures 2021-10-09 11:58:19 -05:00
.pre-commit-config.yaml Merge pull request #137 from ashnair1/pre-commit 2021-09-15 15:46:35 -07:00
.readthedocs.yaml Reduce number of files listing deps (#154) 2021-09-22 09:41:00 -05:00
CODE_OF_CONDUCT.md Add Microsoft open-source template 2021-05-21 11:35:58 -05:00
LICENSE Add Microsoft open-source template 2021-05-21 11:35:58 -05:00
README.md Move contribution guide to documentation 2021-09-22 09:20:58 -07:00
SECURITY.md Add Microsoft open-source template 2021-05-21 11:35:58 -05:00
SUPPORT.md Add Microsoft open-source template 2021-05-21 11:35:58 -05:00
benchmark.py Improve sampler performance for pixel-aligned files (#181) 2021-10-12 15:34:08 -05:00
environment.yml Indices Transforms (#127) 2021-09-28 17:04:56 -05:00
pyproject.toml Add models to pydocstyle match_dir (#136) 2021-09-14 15:53:38 +00:00
setup.cfg Removing duplicate kornia in setup.cfg 2021-09-29 23:19:45 +00:00
setup.py File permissions? 2021-08-31 13:25:05 -05:00
train.py Merge branch 'main' of https://github.com/microsoft/torchgeo into feature/ssl_experiments_sampling 2021-10-21 15:02:21 +01:00

README.md

TorchGeo

TorchGeo is a PyTorch domain library, similar to torchvision, that provides datasets, transforms, samplers, and pre-trained models specific to geospatial data.

The goal of this library is to make it simple:

  1. for machine learning experts to use geospatial data in their workflows, and
  2. for remote sensing experts to use their data in machine learning workflows.

See our installation instructions, documentation, and examples to learn how to use torchgeo.

External links: docs codecov

Tests: docs style tests

Installation instructions

The recommended way to install TorchGeo is with pip:

$ pip install git+https://github.com/microsoft/torchgeo.git

For conda and spack installation instructions, see the documentation.

Documentation

You can find the documentation for torchgeo on ReadTheDocs.

Example usage

The following sections give basic examples of what you can do with torchgeo. For more examples, check out our tutorials.

Train and test models using our PyTorch Lightning based training script

We provide a script, train.py for training models using a subset of the datasets. We do this with the PyTorch Lightning LightningModules and LightningDataModules implemented under the torchgeo.trainers namespace. The train.py script is configurable via the command line and/or via YAML configuration files. See the conf/ directory for example configuration files that can be customized for different training runs.

$ python train.py config_file=conf/landcoverai.yaml

Download and use the Tropical Cyclone Wind Estimation Competition dataset

This dataset is from a competition hosted by Driven Data in collaboration with Radiant Earth. See here for more information.

Using this dataset in torchgeo is as simple as importing and instantiating the appropriate class.

import torchgeo.datasets

dataset = torchgeo.datasets.TropicalCycloneWindEstimation(split="train", download=True)
print(dataset[0]["image"].shape)
print(dataset[0]["wind_speed"])

Contributing

This project welcomes contributions and suggestions. If you would like to submit a pull request, see our Contribution Guide for more information.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.