Recent Releases of torchgeo

torchgeo - v0.7.1

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

  • Samplers: samplers yield, not return (#2766)
  • PreChippedGeoSampler: fix type hints in tests (#2720)

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:

  • @adamjstewart
  • @ashnair1
  • @canmike
  • @DarthReca
  • @ginamanou
  • @isaaccorley
  • @kiransiitg
  • @Night-dev1307
  • @pierotofy
  • @RaczeQ
  • @robmarkcole
  • @wangyi111

- Python
Published by ashnair1 12 months ago

torchgeo - v0.7.0

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

Panopticon Architecture

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!

Dataset Contributors

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.

Copernicus-Pretrain

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

VHR-10 Instance Segmentation

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.

  • MultiLabelClassificationTask is deprecated, use ClassificationTask(task='multilabel', num_labels=...) instead (#2219)
  • torchgeo.transforms.AugmentationSequential is deprecated, use kornia.augmentation.AugmentationSequential instead (#1978, #2147, #2396)
  • torchgeo.datamodules.utils.AugPipe was 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_224 was renamed to dofa_huge_patch14_224 (#2627)
  • SENTINEL1_ALL_* weights are deprecated, use SENTINEL1_GRD_* instead (#2677)
  • ignore parameter was moved to a class attribute in BaseTask (#2317)
  • Removed IDTReeS.plot_las, use matplotlib instead (#2428)

Dependencies

New dependencies

  • NetCDF4 (#2508)
  • Parquet (#2296)
  • Typing-extensions (#2396)
  • WebDataset (#2686)
  • Xarray (#2508)

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

  • Copernicus-FM (#2646)
  • CROMA (#2370, #2653)
  • Panopticon (#2692)

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

  • Add ability to set random sampler generator seed (#2309, #2316)

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: MultiLabelClassificationTask is 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_checkpoint to load a pretrained model (#2317)
  • Ignore ignore when 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

  • Earthquake detection (#2647)
  • Custom semantic segmentation trainer (#2588)

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

- Python
Published by adamjstewart about 1 year ago

torchgeo - v0.6.2

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

  • pyvista: no support for VTK 9.4 yet (#2431)
  • rasterio: 1.4.3+ is now supported (#2442)

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 bands metadata 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 bands match 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

- Python
Published by adamjstewart over 1 year ago

torchgeo - v0.6.1

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 str and pathlib paths (#2270)

Models

  • API: avoid use of eval in get_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 --cov and --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

- Python
Published by adamjstewart over 1 year ago

torchgeo - v0.6.0

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

Diagram of a unified multimodal Earth foundation model

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

Migration from Radiant MLHub to Source Cooperative

TorchGeo contains a number of datasets from the recently defunct Radiant MLHub:

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

OSGeo Community logo

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:

slack huggingface osgeo

Lightning Studios support

Lightning AI logo

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.expanduser for consistency (#1705)
  • LEVIR-CD and OSCD: images key was split into image1 and image2 for change detection (#1684, #1696)
  • EuroSAT: B08A was renamed to B8A to 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.expanduser for 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 B08A to B8A to 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 image into image1 and image2 for change detection (#1696)
  • NASA Marine Debris: migrate to Source Cooperative (#2206)
  • OSCD: support fine-grained band selection (#1684)
  • OSCD: split image into image1 and image2 for 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.expanduser for 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.Path to all datasets (#2173)
  • Datasets can now use command-line utilities to download (#2064)
  • GeoDataset: bbox key was renamed to bounds (#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 dtype attribute 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

  • DOFA (#1903, #2052)
  • Scale-MAE (#2057)
  • Swin Transformer v2 (#1358, #2052)

New model weights

  • DeCUR (#2191)
  • DOFA (#1903)
  • Scale-MAE (#2057)
  • SatlasPretrain (#1358, #1884, #2038)

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_index when 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

  • Alternatives: update metrics (#2259)
  • Contributing: explain how to use new I/O Bench dataset (#1972)

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

  • Use prettier for configuration files (#2018)
  • Use ruff for code files (#1994, #2001)

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)
  • loadstatedict: add shared fixture to avoid code duplication (#1932)
  • loadstatedictfromurl: 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

- Python
Published by adamjstewart over 1 year ago

torchgeo - v0.5.2

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

  • HuggingFace: use stable download URLs (#1916)
  • ViTSmall16_Weights: fix typo (#1904)

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: loadstatedict 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

- Python
Published by isaaccorley about 2 years ago

torchgeo - v0.5.1

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

  • EuroSAT: make channel normalization statistics responsive to dynamic band selection (#1634, #1681)

Datasets

  • AGB Live Woody Biomass: update download link for dataset (#1679, #1713)
  • EuroSAT: remove classes attribute and instead rely on ImageFolder classes (#1648, #1650)
  • OSCD: change image datatype be float instead of int (#1652, #1656)
  • RESICS45: remove classes attribute and instead rely on ImageFolder classes (#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 ImageFolder classes (#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 paths argument instead of root in RuntimeError of 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

  • Solve logging conflict by allowing config.yaml file to be overwritten (#1621, #1625)

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 unrar in CI by using 7zip instead of unrar (#1697)
  • CI: use unique names for release caches (#1723)

Documentation

  • README: update SemanticSegmentationTask example 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

- Python
Published by nilsleh over 2 years ago

torchgeo - v0.5.0

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: ```bash

If torchgeo has been installed

torchgeo

If torchgeo has been installed, or if it has been cloned to the current directory

python3 -m torchgeo It supports command-line configuration or YAML/JSON config files. Valid options can be found from the help messages: bash

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 EuroSAT100DataModule Using the following config file: yaml trainer: maxepochs: 20 model: classpath: ClassificationTask initargs: model: "resnet18" inchannels: 13 numclasses: 10 data: classpath: EuroSAT100DataModule initargs: batchsize: 8 dict_kwargs: download: true we can see the script in action: bash

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.yaml It can also be imported and used in a Python script if you need to extend it to add new features: python from torchgeo.main import main

main(["fit", "--config", "config.yaml"]) ``` See the Lightning documentation for more details.

Self-supervised learning and Landsat

SSL4EO-S12 Logo

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:

  • BYOL [1]
  • MoCo [1, 2, 3]
  • SimCLR [1, 2]

large unlabeled datasets for multiple satellite platforms:

  • SeCo [1]
  • SSL4EO-L [1]
  • SSL4EO-S12 [1]

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 split
  • random_bbox_splitting: randomly split each scene and assign each half to a different split
  • random_grid_cell_assignment: overlay a grid and randomly assign each grid cell to a different split
  • roi_split: split using a roi just like with Sampler
  • time_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: python 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 root to paths (#1442, #1597)
  • Trainers: many parameters renamed (#1541)
  • FAIR1M datamodule: *_split_pct parameters removed (#1275)
  • Inria datamodule: *_split_pct parameters removed (#1540)
  • SemanticSegmentationTask: changes to weights parameter (#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:

  • Add utilities to split GeoDatasets (#536, #866)
  • BoundingBox has a new split function (#866)

Models

Changes to existing models:

  • RCF: add empirical sampling mode (#1339)

New pre-trained model weights:

  • GASSL (#1325)
  • SSL4EO-L (#1482)

Changes to existing pre-trained model weights:

  • SeCo: fix weight loading (#1234, #1593)

Samplers

Changes to existing samplers:

  • GridGeoSampler: don't change stride of last patch (#1245, #1329)

Trainers

New trainers:

  • MoCo (#1285, #1357)
  • Pixelwise Regression (#849, #1241, #1306)
  • SimCLR (#1252, #1357)

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:

  • BaseTask (#1393, #1541)

Transforms

New transforms:

  • Random Grayscale (#1301)

Scripts

New scripts:

  • Add command-line script (#228, #1237, #1352, #1559)

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

- Python
Published by adamjstewart over 2 years ago

torchgeo - v0.4.1

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_bands does not actually contain all bands (e.g., Landsat) (#1134, #1135)
  • RasterDataset: fix support for datasets where all_bands is not defined and separate_files is False (#1135)
  • RasterDataset: fix bug when separate_files and no date in filename_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:

  • Add sha256 suffix for security (#1105)
  • Add and improve normalizations (#1119, #1166)

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

- Python
Published by calebrob6 about 3 years ago

torchgeo - v0.4.0

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:

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:

  • GID-15 (#928)
  • SpaceNet1 (#965)

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_split is deprecated, use torch.utils.data.random_split instead (#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:

HH_HV

Additionally, all image datasets now have a plot method.

New datasets:

  • Cloud Cover Detection (#510)
  • Sentinel-1 (#821)
  • SpaceNet 6 (#878)

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: python 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:

With the 0.4.0 release, TorchGeo has now adopted the same API: python model = resnet50(weights=ResNet50_Weights.SENTINEL2_ALL_MOCO) We also support PyTorch Hub now: ```pycon

import torch from torchgeo.models import ResNet18Weights torch.hub.list("microsoft/torchgeo", trustrepo=True) Downloading: "https://github.com/microsoft/torchgeo/zipball/models/weights" to ~/.cache/torch/hub/modelsweights.zip ['resnet18', 'resnet50', 'vitsmallpatch16224'] model = torch.hub.load("microsoft/torchgeo", "resnet18") Using cache found in ~/.cache/torch/hub/microsofttorchgeomodelsweights model = torch.hub.load("microsoft/torchgeo", "resnet18", weights=ResNet18Weights.SENTINEL2RGBMOCO) Using cache found in ~/.cache/torch/hub/microsofttorchgeomodels_weights ``` In 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:

  • Adopt torchvision's multi-weight support API (#762, #804, #917)
  • Add support for torch.hub (#917)

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:

  • getrandomboundingbox and tileto_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:

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.AugmentationSequential is deprecated, use kornia.augmentation.AugmentationSequential instead (#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

- Python
Published by adamjstewart over 3 years ago

torchgeo - v0.3.1

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

  • Fix rounding bugs in train/val/test split sizes (#675, #679, #736)

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

  • GridGeoSampler: adjust stride of last row/col to sample entire ROI (#431, #448, #630)

Transforms

  • NDVI: fix computation, we were computing the negative (#713, #714)
  • SWI: fix band names (#714)

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:

  • @adamjstewart
  • @ashnair1
  • @calebrob6
  • @isaaccorley
  • @remtav
  • @TCherici

- Python
Published by adamjstewart over 3 years ago

torchgeo - v0.3.0

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.CRS for 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 segmentationmodelspytorch.Unet instead (#345)
  • SemanticSegmentationTrainer: ignorezeros renamed to ignoreindex (#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:

  • Inria Aerial Image Labeling (#498)
  • USAVars (#441)

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 segmentationmodelspytorch.Unet instead (#345)
  • FCSiamConf and FCSiamDiff now inherit from segmentationmodelspytorch.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.CRS for old behavior (#294)

Trainers

Changes to existing trainers:

  • BYOLTask: fix in_channels handling (#522)
  • BYOLTask: fix loading of encoder weights (#524)
  • SemanticSegmentationTask: ignorezeros renamed to ignoreindex (#444, #644)

Transforms

New spectral indices:

  • BNDVI (#386)
  • GBNDVI (#450)
  • GNDVI (#371)
  • GRNDVI (#450)
  • NDRE (#386)
  • RBNDVI (#450)
  • SWI (#371)

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:

  • @adamjstewart
  • @ashnair1
  • @calebrob6
  • @gaetanbahl
  • @iejMac
  • @isaaccorley
  • @khdlr
  • @MATRIX4284
  • @mehmetgunturkun
  • @nilsleh
  • @recursix
  • @remtav
  • @RitwikGupta
  • @saumyasinha
  • @weiji14

- Python
Published by adamjstewart almost 4 years ago

torchgeo - v0.2.1

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

  • Avoid bounding boxes smaller than patch size (#319, #376)

Tutorials

  • Fix variable name in trainer notebook (#434)

Tests

  • Fix integration tests on macOS/Windows (#349, #468)

Contributors

This release is thanks to the following contributors:

  • @adamjstewart
  • @ashnair1
  • @calebrob6
  • @ethanwhite
  • @nilsleh
  • @tritolol
  • @weiji14

- Python
Published by adamjstewart about 4 years ago

torchgeo - v0.2.0

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:

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

Users can now also:

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

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

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

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

Backwards-incompatible changes

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

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

Datamodules

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

In addition, the following datasets have new datamodules:

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

This release also includes the following new benchmark datasets:

  • 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.

  • QR and RQ losses (#202, #333)

Models

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

Samplers

  • Samplers now respect ROI (#144, #149, #260)

Trainers

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

Transforms

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

Documentation

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

Tests

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

Contributors

This release is thanks to the following contributors:

  • @adamjstewart
  • @ashnair1
  • @calebrob6
  • @estherrolf
  • @iejMac
  • @isaaccorley
  • @nilsleh
  • @RitwikGupta

- Python
Published by adamjstewart over 4 years ago

torchgeo - v0.1.1

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:

  • @adamjstewart
  • @amrzv
  • @ashnair1
  • @calebrob6
  • @isaaccorley

- Python
Published by adamjstewart over 4 years ago

torchgeo - v0.1.0

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 (8305aa7c5ed0e3d6d823c7cd2d552b137969b35b)
  • NWPU VHR-10 (6df38094df157aacc4a3f1e9b388b927dcd3515d)
  • 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:

  • Random Geo Sampler (#37)
  • Grid Geo Sampler (#37)
  • Random Batch Geo Sampler (#37)

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:

  • Installation (#153)
  • Contributing (#141)
  • Glossary (f6c91f4ebcfa7363bf421592fc36a0f523b9b5a4)
  • API Docs (00d619e9463ca223e29aa98e4658eb397dd74164)

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:

  • @adamjstewart
  • @anthonymlortiz
  • @ashnair1
  • @calebrob6
  • @isaaccorley
  • @Z-Zheng

- Python
Published by adamjstewart over 4 years ago