Skip to content

Commit 95f10a4

Browse files
authored
Remove stanford cars download instructions (#9012)
1 parent ef4718a commit 95f10a4

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

torchvision/datasets/stanford_cars.py

+5-19
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class StanfordCars(VisionDataset):
1414
split into 8,144 training images and 8,041 testing images, where each class
1515
has been split roughly in a 50-50 split
1616
17-
The original URL is https://ai.stanford.edu/~jkrause/cars/car_dataset.html, but it is broken.
18-
Follow the instructions in ``download`` argument to obtain and use the dataset offline.
17+
The original URL is https://ai.stanford.edu/~jkrause/cars/car_dataset.html,
18+
the dataset isn't available online anymore.
1919
2020
.. note::
2121
@@ -29,13 +29,7 @@ class StanfordCars(VisionDataset):
2929
target_transform (callable, optional): A function/transform that takes in the
3030
target and transforms it.
3131
download (bool, optional): This parameter exists for backward compatibility but it does not
32-
download the dataset, since the original URL is not available anymore. The dataset
33-
seems to be available on Kaggle so you can try to manually download and configure it using
34-
`these instructions <https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616>`_,
35-
or use an integrated
36-
`dataset on Kaggle <https://github.com/pytorch/vision/issues/7545#issuecomment-2282674373>`_.
37-
In both cases, first download and configure the dataset locally, and use the dataset with
38-
``"download=False"``.
32+
download the dataset, since the original URL is not available anymore.
3933
loader (callable, optional): A function to load an image given its path.
4034
By default, it uses PIL as its image loader, but users could also pass in
4135
``torchvision.io.decode_image`` for decoding image data into tensors directly.
@@ -73,10 +67,7 @@ def __init__(
7367
self.download()
7468

7569
if not self._check_exists():
76-
raise RuntimeError(
77-
"Dataset not found. Try to manually download following the instructions in "
78-
"https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616."
79-
)
70+
raise RuntimeError("Dataset not found.")
8071

8172
self._samples = [
8273
(
@@ -111,9 +102,4 @@ def _check_exists(self) -> bool:
111102
return self._annotations_mat_path.exists() and self._images_base_path.is_dir()
112103

113104
def download(self):
114-
raise ValueError(
115-
"The original URL is broken so the StanfordCars dataset is not available for automatic "
116-
"download anymore. You can try to download it manually following "
117-
"https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616, "
118-
"and set download=False to avoid this error."
119-
)
105+
raise ValueError("The original URL is broken so the StanfordCars dataset cannot be downloaded anymore.")

0 commit comments

Comments
 (0)