File size: 6,988 Bytes
6fd61b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
---
license: mit
task_categories:
- robotics
tags:
- LeRobot
- robotics
- preference-learning
- reward-modelling
- rlhf
- manipulation
- franka
configs:
- config_name: default
  data_files: data/*/*.parquet
---

# fold_pants — pairwise preferences on a Franka Panda

Real-robot trajectories for **"fold the shorts"** with **human pairwise preference
labels on multiple judgment axes**. Built for reward-model / preference-learning
research: every label is a comparison of two trajectories on one named axis, not a
scalar score.

The trajectory data is a standard [LeRobot](https://github.com/huggingface/lerobot)
v2.1 dataset, so it also loads directly as an imitation-learning dataset.

## Contents

| | |
|---|---|
| Episodes | **536** |
| Frames | **530,494** (~9.8 h at 15 fps) |
| Preference pairs | **1448** |
| Preference labels (pair x axis) | **4390** |
| Judgment axes | **45** |
| Distinct instructions | **1** |
| Cameras | `agent_view` (third-person), `wrist` — both 224x224 |
| Robot | Franka Panda, 7-DoF joint control + gripper |

### Episodes by kind

| kind | episodes | frames |
|---|---|---|
| rollout | 399 | 385498 |
| demo | 137 | 144996 |

`demo` episodes are human teleoperated demonstrations. `rollout` episodes are policy
rollouts recorded in preference-collection sessions; those are the ones that vary in
quality, which is what makes the comparisons informative.

## Preference labels

`preferences/pairs.parquet` — one row per (pair, axis):

| column | meaning |
|---|---|
| `pair_id` | unique id of the comparison |
| `episode_index_a`, `episode_index_b` | index into this LeRobot dataset |
| `episode_id_a`, `episode_id_b` | original source trajectory id |
| `axis` | the judgment axis being compared |
| `winner` | `A`, `B`, or `Equal` |
| `source` | `in_session` (the two rollouts of one session) or `cross` (arbitrary pair) |
| `source_dir`, `source_file` | provenance of the annotation |
| `annotator` | which annotator's label set this row comes from |
| `axis_set` | `fixed` (curated rubric reused across sessions) or `freeform` (annotator-invented axis names) |
| `overall_score_a/b` | 1–4 Likert quality rating, where the annotator gave one (else null) |
| `succeeded_a/b` | task-success flag recorded at collection time, where available (else null) |
| `instruction` | instruction string logged with the comparison |

`preferences/pairs.jsonl` is the same data with the axes nested per pair.
`preferences/episodes.parquet` maps `episode_index` to the source trajectory.

Winner distribution: **A** 1996, **B** 1968, **Equal** 426.

### Axes

| axis | labels |
|---|---|
| `Overall quality` | 1330 |
| `Quality of 1st fold` | 239 |
| `Quality of 2nd fold` | 239 |
| `Wrinkle of 2nd fold` | 239 |
| `Alignment of final fold` | 239 |
| `Fast` | 239 |
| `Smooth` | 239 |
| `Wrinkle of 1st fold` | 239 |
| `Damage to environment` | 238 |
| `Quality of 3rd fold` | 237 |
| `Wrinkle of 3rd fold` | 237 |
| `fast` | 69 |
| `wrinkle of first fold` | 48 |
| `speed` | 47 |
| `alignment of final fold` | 46 |
| `wrinkle of second fold` | 42 |
| `first fold quality` | 39 |
| `third fold quality` | 38 |
| `smoothness` | 32 |
| `second fold quality` | 30 |
| `final alignment` | 28 |
| `smooth` | 28 |
| `stable` | 26 |
| `wrinkle of third fold` | 26 |
| `first fold wrinkle` | 19 |
| `final fold alignment` | 19 |
| `quality of second fold` | 18 |
| `stability` | 16 |
| `second fold wrinkle` | 16 |
| `third fold wrinkle` | 16 |
| `quality of third fold` | 14 |
| `stablity` | 12 |
| `environment damage` | 11 |
| `quality of first fold` | 10 |
| `damage to environment` | 10 |
| `destruction to environment` | 5 |
| `environmental damage` | 2 |
| `damage caused to environment` | 1 |
| `Quality of placement of big plate` | 1 |
| `Quality of placement of small plate` | 1 |
| `Quality of placement of cup` | 1 |
| `Quality of placement of cutlery` | 1 |
| `Smoothness / carefulness` | 1 |
| `Speed` | 1 |
| `Formality of setup` | 1 |

### Pairs by source

| source | directory | axis set | pairs |
|---|---|---|---|
| cross | `abhijnya/cross_preferences` | fixed | 61 |
| cross | `am208/cross_preferences` | fixed | 690 |
| cross | `am208/cross_preferences_extra` | fixed | 498 |
| in_session | `am208/preferences` | fixed | 79 |
| in_session | `am208/preferences_fold_pants_free` | freeform | 120 |

## Usage

```python
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset
ds = LeRobotDataset("MarcelTorne/fold_pants_preferences")
print(ds[0].keys())
```

```python
# train a reward model on the pairwise labels
import pandas as pd
from huggingface_hub import hf_hub_download
prefs = pd.read_parquet(hf_hub_download("MarcelTorne/fold_pants_preferences", "preferences/pairs.parquet",
                                        repo_type="dataset"))
decisive = prefs[prefs.winner != "Equal"]           # drop ties
overall  = decisive[decisive.axis.str.lower().str.contains("overall")]
```

Both cameras are `dtype: video`. `observation.state` is
`[joint_0..joint_6, gripper]`, `observation.ee` is `[x, y, z, roll, pitch, yaw]`,
and `action` is the commanded `[joint_position(7), gripper_position(1)]`.

## Caveats

- **Frames are h264 (crf 16), not bit-exact.** The source HDF5 held raw uint8
  frames; re-encoding at the same 224x224 resolution shrinks the release ~100x at
  41.8 dB PSNR (mean absolute error 1.1/255, 99th pct 7/255), measured on
  fold_pants cloth texture. Do not expect byte-level reproduction of the originals.
- **`Equal` is common on some axes.** Annotators used it freely; filter deliberately.
- **`freeform` axis names are not a closed vocabulary.** They were invented per
  session, so the same idea appears under several names (`fast` / `speed`,
  `smooth` / `smoothness`). Normalise before aggregating across sessions.
- **A pair can be labelled by more than one annotator.** The two annotators' cross-pair
  sets are near-disjoint, but not perfectly; group by `pair_id` if you need unique pairs.
- **Instructions on `rollout` episodes sometimes carry reward conditioning** (e.g.
  `"fold the shorts, fast: 1.0, ..."`) because the policy that produced them was
  reward-conditioned. The LeRobot task string is the plain instruction; the logged
  string is kept in `preferences/episodes.parquet`.
- **No success labels on `demo` episodes** — they are demonstrations, assumed good.

## Related datasets

Same robot, same collection pipeline, same schema — four tasks released together:

- **`MarcelTorne/fold_pants_preferences`** (fold the shorts) — this dataset
- [`MarcelTorne/setup_table_preferences`](https://huggingface.co/datasets/MarcelTorne/setup_table_preferences) — set up the table
- [`MarcelTorne/put_cube_in_bowl_preferences`](https://huggingface.co/datasets/MarcelTorne/put_cube_in_bowl_preferences) — put the cube in the bowl
- [`MarcelTorne/plate_toast_preferences`](https://huggingface.co/datasets/MarcelTorne/plate_toast_preferences) — put the toast in the plate

## License

MIT.