0.4.0 Release Timeline #931
Replies: 3 comments
-
Went through all remaining open issues/PRs listed under the 0.4.0 milestone. Here are my personal priorities for these: RequiredThese are things I'm willing to delay the release to ensure that they make it in.
I think we'll want to advertise this release around general improvements to models supported by our trainers, and by more pre-trained models. These PRs are crucial to this. Strongly desiredThese are things that are either very close to completion or beneficial to the library.
Nice to haveThese are things that are either far from completion or less crucial to make it into this release.
Feel free to argue for any additional issues/PRs worth adding, or worth removing, from this list. |
Beta Was this translation helpful? Give feedback.
-
TorchGeo 0.4.0 Release NotesThis 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
Dependencies
DatamodulesOur 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 New datamodules:
Changes to existing datamodules:
New base classes:
DatasetsThis 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 New datasets:
Changes to existing datasets:
Changes to existing base classes:
ModelsDue 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:
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_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:
Changes to existing models:
New utility functions:
SamplersChanges to existing samplers:
New utility functions:
TrainersThis 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:
Changes to existing trainers:
TransformsWhenever 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:
Documentation
ContributorsThis release is thanks to the following contributors: @adamjstewart |
Beta Was this translation helpful? Give feedback.
-
TorchGeo 0.4.0 is now out! Hopefully it was worth the wait 😅 If we forgot anyone in the release notes or if you notice any bugs in the new release (it happens...) just let us know! |
Beta Was this translation helpful? Give feedback.
-
We're planning a 0.4.0 release sometime by the end of the month. This will include all features in the following milestones:
If you have any new features you would like to see in this release, or bugs you would like to see fixed before then, now is the time to push forward on PRs. Any questions about this release or suggestions for things that should be required before the release is finalized should be added here. We will implement a feature freeze on the releases/v0.4 branch a few days before the release is finalized in order to finish testing and release prep.
Beta Was this translation helpful? Give feedback.
All reactions