-
Notifications
You must be signed in to change notification settings - Fork 448
Add SSL4Eco SeCo-Eco Weights #2849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new weight configuration for ResNet50 using the SSL4Eco SeCo‐Eco method.
- Introduces a new weight definition (SENTINEL2_ALL_SECO_ECO) in the ResNet50_Weights class.
- Updates associated metadata (e.g., dataset, input channels, publication link, bands) for proper integration with timm and torchvision.
Comments suppressed due to low confidence (2)
torchgeo/models/resnet.py:644
- Verify that the provided publication link is accurate and corresponds to the SeCo-Eco method, and update the documentation if necessary.
'publication': 'https://arxiv.org/abs/2504.18256',
torchgeo/models/resnet.py:647
- Consider adding a comment explaining why 'NDVI' is included in the bands list along with raw satellite bands, as it is typically a derived index.
'bands': ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'NDVI'],
_seco_eco_bands = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'NDVI'] | ||
_seco_eco_transforms = K.AugmentationSequential( | ||
K.Resize((224, 224)), | ||
K.Normalize(mean=torch.tensor(0.0), std=torch.tensor(10000.0)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PlekhanovaElena can you confirm these are the recommended transforms used during pretraining if someone wants to process a raw sentinel-2 uint16 patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely don't want to divide by 10K for NDVI, may need a vector of length 9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In their code when they create NDVI in their dataset they actually multiply it by 10k so it can be normalized later by 10k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -6,6 +6,7 @@ ResNet50_Weights.SENTINEL2_ALL_DECUR,13,`link <https://github.com/zhu-xlab/DeCUR | |||
ResNet50_Weights.SENTINEL2_ALL_DINO,13,`link <https://github.com/zhu-xlab/SSL4EO-S12>`__,`link <https://arxiv.org/abs/2211.07044>`__,"CC-BY-4.0",90.7,99.1,63.6, | |||
ResNet50_Weights.SENTINEL2_ALL_MOCO,13,`link <https://github.com/zhu-xlab/SSL4EO-S12>`__,`link <https://arxiv.org/abs/2211.07044>`__,"CC-BY-4.0",91.8,99.1,60.9, | |||
ResNet50_Weights.SENTINEL2_ALL_SOFTCON, 13,`link <https://github.com/zhu-xlab/softcon>`__,`link <https://arxiv.org/abs/2405.20462>`__,"CC-BY-4.0" | |||
ResNet50_Weights.SENTINEL2_ALL_SECO_ECO, 9,`link <https://github.com/PlekhanovaElena/ssl4eco>`__,`link <https://arxiv.org/abs/2504.18256>`__,"MIT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PlekhanovaElena is the 12-band version without NDVI available? That may be more general and useful to us.
Also, I don't see a license on https://huggingface.co/eplekh/secoeco. What license are the weights released under?
Adds the RN50 weights pretrained on the new SSL4Eco dataset using the SeCo-Eco method modified from the original SeCo method. This is from the CVPR Earthvision paper "SSL4Eco: A Global Seasonal Dataset for Geospatial Foundation Models in Ecology", Plekhanova et al. (2025).
Weights were extracted from the checkpoint and tweaked to be loadable with timm and torchvision resnet50 and rehosted to huggingface here.
cc: @PlekhanovaElena @drprojects @jdollinger-bit