Changelog#
This changelog is automatically generated from GitHub Releases.
v0.9.0#
Released on 2026-02-14 - GitHub
TorchGeo 0.9.0 Release Notes
TorchGeo 0.9 includes 13 new datasets and a number of improvements required for better time series support, encompassing 3 months of hard work by 15 contributors from around the world. We are now trying to make more frequent releases to get exciting new features out to users as quickly as possible!
Highlights of this release
Embeddings datasets
TorchGeo was the first library to provide pre-trained geospatial foundation models, and offers more GeoFMs than all other GeoML libraries combined1. Users have always had the ability to generate their own embeddings using TorchGeo. However, using FMs requires considerable expertise and compute, preventing widespread adoption.
Several prominent papers have introduced the idea of Earth Embeddings, pre-computed embeddings made from satellite imagery mosaics or annual time series data at regional to global scale. As part of a larger review of Earth Embeddings2, we have added all known patch-based and pixel-based embedding products to TorchGeo!
| Dataset | Kind | Spatial Extent | Spatial Resolution | Temporal Extent | Temporal Resolution | Dimensions | Dtype | License |
|---|---|---|---|---|---|---|---|---|
| Clay Embeddings | Patch | Global* | 5.12 km | 2018–2023* | Snapshot | 768 | float32 | ODC-By-1.0 |
| Major TOM Embeddings | Patch | Global | 2.14–3.56 km | 2015–2024* | Snapshot | 2048 | float32 | CC-BY-SA-4.0 |
| Earth Index Embeddings | Patch | Global | 320 m | 2024 | Snapshot | 384 | float32 | CC-BY-4.0 |
| Copernicus-Embed | Patch | Global | 0.25° | 2021 | Annual | 768 | float32 | CC-BY-4.0 |
| LGND Clay Embeddings | Patch | Global | 256 m | 2024–2025 | Snapshot | 1024 | float32 | CC-BY-4.0 |
| EarthEmbeddings | Patch | Global* | 2.24–3.84 km | 2015–2024* | Snapshot | 256–1152 | float16, float32 | CC-BY-SA-4.0 |
| Presto Embeddings | Pixel | Togo | 10 m | 2019–2020 | Annual | 128 | uint16 | CC-BY-4.0 |
| Tessera Embeddings | Pixel | Global | 10 m | 2017–2025* | Annual | 128 | int8 → float32 | CC0-1.0 |
| Google Satellite Embedding | Pixel | Global | 10 m | 2017–2025 | Annual | 64 | int8 → float64 | CC-BY-4.0 |
| Embedded Seamless Data | Pixel | Global | 30 m | 2000–2024 | Annual | 12 | uint16 → float32 | CC-BY-4.0 |
Most of the FMs and pre-training datasets used to generate these embeddings can also be found in TorchGeo, offering complete reproducibility. Expect more experiments comparing the performance of different embedding products from us in the coming months, and check out our review!
Time series datasets and models
As part of our ongoing time series rewrite, this release adds time series support for RasterDataset and several new time series models!
All raster datasets can now be configured to either merge all images into a single mosaic or stack all images into a time series:
Landsat9(..., time_series=False) # merge: [C, H, W]
Landsat9(..., time_series=True) # stack: [T, C, H, W]
CDL(..., time_series=False) # merge: [H, W]
CDL(..., time_series=True) # stack: [T, H, W]TorchGeo now offers several time series models:
1D time series ($$B \times T \times C$$ )
3D change detection ($$B \times 2 \times C \times H \times W$$ )
3D image time series ($$B \times T \times C \times H \times W$$ )
4D ocean and atmosphere ($$B \times T \times C \times Z \times Y \times X$$ )
Most time series datasets now consistently return data in
Backwards-incompatible changes
Warning
TorchGeo 0.9, like 0.8, has a number of backwards-incompatible changes required for a more stable 1.0 release in the future. Below we motivate each change and describe how to migrate any existing code.
GeoDataset: return Tensor outputs when possible
Prior versions of GeoDataset directly returned CRS and query bounding boxes in each sample dictionary. These were designed to support stitching together individual model predictions over space. However, these non-Tensor values could not be transferred to the GPU, requiring custom collation functions and deletion during training.
The 'crs' key has now been removed, and can be retrieved from the dataset. The 'bounds' key has been converted to a Tensor. A new 'transform' key can more directly be used for stitching predictions.
Tip
Instead of:
sample = dataset[...]
crs = sample['crs']use:
crs = dataset.crsPoint datasets (EDDMapS, GBIF, iNaturalist) now use the 'keypoints' key instead of returning the entire index. This enables support for Kornia transforms on these objects.
Tip
Instead of:
keypoints = sample['bounds'].get_coordinates()use:
keypoints = sample['keypoints']There are still several places where sample dictionaries can contain lists or strings. Expect these to be removed or replaced with Tensors in future releases.
Models: avoid downloading by default
Several model architectures and trainers were downloading ImageNet weights by default. This surprised users who didn't expect any downloads and resulted in frequent CI failures. In TorchGeo 0.9, no datasets or models will download anything by default. Model weights will only be downloaded by explicit request.
Tip
To restore the previous behavior, replace:
# Downloads weights unexpectedly
model = ChangeStar()
model = EarthLoc()
model = FarSeg()
model = unet(weights=None)
# Downloads weights with no control over which weights
task = InstanceSegmentationTask(weights=True)
task = ObjectDetectionTask(weights=True)with:
model = ChangeStar(backbone_weights=WeightsEnum)
model = EarthLoc(pretrained=True)
model = FarSeg(backbone_weights=WeightsEnum)
model = unet(weights=WeightsEnum)
task = InstanceSegmentationTask(weights=WeightsEnum)
task = ObjectDetectionTask(weights=WeightsEnum)This is now enforced in CI by preventing all downloads during testing.
Other
- xView2 was renamed to xBD (#3132)
- SemanticSegmentationTask.predict_step now returns a dictionary (#3357)
- SeasoNet and Substation now return
$$T \times C \times H \times W$$ time series by default (#3369, #3371) - The dataset download backend was changed, and Google Drive datasets may no longer download correctly. Most datasets have been moved to Hugging Face, some remain and require manual download (#3338)
Dependencies
New dependencies
- pytest-socket (#3343)
Changes to existing dependencies
- Python: 3.12+ is now required (#3201)
- geopandas: 0.13+ is now required (#3139)
- h5py: 3.10+ is now required (#3201)
- jsonargparse: 4.35+ is now required (#3201)
- matplotlib: 3.7.3+ is now required (#3201)
- netcdf4: 1.6.5+ is now required (#3201)
- numpy: 1.26+ is now required (#3201)
- packaging: 21+ is now required (#3201)
- pandas: 2.1.1+ is now required (#3201)
- pandas-stubs: 2.1.1+ is now required (#3201)
- pillow: 10+ is now required (#3201)
- pycocotools: 2.0.8+ is now required (#3201)
- pyproj: 3.6.1+ is now required (#3201)
- pytest: 7.3.2+ is now required (#3201)
- requests: 2.25+ is now required (#3201)
- scikit-image: 0.22+ is now required (#3201)
- scipy: 1.11.2+ is now required (#3201)
- shapely: 2.0.2+ is now required (#3201)
- torch: 2.2+ is now required (#3201)
- torchvision: 0.17+ is now required (#3201)
- types-requests: 2.25+ is now required (#3201)
- types-shapely: 2.0.2+ is now required (#3201)
- typing-extensions: 4.8+ is now required (#3201)
Datasets
New datasets
- Clay Embeddings (#3293, #3358)
- Copernicus-Embed: pictured above (#3252)
- Earth Embeddings (#3391)
- Earth Index Embeddings (#3282)
- Embedded Seamless Data (ESD) (#3403)
- Google Satellite Embedding (AlphaEarth Foundations) (#3244)
- Major TOM Embeddings (#3295)
- OSCD100 (#3221, #3411)
- PASTIS100 (#3265)
- Presto Embeddings (#3288)
- Tessera Embeddings (#3245, #3310)
Changes to existing datasets
- BigEarthNetV2: fix downloaded filename (#3363)
- Cloud Cover Detection: don't rename downloaded directories (#3158)
- LEVIR-CD: download from Hugging Face (#3351)
- NLCD: add 2024 data (#3189)
- Point datasets: return keypoints (#3139)
- SeasoNet:
$$SC \times H \times W \rightarrow T \times C \times H \times W$$ (#3371) - SSL4EO-S12: correct docs on # channels for TOA vs. SR (#3379)
- Substation: return time series by default, plotting fix (#3369)
- SustainBench Crop Yield: download from Hugging Face (#3337)
- xBD: rename xView2 dataset (#3132)
- Fix plot docstring reference to getitem (#3353)
Changes to dataset base classes
- Dataset: use index consistently (#3264)
- Dataset: return Sample = dict[str, Any] (#3200)
- GeoDataset: remove 'crs', convert 'bounds' (#3138, #3350)
- GeoDataset: return spatial 'transform' (#3140)
- RasterDataset: add time series support (#3183)
- RasterDataset: refactor open/reproject to single method (#3014)
- XarrayDataset: document that this is an experimental feature (#3362)
Utilities
- download_and_extract_archive: replace torchvision utility (#3339)
- download_url: replace torchvision utility, remove support for Google Drive downloads (#3338)
- check_integrity: replace torchvision utility, add support for cryptographically secure checksum algorithms (#3302)
- extract_archive: replace torchvision utility, enforce stricter tarball checks (#3307)
Data Modules
New data modules
Changes to existing data modules
- xBD: rename xView2 data module (#3132)
Changes to data module base classes
- GeoDataModule: don't delete 'crs' and 'bounds' from sample (#3138)
Models
New model architectures
New model weights
- Tile2Vec (#3230)
- U-Net: add ChesapeakeRSC road segmentation weights (#3407)
- U-Net: add PRUE FTW weights (#3406)
Changes to existing models
- ChangeStar: replace backbone_pretrained bool with backbone_weights enum (#3348)
- EarthLoc: pretrained model now defaults to False (#3341)
- FarSeg: replace backbone_pretrained bool with backbone_weights enum (#3348)
- U-Net: don't download weights unless requested (#3344)
Trainers
- ClassificationMixin: unify features of classification trainers, add class-wise metrics (#3328)
- ChangeDetectionTask: add labels parameter (#3328)
- ChangeDetectionTask: add precision and recall metrics (#3328)
- ClassificationTask: add labels, pos_weight, ignore_index parameters (#3328)
- ClassificationTask: add dice loss support (#3328)
- ClassificationTask: add precision and recall metrics (#3328)
- InstanceSegmentationTask: weights bool to enum (#3349)
- InstanceSegmentationTask: add weights_backbone parameter (#3349)
- ObjectDetectionTask: weights bool to enum (#3352)
- SemanticSegmentationTask: add labels and pos_weight parameters (#3328)
- SemanticSegmentationTask: add dice loss support (#3328)
- SemanticSegmentationTask: add precision, recall, and F1-score metrics (#3328)
- SemanticSegmentationTask: predict_step now returns dict (#3357)
Documentation
- Fix broken or redirected links (#3345, #3381, #3413)
- Move images/logo to subdirectory (#3365)
- API: redesign and reorganize dataset docs (#3385, #3395, #3409)
- API: reorganize model architectures (#3324)
- Tutorials: document more TorchGeo slicing options (#3374)
- User: update related libraries (#3412)
- Version bump (#3129, #3329, #3420)
Tests
- agents: help Copilot and friends better review PRs (#3306, #3336, #3355)
- pytest: ensure no downloads occur during testing (#3341, #3343, #3344, #3348, #3349, #3352, #3405)
- pytest: don't verify checksum of fake files (#3367)
- pytest: document purpose of data module tests (#3354)
- ty: various type hint fixes (#3303, #3304, #3335, #3386, #3387, #3388, #3390, #3392, #3393, #3394, #3396, #3397, #3398, #3399, #3400, #3401)
- uv: replace pip with uv in CI (#3318)
Contributors
This release is made possible thanks to the following contributors:
- @adamjstewart
- @adriantre
- @alecsandrei
- @ashnair1
- @DarthReca
- @gatienc
- @heiyuxiaokai
- @hkristen
- @isaaccorley
- @kshitijrajsharma
- @nilsleh
- @Pratik0405
- @robmarkcole
- @VoyagerXvoyagerx
- @yichiac
v0.8.1#
Released on 2026-01-25 - GitHub
TorchGeo 0.8.1 Release Notes
This is a bugfix and maintenance release. While there are no new features or API changes, this release includes important bug fixes, documentation improvements, and minor enhancements across datasets, models, and testing.
Note
TorchGeo's documentation has been updated to use the PyData Sphinx Theme, bringing a modern look and feel along with improved navigation and accessibility. The new theme aligns TorchGeo with other scientific Python projects like NumPy, pandas, and xarray, providing a familiar experience for users across the ecosystem.
Dependencies
- mypy: 1.16+ now required (#3153)
- myst-parser: add new dependency (#3283)
- opencv: remove dependency (#3238)
- pandas: fix support for pandas 3+ (#3311)
- pandas-stubs: add new dependency (#3155)
- pydata-sphinx-theme: add new dependency (#3165)
- python: test 3.14, free-threaded support (#3045, #3203, #3259, #3319)
- pytorch-sphinx-theme: remove dependency (#3165)
- sphinx: fix support for sphinx 6+ (#3165)
- types-requests: add new dependency (#3157)
- types-shapely: add new dependency (#3154, #3187)
- Deprecation policy: NEP 29 -> SPEC 0 (#3204)
Datasets
- Biomassters: fix file handle leak (#3233)
- DL4GAM: fix file handle leak (#3234)
- DIOR: fix download (#3196)
- NLCD: fix download, v0 -> v1 (#3185)
- RasterDataset: fix support for flipped or upside down rasters (#3249)
- Sentinel-1: add support for S1C, S1D (#3223)
- SolarPlantsBrazil: add predictions to plot (#3144)
- VectorDataset: support parquet files (#3166)
- XarrayDataset: fix file handle leak (#3235)
- random_grid_cell_assignment: fix dataset split lengths (#3251)
Models
- ChangeViT: enable dynamic image sizes for all ViT backbones (#3133)
- CROMA: register attn_bias as buffer (#3232)
- RCF/MOSAIKS: performance speedup (#3242)
- Weights: ensure no weights have null transforms (#3167)
Trainers
- Change Detection: add support for pre-trained BTC/ChangeViT weights (#3131)
Documentation
- Switch to pydata-sphinx-theme (#3165, #3275, #3276, #3283)
- Related Libraries: GeoAI has a GUI now (#3193)
- Update TorchGeo citation (#3229)
- ChaBuD: fix homepage, citation links (#3130)
- OSCD: fix license (#3174)
- Remove experiments directory (#3273)
- Add missing copyright header in update_timeline.py (#3262)
- Fix typo in pyproject.toml (#3226)
Tutorials
- Geospatial: use modern GDAL CLI syntax (#3060)
- Transforms: fix EuroSAT visualization widget (#3171)
- CLI: add more custom configuration (#3266)
- Earth Surface Water: remove unused type ignore (#3188)
- Custom Raster Datasets: add examples of dtype/resampling overrides (#3186)
- Set accelerator appropriately for tutorial notebooks (#3149)
Testing
- mypy: improved configuration (#3153, #3172, #3271)
- pre-commit: update dependencies, reuse configuration (#3070)
- ruff: enable docstring-code-format (#3254)
- ty: add configuration (#3212, #3271, #3298)
- Add additional type stubs (#3154, #3155, #3157)
- Various type hint fixes (#3150, #3151, #3152, #3217, #3236, #3268, #3269, #3296, #3297)
- Fix tests when only some optional dependencies are installed (#3277)
- Ensure tests use latest Python release (#3202)
- Convert fake test data from WKT to EPSG (#3260)
Contributors
This release is made possible thanks to the following contributors:
v0.8.0#
Released on 2025-11-23 - GitHub
TorchGeo 0.8.0 Release Notes
TorchGeo 0.8 includes 28 new pre-trained model weights and a number of improvements required for better time series support, including a complete rewrite of all GeoDataset and GeoSampler internals, encompassing 8 months of hard work by 23 contributors from around the world.
Highlights of this release
Open and independent governance
You may have noticed that https://github.com/microsoft/torchgeo is now https://github.com/torchgeo/torchgeo. This is not an accident!
Note
TorchGeo now belongs to YOU, please join our monthly Technical Steering Committee meetings!
TorchGeo was initially created as an intern project at Microsoft's AI for Good Lab back in 2021. Once we made it open source, we were blown away by how quickly it was adopted by the AI4EO community! Since then, over 100 people from around the world have contributed to making TorchGeo what it is today.
Despite being open source, we have received feedback from many current and potential contributors that they have found it difficult to contribute to TorchGeo due to its ownership by Microsoft. While Microsoft has been an excellent incubator for TorchGeo over the past four years, we believe TorchGeo has outgrown its incubation phase.
Over the past year, we have been working diligently with Microsoft to come up with a solution. As of this release, we are excited to announce the formation of the TorchGeo Organization, a governing body designed to ensure the independence and longevity of the TorchGeo Project. The TorchGeo Organization is led by a Technical Steering Committee (TSC), initially composed of the current maintainers of the TorchGeo Project:
- @adamjstewart (TUM) - Chair
- @calebrob6 (Microsoft)
- @anthonymlortiz (Microsoft)
- @isaaccorley (Wherobots)
- @ashnair1 (Space42)
- @nilsleh (TUM)
TorchGeo now lives at https://github.com/torchgeo, and Microsoft has graciously volunteered to give away the copyright to YOU, the TorchGeo Contributors. We would like all TorchGeo users and developers to take ownership of the project, and thus invite each and every one of you to join our TSC meetings. Please join the #technical-steering-committee channel in the TorchGeo Slack for more information on our monthly meeting schedule.
Other than this new open and independent governance, not much will change with the TorchGeo Project. TorchGeo will always remain open source under an MIT license and be free for all users and developers. We hope this change will open up opportunities for more collaboration, more awesome libraries built on top of TorchGeo, and more confidence in the long-term future of the project!
Change detection support
TorchGeo 0.8 introduces support for change detection datasets (B x 2 x C x H x W)! This includes a new ChangeDetectionTask LightningModule with support for binary, multiclass, and multilabel change detection. This LightningModule supports both early-fusion (all encoders from timm and decoders from SMP) and the following change detection-specific late-fusion architectures:
- Fully Convolutional Siamese Networks (@rcdaudt et al., 2018)
- ChangeStar (@Z-Zheng et al., 2021)
- ChangeViT (@zhuduowang et al., 2024)
- Be The Change (@blaz-r et al., 2025)
TorchGeo also includes the following binary and multiclass change detection datasets:
- OSCD (@rcdaudt et al., 2018) - binary
- xView2 @RitwikGupta et al., 2019) - multiclass
- LEVIR-CD (@justchenhao et al., 2020) - binary
- LEVIR-CD+ (Shen et al., 2021) - binary
- ChaBuD (@julien-blanchon et al., 2023) - binary
- CaBuAr (@DarthReca et al., 2024) - binary
- BRIGHT (@ChenHongruixuan et al., 2025) - multiclass, pictured above
All datasets have a corresponding LightningDataModule that is compatible with and tested against ChangeDetectionTask.
P.S. For other change detection models, check out @Z-Zheng's excellent torchange library!
Backwards-incompatible changes
Warning
TorchGeo 0.8 is unusual in the number of backwards-incompatible changes it includes. In preparation for a more stable 1.0 release in the future, we have made several changes to better support time series data. Below we motivate each change and describe how to migrate any existing code.
GeoDataset/GeoSampler: BoundingBox → GeoSlice
Prior releases of TorchGeo used a custom BoundingBox object for GeoDataset indexing:
from torchgeo.datasets import BoundingBox
bbox = BoundingBox(xmin, xmax, ymin, ymax, tmin, tmax)
ds[bbox]This custom BoundingBox object was quite different from other libraries and lacked a lot of the flexibility needed for time series support. All inputs were required, even if space or time were unimportant, and only integer tmin/tmax were supported.
TorchGeo 0.8 adopts a powerful slicing syntax similar to numpy, xarray, and torch:
ds[xmin:xmax:xres, ymin:ymax:yres]
ds[:, :, tmin:tmax:tres]
ds[xmin:xmax, ymin:ymax, tmin:tmax]Spatial-only, temporal-only, and spatiotemporal slices are all supported. Each slice can optionally specify the resolution of the returned data. If any min, max, or res values are missing, the defaults for the full dataset are used. While x and y are in float, t is in datetime.datetime for more natural temporal slicing.
If you are using GeoDataset in combination with GeoSampler, no changes are required for forwards-compatibility, as GeoSampler and GeoDataset.bounds now return these slices. BoundingBox is now deprecated and will be removed in a future release.
Tip
If you need a single BoundingBox-like object, you can use a tuple of slices like so:
bbox = (slice(xmin, xmax), slice(ymin, ymax), slice(tmin, tmax))If you need to be able to calculate the area, intersection, or union of a bounding box, we suggest using shapely.box.
GeoSampler/splitters: BoundingBox → Polygon, Interval
In previous releases of TorchGeo, if you wanted to select a smaller region of interest (ROI) for training or validation, you could either use the roi parameter of GeoSampler or use roi_split and time_series_split to directly split your GeoDataset. However, only BoundingBox objects were supported.
In TorchGeo 0.8, you can now use arbitrary shapely.Polygon and pd.Interval objects for ROI and TOI bounds. These polygons do not have to be boxes, they can be any shape, including a GeoJSON outline of a complex island archipelago.
Tip
To migrate simple boxes to this new syntax, replace:
roi = BoundingBox(xmin, xmax, ymin, ymax, tmin, tmax)with:
roi = shapely.box(xmin, ymin, xmax, ymax) # note change in order
toi = pd.Interval(tmin, tmax)GeoDataset/GeoSampler: rtree → geopandas
TorchGeo previously used the R-tree library for spatiotemporal indexing of geospatial data. This allowed for fast computation of intersection, union, and indexing. However, R-tree lacks support for a lot of desirable geospatial and geotemporal features, including non-rectangular polygons, automatic reprojection, datetime objects, and spatial/temporal aggregation.
TorchGeo 0.8 switches TorchGeo's spatiotemporal indexing backend from R-tree to geopandas, which supports all of these features and more with similar performance. Geopandas can efficiently scale to large datasets using dask-geopandas and multithreading. Entire shapefiles can be directly stored in geopandas instead of only storing a single bounding box.
This change will be most notable for users who write custom GeoDataset subclasses. If you are using a built-in dataset, you may not even notice this change. In the future, we plan to continue improving support for non-rectangular polygons in both the dataset and sampler so that nodata pixels can be easily avoided.
VectorDataset: fiona → geopandas
Similarly, all VectorDataset classes now use geopandas instead of fiona for data loading. This results in one less dependency and allows for complicated expressions without for-loops, often resulting in faster data loading. The only backwards-incompatible change here is that the get_label method now takes a pd.Series row as input instead of a fiona.Feature.
Change detection datasets: C x H x W → 2 x C x H x W
Previously, our time series datasets were inconsistent, with some datasets returning a single T x C x H x W object, others combining the T and C dimensions into a (T C) x H x W object, and others returning multiple C x H x W objects labeled image1, image2, image_pre, image_post, etc.
All change detection datasets now return a single 2 x C x H x W object. The remaining time series datasets will be changed in the next release to T x C x H x W.
Custom transform deprecation removals
This release removes several custom or private transforms that have been deprecated for several releases or are not compatible with time series data:
| Removed | Suggested Replacement |
|---|---|
AugmentationSequential |
kornia.augmentation.AugmentationSequential |
_ExtractPatches |
kornia.augmentation.CenterCrop |
_Clamp |
torchvision.transforms.v2.Lambda(lambda x: torch.clamp(x, 0, 1)) |
CenterCrop is not identical to _ExtractPatches, and you may need to change the patch_size to get full coverage during evaluation. We are planning to upstream a method directly to Kornia or torchvision to better support this.
Dependencies
New dependencies
Removed dependencies
Changes to existing dependencies
- kornia: 0.8.2+ now required (#3094)
- lightning: 2.5.6 not supported (#3080)
- numpy: 1.24+ now required (#1490)
- rasterio: 1.4.3+ now required (#1490)
- shapely: 2+ now required (#2747)
- timm: 1.0.3+ now required (#2828)
- xarray: 0.17+ now required (#1490)
Datasets
New datasets
Changes to existing datasets
- Dataset plots: portrait → landscape (#3093)
- BRIGHT: image_pre, image_post → image (#2862)
- BRIGHT: add vmin/vmax to plots (#3097)
- CaBuAr: (T C) → T x C (#2863)
- CDL: add 2024 data (#2939)
- ChaBuD: (T C) → T x C (#2878)
- ChaBuD: fix link to homepage (#3128)
- EDDMapS: add plot method (#2709)
- GBIF: add plot method (#2741)
- LEVIR-CD: image1, image2 → image (#2879)
- iNaturalist: add plot method (#2743)
- OSCD: image1, image2 → image (#2422)
- OSCD: fix documentation of image sizes (#3128)
- MMEarth: add plot method (#2759)
- Sentinel-2: support for .SAFE multiresolution products (#3043)
- Western USA Live Fuel Moisture: add plot method (#2769)
- xView2: multi-temporal semantic segmentation → change detection (#2906)
Changes to dataset base classes
- GeoDataset: rtree → geopandas (#2747)
- GeoDataset: add support for slicing (#2804, #2847)
- XarrayDataset: new base class, still experimental (#1490)
- VectorDataset: fiona → geopandas (#2962, #3114, #3118, #3119)
- VectorDataset: add support for object and instance detection (#2819)
- IntersectionDataset: support spatial-only intersection (#2837)
Utilities
- BoundingBox: deprecated in favor of GeoSlice (#2847)
- pad_across_batches: time series collation function (#2921)
- splitters: rtree → geopandas (#2747)
- roi_split: support arbitrary Polygon roi (#2835)
Data Modules
New data modules
Changes to existing data modules
- CaBuAr: use video transforms (#2863)
- ChaBuD: use video transforms (#2878)
- LEVIR-CD: use video transforms (#2879)
- OSCD: use video transforms (#2422)
- OSCD: support for non-square images (#3103)
- xView2: use video transforms (#2906)
Losses
- QR: improve numerical stability (#2796)
Models
New model architectures
- Aurora: pictured above (#2823, #3127)
- BTC (#2926, #3122)
- ChangeViT (#2910)
- ConvLSTM (#2898)
- EarthLoc (#2806)
- L-TAE (#2867)
- Swin v1 (#2926)
- U-Net (#2719)
New model weights
Changes to existing models
- All weight transforms are now exportable (#2893)
- MOSAIKS: new alias for RCF (#2915)
- Panopticon: speed up position embedding (#2888)
Samplers
- GeoSampler: r-tree → geopandas (#2747)
- GeoSampler: add support for slicing (#2804, #2847)
- GeoSampler: support arbitrary Polygon roi, add toi (#2812)
- GridGeoSampler: default stride = patch size (#2722)
Scripts
- CLI: add
--versionargument (#2912)
Trainers
New trainers
Changes to existing trainers
- Classification: class_weights list support (#2707)
- Semantic segmentation: class_weights list support (#2707)
- Semantic segmentation: add support for DPT, Segformer, and UPerNet decoders (#2828)
- Semantic segmentation: add support for satellite image time series (#2921)
Transforms
New transforms
Removed transforms
Documentation
- API: restructure model docs (#2892)
- README: add YouTube channel (#3107)
- README: add new podcast episode (#2947)
- README: add more Slack links (#2953)
- Related Libraries: auto-update metrics (#3001, #3011, #3013, #3120, #3125)
- Related Libraries: TorchGeo rtree → geopandas (#2747)
- Related Libraries: fix TerraTorch weights, URL, conda-forge (#3012, #3083, #3104)
- Related Libraries: add GDL (#3008)
- Related Libraries: add torchange (#3072)
Tutorials
Governance
- Add formal governance (#2514)
- Copyright: Microsoft Corporation → TorchGeo Contributors (#2935, #2968, #3010)
- Rename references to previous GitHub organization (#2941)
- pyproject.toml: add explicit license-files (#3126)
Tests
- Bundle all trainer tests together (#3066)
- Silence shapely warnings in test data (#3077)
- Reduce batch size to silence warnings (#3063)
- No unconditional skips (#3096)
Contributors
This release is made possible thanks to the following contributors:
v0.7.2#
Released on 2025-10-29 - GitHub
TorchGeo 0.7.2 Release Notes
This is a bugfix and maintenance release. While there are no new features or API changes, this release includes important bug fixes, documentation improvements, and minor enhancements across datasets, models, and testing.
Dependencies
- laspy: 2.5.3+ now required for wheels (#2988)
- lightning: 2.5.5 not supported, contains checkpoint loading bug (#2996, #3000, #3052)
- lightning: lightning[pytorch-extra] -> lightning + jsonargparse (#2999)
- rasterio: 1.3.11+ now required for support for non-square pixels (#2969)
- dependabot: don't pin setuptools, we can't track it anyway (#2931)
Data Modules
- DataModules: use drop_last flag for train data loader (#3061)
- Augmentations: replace int with tuple in K.Resize commands (#2861)
Datasets
- BRIGHT: fix MD5 checksum (#2864)
- FTW: fix stacking order for reproducibility (#2982)
- HySpecNet-11k: fix bug in filepaths (#2924)
- Non-open source datasets now download from private HF (#2940)
Models
- Remove Weights deepcopy workaround (#2937)
- Augmentations: replace int with tuple in K.Resize commands (#2861)
- Non-open source models now download from private HF (#2940)
Documentation
- Contributing: more detailed instructions to build docs locally (#3044)
- PyPI: add Slack and Codecov links (#2930)
Tutorials
- PyTorch: download all EuroSAT split files (#2853)
- Geospatial: update CRS/projection figures (#3048)
- Embeddings: add new tutorial for generating embeddings with FMs (#2959)
- Pretrained Weights: remove Lightning steps, not yet introduced until later tutorial (#2946)
- Earthquake Detection: rename deprecated ResNet50 S1 weights (#2951)
- Remove Google Colab metadata (#2851)
Tests
- Ensure that pyproject.toml and min-reqs.old match (#2986)
- Windows: use python instead of python3 in .bat mock scripts (#2901)
- Remove orphaned xView3 directory (#2902)
- Tutorials: Test working downloads (#2891)
- Custom Segmentation Tutorial: mock weights download (#3051)
Contributors
This release is made possible thanks to the following contributors:
v0.7.1#
Released on 2025-06-20 - GitHub
TorchGeo 0.7.1 Release Notes
This is a bugfix and maintenance release. While there are no new features or API changes, this release includes important bug fixes, documentation improvements, and minor enhancements across datasets, models, trainers, and testing.
Dependencies
- dependabot: update pandas group in unison (#2818)
- jsonargparse: silence deprecation warnings (#2774)
- segmentation-models-pytorch: 0.5+ now required (#2740)
- setuptools: 77.0.1+ now required (#2703)
Data Modules
- NAIP/Chesapeake: fix train/test overlap (#2834)
- SKIPP'D: add to docs (#2778)
- VHR-10: add to docs (#2776)
Datasets
- Intersection/UnionDataset: simplify crs/res getter/setter (#2754)
- BigEarthNet v2: fix validation directory name (#2825)
- CopernicusPretrain: dataset yields, not returns (#2768)
- EuroSAT: download split file even if image directory already exists (#2840)
- FTW: add predictions to plot (#2731, #2735)
- FTW: add uncompressed test data to git (#2746)
Models
- API: ensure all models are in utility functions/hub (#2733)
- CopernicusFM: fix flaky tests (#2710)
- CopernicusFM: typo fixes (#2770, #2844)
Samplers
Trainers
- Classification: apply sigmoid before threshold in plot (#2793)
- Instance Segmentation: denormalize images before plotting (#2744)
- Instance Segmentation: fix support for non-RGB images (#2752)
- Object Detection: fix support for non-RGB images (#2752)
- Semantic Segmentation: apply sigmoid before threshold in plot (#2793)
- Semantic Segmentation: pretrained ViT weights are now supported (#2787)
Documentation
- README: update TorchGeo paper citation (#2729)
- README: update syntax in VHR-10 example (#2705)
- Related Libraries: add GeoDeep and srai (#2730, #2758)
- Related Libraries: DeepForest used to support TensorFlow (#2734)
- Landsat TM: fix number of channels for pretrained weights (#2836)
- Update PyTorch doc site links (#2794)
Tutorials
- Intro to PyTorch: use transforms (#2723)
- Intro to Geospatial: typo fixes (#2706)
- Earthquake Detection: speed up tutorial testing (#2721)
- Contribute DataModule: typo fixes (#2708)
- Contribute NonGeoDataset: fix sphinx directive (#2784)
Contributors
This release is made possible thanks to the following contributors:
v0.7.0#
Released on 2025-04-05 - GitHub
TorchGeo 0.7.0 Release Notes
TorchGeo 0.7 adds 26 new pre-trained model weights, 33 new datasets, and more powerful trainers, encompassing 7 months of hard work by 20 contributors from around the world.
Highlights of this release
Note
The following model and dataset descriptions were generated by an imperfect human, not by an LLM. If there are any inaccuracies or anything else you would like to highlight, feel free to reach out to @adamjstewart.
Growing collection of foundation models
TorchGeo has a growing collection of Earth observation foundation models, including 94 weights from 13 papers:
- GASSL (@kayush95 et al., 2020): Uses spatially aligned images over time to construct temporal positive pairs and a novel geo-location pretext task. Great if you are working with high-resolution RGB data such as Planet or Maxar.
- SeCo (@oscmansan et al., 2021): Introduces the idea of seasonal contrast, using spatially aligned images over time to force the model to learn features invariant to seasonal augmentations, invariant to synthetic augmentations, and invariant to both.
- SSL4EO-S12 (@wangyi111 et al., 2022): A spiritual successor to SeCo, with models for Sentinel-1/2 data pretrained using MoCo, DINO, and MAE (new).
- Satlas (@favyen2 et al., 2022): A collection of Swin V2 models pretrained on a staggering amount of Sentinel-2 and NAIP data, with support for single-image and multiple-image time series. Sentinel-1 and Landsat models were later released as well.
- Scale-MAE (@cjrd et al., 2022): The first foundation model to explicitly support RGB images with a wide range of spatial resolutions.
- SSL4EO-L (@adamjstewart et al., 2023): The first foundation models pretrained on Landsat imagery, including Landsat 4–5 (TM), Landsat 7 (ETM+), and Landsat 8–9 (OLI/TIRS).
- DeCUR (@wangyi111 et al., 2023): Uses a novel multi-modal SSL strategy to promote learning a common representation while also preserving unique sensor-specific information.
- FG-MAE (@wangyi111 et al., 2023): (new) A feature-guided MAE model, pretrained to reconstruct features from histograms of gradients (HOG) and normalized difference indices (NDVI, NDWI, NDBI).
- CROMA (@antofuller et al., 2023): (new) Combines contrastive learning and reconstruction loss to learn rich representations of MSI and SAR data.
- DOFA (@xiong-zhitong et al., 2024): Introduced the idea of dynamically generating the patch embedding layer of a shared multimodal encoder, allowing a single model weight to support SAR, RGB, MSI, and HSI data. Great for working with multimodal data fusion, flexible channel combinations, or new satellites which don't yet have pretrained models.
- SoftCon (@wangyi111 et al., 2024): (new) Combines a novel multi-label soft contrastive learning with land cover semantics and cross-domain continual pretraining, allowing the model to integrate knowledge from existing computer vision foundation models like DINO (ResNet) and DINOv2 (ViTs). Great if you need efficient small models for SAR/MSI.
- Panopticon (@LeWaldm et al., 2025): (new, model architecture pictured above) Extends DINOv2 with cross attention over channels, additional metadata in the patch embeddings, and spectrally-continual pretraining. Great if you want the same features as DOFA but with even better performance, especially on SAR and HSI data, and on “non-standard” sensors.
- Copernicus-FM (@wangyi111 et al., 2025): (new) Combines the spectral hypernetwork introduced in DOFA with a new language hypernetwork and additional metadata. Great if you want to combine image data with non-spectral data, such as DEMs, LU/LC, and AQ data, and supports variable image dimensions thanks to FlexiViT.
100+ built-in data loaders!
TorchGeo now boasts a whopping 126 built-in data loaders. Shoutout to the following folks who have worked tirelessly to make these datasets more accessible for the ML/EO community: @adamjstewart @nilsleh @isaaccorley @calebrob6 @ashnair1 @wangyi111 @GeorgeHuber @yichiac @iejMac etc. See the above figure for a breakdown of how many datasets each of these people have packaged.
In order to build the above foundation models, TorchGeo includes an increasing number of large pretraining datasets:
- BigEarthNet (@gencersumbul et al., 2019): Including BEN v1 and v2 (new), consisting of 590K Sentinel-2 patches with a multi-label classification task.
- Million-AID (@IenLong et al., 2020): 1M RGB aerial images from Google Earth Engine, including both multi-label and mutli-class classification tasks.
- SeCo (@oscmansan et al., 2021): 1M images and 70B pixels from Sentinel-2 imagery, with a novel Gaussian sampling technique around urban centers with greater data diversity.
- SSL4EO-S12 (@wangyi111 et al., 2022): 3M images and 140B pixels from Sentinel-1 GRD, Sentinel-2 TOA, and Sentinel-2 SR. Extends the SeCo sampling strategy to avoid overlapping images. (new) Now with automatic download support and additional metadata.
- SatlasPretrain (@favyen2 et al., 2022): (new) Over 10M images and 17T pixels from Landsat, NAIP, and Sentinel-1/2 imagery. Also includes 302M supervised labels for 127 categories and 7 label types.
- HySpecNet-11k (@m.fuchs et al., 2023): (new) 11k hyperspectral images from the EnMAP satellite.
- SSL4EO-L (@adamjstewart et al., 2023): 5M images and 348B pixels from Landsat 4–5 (TM), Landsat 7 (ETM+), and Landsat 8–9 (OLI/TIRS). Extends the SSL4EO-S12 sampling strategy to avoid nodata pixels, and includes both TOA and SR imagery, composing the largest ever Landsat dataset. (new) Now with additional metadata.
- SkyScript (@wangzhecheng et al., 2023): (new) 5.2M images from NAIP, orthophotos, Planet SkySat, Sentinel-2, and Landsat 8–9, with corresponding text descriptions for VLM training.
- MMEarth (@vishalned et al., 2024): (new) 6M image patches and 120B pixels from over 1.2M locations, including Sentinel-1/2, Aster DEM, and ERA5 data. Includes both image-level and pixel-level classification labels.
- Copernicus-Pretrain (@wangyi111 et al., 2025): (new, pictured below) 19M image patches and 920B pixels from Sentinel-1/2/3/5P and Copernicus GLO-30 DEM data. Extends SSL4EO-S12 for the entire Copernicus family of satellites.
We are also expanding our collection of benchmark suites to evaluate these new foundation models on a variety of downstream tasks:
- SpaceNet (@avanetten et al., 2018): A challenge with 8 (and growing) datasets for instance segmentation tasks in building segmentation and road network mapping, with > 11M building footprints and ~20K km of road labels.
- Copernicus-Bench (@wangyi111 et al., 2025): (new) A collection of 15 downstream tasks for classification, pixel-wise regression, semantic segmentation, and change detection. Includes Level-1 preprocessing (e.g., cloud detection), Level-2 base applications (e.g., land cover classification), and Level-3 specialized applications (e.g., air quality estimation). Covers Sentinel-1/2/3/5P sensors, and includes the first curated benchmark datasets for Sentinel-3/5P.
More powerful trainers
TorchGeo now includes 10 trainers that make it easy to train models for a wide variety of tasks:
- Classification: including binary (new), multi-class, and multi-label classification
- Regression: including image-level and pixel-level regression
- Semantic segmentation: including binary (new), multi-class, and multi-label (new) semantic segmentation
- Instance segmentation: (new, example predictions pictured above) for RGB, SAR, MSI, and HSI data
- Object detection: now with (new) support for SAR, MSI, and HSI data
- BYOL: Bootstrap Your Own Latent SSL method
- MoCo: Momentum Contrast, including v1, v2, and v3
- SimCLR: Simple framework for Contrastive Learning of visual Representations, including v1 and v2
- I/O Bench: For benchmarking TorchGeo I/O performance
In particular, instance segmentation was @ariannasole23's course project, so you have her to thank for that. Additionally, trainers now properly denormalize images before plotting, resulting in correct "true color" plots in tensorboard.
Backwards-incompatible changes
TorchGeo has graduated from alpha to beta development status (#2578). As a result, major backwards-incompatible changes will coincide with a 1 minor release deprecation before complete removal whenever possible from now on.
MultiLabelClassificationTaskis deprecated, useClassificationTask(task='multilabel', num_labels=...)instead (#2219)torchgeo.transforms.AugmentationSequentialis deprecated, usekornia.augmentation.AugmentationSequentialinstead (#1978, #2147, #2396)torchgeo.datamodules.utils.AugPipewas removed (#1978)- Many objection detection datasets and tasks changed sample keys to match Kornia (#1978, #2513)
- Channel dimension was squeezed out of many masks for compatibility with torchmetrics (#2147)
dofa_huge_patch16_224was renamed todofa_huge_patch14_224(#2627)SENTINEL1_ALL_*weights are deprecated, useSENTINEL1_GRD_*instead (#2677)ignoreparameter was moved to a class attribute inBaseTask(#2317)- Removed
IDTReeS.plot_las, use matplotlib instead (#2428)
Dependencies
New dependencies
Removed dependencies
- PyVista (#2428)
Changes to existing dependencies
- Python: drop support for Python 3.10 (#2559)
- Python: add Python 3.13 tests (#2547)
- Fiona: v1.8.22+ is now required (#2559)
- H5py: v3.8+ is now required (#2559)
- Kornia: v0.7.4+ is now required (#2147)
- Lightning: v2.5.0 is not compatible (#2489)
- Matplotlib: v3.6+ is now required (#2559)
- Numpy: v1.23.2+ is now required (#2559)
- OpenCV: v4.5.5+ is now required (#2559)
- Pandas: v1.5+ is now required (#2559)
- Pillow: v9.2+ is now required (#2559)
- Pyproj: v3.4+ is now required (#2559)
- Rasterio: v1.3.3+ is now required, v1.4.0–1.4.2 is not compatible (#2442, #2559)
- Ruff: v0.9+ is now required (#2423, #2512)
- Scikit-image: v0.20+ is now required (#2559)
- Scipy: v1.9.2+ is now required (#2559)
- SMP: v0.3.3+ is now required (#2513)
- Shapely: v1.8.5+ is now required (#2559)
- Timm: v0.9.2+ is now required (#2513)
- Torch: v2+ is now required (#2559)
- Torchmetrics: v1.2+ is now required (#2513)
- Torchvision: v0.15.1+ is now required (#2559)
Datamodules
New datamodules
- CaFFe (#2350)
- FTW (#2368)
- HySpecNet-11k (#2410)
- LandCover.ai 100 (#2262)
- MMFlood (#2450)
- ReforesTree (#2642, #2655)
- SpaceNet 6 (#2367)
- Substation (#2352)
- TreeSatAI (#2402)
Changes to existing datamodules
- Fix support for large mini-batches in datamodules previously using RandomNCrop (#2682)
- I/O Bench: fix automatic downloads (#2577)
Datasets
New datasets
- Annual NLCD (#2387)
- BigEarthNet v2 (#2531, #2545, #2662)
- BRIGHT (#2520, #2568, #2617)
- CaFFe (#2350)
- Copernicus-Bench (#2604, #2605, #2606, #2607)
- Copernicus-Pretrain (#2686)
- DIOR (#2572)
- DL4GAM Alps (#2508)
- DOTA (#2551)
- EnMAP (#2543)
- EverWatch (#2583, #2679)
- FTW (#2296, #2699)
- GlobalBuildingMap (#2473)
- HySpecNet-11k (#2410, #2569)
- LandCover.ai 100 (#2262)
- MDAS (#2429, #2534)
- MMEarth (#2202)
- MMFlood (#2450)
- SatlasPretrain (#2248)
- SODA-A (#2575)
- Substation (#2352)
- TreeSatAI (#2402)
Changes to existing datasets
- Many objection detection datasets changed sample keys to match Kornia (#1978, #2513)
- BioMassters: rehost on HF (#2676)
- Digital Typhoon: fix MD5 checksum (#2587)
- ETCI 2021: fix file list when 'vv' in directory name (#2532)
- EuroCrops: fix handling of Nones in labels (#2499)
- IDTReeS: removed support for plotting lidar point cloud (#2428)
- Landsat 7: fix default bands (#2542)
- ReforesTree: skip images with missing mappings (#2668)
- ReforesTree: fix image and mask dtype (#2642)
- SSL4EO-L: add additional metadata (#2535)
- SSL4EO-S12: add additional metadata (#2533)
- SSL4EO-S12: add automatic download support (#2616)
- VHR-10: fix plotting (#2603)
- ZueriCrop: rehost on HF (#2522)
Changes to existing base classes
- GeoDataset: all datasets now support non-square pixel resolutions (#2601, #2701)
- RasterDataset: assert valid bands (#2555)
Models
New model architectures
New model weights
- Copernicus-FM (#2646)
- CROMA (#2370, #2652)
- FG-MAE (#2673)
- Panopticon (#2692)
- SoftCon (#2677)
- SSL4EO-S12 MAE (#2673)
Changes to existing models
- Timm models now support
features_only=True(#2659, #2687) - DOFA: save hyperparameters as class attributes (#2346)
- DOFA: fix inconsistent patch size in huge model (#2627)
Samplers
Trainers
New trainers
- Instance segmentation (#2513)
Changes to existing trainers
- All trainers now denormalize images before plotting, resulting in correct "true color" plots in tensorboard (#2560)
- Classification: add support for binary, multiclass, and multilabel classification (#2219)
- Classification:
MultiLabelClassificationTaskis now deprecated (#2219) - Object Detection: add support for non-RGB imagery (SAR, MSI, HSI) (#2602)
- Semantic Segmentation: add support for binary, multiclass, and multilabel semantic segmentation (#2219, #2690)
Changes to trainer base classes
- Fix
load_from_checkpointto load a pretrained model (#2317) - Ignore
ignorewhen saving hyperparameters (#2317)
Transforms
- AugmentationSequential is now deprecated (#2396)
Documentation
Changes to API docs
- SpaceNet is now properly documented as a benchmark suite
- Fix license for RESISC45 and VHR-10
- SatlasPretrain: fix table hyperlink
Changes to user docs
- Update list of related libraries (#2691)
- Add GeoAI to related libraries list (#2675)
- Add geobench to related libraries list (#2665)
- Add OTBTF to related libraries list (#2666)
- Fix file-specific test coverage (#2540)
New tutorials
Changes to existing tutorials
- Customization: fix broken hyperlink (#2549)
- Trainers: document where checkpoints are saved (#2658)
- Trainers: document how to get the best model (#2658)
- Various typo fixes (#2566)
CI
- Faster model testing (#2687)
- Codecov: move configuration file to subdirectory (#2361)
- Do not cancel in-progress jobs on main branch (#2638)
- Ignore prettier reformat in git blame (#2299)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@ando-shah
@ariannasole23
@ashnair1
@burakekim
@calebrob6
@DarthReca
@dcodrut
@giswqs
@isaaccorley
@japanj
@lccol
@LeWaldm
@lns-lns
@mdchuc
@nilsleh
@remicres
@rijuld
@sfalkena
@wangyi111
v0.6.2#
Released on 2024-12-19 - GitHub
TorchGeo 0.6.2 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.6.1 release.
This release doubles the number of TorchGeo tutorials, making it easier than ever to learn TorchGeo! All tutorials have been reorganized as follows:
- Getting Started: background material on PyTorch, geospatial data, and TorchGeo
- Basic Usage: basic concepts and components of TorchGeo and how to use them
- Case Studies: end-to-end workflows for common remote sensing use cases
- Customization: customizing TorchGeo to meet your needs, and contributing back those changes
If you have a use case that is not yet documented, please consider contributing a new Case Study tutorial!
Dependencies
Datasets
- Chesapeake 7/13: remove references to removed classes (#2388)
- Chesapeake CVPR: fix download link (#2445)
- EuroSAT: fix order of Sentinel-2 bands (#2480)
- EuroSAT: redistribute split files on Hugging Face (#2432)
- Forest Damage: fix _verify docstring (#2401)
- Million-AID: fix _verify docstring (#2401)
- UC Merced: redistribute split files on Hugging Face (#2433)
- Utilities: remove defaultdict from collation functions (#2398)
Models
- Add
bandsmetadata to all pre-trained weights (#2376)
Scripts
- SSL4EO: Sentinel-2 name changed on GEE (#2421)
Tests
- CI: more human-readable cache names (#2426)
- Models: test that
bandsmatch expected dimensions (#2383)
Documentation
- Docs: update alternatives (#2437)
- Docs: reorganize tutorial hierarchy (#2439)
- Add Introduction to PyTorch tutorial (#2440, #2467)
- Add Introduction to Geospatial Data tutorial (#2446, #2467)
- Add Introduction to TorchGeo tutorial (#2457)
- Add TorchGeo CLI tutorial (#2479)
- Add Earth Surface Water tutorial (#960)
- Add contribution tutorial for Non-Geo Datasets (#2451, #2469)
- Add contribution tutorial for Data Modules (#2452)
- Add consistent author and copyright info to all tutorials (#2478)
- Update tutorial for transforms and pretrained weights (#2454)
- README: correct syntax highlighting for console code (#2482)
- README: root -> paths for GeoDatasets (#2438)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@calebrob6
@cordmaur
@giswqs
@hfangcat
@InderParmar
@lhackel-tub
@nilsleh
@yichiac
v0.6.1#
Released on 2024-10-10 - GitHub
TorchGeo 0.6.1 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.6.0 release.
This release fixes an important security vulnerability and properly documents a lack of support for rasterio 1.4. All users are recommended to update to TorchGeo 0.6.1 if they are using torchgeo.models.get_weight.
Dependencies
- rasterio: 1.4 not yet supported (#2327)
Datamodules
- Datamodule: use persistent workers for parallel data loading (#2291)
- OSCD: update normalization statistics (#2282)
Datasets
- Datasets: add support for
os.PathLike(#2273) - GeoDataset: allow a mix of
strandpathlibpaths (#2270)
Models
- API: avoid use of
evalinget_weight(#2323)
Tests
- CD: set up continuous deployment to PyPI (#2342)
- CI: install tensorboard to speed up notebooks (#2315)
- CI: install TorchGeo from checked out repo (#2306)
- dependabot: only update npm lockfile (#2277)
- prettier: ignore cache directories (#2278)
- prettier: prefer single quotes (#2280)
- pytest: set default
--covand--cov-report(#2275) - pytest: set matplotlib backend locally too (#2326)
- pytest: silence numpy 2 warnings in PyTorch (#2302)
- ruff: remove NPY tests now that we test numpy 2 in CI (#2287)
Documentation
- Alternatives: add scikit-eo to list of TorchGeo alternatives (#2340)
- Contributing: installation-agnostic prettier usage (#2279)
- Datasets: move dataset CSV to subdirectory (#2281, #2304)
- Datasets: update NAIP resolution (#2325)
- Tutorials: fix NAIP downloads by signing URL (#2343)
- Tutorials: update recommended strategy for raster datasets containing images and masks (#2293)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@calebrob6
@MathiasBaumgartinger
@Nowosad
@sfalkena
v0.6.0#
Released on 2024-09-01 - GitHub
TorchGeo 0.6.0 Release Notes
TorchGeo 0.6 adds 18 new datasets, 15 new datamodules, and 27 new pre-trained models, encompassing 11 months of hard work by 23 contributors from around the world.
Highlights of this release
Multimodal foundation models
There are thousands of Earth observation satellites orbiting the Earth at any given time. Historically, in order to use one of these satellites in a deep learning pipeline, you would first need to collect millions of manually-labeled images from this sensor in order to train a model. Self-supervised learning enabled label-free pre-training, but still required millions of diverse sensor-specific images, making it difficult to use newly launched or expensive commercial satellites.
TorchGeo 0.6 adds multiple new multimodal foundation models capable of being used with imagery from any satellite/sensor, even ones the model was not explicitly trained on. While GASSL and Scale-MAE only support RGB images, DOFA supports RGB, SAR, MSI, and HSI with any number of spectral bands. It uses a novel wavelength-based encoder to map the spectral wavelength of each band to a known range of wavelengths seen during training.
The following table describes the dynamic spatial (resolution), temporal (time span), and/or spectral (wavelength) support, either via their training data (implicit) or via their model architecture (explicit), offered by each of these models:
| Model | Spatial | Temporal | Spectral |
|---|---|---|---|
| DOFA | implicit | - | explicit |
| GASSL | implicit | - | - |
| Scale-MAE | explicit | - | - |
TorchGeo 0.6 also adds multiple new unimodal foundation models, including DeCUR and SatlasPretrain.
Source Cooperative migration
TorchGeo contains a number of datasets from the recently defunct Radiant MLHub:
- AgriFieldNet Competition Dataset
- Smallholder Cashew Plantations in Benin
- Sentinel-2 Cloud Cover Segmentation Dataset
- CV4A Kenya Crop Type Competition
- Tropical Cyclone Wind Estimation Competition
- Marine Debris Dataset for Object Detection in Planetscope Imagery
- Rwanda Field Boundary Competition Dataset
- South Africa Crop Type Competition
- SpaceNet Datasets
- Western USA Live Fuel Moisture
These datasets were recently migrated to Source Cooperative (and AWS in the case of SpaceNet), but with a completely different file format and directory structure. It took a lot of effort, but we have finally ported all of these datasets to the new download location and file hierarchy. As an added bonus, the new data loader code is significantly simpler, allowing us to remove 2.5K lines of code in the process!
OSGeo community project
TorchGeo is now officially a member of the OSGeo community! OSGeo is a not-for-profit foundation for open source geospatial software, providing financial, organizational, and legal support. We are in good company, with other OSGeo projects including GDAL, PROJ, GEOS, QGIS, and PostGIS. Membership in OSGeo promotes advertising of TorchGeo to the community, and also ensures that we follow best practices for the stability, health, and interoperability of the open source geospatial ecosystem.
All TorchGeo users are encouraged to join us on Slack, join our Hugging Face organization, and join us in OSGeo using any of the following badges in our README:
Lightning Studios support
TorchGeo has always had a close collaboration with Lightning AI, including active contributions to PyTorch Lightning and TorchMetrics. In this release, we added buttons allowing users to launch our tutorial notebooks in the new Lightning Studios platform. Lightning Studios is a more powerful version of Google Colab, with reproducible software and data environments allowing you to pick up where you left off, VS Code and terminal support, and the ability to quickly scale up to a large number of GPUs. All TorchGeo tutorials have been confirmed to work in both Lightning Studios and Google Colab, allowing users to get started with TorchGeo without having to invest in their own hardware.
Backwards-incompatible changes
- All Radiant MLHub datasets have been ported to the Source Cooperative file hierarchy (#1830)
- GeoDataset: the bbox sample key was renamed to bounds in order to support Kornia (#2199)
- Chesapeake7 and Chesapeake13: datasets were removed when updating to the 2022 edition (#2214)
- Benin Cashews and Rwanda Field Boundary: remove
os.path.expanduserfor consistency (#1705) - LEVIR-CD and OSCD:
imageskey was split intoimage1andimage2for change detection (#1684, #1696) - EuroSAT:
B08Awas renamed toB8Ato match Sentinel-2 (#1646)
Dependencies
New (optional) dependencies
- aws-cli: to download datasets from AWS (#2203)
- azcopy: to download datasets from Azure (#2064)
- prettier: for YAML file formatting (#2018)
- ruff: for code style and documentation testing (#1994)
Removed (optional) dependencies
- radiant-mlhub: website no longer exists (#1830)
- rarfile: datasets rehosted as zip files (#2210)
- zipfile-deflate: no longer needed for newer Chesapeake data (#2214)
- black: replaced by ruff (#1994)
- flake8: replaced by ruff (#1994)
- isort: replaced by ruff (#1994)
- pydocstyle: replaced by ruff (#1994)
- pyupgrade: replaced by ruff (#1994)
Changes to existing dependencies
- python: 3.10+ required following SPEC 0 (#1966)
- fiona: 1.8.21+ required (#1966)
- kornia: 0.7.3+ required (#1979, #2144)
- lightly: 1.4.5+ required (#2196)
- lightning: 2.3 not supported due to bug (#2155, #2211)
- matplotlib: 3.5+ required (#1966)
- numpy: 1.21.2+ required (#1966), numpy 2 support added (#2151)
- pandas: 1.3.3+ required (#1966)
- pillow: 3.3+ required (#1966), jpeg2000 support required (#2209)
- pyproj: 3.3+ required (#1966)
- rasterio: 1.3+ required (#1966)
- shapely: 1.8+ required (#1966)
- torch: 1.13+ required (#1358)
- torchvision: 0.14+ required (#1358)
- h5py: 3.6+ required (#1966)
- opencv: 4.5.4+ required (#1966)
- pycocotools: 2.0.7+ required (#1966)
- scikit-image: 0.19+ required (#1966)
- scipy: 1.7.2+ required (#1966)
Datamodules
New datamodules
- AgriFieldNet (#1873)
- CaBuAr (#2235)
- ChaBuD (#1259)
- Digital Typhoon (#1748)
- EuroSAT Spatial (#2074)
- GeoNRW (#2209)
- I/O Bench (#1972)
- LEVIR-CD (#1770)
- LEVIR-CD+ (#1707)
- QuakeSet (#1997)
- Sentinel-2 + CDL (#1889)
- Sentinel-2 + EuroCrops (#1869)
- Sentinel-2 + NCCM (#1950)
- Sentinel-2 + South America Soybean (#1959)
- South Africa Crop Type (#1970)
- VHR-10 (#1082)
Changes to existing datamodules
- Remove torchgeo.datamodules.utils.dataset_split (#2005)
- EuroSAT: make sure normalization is actually applied (#2176)
Changes to existing base classes
- Fix plotting in datamodules when dataset is a subset (#2003)
Datasets
New datasets
- AgriFieldNet (#1459)
- Airphen (#1803)
- CaBuAr (#2235)
- ChaBuD (#1259)
- CropHarvest (#1677)
- Digital Typhoon (#1748)
- EuroCrops (#1813)
- EuroSAT Spatial (#2074)
- GeoNRW (#2209)
- I/O Bench (#1972)
- LEVIR-CD (#1770)
- Northeast China Crop Map (#1666)
- PRISMA (#1743)
- QuakeSet (#1997)
- SkyScript (#2253)
- South Africa Crop Type (#1840)
- South America Soybean (#1668)
- SpaceNet 8 (#2203)
Changes to existing datasets
- Benin Cashews: migrate to Source Cooperative (#2116)
- Benin Cashews: remove
os.path.expanduserfor consistency (#1705) - BigEarthNet: fix broken download link (#2174)
- CDL: add 2023 checksum (#1844)
- Chesapeake: update to 2022 edition (#2214)
- ChesapeakeCVPR: reuse NLCD colormap (#1690)
- Cloud Cover: migrate to Source Cooperative (#2117)
- CV4A Kenya Crop Type: migrate to Source Cooperative (#2090)
- EuroSAT: rename
B08AtoB8Ato match Sentinel-2 (#1646) - FireRisk: redistribute on Hugging Face (#2000)
- GlobBiomass: add min/max timestamp (#2086)
- GlobBiomass: use float32 for pixelwise regression mask (#2086)
- GlobBiomass: fix length of dataset (#2086)
- L7 Irish: convert to IntersectionDataset (#2034)
- L8 Biome: convert to IntersectionDataset (#2058)
- LEVIR-CD+: split
imageintoimage1andimage2for change detection (#1696) - NASA Marine Debris: migrate to Source Cooperative (#2206)
- OSCD: support fine-grained band selection (#1684)
- OSCD: split
imageintoimage1andimage2for change detection (#1696) - PatternNet: redistribute on Hugging Face (#2100)
- RESISC45: redistribute on Hugging Face (#2210)
- Rwanda Field Boundary: don't plot empty masks during testing (#2254)
- Rwanda Field Boundary: migrate to Source Cooperative (#2118)
- Rwanda Field Boundary: remove
os.path.expanduserfor consistency (#1705) - SpaceNet 1–7: migrate to Source Cooperative (#2203)
- Tropical Cyclone: migrate to Source Cooperative (#2068)
- VHR-10: redistribute on Hugging Face (#2210)
- VHR-10: improved plotting (#2092)
- Wester USA Live Fuel Moisture: migrate to Source Cooperative (#2206)
Changes to existing base classes
- Add support for
pathlib.Pathto all datasets (#2173) - Datasets can now use command-line utilities to download (#2064)
- GeoDataset:
bboxkey was renamed tobounds(#2199) - GeoDataset: ignore other bands for separate files (#2222)
- GeoDataset: don't warn about missing files for downloadable datasets (#2033)
- RasterDataset: allow subclasses to specify which resampling algorithm to use (#2015)
- RasterDataset: use nearest neighbors for int and bilinear for float by default (#2015)
- RasterDataset: calculate resolution after changing CRS (#2193)
- RasterDataset: support date_str containing % character (#2233)
- RasterDataset: users can now specify the min/max time of a dataset (#2086)
- VectorDataset: add
dtypeattribute to match RasterDataset (#1869) - VectorDataset: extract timestamp from filename to match RasterDataset (#1814)
- IntersectionDataset: ignore 0 area overlap (#1985)
New error classes
- DatasetNotFoundError: when a dataset has not yet been downloaded (#1714, #2053)
- DependencyNotFoundError: when an optional dependency is not installed (#2054)
- RGBBandsMIssingError: when you try to plot a dataset but don't use RGB bands (#1737, #2053)
Models
New model architectures
New model weights
Samplers
Changes to existing samplers
- RandomGeoSampler: fix performance regression, 60% speedup with preprocessed data (#1968)
Trainers
New trainers
- I/O Bench (#1972)
Changes to existing trainers
- Explicitly specify batch size (#1928, #1933)
- MoCo: explicitly specify memory bank size (#1931)
- Semantic Segmentation: support
ingore_indexwhen using Jaccard loss (#1898) - SimCLR: switch from Adam to LARS optimizer (#2196)
- SimCLR: explicitly specify memory bank size (#1931)
Transforms
- Use Kornia's AugmentationSequential for all model weights (#1979)
- Update TorchGeo's AugmentationSequential to support object detection (#1082)
Documentation
Changes to API docs
- Datasets: add license information about every dataset (#1732)
- Datasets: update link to cite SSL4EO-L dataset (#1942)
- Models: emphasize new multimodal foundation models (#2236)
- Trainers: update num_classes parameter description (#2101)
Changes to user docs
Changes to tutorials
- Add button for the new Lightning Studios (#2146)
- Remove button for the recently defunct Planetary Computer Hub (#2107)
- Custom Raster Datasets: download the dataset before calling super (#2177)
- Custom Raster Datasets: fix typo (#1987)
- Transforms: update EuroSAT band names to match Sentinel-2 (#1646)
Other documentation changes
- README: fix CLI example (#2142)
- README: add Hugging Face badge (#1957)
- README: fix example of creating fake raster data (#2162)
- Read the Docs: use latest Ubuntu version to build (#1954)
- Allow horizontal scrolling of wide tables (#1958)
- Fix broken links and redirects (#2267)
Testing
Style
Type hints
- Ensure all functions have type hints (#2217)
- Make all class variables immutable (#2218)
- Check for unreachable code (#2241)
Unit testing
- Datasets: test dataset length (#2084, #2089)
- Datamodules: don't download during testing (#2215, #2231)
- download_url: add shared fixture to avoid code duplication (#2232)
- load_state_dict: add shared fixture to avoid code duplication (#1932)
- load_state_dict_from_url: add shared fixture to avoid code duplication (#2223)
- torch_hub: add fixture to avoid downloading checkpoints to home directory (#2265)
- Pytest: silence warnings (#1929, #1930, #2224)
- PyVista: headless plotting (#1667)
Other CI changes
- Check numpy 2 compliance (#2151)
- Coverage: use newer flag to override ignores (#2260)
- Dependabot: update devcontainer (#2025)
- Dependabot: group torch and torchvision (#2025)
- Labeler: update to v5 (#1759)
- macOS: disable pip caching (#2024)
- Windows: fail fast mode (#2225)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@alhridoy
@ashnair1
@burakekim
@calebrob6
@cookie-kyu
@DarthReca
@Domejko
@favyen2
@GeorgeHuber
@isaaccorley
@kcrans
@nilsleh
@oddeirikigland
@pioneerHitesh
@piperwolters
@robmarkcole
@sfalkena
@ShadowXZT
@shreyakannan1205
@TropicolX
@wangyi111
@yichiac
v0.5.2#
Released on 2024-03-03 - GitHub
TorchGeo 0.5.2 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.5.1 release.
This release contains a number of important fixes to reproducibility and determinism. All users are recommended to upgrade to 0.5.2 if they want to ensure the reproducibility of their work.
TorchGeo has always supported Python 3.12, but this is now officially tested!
Dependencies
- Test TorchGeo support for Python 3.12 (#1837)
- lightly 1.4.26 is incompatible with smp (#1824, #1825)
- Add dev container to support Github Codespaces development (#1085)
Datamodules
- L7 Irish previously used a nondeterministic train/val/test split. This is now fixed (#1899, #1908)
- L8 Biome previously used a nondeterministic train/val/test split. This is now fixed (#1899, #1908)
- Tropical Cyclone previously used a nondeterministic train/val/test split. This is now fixed (#1839)
- SEN12MS previously used a nondeterministic train/val/test split. This is now fixed (#1839)
Datasets
- RasterDataset: clarify documentation of is_image and dtype (#1811)
- GeoDataset previously used a nondeterministic train/val/test split. This is now fixed (#1899, #1908)
- xView2 previously used a nondeterministic order. This is now fixed (#1918)
- HuggingFace: use stable download URLs (#1916)
- GitLab: use stable download URLs (#1917)
- Deep Globe Land Cover: document download steps (#1797, #1921)
- PASTIS: fix default folds (#1810)
- SustainBench Crop Yield: fix download support (#1753, #1755)
- SustainBench Crop Yield: eager data loading (#1754, #1756)
Models
Samplers
- RandomGeoSampler: optional length is optional (#1907)
Trainers
- Remove unnecessary argmax before call to torchmetrics (#1777)
- Better document default trainer metrics (#1874, #1914, #1923, #1924)
- ObjectDetectionTask: increase test coverage (#1739)
Scripts
- SSL4EO download: skip downloading missing coordinates (#1821)
- Ensure that all files have the license header at the top (#1787)
Tests
- Notebooks: use stable dependency versions (#1838)
- Don't cast warnings to errors (#1793)
- Fix lightning-utilities deprecation warning (#1733)
- Fix pre-commit dependency versions (#1781)
Documentation
- RasterDataset: clarify documentation of is_image and dtype (#1811)
- RtD: use stable dependency versions (#1827)
- Document TorchGeo alternatives (#1742)
- Tutorials: load_state_dict does not return the model (#1503)
- README: fix VHR-10 example (#1686, #1920)
- README: add TorchGeo podcast episodes (#1806)
- README: add PyTorch badge (#1882)
- README: add OSGeo badge (#1880)
- README: add color lexing of bibtex (#1820)
- README: fix Spack link (#1804)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@ashnair1
@calebrob6
@DimitrisMantas
@dmeaux
@isaaccorley
@jdilger
@julien-blanchon
@konstantinklemmer
@nilsleh
@tatsubori
v0.5.1#
Released on 2023-11-10 - GitHub
TorchGeo 0.5.1 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.5.0 release.
Datamodules
Datasets
- AGB Live Woody Biomass: update download link for dataset (#1679, #1713)
- EuroSAT: remove classes attribute and instead rely on
ImageFolderclasses (#1648, #1650) - OSCD: change image datatype be float instead of int (#1652, #1656)
- RESICS45: remove classes attribute and instead rely on
ImageFolderclasses (#1648, #1650) - UC Merced: fix plotting which expects images from dataset to be normalized already (#1712)
- UC Merced: remove classes attribute and instead rely on
ImageFolderclasses (#1648, #1650) - GeoDataset: check if the path points to a Virtual File System, to prevent error of looking and not finding the paths locally (#1605, #1612)
- GeoDatasets: consistent use of
pathsargument instead ofrootinRuntimeErrorof several datasets (#1704, #1717)
Trainers
- During logging, trainers were expecting a datamodule with plot functionality, which was preventing trainers from being used with custom Pytorch Dataloaders (#1703)
- Remove default callback configurations of trainers and leave it to user instead (#1640, #1641, #1642, #1645, #1647)
- Skip weights and augmentations when saving hparams, allowing these parameters to be changed (#1622, #1639, #1670)
Scripts
Tests
- Greatly reduce memory footprint of CI which was causing PR tests to fail (#1658)
- Copy testing csv file instead of downloading it for MapInWild dataset test (#1657)
- Fix
choco install unrarin CI by using7zipinstead ofunrar(#1697) - CI: use unique names for release caches (#1723)
Documentation
- README: update
SemanticSegmentationTaskexample with arguments introduced in 0.5 (#1608) - README: add section on LightningCLI usage with torchgeo (#1626, #1628)
- README: add section on availability of pretrained weights in torchgeo (#1716)
- BioMassters: fix typo in docs' overview table of non-geo datasets (#1718)
- SSL4EO-L Benchmark: add dataset information to documentation (#1719)
Contributors
This release is thanks to the following contributors (in alphabetical order):
@adamjstewart
@ashnair1
@dylanrstewart
@kaybe20
@menglutao
@nilsleh
@pioneerHitesh
@robmarkcole
v0.5.0#
Released on 2023-09-30 - GitHub
TorchGeo 0.5.0 Release Notes
0.5.0 encompasses over 8 months of hard work and new features contributed by 20 users from around the world. Below, we detail specific features worth highlighting.
Highlights of this release
New command-line interface
TorchGeo has always had tight integration with PyTorch Lightning, including datamodules for common benchmark datasets and trainers for most computer vision tasks. TorchGeo 0.5.0 introduces a new command-line interface for model training based on LightningCLI. It can be invoked in two ways:
# If torchgeo has been installed
torchgeo
# If torchgeo has been installed, or if it has been cloned to the current directory
python3 -m torchgeoIt supports command-line configuration or YAML/JSON config files. Valid options can be found from the help messages:
# See valid stages
torchgeo --help
# See valid trainer options
torchgeo fit --help
# See valid model options
torchgeo fit --model.help ClassificationTask
# See valid data options
torchgeo fit --data.help EuroSAT100DataModuleUsing the following config file:
trainer:
max_epochs: 20
model:
class_path: ClassificationTask
init_args:
model: "resnet18"
in_channels: 13
num_classes: 10
data:
class_path: EuroSAT100DataModule
init_args:
batch_size: 8
dict_kwargs:
download: truewe can see the script in action:
# Train and validate a model
torchgeo fit --config config.yaml
# Validate-only
torchgeo validate --config config.yaml
# Calculate and report test accuracy
torchgeo test --config config.yamlIt can also be imported and used in a Python script if you need to extend it to add new features:
from torchgeo.main import main
main(["fit", "--config", "config.yaml"])See the Lightning documentation for more details.
Self-supervised learning and Landsat
Self-supervised learning has become a dominant technique for model pre-training, especially in domains (like remote sensing) that are rich in data but lacking in large labeled datasets. The 0.5.0 release adds powerful trainers for the following SSL techniques:
large unlabeled datasets for multiple satellite platforms:
and the first ever models pre-trained on Landsat imagery. See our SSL4EO-L paper for more details.
Utilities for splitting GeoDatasets
In prior releases, the only way to create train/val/test splits of GeoDatasets was to use a Sampler roi. This limited the types of splits you could perform, and was unintuitive for users coming from PyTorch where the dataset can be split into multiple datasets. TorchGeo 0.5.0 introduces new splitting utilities for GeoDatasets in torchgeo.datasets, including:
random_bbox_assignment: randomly assigns each scene to a different splitrandom_bbox_splitting: randomly split each scene and assign each half to a different splitrandom_grid_cell_assignment: overlay a grid and randomly assign each grid cell to a different splitroi_split: split using aroijust like with Samplertime_series_split: split along the time axis
Splitting with a Sampler roi is not yet deprecated, but users are encouraged to adopt the new dataset splitting utility functions.
GeoDatasets now accept lists as input
Previously, each GeoDataset accepted a single root directory as input. Now, users can pass one or more directories, or a list of files they want to include. At first glance, this doesn't seem like a big deal, but it actually opens a lot of possibilities for how users can construct GeoDatasets. For example, users can use custom filters:
files = []
for file in glob.glob("*.tif"):
# check pixel QA band or metadata file
if cloud_cover < 20: # select images with minimal cloud cover
files.append(file)
ds = Landsat8(files)or use remote files from S3 buckets or Azure blob storage. Basically, as long as GDAL knows how to read the file, TorchGeo supports it, wherever the file lives.
Note that some datasets may not support a list of files if you also want to automatically download the dataset because we need to know the directory to download to.
Building a community
With over 50 contributors from around the world, we needed a better way to discuss ideas and share announcements. TorchGeo now has a public Slack channel! Join us and say hello 👋
Now that the majority of the features we've needed have been implemented, one of our goals for the next release is to improve our documentation and tutorials. Expect to see TorchGeo tutorials at all the popular ML/RS conferences next year! We're excited to meet our users in person and learn more about their unique use cases and needs.
Backwards-incompatible changes
- GeoDataset: first parameter renamed from
roottopaths(#1442, #1597) - Trainers: many parameters renamed (#1541)
- FAIR1M datamodule:
*_split_pctparameters removed (#1275) - Inria datamodule:
*_split_pctparameters removed (#1540) - SemanticSegmentationTask: changes to
weightsparameter (#1046)
Dependencies
- Drop Python 3.7 and 3.8 support following NEP 29 (#1058, #1246)
- Dependencies now listed in
pyproject.toml(#1446) - Drop upper bounds on dependencies (#1480)
- Lightly: new required dependency (#1252, #1285)
- Lightning: extra dependencies now required (#1559)
- Omegaconf: no longer a dependency (#1559)
- Pandas: now supports v2.1 (#1537)
- Pandas: new required dependency (#1586)
- Scikit-Learn: no longer a dependency (#1063)
- TorchMetrics: now supports v1 (#1465)
Datamodules
New datamodules:
- EuroSAT 100 (#1130)
- FireRisk (#1265)
- L7 Irish (#1197)
- L8 Biome (#1200)
- SeCo (#1168)
- SKIPP'D (#1267)
- SSL4EO-L (#1332)
- SSL4EO-L Benchmark (#1338)
- SSL4EO-S12 (#1151)
- SustainBench (#1253)
Changes to existing datamodules:
- FAIR1M: add val/test splits, drop split parameters (#1275)
- Inria: add val split, drop split parameters (#654, #1540)
- RESISC45: better normalization (#1349)
- So2Sat: support RGB-only mode (#1283)
- So2Sat: control size of validation dataset (#1283)
New base classes:
- BaseDataModule (#1260)
Changes to existing base classes:
- GeoDataModule: automatically infer epoch length (#1257)
- BaseDataModule: better error messages (#1307, #1441)
Datasets
New datasets:
- BioMassters (#1560)
- EuroSAT 100 (#1130)
- FireRisk (#1265)
- L7 Irish (#1197)
- L8 Biome (#1200)
- LandCover.ai Geo (#1126)
- MapInWild (#1096, #1131)
- NLCD (#1244)
- PASTIS (#315)
- Rwanda Field Boundary (#1574)
- SeasoNet (#1466)
- SKIPP'D (#1267, #1548)
- SSL4EO-L (#1332, #1424)
- SSL4EO-L Benchmark (#1338, #1431)
- SSL4EO-S12 (#1151)
- SustainBench (#1253)
- Western USA Live Fuel Moisture (#1262)
Changes to existing datasets:
- CDL: add years parameter (#1337)
- CDL: add classes parameter (#1392)
- CDL: map class labels to ordinal numbers (#1364, #1368)
- CDL: return figure (#1369)
- CMS Mangrove Canopy: return figure (#1369)
- DFC2022: avoid interpolation in colormap (#1372)
- FAIR1M: add val/test splits (#1275)
- FAIR1M: add download support (#1275)
- Inria: add validation split (#654, #1540)
- SeCo: add seasons parameter (#1168)
- SeCo: faster initialization (#1168)
- SeCo: support new directory structure (#1235)
- So2Sat: add version 3 (#1086, #1283)
- UCMerced: fix image shape bug (#1238)
- USAVars: return lat/lon of centroid (#1240)
- USAVars: convert image to float32 (#1433)
- USAVars: download from Hugging Face (#1453)
Changes to existing base classes:
- GeoDataset: accept list of files or directories (#1427, #1442, #1597)
- GeoDataset: add files property (#1442, #1597)
- Intersection/UnionDataset: fix crs/res propagation (#1341, #1344)
- RasterDataset: add dtype attribute (#1149)
- RasterDataset: allow sampling outside bounds of image (#1329, #1344)
New utility functions:
Models
Changes to existing models:
- RCF: add empirical sampling mode (#1339)
New pre-trained model weights:
Changes to existing pre-trained model weights:
Samplers
Changes to existing samplers:
Trainers
New trainers:
Changes to existing trainers:
- Add ability to freeze backbones and decoders (#1290)
- Fix support for datasets without a plot method (#1551, #1585)
- BYOL: add random season contrast (#1168)
- Classification: add class weights for cross entropy loss (#1592)
- Semantic Segmentation: add class weights for cross entropy loss (#1221)
- Semantic Segmentation: add support for pre-trained model weights (#1046)
- Semantic Segmentation: fix ignore index weighting (#1245, #1331)
New base classes:
Transforms
New transforms:
- Random Grayscale (#1301)
Scripts
New scripts:
Documentation
- CDL: fix documented data source (#1248)
- UCMerced: fix documented dataset size (#1291)
- Remove buggy benchmarking tutorial (#1521)
Testing
- Add Python 3.11 tests (#1180)
- Ensure that none of our minimum version tests are skipped (#1276, #1587)
- Improve CI concurrency robustness (#1412, #1423)
- Test fewer models in trainers to avoid exceeding RAM (#1377)
- Windows CI: replace pacman with choco (#1266)
Contributors
This release is thanks to the following contributors:
@AABNassim
@adamjstewart
@adrianboguszewski
@adriantre
@ashnair1
@briktor
@burakekim
@calebrob6
@dkosm
@estherrolf
@isaaccorley
@nilsleh
@nsutezo
@ntw-au
@pmandiola
@shradhasehgal
@Tarandeep97
@urbanophile
@wangyi111
@yichiac
v0.4.1#
Released on 2023-04-11 - GitHub
TorchGeo 0.4.1 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.4.0 release.
Dependencies
Some dependencies have changed:
- nbmake: 1.3.3+ required now (#1124)
- omegaconf: now optional (#1214)
- pytorch-lightning: replaced with lightning (#1178, #1179)
- sphinx: 6+ not yet supported (#1144)
- tensorboard: now optional (#1214)
pip install torchgeo[all]added, installs all optional dependencies (#1095)
Other dependencies now support newer versions:
- black: add 23 support (#1080)
- kornia: add 0.6.10 support (#1123)
- mypy: add 1 support (#1089)
- nbsphinx: add 0.9 support (#1173)
- pandas: add 2 support (#1216)
- pyvista: add 0.38 support (#1083)
- radiant-mlhub: add 0.5 support (#1102)
- scikit-image: add 0.20 support (#1153)
- setuptools: add 67 support (#1066)
- torch: add 2 support (#1177)
- torchvision: add 0.15 support (#1177)
Datamodules
- SeCo: fix transforms (#1166)
Datasets
Fixes for benchmark datasets:
- BigEarthNet: fix order of class labels (#1127)
- CDL: add checksum for 2022 mask (#1201)
- EuroSAT: fix SSL issue, redistribute on Hugging Face (#1065, #1072)
- FAIR1M: fix directory name (#1098, #1099)
- Landsat: better default bands (#1169)
- UC Merced: redistribute on Hugging Face (#1076)
- USAVars: fix class labels (#1138)
Fixes for base classes:
- RasterDataset: fix support for datasets where
all_bandsdoes not actually contain all bands (e.g., Landsat) (#1134, #1135) - RasterDataset: fix support for datasets where
all_bandsis not defined andseparate_filesis False (#1135) - RasterDataset: fix bug when
separate_filesand no date infilename_regex(#1191) - RasterDataset: remove unnecessary glob (#1219)
- RasterDataset: better error message when no data found (#1193)
- IntersectionDataset: better error message when no overlap (#1192)
Models
There are several improvements to our new pre-trained weights:
Trainers
- BYOL: Fix image size to match ViT patch size (#1084)
- Fix support for loading ViT weights (#1049, #1084)
- Fix support for non-TensorBoardLogger (#1143, #1145)
Tests
A lot of work in this patch release went towards improving CI:
- Constrain dependencies to avoid CI hang (#1062)
- Codecov: use repository upload token (#1077)
- Cache pip installs (#1057)
- Cancel in-progress jobs on new commit (#1094) but not the labeler tasks (#1187)
- Test notebooks when they are modified (#1097)
- Speed up object detection tests (#1148)
- Fix tests on macOS arm64 (MPS support) (#1188)
- Properly test pre-trained model transforms (#1166)
- Speed up notebook tests (#665, #1124)
Documentation
- Update the example embedded in the README (#1211)
- Fix broken URLs throughout the documentation (#1125)
- Tutorial downloads are now much smaller and faster (#1124)
- Replace CSV with TensorBoard in Trainer tutorial (#1163, #1189)
- Fix version selection button (#1144)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@ashnair1
@bugraaldal
@calebrob6
@isaaccorley
@julien-blanchon
@lucastao
@nilsleh
@SpontaneousDuck
@TolgaAktas
v0.4.0#
Released on 2023-01-24 - GitHub
TorchGeo 0.4.0 Release Notes
This is our biggest release yet, with improved support for pre-trained models, faster datamodules and transforms, and more powerful trainers. See the following sections for specific changes to each module:
- Backwards-incompatible changes
- Dependencies
- Datamodules
- Datasets
- Models
- Samplers
- Trainers
- Transforms
- Documentation
As always, thanks to our many contributors!
Backwards-incompatible changes
- Datasets: So2Sat bands were renamed (#735)
- Datasets: TropicalCycloneWindEstimation was renamed to TropicalCyclone (#815, #846)
- Datasets: VisionDataset and VisionClassificationDataset (deprecated in 0.3) have been removed (#627)
- Datamodules: many arguments have been renamed or reordered (#666, #730, #992)
- Datamodules: CycloneDataModule was renamed to TropicalCycloneDataModule (#815, #846)
- Models: resnet50 has a new multi-weight API (#917)
- Trainers: many arguments have been renamed (#916, #917, #918, #919, #920)
- Transforms: now take a single image as input instead of a sample dict (#999)
Dependencies
- Open3D replaced by PyVista (#663)
- Remove packaging dependency (#1019)
- Support einops 0.6 (#896)
- Support flake8 6 (#910)
- Support mypy 0.991 (#900)
- Support pytest-cov 4 (#801)
- Support pyupgrade 3 (#817)
- Support setuptools 66 (#1017)
- Support shapely 2 (#949)
- Support sphinx 6 (#990)
- Support timm 0.6 (#1002)
- Support torchmetrics 0.11 (#925)
- Support torchvision 0.14 (#875)
Datamodules
Our existing datamodules worked well, but suffered from several performance issues. For the average dataset with 3 splits (train/val/test), we were instantiating the dataset 10 times! All data augmentation was done on the CPU, one sample at a time. A multiprocessing bug prevented parallel data loading on macOS and Windows. And a serious bug was discovered in some of our datamodules that allowed training images to leak into the test set (only affected datamodules using torchgeo.datamodules.utils.dataset_split). All of these bugs have been fixed, and performance has been drastically improved. Datasets are only instantiated 3 times (once for each split). All data augmentation happens on the GPU, an entire batch at a time. And multiprocessing is now supported on all platforms. By refactoring our datamodules and adding new base classes, we were able to remove 1.6K lines of duplicated code in the process!
New datamodules:
Changes to existing datamodules:
- Only instantiate dataset in prepare_data if download is requested (#967, #974)
- Only instantiate datasets needed for a given stage (#992)
- Use Kornia for all data augmentation (#992)
- Faster data augmentation (CPU → GPU, sample → batch) (#992)
- Fix macOS/Windows multiprocessing bug (#886, #992)
- Fix bug with train images leaking into test set (#992)
- Add plot method to all datamodules (#814, #992)
torchgeo.datamodules.utils.dataset_splitis deprecated, usetorch.utils.data.random_splitinstead (#992)- Pass kwargs directly to datasets (#666, #730)
- Add random cropping to several datamodules (#851, #853, #855, #876, #929)
- Inria Aerial Image Labeling: fix predict dimensions (#975)
- LandCover.ai: fix mIoU calculation and plotting (#959)
- Tropical Cyclone: CycloneDataModule was renamed to TropicalCycloneDataModule (#815, #846)
New base classes:
- Add GeoDataModule and NonGeoDataModule base classes (#992)
Datasets
This release adds a new Sentinel-1 dataset. Here is a scene taken over the Big Island of Hawai'i:
Additionally, all image datasets now have a plot method.
New datasets:
Changes to existing datasets:
- Add default root argument to all datasets (#802)
- Consistent capitalization of band names (#778)
- Many datasets now return float images and int labels (#992)
- Chesapeake CVPR: add plot method (#820)
- ETCI 2021: fix data loading (#861)
- NASA Marine Debris: fix plot warning when model outputs no prediction boxes (#988)
- OSCD: images are now stacked channel-wise (#992)
- SEN12MS: mask is only single channel (#992)
- Sentinel-2: use 10,000 as scale factor (#1027)
- So2Sat: rename bands (#735)
- Tropical Cyclone: renamed from TropicalCycloneWindEstimation to TropicalCyclone (#815, #846)
- Tropical Cyclone: images are RGB, not grayscale (#992)
- VHR-10: add plot method (#847)
- xView2: remove labels folder (#787)
Changes to existing base classes:
- RasterDataset supports band indexing now (#687)
- UnionDataset actually works now (#769, #786)
- UnionDataset and IntersectionDataset support transforms (#867, #870)
- VectorDataset supports multi-label datasets (#862)
Models
Due to the nature of satellite imagery (different number of spectral bands for every satellite), it is impossible to have a single set of pre-trained weights for each model. TorchGeo has always had multi-weight support:
model = resnet50(sensor="sentinel2", bands="all", pretrained=True)However, this is difficult to extend if you want more fine-grained control over model weights. More recently, torchvision introduced a new multi-weight support API:
- Introducing TorchVision's New Multi-Weight Support API
- Easily List and Initialize Models With New APIs in TorchVision
With the 0.4.0 release, TorchGeo has now adopted the same API:
model = resnet50(weights=ResNet50_Weights.SENTINEL2_ALL_MOCO)We also support PyTorch Hub now:
>>> import torch
>>> from torchgeo.models import ResNet18_Weights
>>> torch.hub.list("microsoft/torchgeo", trust_repo=True)
Downloading: "https://github.com/microsoft/torchgeo/zipball/models/weights" to ~/.cache/torch/hub/models_weights.zip
['resnet18', 'resnet50', 'vit_small_patch16_224']
>>> model = torch.hub.load("microsoft/torchgeo", "resnet18")
Using cache found in ~/.cache/torch/hub/microsoft_torchgeo_models_weights
>>> model = torch.hub.load("microsoft/torchgeo", "resnet18", weights=ResNet18_Weights.SENTINEL2_RGB_MOCO)
Using cache found in ~/.cache/torch/hub/microsoft_torchgeo_models_weightsIn our previous release, we had 1 model pre-trained on 1 satellite with 1 training procedure. We now have 3 models (ResNet-18, ResNet-50, ViT) trained on both Sentinel-1 and Sentinel-2 for all bands and RGB-only bands with 3 SSL techniques (MoCo, DINO, SeCo), and plans to expand this in the future. Shoutout to Zhu Lab and ServiceNow for publishing these weights!
New models:
- Add ResNet-18 and ViT models (#917)
Changes to existing models:
New utility functions:
- Functions to list, query, and initialize models and weights (#917)
Samplers
Changes to existing samplers:
- All random samplers now have a default value for length (#755)
New utility functions:
- get_random_bounding_box and tile_to_chips are now public functions (#755)
Trainers
This release introduces a new trainer for object detection, one of our most highly requested features. All trainers now support prediction. Our old trainers only supported ResNet backbones. Our new trainers now support the 600+ backbones provided by the timm library. And all of the new pre-trained models mentioned above are now supported by our trainers as well.
New trainers:
- Object Detection: add trainer, add Faster R-CNN (#442, #758)
- Object Detection: add RetinaNet and FCOS (#984)
Changes to existing trainers:
- Add support for all timm backbones (#854, #918)
- Add support for more pretrained models (#917)
- Change model argument names (#916, #918, #919, #920)
- Support prediction (#790, #792, #813, #818, #819, #939)
- Fix plotting file handle leak (#825, #826)
- Multi-label Classification: replace softmax with sigmoid (#791)
Transforms
Whenever possible, we try to avoid reinventing the wheel. For data augmentation transforms that aren't specific to geospatial data or satellite imagery, we use existing implementations in popular libraries like:
- torchvision (PIL and PyTorch backends)
- albumentations (OpenCV backend)
- kornia (PyTorch backend)
Until now, we've been fairly agnostic towards data augmentation libraries. However, neither PIL nor OpenCV support multispectral imagery. Because of this, we've decided to use Kornia for all transforms.
Changes to existing transforms:
- All transforms are now compatible with
kornia.augmentation.AugmentationSequential(#999) - All transforms now take a single image as input instead of a sample dict (#999)
torchgeo.transforms.AugmentationSequentialis deprecated, usekornia.augmentation.AugmentationSequentialinstead (#992)
Documentation
- Add new tutorial for working with pretrained model weights (#693, #799, #917)
- Remove execution count from tutorials (#783)
- Remove
__module__hacks, fixing most documentation issues (#976) - Use kornia for all transforms in tutorials (#999)
- Improve trainer API docs (#852)
- Add num classes to ReforeTree dataset (#907)
- Convert tensor to array in tutorials (#841, #845)
- Fix typo in USAVars documentation (#1038)
- Fix typos in TropicalCyclone and GID-15 documentation (#1011)
- Fix URL formatting in LoveDA documentation (#977)
- Fix Aster GDEM dataset name (#884)
- Fix dead link in Vaihingen2D documentation (#850)
- Fix link to iNaturalist in datasets table (#775)
- Fix link in GBIF dataset documentation (#774)
Contributors
This release is thanks to the following contributors:
@adamjstewart
@ashnair1
@bugraaldal
@calebrob6
@daiki-kimura
@eltociear
@fnands
@isaaccorley
@KennSmithDS
@mgnolde
@nilsleh
@Niro4
@osgeokr
@pmandiola
@RitwikGupta
v0.3.1#
Released on 2022-09-08 - GitHub
TorchGeo 0.3.1 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.3.0 release.
Dependencies
- pytorch-lightning: add 1.9 support (#697, #771)
- radiant-mlhub: 0.5 not yet supported (#711)
- segmentation-models-pytorch: add 0.3 support (#692)
- setuptools: add 65 support (#715, #753)
- torchvision: fix 0.12 pretrained model support (#761)
DataModules
Datasets
- Fix rounding bugs leading to inconsistent image shapes in vector datasets (#674, #675, #679, #736)
- IDTReeS: fix (x, y) coordinate swap in boxes (#683, #684)
- IDTReeS: clip boxes to bounds of image (#684, #760)
- Sentinel-2: add support for files downloaded from USGS EarthExplorer (#505, #754)
- Sentinel-2: prevent dataset from loading bands at different resolutions (#754)
- Sentinel-2: support loading even when band B02 is not present (#754)
Samplers
Transforms
Documentation
API docs:
- USAVars is a regression dataset (#699)
Tutorials:
- Use IntersectionDataset in sampler (#707)
- Custom Raster Datasets: complete overhaul with real data (#766, #772)
- Trainers: optional datasets required (#759)
- Transforms: replace cell magic with shell command (#756)
- Transforms: fix GPU usage (#763, #767)
- Clean up file names, execution counts, and output (#770)
Contributors
This release is thanks to the following contributors:
v0.3.0#
Released on 2022-07-11 - GitHub
TorchGeo 0.3.0 Release Notes
This release contains a number of new features, and brings increased stability to installations and testing.
In previous releases, not all dependencies had a minimum supported version listed, causing issues if users had old versions lying around. Old releases would also install the latest version of all dependencies even if they had never been tested before. TorchGeo now lists a minimum and maximum supported version for all dependencies. Moreover, we now test the minimum supported versions of all dependencies. Dependencies are automatically updated using dependabot to prevent unrelated CI failures from sneaking into PRs. We hope this makes it even easier to contribute to TorchGeo, and ensures that old releases will continue to work even if our dependencies make backwards-incompatible changes.
Backwards-incompatible changes
- VisionDataset and VisionClassificationDataset have been renamed to NonGeoDataset and NonGeoClassificationDataset (#627)
- Sample size now defaults to pixel units, use
units=Units.CRSfor old behavior (#294) - RasterDataset no longer has a plot method, subclasses have their own plot methods (#476)
- Plot method of RasterDataset subclasses now take sample dicts, not image tensors (#476)
- Removed FCEF model, use segmentation_models_pytorch.Unet instead (#345)
- SemanticSegmentationTrainer: ignore_zeros renamed to ignore_index (#444, #644)
Dependencies
- Python 3.7+ is now required (#413, #482, #486)
- Add lower version bounds to all dependencies based on testing (#574)
- Add upper version bounds to all dependencies based on semver (#544, #557)
- Fix Conda environment installation (#527, #528, #529, #545)
Datamodules
New datamodules:
Changes to existing datamodules:
- Improved consistency between datamodules (#657)
Datasets
New datasets:
- Aboveground Live Woody Biomass Density (#425)
- Aster GDEM (#404)
- CMS Global Mangrove Canopy (#391, #427)
- DeepGlobe (#578)
- DFC 2022 (#354)
- EDDMapS (#533)
- EnviroAtlas (#364)
- Esri 2020 Land Cover (#390, #405)
- EU-DEM (#426)
- Forest Damage (#461, #499)
- GBIF (#507)
- GlobBiomass (#395)
- iNaturalist (#532)
- Inria Aerial Image Labeling (#355)
- Million-AID (#455)
- OpenBuildings (#68, #402)
- ReforesTree (#582)
- SpaceNet 3 (#480)
- USAVars (#363)
Changes to existing datasets:
- Benin Small Holder Cashews: return geospatial metadata (#377)
- BigEarthNet: fix checksum (#550)
- CBF: add plot method (#410)
- CDL: add 2021 download (#418)
- CDL: add plot method (#415)
- Chesapeake: add plot method (#417)
- EuroSat: new bands parameter (#396, #397)
- LandCover.ai: update download URL (#559, #579)
- Landsat: add support for all Level-1 and Level-2 products (#492, #504)
- Landsat: add plot method (#661)
- NAIP: add plot method (#407)
- Seasonal Contrast: ensure that all images are square (#658)
- Sentinel: add plot method (#416, #493)
- SEN12MS: avoid casting float to int (#500, #502)
- So2Sat: new bands parameter (#394)
Base classes and utilities:
- VisionDataset and VisionClassificationDataset have been renamed to NonGeoDataset and NonGeoClassificationDataset (#627)
- RasterDataset no longer has a plot method, subclasses have their own plot methods (#476)
- Plot method of RasterDataset subclasses now take sample dicts, not image tensors (#476)
- BoundingBox has new area and volume attributes (#375)
- Don't subtract microsecond from mint (#506)
Models
Changes to existing models:
- Removed FCEF model, use segmentation_models_pytorch.Unet instead (#345)
- FCSiamConf and FCSiamDiff now inherit from segmentation_models_pytorch.Unet, allowing for easily loading pretrained weights (#345)
Samplers
New samplers:
- PreChippedGeoSampler (#479)
Changes to existing samplers:
- Allow for point sampling (#477)
- Allow for sampling of entire scene (#477)
- RandomGeoSampler no longer suffers from area bias (#408, #477)
- Sample size now defaults to pixel units, use
units=Units.CRSfor old behavior (#294)
Trainers
Changes to existing trainers:
- BYOLTask: fix in_channels handling (#522)
- BYOLTask: fix loading of encoder weights (#524)
- SemanticSegmentationTask: ignore_zeros renamed to ignore_index (#444, #644)
Transforms
New spectral indices:
New base classes:
- AppendTriBandNormalizedDifferenceIndex (#414)
Documentation
- Improved README (#589, #626)
- Add dataset tables (#435, #478, #649)
- Shorter dataset/datamodule/model names (#569, #571)
- Spectral indices now display mathematical equations (#400)
- Fix NAIP download in tutorials (#526, #531)
- Add issue templates on GitHub (#584, #590)
- Clarify Windows conda installation (#581)
- Public type hints (#508)
Tests
- Test on Python 3.10 (#457)
- Use dependabot to manage dependencies (#488, #551, #647)
- Test minimum version of dependencies (#574)
- Resolve and test for deprecation warnings (#567)
- FCSiam tests no longer require internet access (#495, #497)
Contributors
This release is thanks to the following contributors:
v0.2.1#
Released on 2022-03-20 - GitHub
TorchGeo 0.2.1 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.2.0 release.
Dependencies
- Fix minimum supported kornia version (#350)
- Support older pytorch-lightning (#347, #351)
- Add support for torchmetrics 0.8+ (#361, #382)
DataModules
- RESISC45: fix normalization statistics (#440)
Datasets
Fixes for dataset base classes:
- GeoDataset: fix
len()of empty dataset (#374) - RasterDataset: add support for float dtype (#379, #384)
- RasterDataset: don't override custom cmap (#421, #422)
- VectorDataset: fix issue with empty query (#399, #454, #467)
Fixes for specific datasets:
- CDL: update checksums due to new file formats (#423, #424, #428)
- Chesapeake: support extraction of deflate64-compressed zip files (#59, #282)
- Chesapeake: allow multiple datasets to share same root (#419, #420)
- ChesapeakeCVPR: update prior extension data to version 1.1 (#359)
- IDTReeS: fix citation (#389)
- LandCover.ai: support already-downloaded dataset (#383)
- Sentinel-2: fix regex to support band 8A (#393)
- SpaceNet 2: update checksum due to data format consistency fix (#469)
Samplers
Tutorials
- Fix variable name in trainer notebook (#434)
Tests
Contributors
This release is thanks to the following contributors:
v0.2.0#
Released on 2022-01-02 - GitHub
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 | landsat8Users 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 & cdlIf 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:
ZipDatasethas been renamed toIntersectionDataset(#144)GeoDatasetno longer supports addition (+), use intersection (&) or union (|) instead (#144)BoundingBoxis no longer a subclass oftuple, but can still be cast to a tuple usingtuple(bbox)(#144)collate_dicthas been renamed tostack_samples(#144)- Dataset-specific trainers have been removed, use task-specific trainers instead (#205, #286)
- All
DataModuleshave been moved fromtorchgeo.datasetstotorchgeo.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:
- Chesapeake CVPR prior labels (#202)
- ETCI 2021 (#234)
- EuroSAT (#246)
- FAIR1M (#232)
- LoveDA (#270)
- NASA Marine Debris (#269)
- OSCD (#255, #257, #341)
- Potsdam 2D (#247)
- Vaihingen 2D (#248)
- xView2 (#236)
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
IntersectionDatasetandUnionDatasetclasses (#144) GeoDatasetandBoundingBoxnow 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:
- FAIR1M (#232)
- IDTReeS (#201)
- LoveDA (#270)
- NASA Marine Debris (#269)
- OSCD (#233, #254, #258)
- Potsdam 2D (#247)
- SpaceNet 5 (#263)
- SpaceNet 7 (#241)
- Vaihingen 2D (#248)
- xView2 (#236)
Most existing datasets now have a plot method:
- ADVANCE (#264)
- Benin Small Holder Cashews (#264)
- BigEarthNet (#264)
- COWC (#300)
- CV4A Kenya Crop Type (#312)
- Cyclone (#298)
- ETCI 2021 (#234)
- EuroSAT (#251)
- GID15 (#288)
- LandCover.ai (#251)
- LEVIR-CD+ (#335)
- PatternNet (#314)
- RESISC45 (#251)
- SeCo (#251)
- SEN12MS (#320, #338)
- So2Sat (#251)
- SpaceNet (#252, #311)
- UCMerced (#251)
- Zueri Crop (#334)
Losses
This release adds a new torchgeo.losses namespace for loss functions common in or exclusive to geospatial data.
Models
Samplers
Trainers
- Trainers now plot samples during validation for supported datamodules (#286)
- Dataset-specific trainers have been removed (#286)
Transforms
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:
v0.1.1#
Released on 2021-12-20 - GitHub
TorchGeo 0.1.1 Release Notes
This is a bugfix release. There are no new features or API changes with respect to the 0.1.0 release.
Bug Fixes
- Avoid circular import errors (#276)
- Rework list of required dependencies (#249, #287)
- Relax constraints on Conda environment (#293, #295)
- Fix parallel data loading on macOS/Windows (#184, #304)
- Fix bug in shuffling of ETCI 2021 dataset (#231)
- Support already downloaded files in Chesapeake datasets (#281)
- Tutorials now open the same file in Google Colab (#274, #309)
- Add pre-trained ResNet models to the docs (#256)
- Clean up tutorial imports (#267, #308)
- Various improvements to CI stability (#261, #268, #292, #299, #306)
Contributors
This release is thanks to the following contributors:
v0.1.0#
Released on 2021-11-08 - GitHub
TorchGeo 0.1.0 Release Notes
This is the first official release of TorchGeo! This release contains the following features:
Datasets
Added the following new benchmark datasets:
- ADVANCE (AuDio Visual Aerial sceNe reCognition datasEt) (#133)
- Smallholder Cashew Plantations in Benin (#28)
- BigEarthNet (#197, #211)
- Cars Overhead With Context (COWC) (#25, #217)
- CV4A Kenya Crop Type Competition (#22)
- ETCI2021 Flood Detection (#119)
- EuroSAT (#167)
- GID-15 (Gaofen Image Dataset) (#123)
- LandCover.ai (Land Cover from Aerial Imagery) (#19, #48)
- LEVIR-CD+ (LEVIR Change Detection +) (#106)
- PatternNet (#111)
- RESISC45 (Remote Sensing Image Scene Classification) (#126, #179)
- Seasonal Contrast (#223)
- SEN12MS (#26, #44)
- So2Sat (#34, #145)
- SpaceNet (#129, #155, #185)
- Tropical Cyclone Wind Estimation Competition (8305aa7)
- NWPU VHR-10 (6df3809)
- UC Merced (#169, #208)
- ZueriCrop (#147)
Added the following new generic datasets:
- Canadian Building Footprints (#69)
- Chesapeake Bay High-Resolution Land Cover Project (#18, #100, #142)
- Cropland Data Layer (CDL) (#37)
- Landsat (#37)
- National Agriculture Imagery Program (NAIP) (#57, #98)
- Sentinel (#37)
Models
Added the following new models:
- Change Star (#157)
- Foreground-aware Relation Network (FarSeg) (#150)
- Fully-convolutional Network (FCN) (#54)
- Fully Convolutional Siamese Networks for Change Detection (#108)
- Random-convolutional feature (RCF) extractor (#176)
Samplers
Added the following new samplers:
Trainers
Added the following new trainers:
- BYOL (#145)
- Classification (#207)
- Multi-label Classification (#211)
- Regression (#215)
- Semantic Segmentation (#224)
Transforms
Added the following new transforms:
- Indices: NDBI, NDSI, NDVI, NDWI (#127)
Docs
Added documentation for:
Added tutorials for:
- Getting Started (#93)
- Transforms (#127)
- Indices (#127)
- PyTorch Lightning Trainers (#161)
- Benchmarking (#93)
Contributors
This release is thanks to the following contributors:



