File size: 2,532 Bytes
8171ba4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
license: mit
task_categories:
  - object-detection
tags:
  - yolo
  - obb
  - oriented-bounding-box
  - dice
  - pip-classification
  - robotics
  - pick-and-place
pretty_name: Dice Detection (OBB) with Pip Classification
size_categories:
  - n<1K
---

# Dice Detection (OBB) with Pip Classification

A small oriented-bounding-box (OBB) detection dataset of a wooden die captured from a top-down camera. Each annotation gives the die's rotated bounding box along with the visible pip count (1–6) as the class. Intended for fine-tuning YOLO-style OBB detectors used in pick-and-place / robotic manipulation pipelines.

## Classes

| ID | Name  |
|----|-------|
| 0  | Five  |
| 1  | Four  |
| 2  | One   |
| 3  | Six   |
| 4  | Three |
| 5  | Two   |

(Class IDs are not in numerical order — they follow `dataset.yaml` as released. The class name corresponds to the pip count shown on the die's top face.)

## Splits

| Split | Images | Labels |
|-------|--------|--------|
| train | 125    | 125    |
| val   | 36     | 36     |
| test  | 19     | 19     |
| **total** | **180** | **180** |

Each image contains a single die.

## Image format

- Resolution: 1280 × 720, RGB JPEG
- Captured from a top-down camera over a green tray, with a Movensys "Monopoly" board visible alongside the workspace

## Label format

YOLO OBB — one row per object, 9 values:

```
class_id x1 y1 x2 y2 x3 y3 x4 y4
```

All polygon coordinates are normalized to `[0, 1]` relative to image width/height. Vertices are given in order around the box.

Example (`train/labels/00001.txt`):
```
2 0.4608 0.4944 0.5353 0.5021 0.5307 0.6450 0.4562 0.6374
```

## Directory layout

```
.
├── dataset.yaml
├── train/
│   ├── images/   # *.jpg
│   └── labels/   # *.txt
├── val/
│   ├── images/
│   └── labels/
└── test/
    ├── images/
    └── labels/
```

## Usage

### Download

```bash
hf download movensys/dice-detection-obb \
    --repo-type dataset \
    --local-dir ./dice-detection-obb
```

### Train with Ultralytics YOLO (OBB)

After download, update the `path:` field in `dataset.yaml` to point at the local copy:

```yaml
path: /absolute/path/to/dice-detection-obb
train: train/images
val: val/images
test: test/images
names:
  0: Five
  1: Four
  2: One
  3: Six
  4: Three
  5: Two
```

Then:

```python
from ultralytics import YOLO

model = YOLO("yolo11n-obb.pt")
model.train(data="dataset.yaml", epochs=100, imgsz=1280)
```

## License

Released under the MIT License.