From 27330c32ef95920202bf9b9c5f2c1ef2525a2279 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 28 Feb 2024 12:57:01 +0100 Subject: [PATCH] HuggingFace: use stable download URLs --- torchgeo/datasets/chabud.py | 2 +- torchgeo/datasets/eurosat.py | 10 ++--- torchgeo/datasets/l7irish.py | 2 +- torchgeo/datasets/l8biome.py | 2 +- torchgeo/datasets/mapinwild.py | 2 +- torchgeo/datasets/skippd.py | 2 +- torchgeo/datasets/ssl4eo.py | 2 +- torchgeo/datasets/ssl4eo_benchmark.py | 2 +- torchgeo/datasets/ucmerced.py | 2 +- torchgeo/datasets/usavars.py | 2 +- torchgeo/models/resnet.py | 58 +++++++++++++-------------- torchgeo/models/swin.py | 10 ++--- torchgeo/models/vit.py | 24 +++++------ 13 files changed, 60 insertions(+), 60 deletions(-) diff --git a/torchgeo/datasets/chabud.py b/torchgeo/datasets/chabud.py index 6a94cece0de..febed703110 100644 --- a/torchgeo/datasets/chabud.py +++ b/torchgeo/datasets/chabud.py @@ -68,7 +68,7 @@ class ChaBuD(NonGeoDataset): ] rgb_bands = ["B04", "B03", "B02"] folds = {"train": [1, 2, 3, 4], "val": [0]} - url = "https://huggingface.co/datasets/chabud-team/chabud-ecml-pkdd2023/resolve/main/train_eval.hdf5" # noqa: E501 + url = "https://hf.co/datasets/chabud-team/chabud-ecml-pkdd2023/resolve/de222d434e26379aa3d4f3dd1b2caf502427a8b2/train_eval.hdf5" # noqa: E501 filename = "train_eval.hdf5" md5 = "15d78fb825f9a81dad600db828d22c08" diff --git a/torchgeo/datasets/eurosat.py b/torchgeo/datasets/eurosat.py index 6480045d29a..2802e6924a8 100644 --- a/torchgeo/datasets/eurosat.py +++ b/torchgeo/datasets/eurosat.py @@ -60,7 +60,7 @@ class EuroSAT(NonGeoClassificationDataset): * https://ieeexplore.ieee.org/document/8519248 """ - url = "https://huggingface.co/datasets/torchgeo/eurosat/resolve/main/EuroSATallBands.zip" # noqa: E501 + url = "https://hf.co/datasets/torchgeo/eurosat/resolve/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/EuroSATallBands.zip" # noqa: E501 filename = "EuroSATallBands.zip" md5 = "5ac12b3b2557aa56e1826e981e8e200e" @@ -308,14 +308,14 @@ class EuroSAT100(EuroSAT): .. versionadded:: 0.5 """ - url = "https://huggingface.co/datasets/torchgeo/eurosat/resolve/main/EuroSAT100.zip" + url = "https://hf.co/datasets/torchgeo/eurosat/resolve/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/EuroSAT100.zip" # noqa: E501 filename = "EuroSAT100.zip" md5 = "c21c649ba747e86eda813407ef17d596" split_urls = { - "train": "https://huggingface.co/datasets/torchgeo/eurosat/raw/main/eurosat-train.txt", # noqa: E501 - "val": "https://huggingface.co/datasets/torchgeo/eurosat/raw/main/eurosat-val.txt", # noqa: E501 - "test": "https://huggingface.co/datasets/torchgeo/eurosat/raw/main/eurosat-test.txt", # noqa: E501 + "train": "https://hf.co/datasets/torchgeo/eurosat/raw/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/eurosat-train.txt", # noqa: E501 + "val": "https://hf.co/datasets/torchgeo/eurosat/raw/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/eurosat-val.txt", # noqa: E501 + "test": "https://hf.co/datasets/torchgeo/eurosat/raw/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/eurosat-test.txt", # noqa: E501 } split_md5s = { "train": "033d0c23e3a75e3fa79618b0e35fe1c7", diff --git a/torchgeo/datasets/l7irish.py b/torchgeo/datasets/l7irish.py index fe9e6b4a656..b2d87eade5e 100644 --- a/torchgeo/datasets/l7irish.py +++ b/torchgeo/datasets/l7irish.py @@ -63,7 +63,7 @@ class L7Irish(RasterDataset): .. versionadded:: 0.5 """ # noqa: E501 - url = "https://huggingface.co/datasets/torchgeo/l7irish/resolve/main/{}.tar.gz" # noqa: E501 + url = "https://hf.co/datasets/torchgeo/l7irish/resolve/6807e0b22eca7f9a8a3903ea673b31a115837464/{}.tar.gz" # noqa: E501 md5s = { "austral": "0a34770b992a62abeb88819feb192436", diff --git a/torchgeo/datasets/l8biome.py b/torchgeo/datasets/l8biome.py index 754db127810..88ef1559225 100644 --- a/torchgeo/datasets/l8biome.py +++ b/torchgeo/datasets/l8biome.py @@ -62,7 +62,7 @@ class L8Biome(RasterDataset): .. versionadded:: 0.5 """ # noqa: E501 - url = "https://huggingface.co/datasets/torchgeo/l8biome/resolve/main/{}.tar.gz" # noqa: E501 + url = "https://hf.co/datasets/torchgeo/l8biome/resolve/f76df19accce34d2acc1878d88b9491bc81f94c8/{}.tar.gz" # noqa: E501 md5s = { "barren": "0eb691822d03dabd4f5ea8aadd0b41c3", diff --git a/torchgeo/datasets/mapinwild.py b/torchgeo/datasets/mapinwild.py index 5eaa426d230..68b601bb5da 100644 --- a/torchgeo/datasets/mapinwild.py +++ b/torchgeo/datasets/mapinwild.py @@ -53,7 +53,7 @@ class MapInWild(NonGeoDataset): .. versionadded:: 0.5 """ - url = "https://huggingface.co/datasets/burakekim/mapinwild/resolve/main/" + url = "https://hf.co/datasets/burakekim/mapinwild/resolve/d963778e31e7e0ed2329c0f4cbe493be532f0e71/" # noqa: E501 modality_urls = { "esa_wc": {"esa_wc/ESA_WC.zip"}, diff --git a/torchgeo/datasets/skippd.py b/torchgeo/datasets/skippd.py index 156b3f1568d..d35897182a1 100644 --- a/torchgeo/datasets/skippd.py +++ b/torchgeo/datasets/skippd.py @@ -54,7 +54,7 @@ class SKIPPD(NonGeoDataset): .. versionadded:: 0.5 """ - url = "https://huggingface.co/datasets/torchgeo/skippd/resolve/main/{}" + url = "https://hf.co/datasets/torchgeo/skippd/resolve/a16c7e200b4618cd93be3143cdb973e3f21498fa/{}" # noqa: E501 md5 = { "forecast": "f4f3509ddcc83a55c433be9db2e51077", "nowcast": "0000761d403e45bb5f86c21d3c69aa80", diff --git a/torchgeo/datasets/ssl4eo.py b/torchgeo/datasets/ssl4eo.py index fa486c4aa79..e8779a3e5f5 100644 --- a/torchgeo/datasets/ssl4eo.py +++ b/torchgeo/datasets/ssl4eo.py @@ -105,7 +105,7 @@ class _Metadata(TypedDict): "oli_sr": {"num_bands": 7, "rgb_bands": [3, 2, 1]}, } - url = "https://hf.co/datasets/torchgeo/ssl4eo_l/resolve/main/{0}/ssl4eo_l_{0}.tar.gz{1}" # noqa: E501 + url = "https://hf.co/datasets/torchgeo/ssl4eo_l/resolve/e2467887e6a6bcd7547d9d5999f8d9bc3323dc31/{0}/ssl4eo_l_{0}.tar.gz{1}" # noqa: E501 checksums = { "tm_toa": { "aa": "553795b8d73aa253445b1e67c5b81f11", diff --git a/torchgeo/datasets/ssl4eo_benchmark.py b/torchgeo/datasets/ssl4eo_benchmark.py index 003cccf2fcf..8f2858b7e23 100644 --- a/torchgeo/datasets/ssl4eo_benchmark.py +++ b/torchgeo/datasets/ssl4eo_benchmark.py @@ -47,7 +47,7 @@ class SSL4EOLBenchmark(NonGeoDataset): .. versionadded:: 0.5 """ - url = "https://huggingface.co/datasets/torchgeo/ssl4eo-l-benchmark/resolve/main/{}.tar.gz" # noqa: E501 + url = "https://hf.co/datasets/torchgeo/ssl4eo-l-benchmark/resolve/da96ae2b04cb509710b72fce9131c2a3d5c211c2/{}.tar.gz" # noqa: E501 valid_sensors = ["tm_toa", "etm_toa", "etm_sr", "oli_tirs_toa", "oli_sr"] valid_products = ["cdl", "nlcd"] diff --git a/torchgeo/datasets/ucmerced.py b/torchgeo/datasets/ucmerced.py index 4a7867dc4a5..05ac17599ba 100644 --- a/torchgeo/datasets/ucmerced.py +++ b/torchgeo/datasets/ucmerced.py @@ -63,7 +63,7 @@ class UCMerced(NonGeoClassificationDataset): * https://dl.acm.org/doi/10.1145/1869790.1869829 """ - url = "https://huggingface.co/datasets/torchgeo/ucmerced/resolve/main/UCMerced_LandUse.zip" # noqa: E501 + url = "https://hf.co/datasets/torchgeo/ucmerced/resolve/d0af6e2eeea2322af86078068bd83337148a2149/UCMerced_LandUse.zip" # noqa: E501 filename = "UCMerced_LandUse.zip" md5 = "5b7ec56793786b6dc8a908e8854ac0e4" diff --git a/torchgeo/datasets/usavars.py b/torchgeo/datasets/usavars.py index f33d268d4ce..a3156ab7307 100644 --- a/torchgeo/datasets/usavars.py +++ b/torchgeo/datasets/usavars.py @@ -49,7 +49,7 @@ class USAVars(NonGeoDataset): .. versionadded:: 0.3 """ - data_url = "https://huggingface.co/datasets/torchgeo/usavars/resolve/main/{}" + data_url = "https://hf.co/datasets/torchgeo/usavars/resolve/01377abfaf50c0cc8548aaafb79533666bbf288f/{}" # noqa: E501 dirname = "uar" md5 = "677e89fd20e5dd0fe4d29b61827c2456" diff --git a/torchgeo/models/resnet.py b/torchgeo/models/resnet.py index fb254c166e4..70c058711d9 100644 --- a/torchgeo/models/resnet.py +++ b/torchgeo/models/resnet.py @@ -75,7 +75,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] """ LANDSAT_TM_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_tm_toa_moco-1c691b4f.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_tm_toa_moco-1c691b4f.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -88,7 +88,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_TM_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_tm_toa_simclr-d2d38ace.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_tm_toa_simclr-d2d38ace.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -101,7 +101,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_etm_toa_moco-bb88689c.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_etm_toa_moco-bb88689c.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -114,7 +114,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_etm_toa_simclr-4d813f79.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_etm_toa_simclr-4d813f79.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -127,7 +127,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_SR_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_etm_sr_moco-4f078acd.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_etm_sr_moco-4f078acd.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -140,7 +140,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_SR_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_etm_sr_simclr-8e8543b4.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_etm_sr_simclr-8e8543b4.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -153,7 +153,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_TIRS_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_oli_tirs_toa_moco-a3002f51.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_oli_tirs_toa_moco-a3002f51.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -166,7 +166,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_TIRS_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_oli_tirs_toa_simclr-b0635cc6.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_oli_tirs_toa_simclr-b0635cc6.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -179,7 +179,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_SR_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_oli_sr_moco-660e82ed.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_oli_sr_moco-660e82ed.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -192,7 +192,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_SR_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet18_landsat_oli_sr_simclr-7bced5be.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet18_landsat_oli_sr_simclr-7bced5be.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -205,7 +205,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_ALL_MOCO = Weights( - url="https://huggingface.co/torchgeo/resnet18_sentinel2_all_moco/resolve/main/resnet18_sentinel2_all_moco-59bfdff9.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet18_sentinel2_all_moco/resolve/5b8cddc9a14f3844350b7f40b85bcd32aed75918/resnet18_sentinel2_all_moco-59bfdff9.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -218,7 +218,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_RGB_MOCO = Weights( - url="https://huggingface.co/torchgeo/resnet18_sentinel2_rgb_moco/resolve/main/resnet18_sentinel2_rgb_moco-e3a335e3.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet18_sentinel2_rgb_moco/resolve/e1c032e7785fd0625224cdb6699aa138bb304eec/resnet18_sentinel2_rgb_moco-e3a335e3.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -231,7 +231,7 @@ class ResNet18_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_RGB_SECO = Weights( - url="https://huggingface.co/torchgeo/resnet18_sentinel2_rgb_seco/resolve/main/resnet18_sentinel2_rgb_seco-cefca942.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet18_sentinel2_rgb_seco/resolve/f8dcee692cf7142163b55a5c197d981fe0e717a0/resnet18_sentinel2_rgb_seco-cefca942.pth", # noqa: E501 transforms=_seco_transforms, meta={ "dataset": "SeCo Dataset", @@ -254,7 +254,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] """ FMOW_RGB_GASSL = Weights( - url="https://huggingface.co/torchgeo/resnet50_fmow_rgb_gassl/resolve/main/resnet50_fmow_rgb_gassl-da43d987.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet50_fmow_rgb_gassl/resolve/fe8a91026cf9104f1e884316b8e8772d7af9052c/resnet50_fmow_rgb_gassl-da43d987.pth", # noqa: E501 transforms=_gassl_transforms, meta={ "dataset": "fMoW Dataset", @@ -267,7 +267,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_TM_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_tm_toa_moco-ba1ce753.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_tm_toa_moco-ba1ce753.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -280,7 +280,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_TM_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_tm_toa_simclr-a1c93432.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_tm_toa_simclr-a1c93432.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -293,7 +293,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_etm_toa_moco-e9a84d5a.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_etm_toa_moco-e9a84d5a.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -306,7 +306,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_etm_toa_simclr-70b5575f.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_etm_toa_simclr-70b5575f.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -319,7 +319,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_SR_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_etm_sr_moco-1266cde3.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_etm_sr_moco-1266cde3.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -332,7 +332,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_SR_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_etm_sr_simclr-e5d185d7.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_etm_sr_simclr-e5d185d7.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -345,7 +345,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_TIRS_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_oli_tirs_toa_moco-de7f5e0f.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_oli_tirs_toa_moco-de7f5e0f.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -358,7 +358,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_TIRS_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_oli_tirs_toa_simclr-030cebfe.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_oli_tirs_toa_simclr-030cebfe.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -371,7 +371,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_SR_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_oli_sr_moco-ff580dad.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_oli_sr_moco-ff580dad.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -384,7 +384,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_SR_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/resnet50_landsat_oli_sr_simclr-94f78913.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/resnet50_landsat_oli_sr_simclr-94f78913.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -397,7 +397,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL1_ALL_MOCO = Weights( - url="https://huggingface.co/torchgeo/resnet50_sentinel1_all_moco/resolve/main/resnet50_sentinel1_all_moco-906e4356.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet50_sentinel1_all_moco/resolve/e79862c667853c10a709bdd77ea8ffbad0e0f1cf/resnet50_sentinel1_all_moco-906e4356.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -410,7 +410,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_ALL_DINO = Weights( - url="https://huggingface.co/torchgeo/resnet50_sentinel2_all_dino/resolve/main/resnet50_sentinel2_all_dino-d6c330e9.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet50_sentinel2_all_dino/resolve/d7f14bf5530d70ac69d763e58e77e44dbecfec7c/resnet50_sentinel2_all_dino-d6c330e9.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -423,7 +423,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_ALL_MOCO = Weights( - url="https://huggingface.co/torchgeo/resnet50_sentinel2_all_moco/resolve/main/resnet50_sentinel2_all_moco-df8b932e.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet50_sentinel2_all_moco/resolve/da4f3c9dbe09272eb902f3b37f46635fa4726879/resnet50_sentinel2_all_moco-df8b932e.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -436,7 +436,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_RGB_MOCO = Weights( - url="https://huggingface.co/torchgeo/resnet50_sentinel2_rgb_moco/resolve/main/resnet50_sentinel2_rgb_moco-2b57ba8b.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet50_sentinel2_rgb_moco/resolve/efd9723b59a88e9dc1420dc1e96afb25b0630a3c/resnet50_sentinel2_rgb_moco-2b57ba8b.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -449,7 +449,7 @@ class ResNet50_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_RGB_SECO = Weights( - url="https://huggingface.co/torchgeo/resnet50_sentinel2_rgb_seco/resolve/main/resnet50_sentinel2_rgb_seco-018bf397.pth", # noqa: E501 + url="https://hf.co/torchgeo/resnet50_sentinel2_rgb_seco/resolve/fbd07b02a8edb8fc1035f7957160deed4321c145/resnet50_sentinel2_rgb_seco-018bf397.pth", # noqa: E501 transforms=_seco_transforms, meta={ "dataset": "SeCo Dataset", diff --git a/torchgeo/models/swin.py b/torchgeo/models/swin.py index 91b944c8f7a..66dd0ebc085 100644 --- a/torchgeo/models/swin.py +++ b/torchgeo/models/swin.py @@ -60,7 +60,7 @@ class Swin_V2_B_Weights(WeightsEnum): # type: ignore[misc] """ NAIP_RGB_SI_SATLAS = Weights( - url="https://huggingface.co/allenai/satlas-pretrain/resolve/main/aerial_swinb_si.pth", # noqa: E501 + url="https://hf.co/allenai/satlas-pretrain/resolve/daa578a4be36573d9791bf51dcd0420b8dc75732/aerial_swinb_si.pth", # noqa: E501 transforms=_satlas_transforms, meta={ "dataset": "Satlas", @@ -72,7 +72,7 @@ class Swin_V2_B_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_RGB_SI_SATLAS = Weights( - url="https://huggingface.co/allenai/satlas-pretrain/resolve/main/sentinel2_swinb_si_rgb.pth", # noqa: E501 + url="https://hf.co/allenai/satlas-pretrain/resolve/daa578a4be36573d9791bf51dcd0420b8dc75732/sentinel2_swinb_si_rgb.pth", # noqa: E501 transforms=_satlas_transforms, meta={ "dataset": "Satlas", @@ -84,7 +84,7 @@ class Swin_V2_B_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_MS_SI_SATLAS = Weights( - url="https://huggingface.co/allenai/satlas-pretrain/resolve/main/sentinel2_swinb_si_ms.pth", # noqa: E501 + url="https://hf.co/allenai/satlas-pretrain/resolve/daa578a4be36573d9791bf51dcd0420b8dc75732/sentinel2_swinb_si_ms.pth", # noqa: E501 transforms=_sentinel2_ms_satlas_transforms, meta={ "dataset": "Satlas", @@ -97,7 +97,7 @@ class Swin_V2_B_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL1_SI_SATLAS = Weights( - url="https://huggingface.co/allenai/satlas-pretrain/resolve/main/sentinel1_swinb_si.pth", # noqa: E501 + url="https://hf.co/allenai/satlas-pretrain/resolve/daa578a4be36573d9791bf51dcd0420b8dc75732/sentinel1_swinb_si.pth", # noqa: E501 transforms=_satlas_transforms, meta={ "dataset": "Satlas", @@ -110,7 +110,7 @@ class Swin_V2_B_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_SI_SATLAS = Weights( - url="https://huggingface.co/allenai/satlas-pretrain/resolve/main/landsat_swinb_si.pth", # noqa: E501 + url="https://hf.co/allenai/satlas-pretrain/resolve/daa578a4be36573d9791bf51dcd0420b8dc75732/landsat_swinb_si.pth", # noqa: E501 transforms=_landsat_satlas_transforms, meta={ "dataset": "Satlas", diff --git a/torchgeo/models/vit.py b/torchgeo/models/vit.py index d1e2257e780..85c2e42888a 100644 --- a/torchgeo/models/vit.py +++ b/torchgeo/models/vit.py @@ -48,7 +48,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] """ LANDSAT_TM_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_tm_toa_moco-a1c967d8.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_tm_toa_moco-a1c967d8.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -61,7 +61,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_TM_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_tm_toa_simclr-7c2d9799.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_tm_toa_simclr-7c2d9799.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -74,7 +74,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_etm_toa_moco-26d19bcf.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_etm_toa_moco-26d19bcf.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -87,7 +87,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_etm_toa_simclr-34fb12cb.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_etm_toa_simclr-34fb12cb.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -100,7 +100,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_SR_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_etm_sr_moco-eaa4674e.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_etm_sr_moco-eaa4674e.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -113,7 +113,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_ETM_SR_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_etm_sr_simclr-a14c466a.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_etm_sr_simclr-a14c466a.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -126,7 +126,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_TIRS_TOA_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_oli_tirs_toa_moco-c7c2cceb.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_oli_tirs_toa_moco-c7c2cceb.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -139,7 +139,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_TIRS_TOA_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_oli_tirs_toa_simclr-ad43e9a4.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_oli_tirs_toa_simclr-ad43e9a4.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -152,7 +152,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_SR_MOCO = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_oli_sr_moco-c9b8898d.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_oli_sr_moco-c9b8898d.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -165,7 +165,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) LANDSAT_OLI_SR_SIMCLR = Weights( - url="https://huggingface.co/torchgeo/ssl4eo_landsat/resolve/main/vits16_landsat_oli_sr_simclr-4e8f6102.pth", # noqa: E501 + url="https://hf.co/torchgeo/ssl4eo_landsat/resolve/1c88bb51b6e17a21dde5230738fa38b74bd74f76/vits16_landsat_oli_sr_simclr-4e8f6102.pth", # noqa: E501 transforms=_ssl4eo_l_transforms, meta={ "dataset": "SSL4EO-L", @@ -178,7 +178,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_ALL_DINO = Weights( - url="https://huggingface.co/torchgeo/vit_small_patch16_224_sentinel2_all_dino/resolve/main/vit_small_patch16_224_sentinel2_all_dino-36bcc127.pth", # noqa: E501 + url="https://hf.co/torchgeo/vit_small_patch16_224_sentinel2_all_dino/resolve/5b41dd418a79de47ac9f5be3e035405a83818a62/vit_small_patch16_224_sentinel2_all_dino-36bcc127.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12", @@ -191,7 +191,7 @@ class ViTSmall16_Weights(WeightsEnum): # type: ignore[misc] ) SENTINEL2_ALL_MOCO = Weights( - url="https://huggingface.co/torchgeo/vit_small_patch16_224_sentinel2_all_moco/resolve/main/vit_small_patch16_224_sentinel2_all_moco-67c9032d.pth", # noqa: E501 + url="https://hf.co/torchgeo/vit_small_patch16_224_sentinel2_all_moco/resolve/1cb683f6c14739634cdfaaceb076529adf898c74/vit_small_patch16_224_sentinel2_all_moco-67c9032d.pth", # noqa: E501 transforms=_zhu_xlab_transforms, meta={ "dataset": "SSL4EO-S12",