Skip to content

v0.2.0

Compare
Choose a tag to compare
@adamjstewart adamjstewart released this 02 Jan 03:58
· 31 commits to releases/v0.2 since this release

TorchGeo 0.2.0 Release Notes

This release contains a number of new features. The biggest change in this release is a significant overhaul of GeoDataset. It is now possible to intelligently compose multiple GeoDatasets in a variety of ways. For example, users can now:

  • Combine datasets for multiple image sources and treat them as equivalent (e.g. Landsat 7 and Landsat 8)
  • Combine datasets for disparate geospatial locations (e.g. Chesapeake NY and PA)

These combinations require that all queries are present in at least one dataset, and can be combined using a UnionDataset:

landsat7 = Landsat7(root="...")
landsat8 = Landsat8(root="...", bands=["B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9"])
landsat = landsat7 | landsat8

Users can now also:

  • Combine image and target labels and sample from both simultaneously (e.g. Landsat and CDL)
  • Combine datasets for multiple image sources for multimodal learning or data fusion (e.g. Landsat and Sentinel)

These combinations require that all queries are present in both datasets, and can be combined using an IntersectionDataset:

cdl = CDL(root="...", download=True, checksum=True)
dataset = landsat & cdl

If files are in different coordinate systems or at different spatial resolutions, TorchGeo now automatically warps all tiles to a common CRS and resolution. As before, all GeoDatasets are compatible with PyTorch DataLoaders using GeoSamplers.

Backwards-incompatible changes

TorchGeo is still in the alpha development phase and our API continues to change as needed. If you are using any of the following features, be sure to update your code to use the new API:

  • ZipDataset has been renamed to IntersectionDataset (#144)
  • GeoDataset no longer supports addition (+), use intersection (&) or union (|) instead (#144)
  • BoundingBox is no longer a subclass of tuple, but can still be cast to a tuple using tuple(bbox) (#144)
  • collate_dict has been renamed to stack_samples (#144)
  • Dataset-specific trainers have been removed, use task-specific trainers instead (#205, #286)
  • All DataModules have been moved from torchgeo.datasets to torchgeo.datamodules (#321)
  • Functional index transforms have been removed (#285)

Datamodules

This release adds a new torchgeo.datamodules namespace. All DataModules previously defined in torchgeo.datasets now live in torchgeo.datamodules.

In addition, the following datasets have new datamodules:

Many datamodules now have a plot method that wraps around the respective dataset plot method (#286)

Datasets

This release includes many improvements for geospatial datasets:

  • New IntersectionDataset and UnionDataset classes (#144)
  • GeoDataset and BoundingBox now support set arithmetic (#144)
  • New collation functions for stacking, concatenating, merging, and unbinding samples (#144, #286, #328)
  • Chesapeake CVPR dataset now supports optional prior labels (#202)

This release also includes the following new benchmark datasets:

Most existing datasets now have a plot method:

Losses

This release adds a new torchgeo.losses namespace for loss functions common in or exclusive to geospatial data.

Models

  • RCF now has a seed parameter (#193, #250)

Samplers

Trainers

  • Trainers now plot samples during validation for supported datamodules (#286)
  • Dataset-specific trainers have been removed (#286)

Transforms

  • New AppendNormalizedDifferenceIndex transform (#285)
  • New normalized burn ratio transform (#284)

Documentation

  • New tutorial for writing custom RasterDatasets (#283)
  • Tutorials are now properly versioned (#274, #309, #310)
  • Tutorials now have an "Open in Planetary Computer" button (#316)
  • Minor updates to Indices tutorial (#339, #348)

Tests

  • Datamodules are now properly tested with real trainers (#329)
  • Tests no longer require internet access (#194, #265)
  • Tests now use significantly less memory (#344)

Contributors

This release is thanks to the following contributors: