From f1fe19fcd3aa17780896c730f4a851f1075b2da4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 30 Jul 2024 18:49:09 +0200 Subject: [PATCH 1/2] EuroSAT: fix SSL certificate issues --- torchvision/datasets/eurosat.py | 5 ++++- torchvision/prototype/datasets/_builtin/eurosat.py | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/torchvision/datasets/eurosat.py b/torchvision/datasets/eurosat.py index 3f490b11902..c6571d2abab 100644 --- a/torchvision/datasets/eurosat.py +++ b/torchvision/datasets/eurosat.py @@ -9,6 +9,9 @@ class EuroSAT(ImageFolder): """RGB version of the `EuroSAT `_ Dataset. + For the MS version of the dataset, see + `TorchGeo `__. + Args: root (str or ``pathlib.Path``): Root directory of dataset where ``root/eurosat`` exists. transform (callable, optional): A function/transform that takes in a PIL image @@ -53,7 +56,7 @@ def download(self) -> None: os.makedirs(self._base_folder, exist_ok=True) download_and_extract_archive( - "https://madm.dfki.de/files/sentinel/EuroSAT.zip", + "https://huggingface.co/datasets/torchgeo/eurosat/resolve/c877bcd43f099cd0196738f714544e355477f3fd/EuroSAT.zip", download_root=self._base_folder, md5="c8fa014336c82ac7804f0398fcb19387", ) diff --git a/torchvision/prototype/datasets/_builtin/eurosat.py b/torchvision/prototype/datasets/_builtin/eurosat.py index 747f0320e86..b08ae622b23 100644 --- a/torchvision/prototype/datasets/_builtin/eurosat.py +++ b/torchvision/prototype/datasets/_builtin/eurosat.py @@ -31,8 +31,11 @@ def _info() -> Dict[str, Any]: @register_dataset(NAME) class EuroSAT(Dataset): - """EuroSAT Dataset. + """RGB version of the EuroSAT Dataset. homepage="https://github.com/phelber/eurosat", + + For the MS version of the dataset, see + `TorchGeo `__. """ def __init__(self, root: Union[str, pathlib.Path], *, skip_integrity_check: bool = False) -> None: @@ -42,7 +45,7 @@ def __init__(self, root: Union[str, pathlib.Path], *, skip_integrity_check: bool def _resources(self) -> List[OnlineResource]: return [ HttpResource( - "https://madm.dfki.de/files/sentinel/EuroSAT.zip", + "https://huggingface.co/datasets/torchgeo/eurosat/resolve/c877bcd43f099cd0196738f714544e355477f3fd/EuroSAT.zip", sha256="8ebea626349354c5328b142b96d0430e647051f26efc2dc974c843f25ecf70bd", ) ] From a8c8a3c501c5a57ce5501c6be1d30afe0806cc35 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 6 Aug 2024 13:18:45 +0100 Subject: [PATCH 2/2] Remove changes to prototype --- torchvision/prototype/datasets/_builtin/eurosat.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/torchvision/prototype/datasets/_builtin/eurosat.py b/torchvision/prototype/datasets/_builtin/eurosat.py index b08ae622b23..747f0320e86 100644 --- a/torchvision/prototype/datasets/_builtin/eurosat.py +++ b/torchvision/prototype/datasets/_builtin/eurosat.py @@ -31,11 +31,8 @@ def _info() -> Dict[str, Any]: @register_dataset(NAME) class EuroSAT(Dataset): - """RGB version of the EuroSAT Dataset. + """EuroSAT Dataset. homepage="https://github.com/phelber/eurosat", - - For the MS version of the dataset, see - `TorchGeo `__. """ def __init__(self, root: Union[str, pathlib.Path], *, skip_integrity_check: bool = False) -> None: @@ -45,7 +42,7 @@ def __init__(self, root: Union[str, pathlib.Path], *, skip_integrity_check: bool def _resources(self) -> List[OnlineResource]: return [ HttpResource( - "https://huggingface.co/datasets/torchgeo/eurosat/resolve/c877bcd43f099cd0196738f714544e355477f3fd/EuroSAT.zip", + "https://madm.dfki.de/files/sentinel/EuroSAT.zip", sha256="8ebea626349354c5328b142b96d0430e647051f26efc2dc974c843f25ecf70bd", ) ]