"git@developer.sourcefind.cn:norm/vllm.git" did not exist on "a4211a4dc3a83d9e58eb7ee2f015aa033159c267"
Unverified Commit 9a9ae1ef authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

fix caltech dataset downloads (#5789)

parent 461b034c
...@@ -129,13 +129,15 @@ class Caltech101(VisionDataset): ...@@ -129,13 +129,15 @@ class Caltech101(VisionDataset):
return return
download_and_extract_archive( download_and_extract_archive(
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/101_ObjectCategories.tar.gz", "https://drive.google.com/file/d/137RyRjvTBkBiIfeYBNZBtViDHQ6_Ewsp",
self.root, self.root,
filename="101_ObjectCategories.tar.gz",
md5="b224c7392d521a49829488ab0f1120d9", md5="b224c7392d521a49829488ab0f1120d9",
) )
download_and_extract_archive( download_and_extract_archive(
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/Annotations.tar", "https://drive.google.com/file/d/175kQy3UsZ0wUEHZjqkUDdNVssr7bgh_m",
self.root, self.root,
filename="Annotations.tar",
md5="6f83eeb1f24d99cab4eb377263132c91", md5="6f83eeb1f24d99cab4eb377263132c91",
) )
...@@ -228,7 +230,7 @@ class Caltech256(VisionDataset): ...@@ -228,7 +230,7 @@ class Caltech256(VisionDataset):
return return
download_and_extract_archive( download_and_extract_archive(
"http://www.vision.caltech.edu/Image_Datasets/Caltech256/256_ObjectCategories.tar", "https://drive.google.com/file/d/1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK",
self.root, self.root,
filename="256_ObjectCategories.tar", filename="256_ObjectCategories.tar",
md5="67b4f42ca05d46448c6bb8ecd2220f6d", md5="67b4f42ca05d46448c6bb8ecd2220f6d",
......
...@@ -9,7 +9,7 @@ from torchdata.datapipes.iter import ( ...@@ -9,7 +9,7 @@ from torchdata.datapipes.iter import (
Filter, Filter,
IterKeyZipper, IterKeyZipper,
) )
from torchvision.prototype.datasets.utils import Dataset, HttpResource, OnlineResource from torchvision.prototype.datasets.utils import Dataset, GDriveResource, OnlineResource
from torchvision.prototype.datasets.utils._internal import ( from torchvision.prototype.datasets.utils._internal import (
INFINITE_BUFFER_SIZE, INFINITE_BUFFER_SIZE,
read_mat, read_mat,
...@@ -49,13 +49,15 @@ class Caltech101(Dataset): ...@@ -49,13 +49,15 @@ class Caltech101(Dataset):
) )
def _resources(self) -> List[OnlineResource]: def _resources(self) -> List[OnlineResource]:
images = HttpResource( images = GDriveResource(
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/101_ObjectCategories.tar.gz", "137RyRjvTBkBiIfeYBNZBtViDHQ6_Ewsp",
file_name="101_ObjectCategories.tar.gz",
sha256="af6ece2f339791ca20f855943d8b55dd60892c0a25105fcd631ee3d6430f9926", sha256="af6ece2f339791ca20f855943d8b55dd60892c0a25105fcd631ee3d6430f9926",
preprocess="decompress", preprocess="decompress",
) )
anns = HttpResource( anns = GDriveResource(
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/Annotations.tar", "175kQy3UsZ0wUEHZjqkUDdNVssr7bgh_m",
file_name="Annotations.tar",
sha256="1717f4e10aa837b05956e3f4c94456527b143eec0d95e935028b30aff40663d8", sha256="1717f4e10aa837b05956e3f4c94456527b143eec0d95e935028b30aff40663d8",
) )
return [images, anns] return [images, anns]
...@@ -171,8 +173,9 @@ class Caltech256(Dataset): ...@@ -171,8 +173,9 @@ class Caltech256(Dataset):
def _resources(self) -> List[OnlineResource]: def _resources(self) -> List[OnlineResource]:
return [ return [
HttpResource( GDriveResource(
"http://www.vision.caltech.edu/Image_Datasets/Caltech256/256_ObjectCategories.tar", "1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK",
file_name="256_ObjectCategories.tar",
sha256="08ff01b03c65566014ae88eb0490dbe4419fc7ac4de726ee1163e39fd809543e", sha256="08ff01b03c65566014ae88eb0490dbe4419fc7ac4de726ee1163e39fd809543e",
) )
] ]
......
...@@ -13,11 +13,7 @@ from torchdata.datapipes.iter import ( ...@@ -13,11 +13,7 @@ from torchdata.datapipes.iter import (
CSVParser, CSVParser,
CSVDictParser, CSVDictParser,
) )
from torchvision.prototype.datasets.utils import ( from torchvision.prototype.datasets.utils import Dataset, GDriveResource, OnlineResource
Dataset,
HttpResource,
OnlineResource,
)
from torchvision.prototype.datasets.utils._internal import ( from torchvision.prototype.datasets.utils._internal import (
INFINITE_BUFFER_SIZE, INFINITE_BUFFER_SIZE,
read_mat, read_mat,
...@@ -71,30 +67,35 @@ class CUB200(Dataset): ...@@ -71,30 +67,35 @@ class CUB200(Dataset):
def _resources(self) -> List[OnlineResource]: def _resources(self) -> List[OnlineResource]:
if self._year == "2011": if self._year == "2011":
archive = HttpResource( archive = GDriveResource(
"http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/CUB_200_2011.tgz", "1hbzc_P1FuxMkcabkgn9ZKinBwW683j45",
file_name="CUB_200_2011.tgz",
sha256="0c685df5597a8b24909f6a7c9db6d11e008733779a671760afef78feb49bf081", sha256="0c685df5597a8b24909f6a7c9db6d11e008733779a671760afef78feb49bf081",
preprocess="decompress", preprocess="decompress",
) )
segmentations = HttpResource( segmentations = GDriveResource(
"http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/segmentations.tgz", "1EamOKGLoTuZdtcVYbHMWNpkn3iAVj8TP",
file_name="segmentations.tgz",
sha256="dc77f6cffea0cbe2e41d4201115c8f29a6320ecb04fffd2444f51b8066e4b84f", sha256="dc77f6cffea0cbe2e41d4201115c8f29a6320ecb04fffd2444f51b8066e4b84f",
preprocess="decompress", preprocess="decompress",
) )
return [archive, segmentations] return [archive, segmentations]
else: # self._year == "2010" else: # self._year == "2010"
split = HttpResource( split = GDriveResource(
"http://www.vision.caltech.edu/visipedia-data/CUB-200/lists.tgz", "1vZuZPqha0JjmwkdaS_XtYryE3Jf5Q1AC",
file_name="lists.tgz",
sha256="aeacbd5e3539ae84ea726e8a266a9a119c18f055cd80f3836d5eb4500b005428", sha256="aeacbd5e3539ae84ea726e8a266a9a119c18f055cd80f3836d5eb4500b005428",
preprocess="decompress", preprocess="decompress",
) )
images = HttpResource( images = GDriveResource(
"http://www.vision.caltech.edu/visipedia-data/CUB-200/images.tgz", "1GDr1OkoXdhaXWGA8S3MAq3a522Tak-nx",
file_name="images.tgz",
sha256="2a6d2246bbb9778ca03aa94e2e683ccb4f8821a36b7f235c0822e659d60a803e", sha256="2a6d2246bbb9778ca03aa94e2e683ccb4f8821a36b7f235c0822e659d60a803e",
preprocess="decompress", preprocess="decompress",
) )
anns = HttpResource( anns = GDriveResource(
"http://www.vision.caltech.edu/visipedia-data/CUB-200/annotations.tgz", "16NsbTpMs5L6hT4hUJAmpW2u7wH326WTR",
file_name="annotations.tgz",
sha256="c17b7841c21a66aa44ba8fe92369cc95dfc998946081828b1d7b8a4b716805c1", sha256="c17b7841c21a66aa44ba8fe92369cc95dfc998946081828b1d7b8a4b716805c1",
preprocess="decompress", preprocess="decompress",
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment