@@ -14,8 +14,8 @@ class StanfordCars(VisionDataset):
14
14
split into 8,144 training images and 8,041 testing images, where each class
15
15
has been split roughly in a 50-50 split
16
16
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 .
19
19
20
20
.. note::
21
21
@@ -29,13 +29,7 @@ class StanfordCars(VisionDataset):
29
29
target_transform (callable, optional): A function/transform that takes in the
30
30
target and transforms it.
31
31
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.
39
33
loader (callable, optional): A function to load an image given its path.
40
34
By default, it uses PIL as its image loader, but users could also pass in
41
35
``torchvision.io.decode_image`` for decoding image data into tensors directly.
@@ -73,10 +67,7 @@ def __init__(
73
67
self .download ()
74
68
75
69
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." )
80
71
81
72
self ._samples = [
82
73
(
@@ -111,9 +102,4 @@ def _check_exists(self) -> bool:
111
102
return self ._annotations_mat_path .exists () and self ._images_base_path .is_dir ()
112
103
113
104
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