Datasets:
Upload folder using huggingface_hub
Browse files- README.md +264 -0
- data/contrast.zip +3 -0
- data/gaussian_noise.zip +3 -0
- data/impulse_noise.zip +3 -0
- data/jpeg_compression.zip +3 -0
- data/motion_blur.zip +3 -0
- data/pixelate.zip +3 -0
- data/spatter.zip +3 -0
- data/test.zip +3 -0
- data/train.zip +3 -0
- stanford_cars.py +249 -0
README.md
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
dataset_info:
|
3 |
+
features:
|
4 |
+
- name: image
|
5 |
+
dtype: image
|
6 |
+
- name: label
|
7 |
+
dtype:
|
8 |
+
class_label:
|
9 |
+
names:
|
10 |
+
'0': AM General Hummer SUV 2000
|
11 |
+
'1': Acura RL Sedan 2012
|
12 |
+
'2': Acura TL Sedan 2012
|
13 |
+
'3': Acura TL Type-S 2008
|
14 |
+
'4': Acura TSX Sedan 2012
|
15 |
+
'5': Acura Integra Type R 2001
|
16 |
+
'6': Acura ZDX Hatchback 2012
|
17 |
+
'7': Aston Martin V8 Vantage Convertible 2012
|
18 |
+
'8': Aston Martin V8 Vantage Coupe 2012
|
19 |
+
'9': Aston Martin Virage Convertible 2012
|
20 |
+
'10': Aston Martin Virage Coupe 2012
|
21 |
+
'11': Audi RS 4 Convertible 2008
|
22 |
+
'12': Audi A5 Coupe 2012
|
23 |
+
'13': Audi TTS Coupe 2012
|
24 |
+
'14': Audi R8 Coupe 2012
|
25 |
+
'15': Audi V8 Sedan 1994
|
26 |
+
'16': Audi 100 Sedan 1994
|
27 |
+
'17': Audi 100 Wagon 1994
|
28 |
+
'18': Audi TT Hatchback 2011
|
29 |
+
'19': Audi S6 Sedan 2011
|
30 |
+
'20': Audi S5 Convertible 2012
|
31 |
+
'21': Audi S5 Coupe 2012
|
32 |
+
'22': Audi S4 Sedan 2012
|
33 |
+
'23': Audi S4 Sedan 2007
|
34 |
+
'24': Audi TT RS Coupe 2012
|
35 |
+
'25': BMW ActiveHybrid 5 Sedan 2012
|
36 |
+
'26': BMW 1 Series Convertible 2012
|
37 |
+
'27': BMW 1 Series Coupe 2012
|
38 |
+
'28': BMW 3 Series Sedan 2012
|
39 |
+
'29': BMW 3 Series Wagon 2012
|
40 |
+
'30': BMW 6 Series Convertible 2007
|
41 |
+
'31': BMW X5 SUV 2007
|
42 |
+
'32': BMW X6 SUV 2012
|
43 |
+
'33': BMW M3 Coupe 2012
|
44 |
+
'34': BMW M5 Sedan 2010
|
45 |
+
'35': BMW M6 Convertible 2010
|
46 |
+
'36': BMW X3 SUV 2012
|
47 |
+
'37': BMW Z4 Convertible 2012
|
48 |
+
'38': Bentley Continental Supersports Conv. Convertible 2012
|
49 |
+
'39': Bentley Arnage Sedan 2009
|
50 |
+
'40': Bentley Mulsanne Sedan 2011
|
51 |
+
'41': Bentley Continental GT Coupe 2012
|
52 |
+
'42': Bentley Continental GT Coupe 2007
|
53 |
+
'43': Bentley Continental Flying Spur Sedan 2007
|
54 |
+
'44': Bugatti Veyron 16.4 Convertible 2009
|
55 |
+
'45': Bugatti Veyron 16.4 Coupe 2009
|
56 |
+
'46': Buick Regal GS 2012
|
57 |
+
'47': Buick Rainier SUV 2007
|
58 |
+
'48': Buick Verano Sedan 2012
|
59 |
+
'49': Buick Enclave SUV 2012
|
60 |
+
'50': Cadillac CTS-V Sedan 2012
|
61 |
+
'51': Cadillac SRX SUV 2012
|
62 |
+
'52': Cadillac Escalade EXT Crew Cab 2007
|
63 |
+
'53': Chevrolet Silverado 1500 Hybrid Crew Cab 2012
|
64 |
+
'54': Chevrolet Corvette Convertible 2012
|
65 |
+
'55': Chevrolet Corvette ZR1 2012
|
66 |
+
'56': Chevrolet Corvette Ron Fellows Edition Z06 2007
|
67 |
+
'57': Chevrolet Traverse SUV 2012
|
68 |
+
'58': Chevrolet Camaro Convertible 2012
|
69 |
+
'59': Chevrolet HHR SS 2010
|
70 |
+
'60': Chevrolet Impala Sedan 2007
|
71 |
+
'61': Chevrolet Tahoe Hybrid SUV 2012
|
72 |
+
'62': Chevrolet Sonic Sedan 2012
|
73 |
+
'63': Chevrolet Express Cargo Van 2007
|
74 |
+
'64': Chevrolet Avalanche Crew Cab 2012
|
75 |
+
'65': Chevrolet Cobalt SS 2010
|
76 |
+
'66': Chevrolet Malibu Hybrid Sedan 2010
|
77 |
+
'67': Chevrolet TrailBlazer SS 2009
|
78 |
+
'68': Chevrolet Silverado 2500HD Regular Cab 2012
|
79 |
+
'69': Chevrolet Silverado 1500 Classic Extended Cab 2007
|
80 |
+
'70': Chevrolet Express Van 2007
|
81 |
+
'71': Chevrolet Monte Carlo Coupe 2007
|
82 |
+
'72': Chevrolet Malibu Sedan 2007
|
83 |
+
'73': Chevrolet Silverado 1500 Extended Cab 2012
|
84 |
+
'74': Chevrolet Silverado 1500 Regular Cab 2012
|
85 |
+
'75': Chrysler Aspen SUV 2009
|
86 |
+
'76': Chrysler Sebring Convertible 2010
|
87 |
+
'77': Chrysler Town and Country Minivan 2012
|
88 |
+
'78': Chrysler 300 SRT-8 2010
|
89 |
+
'79': Chrysler Crossfire Convertible 2008
|
90 |
+
'80': Chrysler PT Cruiser Convertible 2008
|
91 |
+
'81': Daewoo Nubira Wagon 2002
|
92 |
+
'82': Dodge Caliber Wagon 2012
|
93 |
+
'83': Dodge Caliber Wagon 2007
|
94 |
+
'84': Dodge Caravan Minivan 1997
|
95 |
+
'85': Dodge Ram Pickup 3500 Crew Cab 2010
|
96 |
+
'86': Dodge Ram Pickup 3500 Quad Cab 2009
|
97 |
+
'87': Dodge Sprinter Cargo Van 2009
|
98 |
+
'88': Dodge Journey SUV 2012
|
99 |
+
'89': Dodge Dakota Crew Cab 2010
|
100 |
+
'90': Dodge Dakota Club Cab 2007
|
101 |
+
'91': Dodge Magnum Wagon 2008
|
102 |
+
'92': Dodge Challenger SRT8 2011
|
103 |
+
'93': Dodge Durango SUV 2012
|
104 |
+
'94': Dodge Durango SUV 2007
|
105 |
+
'95': Dodge Charger Sedan 2012
|
106 |
+
'96': Dodge Charger SRT-8 2009
|
107 |
+
'97': Eagle Talon Hatchback 1998
|
108 |
+
'98': FIAT 500 Abarth 2012
|
109 |
+
'99': FIAT 500 Convertible 2012
|
110 |
+
'100': Ferrari FF Coupe 2012
|
111 |
+
'101': Ferrari California Convertible 2012
|
112 |
+
'102': Ferrari 458 Italia Convertible 2012
|
113 |
+
'103': Ferrari 458 Italia Coupe 2012
|
114 |
+
'104': Fisker Karma Sedan 2012
|
115 |
+
'105': Ford F-450 Super Duty Crew Cab 2012
|
116 |
+
'106': Ford Mustang Convertible 2007
|
117 |
+
'107': Ford Freestar Minivan 2007
|
118 |
+
'108': Ford Expedition EL SUV 2009
|
119 |
+
'109': Ford Edge SUV 2012
|
120 |
+
'110': Ford Ranger SuperCab 2011
|
121 |
+
'111': Ford GT Coupe 2006
|
122 |
+
'112': Ford F-150 Regular Cab 2012
|
123 |
+
'113': Ford F-150 Regular Cab 2007
|
124 |
+
'114': Ford Focus Sedan 2007
|
125 |
+
'115': Ford E-Series Wagon Van 2012
|
126 |
+
'116': Ford Fiesta Sedan 2012
|
127 |
+
'117': GMC Terrain SUV 2012
|
128 |
+
'118': GMC Savana Van 2012
|
129 |
+
'119': GMC Yukon Hybrid SUV 2012
|
130 |
+
'120': GMC Acadia SUV 2012
|
131 |
+
'121': GMC Canyon Extended Cab 2012
|
132 |
+
'122': Geo Metro Convertible 1993
|
133 |
+
'123': HUMMER H3T Crew Cab 2010
|
134 |
+
'124': HUMMER H2 SUT Crew Cab 2009
|
135 |
+
'125': Honda Odyssey Minivan 2012
|
136 |
+
'126': Honda Odyssey Minivan 2007
|
137 |
+
'127': Honda Accord Coupe 2012
|
138 |
+
'128': Honda Accord Sedan 2012
|
139 |
+
'129': Hyundai Veloster Hatchback 2012
|
140 |
+
'130': Hyundai Santa Fe SUV 2012
|
141 |
+
'131': Hyundai Tucson SUV 2012
|
142 |
+
'132': Hyundai Veracruz SUV 2012
|
143 |
+
'133': Hyundai Sonata Hybrid Sedan 2012
|
144 |
+
'134': Hyundai Elantra Sedan 2007
|
145 |
+
'135': Hyundai Accent Sedan 2012
|
146 |
+
'136': Hyundai Genesis Sedan 2012
|
147 |
+
'137': Hyundai Sonata Sedan 2012
|
148 |
+
'138': Hyundai Elantra Touring Hatchback 2012
|
149 |
+
'139': Hyundai Azera Sedan 2012
|
150 |
+
'140': Infiniti G Coupe IPL 2012
|
151 |
+
'141': Infiniti QX56 SUV 2011
|
152 |
+
'142': Isuzu Ascender SUV 2008
|
153 |
+
'143': Jaguar XK XKR 2012
|
154 |
+
'144': Jeep Patriot SUV 2012
|
155 |
+
'145': Jeep Wrangler SUV 2012
|
156 |
+
'146': Jeep Liberty SUV 2012
|
157 |
+
'147': Jeep Grand Cherokee SUV 2012
|
158 |
+
'148': Jeep Compass SUV 2012
|
159 |
+
'149': Lamborghini Reventon Coupe 2008
|
160 |
+
'150': Lamborghini Aventador Coupe 2012
|
161 |
+
'151': Lamborghini Gallardo LP 570-4 Superleggera 2012
|
162 |
+
'152': Lamborghini Diablo Coupe 2001
|
163 |
+
'153': Land Rover Range Rover SUV 2012
|
164 |
+
'154': Land Rover LR2 SUV 2012
|
165 |
+
'155': Lincoln Town Car Sedan 2011
|
166 |
+
'156': MINI Cooper Roadster Convertible 2012
|
167 |
+
'157': Maybach Landaulet Convertible 2012
|
168 |
+
'158': Mazda Tribute SUV 2011
|
169 |
+
'159': McLaren MP4-12C Coupe 2012
|
170 |
+
'160': Mercedes-Benz 300-Class Convertible 1993
|
171 |
+
'161': Mercedes-Benz C-Class Sedan 2012
|
172 |
+
'162': Mercedes-Benz SL-Class Coupe 2009
|
173 |
+
'163': Mercedes-Benz E-Class Sedan 2012
|
174 |
+
'164': Mercedes-Benz S-Class Sedan 2012
|
175 |
+
'165': Mercedes-Benz Sprinter Van 2012
|
176 |
+
'166': Mitsubishi Lancer Sedan 2012
|
177 |
+
'167': Nissan Leaf Hatchback 2012
|
178 |
+
'168': Nissan NV Passenger Van 2012
|
179 |
+
'169': Nissan Juke Hatchback 2012
|
180 |
+
'170': Nissan 240SX Coupe 1998
|
181 |
+
'171': Plymouth Neon Coupe 1999
|
182 |
+
'172': Porsche Panamera Sedan 2012
|
183 |
+
'173': Ram C/V Cargo Van Minivan 2012
|
184 |
+
'174': Rolls-Royce Phantom Drophead Coupe Convertible 2012
|
185 |
+
'175': Rolls-Royce Ghost Sedan 2012
|
186 |
+
'176': Rolls-Royce Phantom Sedan 2012
|
187 |
+
'177': Scion xD Hatchback 2012
|
188 |
+
'178': Spyker C8 Convertible 2009
|
189 |
+
'179': Spyker C8 Coupe 2009
|
190 |
+
'180': Suzuki Aerio Sedan 2007
|
191 |
+
'181': Suzuki Kizashi Sedan 2012
|
192 |
+
'182': Suzuki SX4 Hatchback 2012
|
193 |
+
'183': Suzuki SX4 Sedan 2012
|
194 |
+
'184': Tesla Model S Sedan 2012
|
195 |
+
'185': Toyota Sequoia SUV 2012
|
196 |
+
'186': Toyota Camry Sedan 2012
|
197 |
+
'187': Toyota Corolla Sedan 2012
|
198 |
+
'188': Toyota 4Runner SUV 2012
|
199 |
+
'189': Volkswagen Golf Hatchback 2012
|
200 |
+
'190': Volkswagen Golf Hatchback 1991
|
201 |
+
'191': Volkswagen Beetle Hatchback 2012
|
202 |
+
'192': Volvo C30 Hatchback 2012
|
203 |
+
'193': Volvo 240 Sedan 1993
|
204 |
+
'194': Volvo XC90 SUV 2007
|
205 |
+
'195': smart fortwo Convertible 2012
|
206 |
+
splits:
|
207 |
+
- name: train
|
208 |
+
num_bytes: 998210
|
209 |
+
num_examples: 8144
|
210 |
+
- name: test
|
211 |
+
num_bytes: 969502
|
212 |
+
num_examples: 8041
|
213 |
+
- name: contrast
|
214 |
+
num_bytes: 1033830
|
215 |
+
num_examples: 8041
|
216 |
+
- name: gaussian_noise
|
217 |
+
num_bytes: 1130322
|
218 |
+
num_examples: 8041
|
219 |
+
- name: impulse_noise
|
220 |
+
num_bytes: 1114240
|
221 |
+
num_examples: 8041
|
222 |
+
- name: jpeg_compression
|
223 |
+
num_bytes: 1162486
|
224 |
+
num_examples: 8041
|
225 |
+
- name: motion_blur
|
226 |
+
num_bytes: 1082076
|
227 |
+
num_examples: 8041
|
228 |
+
- name: pixelate
|
229 |
+
num_bytes: 1033830
|
230 |
+
num_examples: 8041
|
231 |
+
- name: spatter
|
232 |
+
num_bytes: 1017748
|
233 |
+
num_examples: 8041
|
234 |
+
download_size: 5970247373
|
235 |
+
dataset_size: 9542244
|
236 |
+
---
|
237 |
+
|
238 |
+
# Stanford Cars Dataset
|
239 |
+
|
240 |
+
## Dataset Overview
|
241 |
+
|
242 |
+
- **Splits**:
|
243 |
+
- **Training**: 8144 images used for model training.
|
244 |
+
- **Test**: 8041 images used for evaluation.
|
245 |
+
- **Contrast**: 8041 images with high contrast for robustness testing.
|
246 |
+
- **Gaussian Noise**: 8041 images corrupted by Gaussian noise for robustness testing.
|
247 |
+
- **Impulse Noise**: 8041 images corrupted by impulse noise for robustness testing.
|
248 |
+
- **JPEG Compression**: 8041 compressed images for robustness testing.
|
249 |
+
- **Motion Blur**: 8041 images with motion blur for robustness testing.
|
250 |
+
- **Pixelate**: 8041 pixelated images for robustness testing.
|
251 |
+
- **Spatter**: 8041 images corrupted by spatter for robustness testing.
|
252 |
+
|
253 |
+
|
254 |
+
## Usage Examples
|
255 |
+
|
256 |
+
```python
|
257 |
+
from datasets import load_dataset
|
258 |
+
|
259 |
+
# Load the dataset in a tabular format with image URLs and metadata
|
260 |
+
dataset = load_dataset("tanganke/stanford_cars")
|
261 |
+
|
262 |
+
# Access the training set directly
|
263 |
+
train_set = dataset["train"]
|
264 |
+
```
|
data/contrast.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9026fba8ed35e94c9625de95d38d83020c0adb9aca71b9a56c078c1b87dcc8d5
|
3 |
+
size 340607167
|
data/gaussian_noise.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7774a17ac88fe049373d00a40cb21d5cef6c0cf0b16625f413d9e0f5e6766429
|
3 |
+
size 919100022
|
data/impulse_noise.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ed5e80478e44fa8b5ca6016ca8a3155a2507127929c6fa06ffc2e71bd104cc62
|
3 |
+
size 1049045920
|
data/jpeg_compression.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6e01430d1e0cce12bbcf323f889ff968af663aeb0062a4b91b92580ed7d0462
|
3 |
+
size 460660291
|
data/motion_blur.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea78e6216df6a70fcc8cb5f546c0140ba5dfd4a506b981c62da3ac0173463090
|
3 |
+
size 430540860
|
data/pixelate.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa45a88b91e5f67606f0624b4b11f251c1f7e5618bf32b06b0716af1d9ce1cad
|
3 |
+
size 7810061
|
data/spatter.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f4c97978d1fab550be204866d4f7595e3fd278e615f9a74171d0c5a88ebbdb08
|
3 |
+
size 804540937
|
data/test.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:56f3ecdfda5110029362e6f0a6a370e46643df020f0bc305ab8592b4c98bc9fb
|
3 |
+
size 977997280
|
data/train.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ef52f6bb750d31df9205b49d3a36570c8f723ad3d605e30941d0eb937ddcfab
|
3 |
+
size 979944835
|
stanford_cars.py
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
from datasets.data_files import DataFilesDict
|
3 |
+
from datasets.packaged_modules.imagefolder.imagefolder import ImageFolder, ImageFolderConfig
|
4 |
+
|
5 |
+
logger = datasets.logging.get_logger(__name__)
|
6 |
+
|
7 |
+
|
8 |
+
class StanfordCars(ImageFolder):
|
9 |
+
R"""
|
10 |
+
StanfordCars dataset for image classification.
|
11 |
+
"""
|
12 |
+
|
13 |
+
BUILDER_CONFIG_CLASS = ImageFolderConfig
|
14 |
+
BUILDER_CONFIGS = [
|
15 |
+
ImageFolderConfig(
|
16 |
+
name="default",
|
17 |
+
features=("images", "labels"),
|
18 |
+
data_files=DataFilesDict(
|
19 |
+
{
|
20 |
+
split: f"data/{split}.zip"
|
21 |
+
for split in ["train", "test"]
|
22 |
+
+ ["contrast", "gaussian_noise", "impulse_noise", "jpeg_compression", "motion_blur", "pixelate", "spatter"]
|
23 |
+
}
|
24 |
+
),
|
25 |
+
)
|
26 |
+
]
|
27 |
+
|
28 |
+
classnames = [
|
29 |
+
"AM General Hummer SUV 2000",
|
30 |
+
"Acura RL Sedan 2012",
|
31 |
+
"Acura TL Sedan 2012",
|
32 |
+
"Acura TL Type-S 2008",
|
33 |
+
"Acura TSX Sedan 2012",
|
34 |
+
"Acura Integra Type R 2001",
|
35 |
+
"Acura ZDX Hatchback 2012",
|
36 |
+
"Aston Martin V8 Vantage Convertible 2012",
|
37 |
+
"Aston Martin V8 Vantage Coupe 2012",
|
38 |
+
"Aston Martin Virage Convertible 2012",
|
39 |
+
"Aston Martin Virage Coupe 2012",
|
40 |
+
"Audi RS 4 Convertible 2008",
|
41 |
+
"Audi A5 Coupe 2012",
|
42 |
+
"Audi TTS Coupe 2012",
|
43 |
+
"Audi R8 Coupe 2012",
|
44 |
+
"Audi V8 Sedan 1994",
|
45 |
+
"Audi 100 Sedan 1994",
|
46 |
+
"Audi 100 Wagon 1994",
|
47 |
+
"Audi TT Hatchback 2011",
|
48 |
+
"Audi S6 Sedan 2011",
|
49 |
+
"Audi S5 Convertible 2012",
|
50 |
+
"Audi S5 Coupe 2012",
|
51 |
+
"Audi S4 Sedan 2012",
|
52 |
+
"Audi S4 Sedan 2007",
|
53 |
+
"Audi TT RS Coupe 2012",
|
54 |
+
"BMW ActiveHybrid 5 Sedan 2012",
|
55 |
+
"BMW 1 Series Convertible 2012",
|
56 |
+
"BMW 1 Series Coupe 2012",
|
57 |
+
"BMW 3 Series Sedan 2012",
|
58 |
+
"BMW 3 Series Wagon 2012",
|
59 |
+
"BMW 6 Series Convertible 2007",
|
60 |
+
"BMW X5 SUV 2007",
|
61 |
+
"BMW X6 SUV 2012",
|
62 |
+
"BMW M3 Coupe 2012",
|
63 |
+
"BMW M5 Sedan 2010",
|
64 |
+
"BMW M6 Convertible 2010",
|
65 |
+
"BMW X3 SUV 2012",
|
66 |
+
"BMW Z4 Convertible 2012",
|
67 |
+
"Bentley Continental Supersports Conv. Convertible 2012",
|
68 |
+
"Bentley Arnage Sedan 2009",
|
69 |
+
"Bentley Mulsanne Sedan 2011",
|
70 |
+
"Bentley Continental GT Coupe 2012",
|
71 |
+
"Bentley Continental GT Coupe 2007",
|
72 |
+
"Bentley Continental Flying Spur Sedan 2007",
|
73 |
+
"Bugatti Veyron 16.4 Convertible 2009",
|
74 |
+
"Bugatti Veyron 16.4 Coupe 2009",
|
75 |
+
"Buick Regal GS 2012",
|
76 |
+
"Buick Rainier SUV 2007",
|
77 |
+
"Buick Verano Sedan 2012",
|
78 |
+
"Buick Enclave SUV 2012",
|
79 |
+
"Cadillac CTS-V Sedan 2012",
|
80 |
+
"Cadillac SRX SUV 2012",
|
81 |
+
"Cadillac Escalade EXT Crew Cab 2007",
|
82 |
+
"Chevrolet Silverado 1500 Hybrid Crew Cab 2012",
|
83 |
+
"Chevrolet Corvette Convertible 2012",
|
84 |
+
"Chevrolet Corvette ZR1 2012",
|
85 |
+
"Chevrolet Corvette Ron Fellows Edition Z06 2007",
|
86 |
+
"Chevrolet Traverse SUV 2012",
|
87 |
+
"Chevrolet Camaro Convertible 2012",
|
88 |
+
"Chevrolet HHR SS 2010",
|
89 |
+
"Chevrolet Impala Sedan 2007",
|
90 |
+
"Chevrolet Tahoe Hybrid SUV 2012",
|
91 |
+
"Chevrolet Sonic Sedan 2012",
|
92 |
+
"Chevrolet Express Cargo Van 2007",
|
93 |
+
"Chevrolet Avalanche Crew Cab 2012",
|
94 |
+
"Chevrolet Cobalt SS 2010",
|
95 |
+
"Chevrolet Malibu Hybrid Sedan 2010",
|
96 |
+
"Chevrolet TrailBlazer SS 2009",
|
97 |
+
"Chevrolet Silverado 2500HD Regular Cab 2012",
|
98 |
+
"Chevrolet Silverado 1500 Classic Extended Cab 2007",
|
99 |
+
"Chevrolet Express Van 2007",
|
100 |
+
"Chevrolet Monte Carlo Coupe 2007",
|
101 |
+
"Chevrolet Malibu Sedan 2007",
|
102 |
+
"Chevrolet Silverado 1500 Extended Cab 2012",
|
103 |
+
"Chevrolet Silverado 1500 Regular Cab 2012",
|
104 |
+
"Chrysler Aspen SUV 2009",
|
105 |
+
"Chrysler Sebring Convertible 2010",
|
106 |
+
"Chrysler Town and Country Minivan 2012",
|
107 |
+
"Chrysler 300 SRT-8 2010",
|
108 |
+
"Chrysler Crossfire Convertible 2008",
|
109 |
+
"Chrysler PT Cruiser Convertible 2008",
|
110 |
+
"Daewoo Nubira Wagon 2002",
|
111 |
+
"Dodge Caliber Wagon 2012",
|
112 |
+
"Dodge Caliber Wagon 2007",
|
113 |
+
"Dodge Caravan Minivan 1997",
|
114 |
+
"Dodge Ram Pickup 3500 Crew Cab 2010",
|
115 |
+
"Dodge Ram Pickup 3500 Quad Cab 2009",
|
116 |
+
"Dodge Sprinter Cargo Van 2009",
|
117 |
+
"Dodge Journey SUV 2012",
|
118 |
+
"Dodge Dakota Crew Cab 2010",
|
119 |
+
"Dodge Dakota Club Cab 2007",
|
120 |
+
"Dodge Magnum Wagon 2008",
|
121 |
+
"Dodge Challenger SRT8 2011",
|
122 |
+
"Dodge Durango SUV 2012",
|
123 |
+
"Dodge Durango SUV 2007",
|
124 |
+
"Dodge Charger Sedan 2012",
|
125 |
+
"Dodge Charger SRT-8 2009",
|
126 |
+
"Eagle Talon Hatchback 1998",
|
127 |
+
"FIAT 500 Abarth 2012",
|
128 |
+
"FIAT 500 Convertible 2012",
|
129 |
+
"Ferrari FF Coupe 2012",
|
130 |
+
"Ferrari California Convertible 2012",
|
131 |
+
"Ferrari 458 Italia Convertible 2012",
|
132 |
+
"Ferrari 458 Italia Coupe 2012",
|
133 |
+
"Fisker Karma Sedan 2012",
|
134 |
+
"Ford F-450 Super Duty Crew Cab 2012",
|
135 |
+
"Ford Mustang Convertible 2007",
|
136 |
+
"Ford Freestar Minivan 2007",
|
137 |
+
"Ford Expedition EL SUV 2009",
|
138 |
+
"Ford Edge SUV 2012",
|
139 |
+
"Ford Ranger SuperCab 2011",
|
140 |
+
"Ford GT Coupe 2006",
|
141 |
+
"Ford F-150 Regular Cab 2012",
|
142 |
+
"Ford F-150 Regular Cab 2007",
|
143 |
+
"Ford Focus Sedan 2007",
|
144 |
+
"Ford E-Series Wagon Van 2012",
|
145 |
+
"Ford Fiesta Sedan 2012",
|
146 |
+
"GMC Terrain SUV 2012",
|
147 |
+
"GMC Savana Van 2012",
|
148 |
+
"GMC Yukon Hybrid SUV 2012",
|
149 |
+
"GMC Acadia SUV 2012",
|
150 |
+
"GMC Canyon Extended Cab 2012",
|
151 |
+
"Geo Metro Convertible 1993",
|
152 |
+
"HUMMER H3T Crew Cab 2010",
|
153 |
+
"HUMMER H2 SUT Crew Cab 2009",
|
154 |
+
"Honda Odyssey Minivan 2012",
|
155 |
+
"Honda Odyssey Minivan 2007",
|
156 |
+
"Honda Accord Coupe 2012",
|
157 |
+
"Honda Accord Sedan 2012",
|
158 |
+
"Hyundai Veloster Hatchback 2012",
|
159 |
+
"Hyundai Santa Fe SUV 2012",
|
160 |
+
"Hyundai Tucson SUV 2012",
|
161 |
+
"Hyundai Veracruz SUV 2012",
|
162 |
+
"Hyundai Sonata Hybrid Sedan 2012",
|
163 |
+
"Hyundai Elantra Sedan 2007",
|
164 |
+
"Hyundai Accent Sedan 2012",
|
165 |
+
"Hyundai Genesis Sedan 2012",
|
166 |
+
"Hyundai Sonata Sedan 2012",
|
167 |
+
"Hyundai Elantra Touring Hatchback 2012",
|
168 |
+
"Hyundai Azera Sedan 2012",
|
169 |
+
"Infiniti G Coupe IPL 2012",
|
170 |
+
"Infiniti QX56 SUV 2011",
|
171 |
+
"Isuzu Ascender SUV 2008",
|
172 |
+
"Jaguar XK XKR 2012",
|
173 |
+
"Jeep Patriot SUV 2012",
|
174 |
+
"Jeep Wrangler SUV 2012",
|
175 |
+
"Jeep Liberty SUV 2012",
|
176 |
+
"Jeep Grand Cherokee SUV 2012",
|
177 |
+
"Jeep Compass SUV 2012",
|
178 |
+
"Lamborghini Reventon Coupe 2008",
|
179 |
+
"Lamborghini Aventador Coupe 2012",
|
180 |
+
"Lamborghini Gallardo LP 570-4 Superleggera 2012",
|
181 |
+
"Lamborghini Diablo Coupe 2001",
|
182 |
+
"Land Rover Range Rover SUV 2012",
|
183 |
+
"Land Rover LR2 SUV 2012",
|
184 |
+
"Lincoln Town Car Sedan 2011",
|
185 |
+
"MINI Cooper Roadster Convertible 2012",
|
186 |
+
"Maybach Landaulet Convertible 2012",
|
187 |
+
"Mazda Tribute SUV 2011",
|
188 |
+
"McLaren MP4-12C Coupe 2012",
|
189 |
+
"Mercedes-Benz 300-Class Convertible 1993",
|
190 |
+
"Mercedes-Benz C-Class Sedan 2012",
|
191 |
+
"Mercedes-Benz SL-Class Coupe 2009",
|
192 |
+
"Mercedes-Benz E-Class Sedan 2012",
|
193 |
+
"Mercedes-Benz S-Class Sedan 2012",
|
194 |
+
"Mercedes-Benz Sprinter Van 2012",
|
195 |
+
"Mitsubishi Lancer Sedan 2012",
|
196 |
+
"Nissan Leaf Hatchback 2012",
|
197 |
+
"Nissan NV Passenger Van 2012",
|
198 |
+
"Nissan Juke Hatchback 2012",
|
199 |
+
"Nissan 240SX Coupe 1998",
|
200 |
+
"Plymouth Neon Coupe 1999",
|
201 |
+
"Porsche Panamera Sedan 2012",
|
202 |
+
"Ram C/V Cargo Van Minivan 2012",
|
203 |
+
"Rolls-Royce Phantom Drophead Coupe Convertible 2012",
|
204 |
+
"Rolls-Royce Ghost Sedan 2012",
|
205 |
+
"Rolls-Royce Phantom Sedan 2012",
|
206 |
+
"Scion xD Hatchback 2012",
|
207 |
+
"Spyker C8 Convertible 2009",
|
208 |
+
"Spyker C8 Coupe 2009",
|
209 |
+
"Suzuki Aerio Sedan 2007",
|
210 |
+
"Suzuki Kizashi Sedan 2012",
|
211 |
+
"Suzuki SX4 Hatchback 2012",
|
212 |
+
"Suzuki SX4 Sedan 2012",
|
213 |
+
"Tesla Model S Sedan 2012",
|
214 |
+
"Toyota Sequoia SUV 2012",
|
215 |
+
"Toyota Camry Sedan 2012",
|
216 |
+
"Toyota Corolla Sedan 2012",
|
217 |
+
"Toyota 4Runner SUV 2012",
|
218 |
+
"Volkswagen Golf Hatchback 2012",
|
219 |
+
"Volkswagen Golf Hatchback 1991",
|
220 |
+
"Volkswagen Beetle Hatchback 2012",
|
221 |
+
"Volvo C30 Hatchback 2012",
|
222 |
+
"Volvo 240 Sedan 1993",
|
223 |
+
"Volvo XC90 SUV 2007",
|
224 |
+
"smart fortwo Convertible 2012",
|
225 |
+
]
|
226 |
+
|
227 |
+
clip_templates = [
|
228 |
+
lambda c: f"a photo of a {c}.",
|
229 |
+
lambda c: f"a photo of the {c}.",
|
230 |
+
lambda c: f"a photo of my {c}.",
|
231 |
+
lambda c: f"i love my {c}!",
|
232 |
+
lambda c: f"a photo of my dirty {c}.",
|
233 |
+
lambda c: f"a photo of my clean {c}.",
|
234 |
+
lambda c: f"a photo of my new {c}.",
|
235 |
+
lambda c: f"a photo of my old {c}.",
|
236 |
+
]
|
237 |
+
|
238 |
+
def _info(self):
|
239 |
+
return datasets.DatasetInfo(
|
240 |
+
description="StanfordCars dataset for image classification.",
|
241 |
+
features=datasets.Features(
|
242 |
+
{
|
243 |
+
"image": datasets.Image(),
|
244 |
+
"label": datasets.ClassLabel(names=self.classnames),
|
245 |
+
}
|
246 |
+
),
|
247 |
+
supervised_keys=("image", "label"),
|
248 |
+
task_templates=[datasets.ImageClassification(image_column="image", label_column="label")],
|
249 |
+
)
|