The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
image
image |
|---|
Robot ManiSkill ImageβState Dataset
0. Update
12.2
delete pick_cube_rgb_traj_v1
11.30
pick_cube_rgb_traj_v2: rendering images with cube in pickcube task.
11.28
pick_cube_rgb_traj_v1: Trajectory subset
pick_cube_rgb_random_v1: Random joint sampling subset
1. Overview
This dataset is generated in the ManiSkill simulation environment.
It contains two types of data pairs:
Random joint sampling subset
- Randomly sampled robot joint configurations (qpos).
- For each sampled configuration, multi-view RGBD images are rendered.
Trajectory subset
- Full trajectories from ManiSkill's demonstrations (.h5).
- For each time step, one-view RGBD images are rendered.
2. Dataset Structure
On the Hub, the dataset is organized as follows:
surgingTu/robot-maniskill-image-state-dataset-v1
βββ pickcube_rgb_traj_v1/
β βββ PickCube-v1/
β βββ traj_0/
β βββ traj_1/
β βββ ...
β βββ traj_K/
βββ pickcube_rgb_random_v1/
βββ random_robot_rendering/
βββ sample_0000/
βββ sample_0001/
βββ ...
βββ sample_NNNN/
2.1 Trajectory subset
Each trajectory directory (e.g. traj_0) has the structure:
pickcube_rgb_traj_v1/PickCube-v1/traj_0/
βββ images/
β βββ {CAM_NAME}_step0000.png
| βββ {CAM_NAME}_step0000_depth.npy
β βββ {CAM_NAME}_step0001.png
| βββ {CAM_NAME}_step0001_depth.npy
β βββ ...
β βββ {CAM_NAME}_step{T-1:04d}.png
β βββ {CAM_NAME}_step{T-1:04d}_depth.npy
βββ actions.npy # shape (T, A), low-level actions per time step
βββ qpos.npy # shape (T, D_qpos), joint positions per time step
βββ camera_params.json
βββ ...
CAM_NAME encodes the camera configuration (e.g. y_angle_0_z_angle_0). *_stepXXXX.png is the image at time step XXXX.
All cameras share the same step index.
2.2 Random joint sampling subset
Each random sample directory (e.g. sample_0000) has the structure:
pickcube_rgb_random_v1/random_robot_rendering/sample_0000/
βββ images/
β βββ {CAM_NAME}_sample0000.png
| βββ {CAM_NAME}_sample0000_depth.npy
β βββ {CAM_NAME}_sample0001.png
| βββ {CAM_NAME}_sample0001_depth.npy
β βββ ...
β βββ {CAM_NAME}_sample{M-1:04d}.png
β βββ {CAM_NAME}_sample{M-1:04d}_depth.npy
βββ qpos.npy # shape (M, D_qpos), random joint configurations
βββ camera_params.json
βββ ...
For this subset, filenames use *_sampleXXXX.png instead of *_stepXXXX.png.
3. Reference dataloader function
Below is a minimal reference function for loading one directory (either a single traj_* or sample_* folder). It parses multi-view images and the corresponding actions.npy (or can be adapted to qpos.npy).
import numpy as np
import imageio.v2 as imageio
def load_obs_qpos_pair_from_dir(path):
"""
Load multi-view RGB observations and corresponding actions from a directory.
e.g. path = ~/mani_datasets/pickcube_rgb_traj_v1/PickCube-v1/traj_0
or path = ~/mani_datasets/pickcube_rgb_random_v1/random_robot_rendering/sample_0000
Expected directory structure:
path/
βββ images/
β βββ {CAM_NAME}_step0000.png
β βββ {CAM_NAME}_step0001.png
β βββ ...
βββ actions.npy
tips: change "step" to "sample" if the dataset is from random robot rendering.
- Images follow the pattern: "{cam_name}_step{STEP:04d}.png"
e.g. "y_angle_0_z_angle_0_step0065.png".
Returns:
image_dict: dict[step_idx][cam_name] -> (H, W, 3) image array
actions: np.ndarray of shape (T, A) or other .npy file (e.g. qpos.npy)
"""
from pathlib import Path
print("Loading obs and qpos pair from directory", path)
path = Path(path)
# image
images_dir = path / "images"
image_dict = {}
image_png_dict = {}
for p in sorted(images_dir.glob("*.png")):
name = p.stem
if "_step" not in name:
continue
# ζζεδΈδΈͺ "_step" εεΌ
cam_name, step_str = name.rsplit("_step", 1) # cam_name = y_angle_0_z_angle_0, step_str = 0065
step_idx = int(step_str) # step0000 -> 0, step0065 -> 65
if step_idx not in image_dict:
image_dict[step_idx] = {}
# ζ step εη»οΌεζ camera name εθ·―εΎ
image_dict[step_idx][cam_name] = str(p)
for step_idx in image_dict:
if step_idx not in image_png_dict:
image_png_dict[step_idx] = {}
for cam_name in image_dict[step_idx]:
if cam_name not in image_png_dict[step_idx]:
image_png_dict[step_idx][cam_name] = {}
image_path_tmp = image_dict[step_idx][cam_name]
if image_path_tmp.endswith('.png'):
image_png_dict[step_idx][cam_name] = imageio.imread(image_path_tmp)
# actions
action_files = list(path.glob("actions.npy"))
action = np.load(action_files[0])
print("action shape")
print(action.shape)
if len(image_png_dict) != action.shape[0]:
raise ValueError(f"image_png_dict length: {len(image_png_dict)} != action length: {action.shape[0]}")
# qpos
# qpos_files = list(path.glob("qpos.npy"))
# qpos = np.load(qpos_files[0])
# print(qpos.shape)
# if len(image_png_dict) != qpos.shape[0]:
# raise ValueError(f"image_png_dict length: {len(image_png_dict)} != qpos length: {qpos.shape[0]}")
return image_png_dict, action
- Downloads last month
- 7,101