Skip to content
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

Add DeCUR RN50 weights #2191

Merged
merged 12 commits into from
Aug 19, 2024
1 change: 1 addition & 0 deletions docs/api/sentinel1_pretrained_weights.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Weight,Channels,Source,Citation,License
ResNet50_Weights.SENTINEL1_ALL_MOCO, 2,`link <https://github.com/zhu-xlab/SSL4EO-S12>`__,`link <https://arxiv.org/abs/2211.07044>`__,"CC-BY-4.0"
ResNet50_Weights.SENTINEL1_ALL_DECUR, 2,`link <https://github.com/zhu-xlab/DeCUR>`__,`link <https://arxiv.org/abs/2309.05300>`__,"Apache-2.0"
Swin_V2_B_Weights.SENTINEL1_SI_SATLAS,2,`link <https://github.com/allenai/satlas>`__,`link <https://arxiv.org/abs/2211.15660>`__,"ODC-BY"
1 change: 1 addition & 0 deletions docs/api/sentinel2_pretrained_weights.csv
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ ResNet50_Weights.SENTINEL2_ALL_DINO,13,`link <https://github.com/zhu-xlab/SSL4EO
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_RGB_MOCO, 3,`link <https://github.com/zhu-xlab/SSL4EO-S12>`__,`link <https://arxiv.org/abs/2211.07044>`__,"CC-BY-4.0",,,
ResNet50_Weights.SENTINEL2_RGB_SECO, 3,`link <https://github.com/ServiceNow/seasonal-contrast>`__,`link <https://arxiv.org/abs/2103.16607>`__,"Apache-2.0",87.81,,,
ResNet50_Weights.SENTINEL2_ALL_DECUR,13,`link <https://github.com/zhu-xlab/DeCUR>`__,`link <https://arxiv.org/abs/2309.05300>`__,"Apache-2.0",,,,
ViTSmall16_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.5,99.0,62.2,
ViTSmall16_Weights.SENTINEL2_ALL_MOCO,13,`link <https://github.com/zhu-xlab/SSL4EO-S12>`__,`link <https://arxiv.org/abs/2211.07044>`__,"CC-BY-4.0",89.9,98.6,61.6,
Swin_V2_B_Weights.SENTINEL2_RGB_SI_SATLAS,3,`link <https://github.com/allenai/satlas>`__,`link <https://arxiv.org/abs/2211.15660>`__,"ODC-BY",,,,
26 changes: 26 additions & 0 deletions torchgeo/models/resnet.py
Original file line number Diff line number Diff line change
@@ -404,6 +404,19 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc]
},
)

SENTINEL1_ALL_DECUR = Weights(
url='https://huggingface.co/torchgeo/decur/resolve/9328eeb90c686a88b30f8526ed757b4bc0f12027/rn50_ssl4eo-s12_sar_decur_ep100-f0e69ba2.pth', # noqa: E501
transforms=_zhu_xlab_transforms,
wangyi111 marked this conversation as resolved.
Show resolved Hide resolved
meta={
'dataset': 'SSL4EO-S12',
'in_chans': 2,
'model': 'resnet50',
'publication': 'https://arxiv.org/abs/2309.05300',
'repo': 'https://github.com/zhu-xlab/DeCUR',
'ssl_method': 'decur',
},
)

SENTINEL2_ALL_DINO = Weights(
url='https://hf.co/torchgeo/resnet50_sentinel2_all_dino/resolve/d7f14bf5530d70ac69d763e58e77e44dbecfec7c/resnet50_sentinel2_all_dino-d6c330e9.pth', # noqa: E501
transforms=_zhu_xlab_transforms,
@@ -430,6 +443,19 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc]
},
)

SENTINEL2_ALL_DECUR = Weights(
url='https://huggingface.co/torchgeo/decur/resolve/eba7ae5945d482a4319be046d34b552db5dd9950/rn50_ssl4eo-s12_ms_decur_ep100-fc6b09ff.pth', # noqa: E501
transforms=_zhu_xlab_transforms,
meta={
'dataset': 'SSL4EO-S12',
'in_chans': 13,
'model': 'resnet50',
'publication': 'https://arxiv.org/abs/2309.05300',
'repo': 'https://github.com/zhu-xlab/DeCUR',
'ssl_method': 'decur',
},
)

SENTINEL2_RGB_MOCO = Weights(
url='https://hf.co/torchgeo/resnet50_sentinel2_rgb_moco/resolve/efd9723b59a88e9dc1420dc1e96afb25b0630a3c/resnet50_sentinel2_rgb_moco-2b57ba8b.pth', # noqa: E501
transforms=_zhu_xlab_transforms,