unixpickle commited on
Commit
ddd296c
1 Parent(s): 481fb54
Files changed (3) hide show
  1. app.py +41 -3
  2. constants.py +549 -0
  3. requirements.txt +3 -1
app.py CHANGED
@@ -1,9 +1,47 @@
1
  import gradio as gr
 
 
 
 
2
 
 
3
 
4
- def greet(name):
5
- return "Hello " + name + "!!"
 
 
 
 
 
 
 
 
 
6
 
7
 
8
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  iface.launch()
 
1
  import gradio as gr
2
+ import torch
3
+ import torch.nn.functional as F
4
+ import torchvision.transforms as transforms
5
+ from PIL import Image
6
 
7
+ from constants import MAKES_MODELS, PRICE_BIN_LABELS
8
 
9
+ model = torch.jit.load("mobilenetv2_432000_calib.pt")
10
+ model.eval()
11
+ transform = transforms.Compose(
12
+ [
13
+ transforms.ToTensor(),
14
+ transforms.Normalize(
15
+ (0.48145466, 0.4578275, 0.40821073),
16
+ (0.26862954, 0.26130258, 0.27577711),
17
+ ),
18
+ ]
19
+ )
20
 
21
 
22
+ def classify(img: Image.Image):
23
+ in_tensor = transform(img)[None]
24
+ outputs = model(in_tensor)
25
+
26
+ price_bins = dict(
27
+ zip(PRICE_BIN_LABELS, F.softmax(outputs["price_bin"], dim=-1)[0].tolist())
28
+ )
29
+ make_models = dict(
30
+ zip(
31
+ ([f"{make} {model}" for make, model in MAKES_MODELS] + ["Unknown"]),
32
+ F.softmax(outputs["make_model"], dim=-1)[0].tolist(),
33
+ )
34
+ )
35
+ return f"${int(round(outputs['price_median'].item()))}", price_bins, make_models
36
+
37
+
38
+ iface = gr.Interface(
39
+ fn=classify,
40
+ inputs=gr.Image(shape=(224, 224), type="pil"),
41
+ outputs=[
42
+ gr.Text(label="Price Prediction"),
43
+ gr.Label(label="Price Bin"),
44
+ gr.Label(label="Make/Model"),
45
+ ],
46
+ )
47
  iface.launch()
constants.py ADDED
@@ -0,0 +1,549 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRICE_CUTOFFS = [
2
+ 10_000.0,
3
+ 15_000.0,
4
+ 20_000.0,
5
+ 25_000.0,
6
+ 30_000.0,
7
+ 35_000.0,
8
+ 40_000.0,
9
+ 50_000.0,
10
+ 60_000.0,
11
+ ]
12
+
13
+ NUM_PRICE_BINS = len(PRICE_CUTOFFS) + 1
14
+
15
+ PRICE_BIN_LABELS = [
16
+ "$0-$10,000",
17
+ "$10,000-$15,000",
18
+ "$15,000-$20,000",
19
+ "$20,000-$25,000",
20
+ "$25,000-$30,000",
21
+ "$30,000-$35,000",
22
+ "$35,000-$40,000",
23
+ "$40,000-$50,000",
24
+ "$50,000-$60,000",
25
+ "$60,000+",
26
+ ]
27
+
28
+ MEDIAN_PRICE_SCALE = 30000.0
29
+
30
+ YEARS = list(range(1983, 2024))
31
+ NUM_YEARS = len(YEARS) + 1
32
+
33
+ MAKES_MODELS = (
34
+ ("Ford", "F150"),
35
+ ("Chevrolet", "Silverado 1500"),
36
+ ("RAM", "1500"),
37
+ ("Jeep", "Wrangler"),
38
+ ("Ford", "Explorer"),
39
+ ("Nissan", "Rogue"),
40
+ ("Jeep", "Grand Cherokee"),
41
+ ("Chevrolet", "Equinox"),
42
+ ("GMC", "Sierra 1500"),
43
+ ("Ford", "Escape"),
44
+ ("Honda", "Accord"),
45
+ ("Toyota", "Camry"),
46
+ ("Toyota", "RAV4"),
47
+ ("Honda", "Civic"),
48
+ ("Honda", "CR-V"),
49
+ ("MAZDA", "CX-5"),
50
+ ("Toyota", "Tacoma"),
51
+ ("Ford", "F250"),
52
+ ("Toyota", "Corolla"),
53
+ ("Toyota", "Highlander"),
54
+ ("Jeep", "Cherokee"),
55
+ ("Nissan", "Altima"),
56
+ ("Subaru", "Outback"),
57
+ ("RAM", "2500"),
58
+ ("Honda", "Pilot"),
59
+ ("Chevrolet", "Malibu"),
60
+ ("Hyundai", "Tucson"),
61
+ ("Ford", "Mustang"),
62
+ ("Chevrolet", "Traverse"),
63
+ ("Hyundai", "Santa Fe"),
64
+ ("Hyundai", "Elantra"),
65
+ ("Jeep", "Compass"),
66
+ ("Chevrolet", "Silverado 2500"),
67
+ ("Ford", "Edge"),
68
+ ("Nissan", "Frontier"),
69
+ ("Chevrolet", "Tahoe"),
70
+ ("GMC", "Terrain"),
71
+ ("Toyota", "Tundra"),
72
+ ("GMC", "Acadia"),
73
+ ("Volkswagen", "Tiguan"),
74
+ ("Hyundai", "Sonata"),
75
+ ("Subaru", "Forester"),
76
+ ("Jeep", "Gladiator"),
77
+ ("Chevrolet", "Colorado"),
78
+ ("Nissan", "Pathfinder"),
79
+ ("Toyota", "4Runner"),
80
+ ("Ford", "Fusion"),
81
+ ("Nissan", "Sentra"),
82
+ ("Kia", "Sorento"),
83
+ ("GMC", "Sierra 2500"),
84
+ ("Ford", "F350"),
85
+ ("Subaru", "Crosstrek"),
86
+ ("Kia", "Sportage"),
87
+ ("Honda", "HR-V"),
88
+ ("Kia", "Forte"),
89
+ ("Honda", "Odyssey"),
90
+ ("Ford", "Bronco Sport"),
91
+ ("Dodge", "Challenger"),
92
+ ("Dodge", "Charger"),
93
+ ("Buick", "Enclave"),
94
+ ("Chevrolet", "Blazer"),
95
+ ("Acura", "MDX"),
96
+ ("Audi", "Q5"),
97
+ ("Volkswagen", "Atlas"),
98
+ ("Buick", "Envision"),
99
+ ("Kia", "Soul"),
100
+ ("Chrysler", "Pacifica"),
101
+ ("Hyundai", "Kona"),
102
+ ("Chevrolet", "Camaro"),
103
+ ("Jeep", "Grand Cherokee L"),
104
+ ("MAZDA", "CX-9"),
105
+ ("Dodge", "Durango"),
106
+ ("Nissan", "Murano"),
107
+ ("Chevrolet", "Trax"),
108
+ ("GMC", "Yukon"),
109
+ ("Volkswagen", "Jetta"),
110
+ ("BMW", "X5"),
111
+ ("Chevrolet", "Suburban"),
112
+ ("Ford", "Expedition"),
113
+ ("Nissan", "Rogue Sport"),
114
+ ("RAM", "3500"),
115
+ ("Ford", "Bronco"),
116
+ ("Honda", "Ridgeline"),
117
+ ("Chevrolet", "Corvette"),
118
+ ("Cadillac", "XT5"),
119
+ ("Toyota", "Sienna"),
120
+ ("Mitsubishi", "Outlander"),
121
+ ("Kia", "Telluride"),
122
+ ("Buick", "Encore"),
123
+ ("Mercedes-Benz", "C 300"),
124
+ ("BMW", "X3"),
125
+ ("Subaru", "Ascent"),
126
+ ("Honda", "Passport"),
127
+ ("MAZDA", "MAZDA3"),
128
+ ("Buick", "Encore GX"),
129
+ ("Volvo", "XC90"),
130
+ ("Mercedes-Benz", "GLC 300"),
131
+ ("Ford", "Ranger"),
132
+ ("Jeep", "Renegade"),
133
+ ("Lexus", "RX 350"),
134
+ ("Volvo", "XC60"),
135
+ ("Kia", "Optima"),
136
+ ("Chevrolet", "Silverado 3500"),
137
+ ("Dodge", "Grand Caravan"),
138
+ ("INFINITI", "QX60"),
139
+ ("Nissan", "Titan"),
140
+ ("Subaru", "WRX"),
141
+ ("GMC", "Canyon"),
142
+ ("Tesla", "Model 3"),
143
+ ("Chevrolet", "Cruze"),
144
+ ("Lexus", "ES 350"),
145
+ ("Nissan", "Armada"),
146
+ ("GMC", "Yukon XL"),
147
+ ("GMC", "Sierra 3500"),
148
+ ("Hyundai", "Palisade"),
149
+ ("Ford", "Focus"),
150
+ ("Kia", "Niro"),
151
+ ("Toyota", "Prius"),
152
+ ("INFINITI", "QX80"),
153
+ ("Porsche", "Macan"),
154
+ ("Chevrolet", "TrailBlazer"),
155
+ ("Cadillac", "XT4"),
156
+ ("MAZDA", "CX-50"),
157
+ ("Lincoln", "Corsair"),
158
+ ("Audi", "Q7"),
159
+ ("Ford", "Expedition Max"),
160
+ ("Cadillac", "Escalade"),
161
+ ("MINI", "Cooper"),
162
+ ("Acura", "RDX"),
163
+ ("Subaru", "Impreza"),
164
+ ("Audi", "A4"),
165
+ ("Nissan", "Kicks"),
166
+ ("Nissan", "Maxima"),
167
+ ("Porsche", "Cayenne"),
168
+ ("Dodge", "Journey"),
169
+ ("Porsche", "911"),
170
+ ("RAM", "ProMaster"),
171
+ ("Mercedes-Benz", "GLE 350"),
172
+ ("Ford", "EcoSport"),
173
+ ("Volkswagen", "Taos"),
174
+ ("MAZDA", "CX-30"),
175
+ ("Lincoln", "Nautilus"),
176
+ ("Land Rover", "Range Rover"),
177
+ ("Mitsubishi", "Outlander Sport"),
178
+ ("Lexus", "GX 460"),
179
+ ("Volkswagen", "Passat"),
180
+ ("Land Rover", "Range Rover Sport"),
181
+ ("Nissan", "Versa"),
182
+ ("Volvo", "XC40"),
183
+ ("Mercedes-Benz", "E 350"),
184
+ ("Chrysler", "300"),
185
+ ("Chevrolet", "Impala"),
186
+ ("Subaru", "Legacy"),
187
+ ("Acura", "TLX"),
188
+ ("Mercedes-Benz", "Sprinter"),
189
+ ("Cadillac", "CT5"),
190
+ ("Mercedes-Benz", "GLA 250"),
191
+ ("Hyundai", "Santa Cruz"),
192
+ ("Tesla", "Model S"),
193
+ ("Mercedes-Benz", "GLB 250"),
194
+ ("INFINITI", "Q50"),
195
+ ("Kia", "K5"),
196
+ ("Cadillac", "XT6"),
197
+ ("Audi", "Q3"),
198
+ ("INFINITI", "QX50"),
199
+ ("Ford", "Transit 250"),
200
+ ("Ford", "Mustang Mach-E"),
201
+ ("Kia", "Seltos"),
202
+ ("MAZDA", "MX-5 Miata"),
203
+ ("Audi", "A5"),
204
+ ("Lincoln", "Aviator"),
205
+ ("BMW", "X1"),
206
+ ("Kia", "Rio"),
207
+ ("Chevrolet", "Express 2500"),
208
+ ("Ford", "Transit 350"),
209
+ ("Toyota", "Venza"),
210
+ ("Mercedes-Benz", "S 500"),
211
+ ("Cadillac", "Escalade ESV"),
212
+ ("Jeep", "Wagoneer"),
213
+ ("Chevrolet", "Bolt"),
214
+ ("MINI", "Cooper Countryman"),
215
+ ("Toyota", "Sequoia"),
216
+ ("Mercedes-Benz", "CLA 250"),
217
+ ("BMW", "X7"),
218
+ ("Cadillac", "CTS"),
219
+ ("Hyundai", "Venue"),
220
+ ("Volkswagen", "ID.4"),
221
+ ("Toyota", "Avalon"),
222
+ ("Jeep", "Patriot"),
223
+ ("Tesla", "Model Y"),
224
+ ("Nissan", "Leaf"),
225
+ ("Audi", "A3"),
226
+ ("Acura", "Integra"),
227
+ ("Ford", "Transit Connect"),
228
+ ("Lexus", "NX 300"),
229
+ ("Audi", "A6"),
230
+ ("Mercedes-Benz", "EQS 450+"),
231
+ ("Chevrolet", "Spark"),
232
+ ("Jaguar", "F-PACE"),
233
+ ("Mercedes-Benz", "S 580"),
234
+ ("Chevrolet", "Sonic"),
235
+ ("Lincoln", "Navigator"),
236
+ ("Toyota", "C-HR"),
237
+ ("Ford", "Fiesta"),
238
+ ("RAM", "ProMaster City"),
239
+ ("Volvo", "S60"),
240
+ ("BMW", "330i xDrive"),
241
+ ("Ford", "Flex"),
242
+ ("MAZDA", "MAZDA6"),
243
+ ("Toyota", "Corolla Cross"),
244
+ ("Lincoln", "MKZ"),
245
+ ("Chevrolet", "Express 3500"),
246
+ ("Hyundai", "Accent"),
247
+ ("Land Rover", "Discovery Sport"),
248
+ ("Tesla", "Model X"),
249
+ ("Honda", "Fit"),
250
+ ("Alfa Romeo", "Stelvio"),
251
+ ("Chrysler", "200"),
252
+ ("Volkswagen", "Beetle"),
253
+ ("Cadillac", "CT4"),
254
+ ("Ford", "Maverick"),
255
+ ("Volkswagen", "GTI"),
256
+ ("Lincoln", "MKC"),
257
+ ("Porsche", "Panamera"),
258
+ ("Ford", "F450"),
259
+ ("Lexus", "NX 350"),
260
+ ("Chrysler", "Town & Country"),
261
+ ("Kia", "Stinger"),
262
+ ("Land Rover", "Range Rover Velar"),
263
+ ("Audi", "S5"),
264
+ ("BMW", "330i"),
265
+ ("Volkswagen", "Golf"),
266
+ ("Mercedes-Benz", "GLS 450"),
267
+ ("Lexus", "IS 350"),
268
+ ("Land Rover", "Range Rover Evoque"),
269
+ ("Toyota", "Prius Prime"),
270
+ ("Acura", "ILX"),
271
+ ("Genesis", "G70"),
272
+ ("Ford", "Taurus"),
273
+ ("Hyundai", "Veloster"),
274
+ ("Lexus", "IS 300"),
275
+ ("Land Rover", "Defender"),
276
+ ("Genesis", "GV80"),
277
+ ("Alfa Romeo", "Giulia"),
278
+ ("BMW", "X6"),
279
+ ("Hyundai", "Ioniq 5"),
280
+ ("Audi", "SQ5"),
281
+ ("BMW", "328i"),
282
+ ("BMW", "i3"),
283
+ ("Cadillac", "ATS"),
284
+ ("Mercedes-Benz", "S 550"),
285
+ ("Lincoln", "Navigator L"),
286
+ ("Mercedes-Benz", "E 450"),
287
+ ("Buick", "LaCrosse"),
288
+ ("Ford", "E-350 and Econoline 350"),
289
+ ("BMW", "M3"),
290
+ ("Mercedes-Benz", "GLE 53 AMG"),
291
+ ("Lexus", "IS 250"),
292
+ ("Mercedes-Benz", "E 300"),
293
+ ("Cadillac", "SRX"),
294
+ ("GMC", "Savana 2500"),
295
+ ("INFINITI", "QX55"),
296
+ ("Mitsubishi", "Eclipse Cross"),
297
+ ("Audi", "Q8"),
298
+ ("INFINITI", "Q60"),
299
+ ("Kia", "Sedona"),
300
+ ("Lincoln", "MKX"),
301
+ ("Audi", "e-tron"),
302
+ ("Chevrolet", "Volt"),
303
+ ("BMW", "X4"),
304
+ ("Chevrolet", "Bolt EUV"),
305
+ ("Volvo", "C40"),
306
+ ("Maserati", "Ghibli"),
307
+ ("Lexus", "ES 300h"),
308
+ ("Jaguar", "F-TYPE"),
309
+ ("Cadillac", "XTS"),
310
+ ("Genesis", "GV70"),
311
+ ("BMW", "430i xDrive"),
312
+ ("BMW", "430i"),
313
+ ("BMW", "Z4"),
314
+ ("BMW", "M4"),
315
+ ("Land Rover", "Discovery"),
316
+ ("Lexus", "GS 350"),
317
+ ("Mercedes-Benz", "A 220"),
318
+ ("Dodge", "Ram 1500 Truck"),
319
+ ("Ford", "F550"),
320
+ ("Hyundai", "Ioniq"),
321
+ ("Mercedes-Benz", "ML 350"),
322
+ ("Genesis", "G80"),
323
+ ("MINI", "Cooper Clubman"),
324
+ ("Maserati", "Levante"),
325
+ ("Mercedes-Benz", "AMG GT"),
326
+ ("BMW", "530i xDrive"),
327
+ ("Lincoln", "Continental"),
328
+ ("Chrysler", "Voyager"),
329
+ ("Lexus", "LS 460"),
330
+ ("MAZDA", "MX-5 Miata RF"),
331
+ ("FIAT", "500"),
332
+ ("Cadillac", "CT6"),
333
+ ("MAZDA", "CX-3"),
334
+ ("BMW", "M5"),
335
+ ("BMW", "328i xDrive"),
336
+ ("Hyundai", "Genesis"),
337
+ ("Kia", "EV6"),
338
+ ("INFINITI", "G37"),
339
+ ("Audi", "A8"),
340
+ ("Audi", "S4"),
341
+ ("BMW", "X2"),
342
+ ("BMW", "530i"),
343
+ ("Lexus", "UX 250h"),
344
+ ("Lexus", "RX 350L"),
345
+ ("Mercedes-Benz", "G 63 AMG"),
346
+ ("Nissan", "Juke"),
347
+ ("Volkswagen", "Arteon"),
348
+ ("Honda", "Insight"),
349
+ ("Lexus", "RC 350"),
350
+ ("RAM", "5500"),
351
+ ("Audi", "A7"),
352
+ ("Lexus", "NX 200t"),
353
+ ("Nissan", "370Z"),
354
+ ("Porsche", "Boxster"),
355
+ ("BMW", "540i"),
356
+ ("Buick", "Regal"),
357
+ ("Dodge", "Dart"),
358
+ ("BMW", "540i xDrive"),
359
+ ("Mercedes-Benz", "GLE 450"),
360
+ ("Ford", "Expedition EL"),
361
+ ("Jeep", "Grand Wagoneer"),
362
+ ("Bentley", "Continental"),
363
+ ("Dodge", "Ram 2500 Truck"),
364
+ ("Jeep", "Liberty"),
365
+ ("Kia", "Carnival"),
366
+ ("Mitsubishi", "Mirage G4"),
367
+ ("Mercedes-Benz", "GL 450"),
368
+ ("Mitsubishi", "Mirage"),
369
+ ("Lexus", "RX 450h"),
370
+ ("Porsche", "Taycan"),
371
+ ("Acura", "TL"),
372
+ ("Lexus", "CT 200h"),
373
+ ("Nissan", "NV"),
374
+ ("BMW", "440i xDrive"),
375
+ ("Mercedes-Benz", "C 43 AMG"),
376
+ ("Mercedes-Benz", "EQS 580"),
377
+ ("Toyota", "Supra"),
378
+ ("Mercedes-Benz", "GLK 350"),
379
+ ("Lexus", "LS 500"),
380
+ ("Toyota", "Prius C"),
381
+ ("Toyota", "Yaris"),
382
+ ("Jaguar", "XF"),
383
+ ("Nissan", "Versa Note"),
384
+ ("BMW", "335i"),
385
+ ("Nissan", "Xterra"),
386
+ ("Lexus", "NX 250"),
387
+ ("Toyota", "FJ Cruiser"),
388
+ ("Audi", "RS 5"),
389
+ ("Volvo", "V60"),
390
+ ("Audi", "S3"),
391
+ ("BMW", "740i"),
392
+ ("BMW", "128i"),
393
+ ("Buick", "Verano"),
394
+ ("Subaru", "BRZ"),
395
+ ("Audi", "Q4 e-tron"),
396
+ ("Chevrolet", "Avalanche"),
397
+ ("Mercedes-Benz", "SL 550"),
398
+ ("Ford", "C-MAX"),
399
+ ("Toyota", "GR86"),
400
+ ("BMW", "750i xDrive"),
401
+ ("Ford", "Transit 150"),
402
+ ("Mercedes-Benz", "Metris"),
403
+ ("Mercedes-Benz", "S 560"),
404
+ ("Nissan", "NV200"),
405
+ ("Volkswagen", "Golf R"),
406
+ ("Mercedes-Benz", "SL 63 AMG"),
407
+ ("BMW", "M850i xDrive"),
408
+ ("Lexus", "LX 570"),
409
+ ("Mercedes-Benz", "G 550"),
410
+ ("Ford", "E-450 and Econoline 450"),
411
+ ("Ford", "E-Transit"),
412
+ ("Mercedes-Benz", "C 250"),
413
+ ("Mercedes-Benz", "CLS 450"),
414
+ ("Mercedes-Benz", "S 63 AMG"),
415
+ ("BMW", "530e"),
416
+ ("BMW", "428i"),
417
+ ("Mercedes-Benz", "GLC 43 AMG"),
418
+ ("Volvo", "S90"),
419
+ ("Dodge", "Avenger"),
420
+ ("Lexus", "NX 300h"),
421
+ ("Mercedes-Benz", "GLE 43 AMG"),
422
+ ("Mercedes-Benz", "E 400"),
423
+ ("Toyota", "Prius V"),
424
+ ("BMW", "X5 M"),
425
+ ("GMC", "Savana 3500"),
426
+ ("Scion", "tC"),
427
+ ("Volkswagen", "CC"),
428
+ ("Acura", "TSX"),
429
+ ("BMW", "228i xDrive"),
430
+ ("BMW", "535i xDrive"),
431
+ ("Porsche", "Cayman"),
432
+ ("Subaru", "Impreza WRX"),
433
+ ("BMW", "535i"),
434
+ ("BMW", "M8"),
435
+ ("Bentley", "Bentayga"),
436
+ ("Maserati", "Quattroporte"),
437
+ ("BMW", "M550i xDrive"),
438
+ ("Jaguar", "XE"),
439
+ ("Hyundai", "Kona N"),
440
+ ("Porsche", "718 Cayman"),
441
+ ("BMW", "M2"),
442
+ ("Mercedes-Benz", "C 63 AMG"),
443
+ ("BMW", "M340i"),
444
+ ("Hyundai", "Elantra N"),
445
+ ("BMW", "528i"),
446
+ ("Ford", "E-250 and Econoline 250"),
447
+ ("BMW", "i4"),
448
+ ("FIAT", "500X"),
449
+ ("BMW", "iX"),
450
+ ("Audi", "TT"),
451
+ ("Lexus", "IS 200t"),
452
+ ("Maserati", "GranTurismo"),
453
+ ("Dodge", "Ram 3500 Truck"),
454
+ ("BMW", "650i"),
455
+ ("Lexus", "UX 200"),
456
+ ("Dodge", "Dakota"),
457
+ ("INFINITI", "QX30"),
458
+ ("Mercedes-Benz", "GLE 63 AMG"),
459
+ ("Volkswagen", "Touareg"),
460
+ ("Volkswagen", "e-Golf"),
461
+ ("Lamborghini", "Huracan"),
462
+ ("Lexus", "LC 500"),
463
+ ("Land Rover", "LR4"),
464
+ ("Lexus", "NX 350h"),
465
+ ("BMW", "428i xDrive"),
466
+ ("Jaguar", "XJ"),
467
+ ("Lexus", "RC 300"),
468
+ ("Toyota", "Mirai"),
469
+ ("BMW", "330e"),
470
+ ("Genesis", "G90"),
471
+ ("Jaguar", "E-PACE"),
472
+ ("Lamborghini", "Urus"),
473
+ ("BMW", "M340i xDrive"),
474
+ ("Audi", "RS 7"),
475
+ ("Lexus", "ES 250"),
476
+ ("Mercedes-Benz", "SL 55 AMG"),
477
+ ("BMW", "320i"),
478
+ ("Toyota", "Land Cruiser"),
479
+ ("Ford", "Thunderbird"),
480
+ ("Honda", "Element"),
481
+ ("Scion", "xB"),
482
+ ("BMW", "530e xDrive"),
483
+ ("Porsche", "718 Boxster"),
484
+ ("Buick", "Lucerne"),
485
+ ("Mercedes-Benz", "E 53 AMG"),
486
+ ("Mitsubishi", "Lancer"),
487
+ ("Polestar", "Polestar 2"),
488
+ ("RAM", "4500"),
489
+ ("Scion", "FR-S"),
490
+ ("Mercedes-Benz", "E 550"),
491
+ ("Nissan", "GT-R"),
492
+ ("BMW", "X6 M"),
493
+ ("INFINITI", "Q70"),
494
+ ("Audi", "R8"),
495
+ ("Honda", "Clarity"),
496
+ ("Mercedes-Benz", "E 63 AMG"),
497
+ ("BMW", "320i xDrive"),
498
+ ("Ford", "E-150 and Econoline 150"),
499
+ ("Lexus", "GX 470"),
500
+ ("Lincoln", "MKS"),
501
+ ("BMW", "135i"),
502
+ ("Mercedes-Benz", "GL 550"),
503
+ ("Toyota", "86"),
504
+ ("smart", "fortwo"),
505
+ ("Chevrolet", "Express 1500"),
506
+ ("BMW", "528i xDrive"),
507
+ ("BMW", "M440i"),
508
+ ("BMW", "230i"),
509
+ ("INFINITI", "G35"),
510
+ ("Mercedes-Benz", "S 450"),
511
+ ("Mercedes-Benz", "SL 500"),
512
+ ("BMW", "435i xDrive"),
513
+ ("FIAT", "124 Spider"),
514
+ ("Mercedes-Benz", "CLS 550"),
515
+ ("Mercedes-Benz", "EQE 350+"),
516
+ ("Mercury", "Grand Marquis"),
517
+ ("Volkswagen", "Eos"),
518
+ ("Chrysler", "PT Cruiser"),
519
+ ("Lexus", "SC 430"),
520
+ ("Lincoln", "Town Car"),
521
+ ("Nissan", "Quest"),
522
+ ("Audi", "S8"),
523
+ ("BMW", "435i"),
524
+ ("HUMMER", "H2"),
525
+ ("Kia", "Cadenza"),
526
+ ("BMW", "228i"),
527
+ ("Chrysler", "Sebring"),
528
+ ("Volvo", "XC70"),
529
+ ("BMW", "335i xDrive"),
530
+ ("Chevrolet", "Captiva Sport"),
531
+ ("Ferrari", "California"),
532
+ ("Ford", "Excursion"),
533
+ ("BMW", "440i"),
534
+ ("Chevrolet", "HHR"),
535
+ ("INFINITI", "QX56"),
536
+ ("INFINITI", "QX70"),
537
+ ("MAZDA", "MAZDA5"),
538
+ ("Pontiac", "G6"),
539
+ ("Chevrolet", "Cobalt"),
540
+ ("Rivian", "R1T"),
541
+ ("Audi", "S6"),
542
+ ("BMW", "750i"),
543
+ ("BMW", "M240i xDrive"),
544
+ ("BMW", "i8"),
545
+ )
546
+
547
+ MAKE_MODEL_TO_INDEX = {x: i for i, x in enumerate(MAKES_MODELS)}
548
+
549
+ NUM_MAKE_MODELS = len(MAKE_MODEL_TO_INDEX) + 1
requirements.txt CHANGED
@@ -1 +1,3 @@
1
- git+https://github.com/unixpickle/car-data@main#egg=car-data
 
 
 
1
+ torch
2
+ torchvision
3
+ Pillow