AtomAction_Dataset / README.md
Weizm's picture
Add dataset card
8a12fb4 verified
|
Raw
History Blame Contribute Delete
10.5 kB
---
pretty_name: AtomAction Dataset
language:
- en
tags:
- robotics
- rlbench
- robot-manipulation
- imitation-learning
- multimodal
- image
- timeseries
size_categories:
- 10K<n<100K
---
# AtomAction Dataset
AtomAction is a phase-level robot-manipulation dataset derived from RLBench
expert demonstrations. Full task demonstrations are segmented into short,
semantically labeled atomic-action phases and reorganized as:
```text
atomic action -> RLBench task -> task variation -> phase sample
```
Each phase contains a variable-length low-dimensional robot trajectory,
start/end observations from five cameras, segmentation metadata, and an atomic
action label. The release is intended for atomic-action representation
learning, robot trajectory modeling, phase classification, multimodal
pretraining, and analysis of reusable manipulation primitives.
## Dataset Summary
| Property | Value |
|---|---:|
| Atomic-action labels | 18 |
| Unique RLBench tasks | 69 |
| Task variations | 545 |
| Phase samples | 57,803 |
| Camera views | 5 |
| Image resolution | 256 x 256 |
| Official train/validation/test split | Not provided |
The 18 action labels are:
```text
approach, flip-close, flip-open, grasp, hang, insert, lift, place,
pose-adjust, press, pull, push, revolve-in, revolve-out, rotate,
slide, transfer, wipe
```
### Samples per action
| Action | Phase samples |
|---|---:|
| `approach` | 11,998 |
| `flip-close` | 400 |
| `flip-open` | 200 |
| `grasp` | 13,074 |
| `hang` | 100 |
| `insert` | 283 |
| `lift` | 9,104 |
| `place` | 6,265 |
| `pose-adjust` | 1,307 |
| `press` | 1,200 |
| `pull` | 800 |
| `push` | 800 |
| `revolve-in` | 200 |
| `revolve-out` | 600 |
| `rotate` | 2,132 |
| `slide` | 600 |
| `transfer` | 8,340 |
| `wipe` | 400 |
The class distribution is imbalanced. Use per-class sampling, weighting, or
macro-averaged metrics where appropriate.
## Directory Structure
```text
AtomAction_Dataset/
├── dataset_metadata.json
├── build_atomaction_lowdim_features.py
└── {action}/
├── action_metadata.json
└── {task}/
├── task_metadata.json
└── variation{N}/
├── variation_metadata.json
└── phase_{NNN}/
├── low_dim_obs.pkl
├── phase_metadata.json
├── front_{rgb,depth,mask}/
├── left_shoulder_{rgb,depth,mask}/
├── right_shoulder_{rgb,depth,mask}/
├── overhead_{rgb,depth,mask}/
└── wrist_{rgb,depth,mask}/
```
One `phase_{NNN}` directory is one dataset sample. The numeric phase name is an
output sample index within its action/task/variation directory; the original
phase index and frame boundaries are recorded in `phase_metadata.json`.
## Data Fields
### Low-dimensional trajectory
`low_dim_obs.pkl` stores a Python list of
`rlbench.backend.observation.Observation` objects, one per trajectory step. The
canonical trajectory fields used by this dataset are:
| Field | Per-frame shape | Description |
|---|---:|---|
| `joint_positions` | 7 | Robot joint positions |
| `joint_velocities` | 7 | Robot joint velocities |
| `joint_forces` | 7 | Robot joint forces/torques |
| `gripper_pose` | 7 | XYZ position and XYZW quaternion |
| `gripper_open` | scalar | Gripper open state |
| `gripper_joint_positions` | 2 | Gripper joint positions |
| `gripper_touch_forces` | 6 | Gripper touch-force readings |
The trajectory length varies by phase. Image arrays and point clouds inside the
pickled observations were cleared before serialization to reduce file size;
camera observations are stored separately as PNG files.
Global low-dimensional statistics are available in
`dataset_metadata.json["traj_stats"]`. These include sample counts, mean,
variance, standard deviation, minimum, maximum, and 1st/99th percentiles.
### Camera observations
The five views are:
```text
front, left_shoulder, right_shoulder, overhead, wrist
```
For each view, the phase directory contains RGB, depth, and mask folders. The
saved PNGs correspond to phase boundary observations (normally the start and
end frames), while `low_dim_obs.pkl` contains the complete low-dimensional
sequence.
- RGB files are standard 8-bit RGB PNGs.
- Depth files are RLBench RGB-encoded depth PNGs and should be decoded with
RLBench utilities rather than treated as color images.
- Mask files are RGB PNGs containing simulator segmentation-mask values.
### Metadata
- `dataset_metadata.json`: dataset-wide counts, label inventory, and trajectory
statistics.
- `action_metadata.json`: task inventory and counts for one atomic action.
- `task_metadata.json`: variation inventory and statistics for one
action/task pair.
- `variation_metadata.json`: per-phase action labels and eight English
instruction styles (`short`, `clear`, `object_focused`, `goal_focused`,
`detailed`, `abstract`, `natural`, and `instructional`).
- `phase_metadata.json`: source phase index, keyframe, frame boundaries,
trajectory length, interaction signals, and optional cached camera-view
change scores.
## Download and Load
This repository uses a native RLBench directory layout rather than a
Parquet/Arrow table. Download the complete repository with Git LFS or
`huggingface_hub`:
```bash
git lfs install
git clone https://huggingface.co/datasets/<YOUR_HF_NAMESPACE>/AtomAction_Dataset
```
or:
```python
from huggingface_hub import snapshot_download
dataset_root = snapshot_download(
repo_id="<YOUR_HF_NAMESPACE>/AtomAction_Dataset",
repo_type="dataset",
)
print(dataset_root)
```
Because the low-dimensional trajectories contain pickled RLBench
`Observation` objects, load them only from a trusted source and use a compatible
RLBench/PyRep environment:
```python
import json
import pickle
from pathlib import Path
from PIL import Image
root = Path("AtomAction_Dataset")
phase_dir = root / "grasp" / "open_drawer" / "variation0" / "phase_000"
with (phase_dir / "low_dim_obs.pkl").open("rb") as f:
observations = pickle.load(f)
with (phase_dir / "phase_metadata.json").open(encoding="utf-8") as f:
metadata = json.load(f)
rgb_files = sorted(
(phase_dir / "front_rgb").glob("*.png"),
key=lambda path: int(path.stem),
)
start_rgb = Image.open(rgb_files[0]).convert("RGB")
end_rgb = Image.open(rgb_files[-1]).convert("RGB")
print(metadata["action"], metadata["task_name"])
print("trajectory length:", len(observations))
print("first gripper pose:", observations[0].gripper_pose)
print("RGB size:", start_rgb.size)
```
To enumerate every phase without assuming a fixed task list:
```python
import json
from pathlib import Path
def iter_phase_dirs(root: Path):
dataset_meta = json.loads(
(root / "dataset_metadata.json").read_text(encoding="utf-8")
)
for action in dataset_meta["actions"]:
action_dir = root / action
action_meta = json.loads(
(action_dir / "action_metadata.json").read_text(encoding="utf-8")
)
for task in action_meta["tasks"]:
task_dir = action_dir / task
task_meta = json.loads(
(task_dir / "task_metadata.json").read_text(encoding="utf-8")
)
for variation in task_meta["variation_names"]:
yield from sorted((task_dir / variation).glob("phase_*"))
phase_dirs = list(iter_phase_dirs(Path("AtomAction_Dataset")))
print(len(phase_dirs)) # 57803
```
## Auxiliary Feature-Extraction Script
`build_atomaction_lowdim_features.py` is an optional offline analysis utility;
it is not required to load or train on the dataset. For every phase, it
concatenates the seven canonical low-dimensional fields into a 37-dimensional
per-frame vector and summarizes the sequence with:
```text
start + end + (end - start) + mean + standard deviation
```
This produces a 185-dimensional phase feature and exports compressed NPZ, CSV,
and JSON summary files. `--max-per-action` applies deterministic per-action
reservoir sampling, which is useful for balanced visualization or classical
machine-learning experiments.
```bash
python build_atomaction_lowdim_features.py \
--root . \
--out-dir ./lowdim_features \
--prefix atomaction_lowdim \
--max-per-action 400 \
--seed 42
```
The script may be removed if these derived low-dimensional summaries do not
need to be regenerated. Removing it does not remove data and does not affect
the native dataset layout.
## Intended Uses
- Learning representations or codebooks for reusable atomic robot actions.
- Atomic-action or phase classification.
- Modeling variable-length low-dimensional manipulation trajectories.
- Multimodal learning from robot state and multi-view phase-boundary images.
- Studying transfer across RLBench tasks and variations.
## Limitations and Responsible Use
- All observations are generated in simulation; results may not transfer
directly to real robots.
- The action classes are substantially imbalanced.
- No official train/validation/test split is included. Random phase-level
splitting can leak very similar demonstrations across splits. Prefer
task-level or variation-level splits and report the split protocol.
- The release includes `pose-adjust`. Its annotation quality should be audited
before training; the associated VQAP training configuration excludes this
label.
- Phase descriptions and action boundaries may contain annotation errors.
- Pickle can execute arbitrary code during deserialization. Do not unpickle
files from untrusted or modified copies of the dataset.
- The dataset is designed for research in simulation, not direct deployment on
physical robots or safety-critical control.
## License
No dataset-specific license file was present when this card was prepared.
Users should not infer a permissive license from this README. Before using or
redistributing the dataset, review the RLBench license and the terms of its
third-party simulator assets, and add an explicit dataset license to this
repository.
## Citation
If you use this dataset, cite the dataset release (once a canonical citation is
provided by the maintainers) and the RLBench paper:
```bibtex
@article{james2020rlbench,
title = {RLBench: The Robot Learning Benchmark \& Learning Environment},
author = {James, Stephen and Ma, Zicong and Rovick Arrojo, David and Davison, Andrew J.},
journal = {IEEE Robotics and Automation Letters},
year = {2020}
}
```