mimicgen_threading_d0_224x224_seg
收藏资源简介:
该数据集来源于[`chomeed/mimicgen_threading_d0_224x224`](https://huggingface.co/datasets/chomeed/mimicgen_threading_d0_224x224),每个原始片段被裁剪为从“抓取”到“终止”的单一剪辑。任务相同,相机相同,20帧每秒,特征模式相同。裁剪后仅保留机器人手部抓住针并尝试插入的部分,去除了接近和结果后的帧。共1000个片段,保留了170509帧(占原始224508帧的76%)。裁剪规则:起始点为机械臂末端执行器距离针小于80毫米且持续40帧以上的第一帧;终止点分为两种情况:奖励片段(rewarded)为奖励大于0的第一帧,未奖励片段(unrewarded)为抓取后针与三脚架偏移量最接近成功片段终点的帧。未奖励片段的终止点不标记为MDP终止(is_terminal为False),奖励片段则标记为True。元数据记录了每个片段的源索引、长度、抓取帧、终止帧等。数据集包含1000个片段,每片段平均171帧,最小138帧,最大211帧。
This dataset is derived from [`chomeed/mimicgen_threading_d0_224x224`](https://huggingface.co/datasets/chomeed/mimicgen_threading_d0_224x224), where each original episode is trimmed into a single clip from grasp to termination. The task, camera, frame rate (20 fps), and feature modality are the same. After trimming, only the part where the robot hand grasps the needle and attempts to insert it is retained, removing frames before approach and after result. There are 1000 episodes, retaining 170,509 frames (76% of the original 224,508 frames). Trimming rules: the start point is the first frame where the end-effector distance to the needle is less than 80 mm and lasts for more than 40 frames; the end point has two cases: for rewarded episodes, it is the first frame with reward greater than 0; for unrewarded episodes, it is the frame where the offset between the needle and the tripod after grasping is closest to the end point of successful episodes. The termination of unrewarded episodes is not marked as MDP termination (is_terminal=False), while rewarded episodes are marked as True. Metadata records the source index, length, grasp frame, termination frame, etc. for each episode. The dataset contains 1000 episodes, with an average of 171 frames per episode, minimum 138, maximum 211.
数据集概述:chomeed/mimicgen_threading_d0_224x224_seg
基本信息
| 属性 | 内容 |
|---|---|
| 任务类别 | 机器人(Robotics) |
| 许可证 | Apache 2.0 |
| 机器人类型 | Panda |
| 视频帧率 | 20 FPS |
| 总回合数 | 1000 |
| 总帧数 | 170,509 |
| 任务数量 | 1 |
数据集描述
该数据集是对 chomeed/mimicgen_threading_d0_224x224 数据集中的每一个 episode 进行裁剪,仅保留从 抓取(grasp)→ 末端(terminal) 的关键片段。裁剪后移除了接近阶段和结果后阶段的帧,保留的是针在手中并执行插入操作的部分。数据集中保留了原始数据集中 1000 个 episode 中的全部 1000 个(100%),共 170,509 帧(占源数据 224,508 帧的 76%)。
裁剪规则
起点(抓取判定)
- episode 在被裁剪为闭区间
[grasp, terminal],起点为末端执行器与针的距离首次进入 80 mm 阈值内,且后续 40 帧中超过 90% 仍低于该阈值的首帧。 - 距离基于
observation.state[0:3](末端执行器)与observation.state[9:12](针)计算。 - 由于坐标原点偏移,距离最低约为 59 mm,不会为零;50 mm 阈值仅对极少 episode 生效,80 mm 阈值对所有 episode 均生效。
终点(末端判定)
终点判定区分两种情况,并通过 rewarded 字段记录:
- 奖励型 episode(被判定为成功穿线的时刻):终点为第一次出现
reward > 0的帧,即针被判定穿线成功的时刻。 - 未奖励型 episode(失败回放及部分奖励通道未触发的演示):终点为抓取之后,针到三脚架的距离与成功 episode 终点距离(
ref = [0.8, 31.0, 89.4] mm)欧氏距离最近的帧,即"最接近成功"的最近失败帧。
不采用时间限制的原因
失败回放运行至 400 步超时,随后机器人通常会打翻三脚架。若以超时作为终点,会得到成功 episode 从未出现的场景状态,且长度约为成功片段的两倍。在最近失败点处裁剪,失败 episode 的终点约为源 episode 的 50%(奖励型为 97-100%),且两类 clip 结束于同一事件——插入尝试结果判定。
最小长度限制
片段短于 20 帧(1 秒)的被丢弃,本例中无任何 episode 落入此情况。
裁剪后的数据调整
| 列名 | 处理方式 |
|---|---|
frame_index, index, timestamp |
从 0 重新编号 |
episode_index |
在保留的 episode 上重新编号 |
is_first |
新第 0 帧设为 True |
is_last, done |
新最后一帧设为 True |
is_terminal |
仅当 episode 为奖励型时,新最后一帧设为 True |
注意:is_terminal 对强化学习至关重要。奖励型 clip 结束于真实 MDP 终止状态;未奖励 clip 的结束点(最近失败)实际上是截断,其最终状态应保持可引导(bootstrappable),故 is_terminal 保持 False。
以下字段原样保留:reward, success, source_demo_index, observation.*, action。
数据统计
| 指标 | 数值 |
|---|---|
| 保留 episode 数 | 1000 / 1000 |
| 保留帧数 | 170,509 / 224,508(76%) |
| 奖励型 episode 数 | 996 / 1000 |
| 抓取帧位置 | 平均第 49 帧(约占源 episode 的 22%) |
| clip 长度 | 均值 171 帧,最小 138 帧,最大 211 帧 |
| 终点残差 | 中位数 5.3 mm,p90 为 9.1 mm,最大 15.3 mm |
逐 episode 元数据
文件 meta/segment_info.json 记录了每个源 episode(包括被丢弃的)的裁剪信息:
json {"source_episode_index": 0, "source_length": 194, "grasp_frame": 39, "terminal_frame": 180, "length": 142, "rewarded": true, "endpoint_residual_mm": 7.619936466217041, "kept": true, "episode_index": 0}
endpoint_residual_mm表示该 episode 终点与参考距离ref的实际偏差,可用于筛选过滤。- 奖励型 episode 的残差通常较小;未奖励 episode 若从未接近三脚架,其残差会较大,反映该 clip 并非真正的"接近成功"。
数据特征结构
主要特征包括:
- 观测图像:
agentview(外部视角)和eye_in_hand(手眼相机),均为 224×224×3,视频编码 AV1,20 FPS - 观测状态:
observation.state(37 维)、observation.sim_state(45 维)、observation.robot0_eef_pos/quat/vel、夹爪状态、关节位置/速度等 - 基础字段:
action(7 维 float32)、reward、done、success、is_first、is_last、is_terminal、source_demo_index - 索引字段:
frame_index、episode_index、index、task_index、timestamp
数据划分
- 训练集:
train: 0:1000(全量 1000 个 episode 均属于训练集)
构建工具
- 数据集由
experiments/0905/seg/build_seg.py构建 - 片段裁剪规则定义于
experiments/0905/seg/segments.py - 基于 LeRobot 框架创建



