Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
9a9ae1ef
"git@developer.sourcefind.cn:norm/vllm.git" did not exist on "a4211a4dc3a83d9e58eb7ee2f015aa033159c267"
Unverified
Commit
9a9ae1ef
authored
Apr 11, 2022
by
Philip Meier
Committed by
GitHub
Apr 11, 2022
Browse files
fix caltech dataset downloads (#5789)
parent
461b034c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
25 deletions
+31
-25
torchvision/datasets/caltech.py
torchvision/datasets/caltech.py
+5
-3
torchvision/prototype/datasets/_builtin/caltech.py
torchvision/prototype/datasets/_builtin/caltech.py
+10
-7
torchvision/prototype/datasets/_builtin/cub200.py
torchvision/prototype/datasets/_builtin/cub200.py
+16
-15
No files found.
torchvision/datasets/caltech.py
View file @
9a9ae1ef
...
@@ -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
"
,
"http
s
://
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
"
,
"http
s
://
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
"
,
"http
s
://
drive.google.com/file/d/1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK
"
,
self
.
root
,
self
.
root
,
filename
=
"256_ObjectCategories.tar"
,
filename
=
"256_ObjectCategories.tar"
,
md5
=
"67b4f42ca05d46448c6bb8ecd2220f6d"
,
md5
=
"67b4f42ca05d46448c6bb8ecd2220f6d"
,
...
...
torchvision/prototype/datasets/_builtin/caltech.py
View file @
9a9ae1ef
...
@@ -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
,
Http
Resource
,
OnlineResource
from
torchvision.prototype.datasets.utils
import
Dataset
,
GDrive
Resource
,
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"
,
)
)
]
]
...
...
torchvision/prototype/datasets/_builtin/cub200.py
View file @
9a9ae1ef
...
@@ -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"
,
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment