File size: 2,342 Bytes
0c63d3a
81c32e5
dbfb3f0
81c32e5
 
0c63d3a
81c32e5
dbfb3f0
81c32e5
 
 
 
 
0c63d3a
81c32e5
0c63d3a
 
dbfb3f0
 
81c32e5
 
dbfb3f0
 
 
 
0c63d3a
dbfb3f0
 
 
 
0c63d3a
dbfb3f0
0c63d3a
dbfb3f0
 
 
 
 
 
 
0c63d3a
dbfb3f0
0c63d3a
 
 
 
dbfb3f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0c63d3a
dbfb3f0
81c32e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
license: apache-2.0
task_categories:
- image-segmentation
- image-classification
language:
- en
tags:
- stanford-cars
- segmentation
- sam
- bounding-box
- mask
size_categories:
- 10K<n<100K
---

# Stanford Cars with SAM3 Segmentation Masks

This dataset was created using [segmentationAPI.com](https://segmentationapi.com)

A version of the [Stanford Cars](https://ai.stanford.edu/~jkrause/cars/car_dataset.html) dataset
augmented with per-image segmentation masks generated by SAM3 (Segment Anything Model 3).

## Dataset Description

- **Images**: 196 car model classes, original Stanford Cars images
- **Masks**: Binary segmentation masks from SAM3, stored as grayscale PNG (255 = car, 0 = background)
- **Bounding boxes**: `[x1, y1, x2, y2]` pixel coordinates of the primary car object
- **Splits**: `train` (8,144 images), `test` (8,041 images)

## Schema

| Column | Type       | Description                                      |
|--------|------------|--------------------------------------------------|
| image  | Image      | Original car photograph (JPEG)                   |
| label  | int        | Class label (0–195, 196 car models)              |
| split  | string     | `train` or `test`                                |
| mask   | Image      | Binary segmentation mask (grayscale PNG)         |
| bbox   | list[int]  | Bounding box `[x1, y1, x2, y2]` in pixels       |

## Usage

```python
from datasets import load_dataset

ds = load_dataset("segmentationAPIs/standford_cars_masks")
sample = ds["train"][0]

sample["image"]   # PIL Image — original photo
sample["mask"]    # PIL Image — grayscale mask (255 = car)
sample["bbox"]    # [x1, y1, x2, y2]
sample["label"]   # int class label
```

## Class Labels

196 fine-grained car model classes covering major manufacturers (Acura, Aston Martin, Audi, BMW,
Bentley, Bugatti, Buick, Cadillac, Chevrolet, Chrysler, Dodge, Ferrari, FIAT, Ford, GMC, Honda,
Hyundai, Infiniti, Isuzu, Jaguar, Jeep, Lamborghini, Land Rover, Lincoln, MINI, Maybach, McLaren,
Mercedes-Benz, Mitsubishi, Nissan, Plymouth, Pontiac, Porsche, Ram, Rolls-Royce, Scion, Spyker,
Subaru, Suzuki, Tesla, Toyota, Volkswagen, Volvo).

## Source

- Original dataset: [Stanford Cars Dataset](https://ai.stanford.edu/~jkrause/cars/car_dataset.html)
- Masks generated with SAM3 (Segment Anything Model 3)