494 lines
21 KiB
Python
494 lines
21 KiB
Python
# 来源: RoboTwin仓库 scripts/collect_data.py @ 30954692d06ba7e89f7a6b76064f4062c488fa81
|
|
# 改动点:
|
|
# 1) 超参经环境变量注入, ws_common.config_override 统一解析覆盖 (优先级: env > 预设 yml > 内置默认)
|
|
# 2) 配置目录合并 (仓库 env_cfg/task_config 全部 yml + presets 扩展) 后改写 CONFIGS_PATH,
|
|
# 支持四相机预设与扩展相机类型表; 合并目录内 _embodiment_config.yml 的 file_path 已固化为
|
|
# 容器内绝对路径; 仓库本体不动
|
|
# 3) front_camera_type (预设扩展键或超参) 注入本体配置 static_camera_list 非 head 条目, 不改仓库
|
|
# 4) 每个 hdf5 落盘后追加 task_description 字段 (h5py 后处理, 不改仓库写入链)
|
|
# 5) 逐 episode 进度标记 DROBOTICFLOW_PROGRESS; 渲染自检失败非 0 退出
|
|
# 6) 多任务循环由本文件承担 (TASK_NAME 逗号分隔), 产物按 OUTPUT_ROOT/<task>/{data,videos} 布局,
|
|
# 每任务写 meta.json 采集摘要, 结束写 $OUTPUT_DIR/.artifacts.json
|
|
|
|
from __future__ import annotations
|
|
|
|
import importlib
|
|
import json
|
|
import os
|
|
import re
|
|
import shutil
|
|
import sys
|
|
import time
|
|
from pathlib import Path
|
|
|
|
import h5py
|
|
import yaml
|
|
|
|
APP_SRC = Path(os.environ.get("APP_SRC", "/app/src"))
|
|
ROBOTWIN_ROOT = Path(os.environ.get("ROBOTWIN_ROOT", str(APP_SRC / "RoboTwin")))
|
|
PRESETS_DIR = Path(os.environ.get("PRESETS_DIR", str(APP_SRC / "presets")))
|
|
|
|
for _p in (str(APP_SRC), str(ROBOTWIN_ROOT)):
|
|
if _p not in sys.path:
|
|
sys.path.insert(0, _p)
|
|
os.chdir(ROBOTWIN_ROOT) # 仓库相对路径 (./assets/...) 的解析基准
|
|
|
|
from ws_common import config_override, report_utils # noqa: E402
|
|
|
|
# 配置目录合并 + CONFIGS_PATH 改写: 必须先于 `from envs import *` 与任务类加载
|
|
# (envs 内多个模块在 import 期值拷贝 CONFIGS_PATH)
|
|
MERGED_CONFIG_DIR = config_override.build_merged_config_dir(ROBOTWIN_ROOT, PRESETS_DIR)
|
|
CONFIGS_PATH = config_override.install_config_dir(MERGED_CONFIG_DIR)
|
|
|
|
from envs import * # noqa: E402,F401,F403 (CONFIGS_PATH 已指向合并目录)
|
|
from envs.utils.create_actor import UnStableError # noqa: E402
|
|
from description.utils.generate_episode_instructions import ( # noqa: E402
|
|
generate_episode_descriptions,
|
|
)
|
|
|
|
|
|
def sapien_render_check() -> None:
|
|
"""渲染自检 (对齐 scripts/test_render.py 的 setup_scene), 失败非 0 退出。
|
|
|
|
官方 Sapien_TEST 失败时 bare exit() 退出码为 0, 上层无法感知, 此处改为显式非 0。
|
|
"""
|
|
import sapien.core as sapien # noqa: PLC0415
|
|
from sapien.render import set_global_config # noqa: PLC0415
|
|
|
|
try:
|
|
engine = sapien.Engine()
|
|
set_global_config(max_num_materials=50000, max_num_textures=50000)
|
|
renderer = sapien.SapienRenderer()
|
|
engine.set_renderer(renderer)
|
|
sapien.render.set_camera_shader_dir("rt")
|
|
sapien.render.set_ray_tracing_samples_per_pixel(32)
|
|
sapien.render.set_ray_tracing_path_depth(8)
|
|
sapien.render.set_ray_tracing_denoiser("oidn")
|
|
scene = engine.create_scene(sapien.SceneConfig())
|
|
del scene, renderer, engine
|
|
except SystemExit:
|
|
raise
|
|
except Exception as exc:
|
|
print(f"[render-check] FAILED: {type(exc).__name__}: {exc}", file=sys.stderr)
|
|
sys.exit(1)
|
|
print("[render-check] Render Well")
|
|
|
|
|
|
def resolve_output_root(value: str, label: str = "OUTPUT_ROOT") -> str:
|
|
"""输出根路径解析: 空回落 OUTPUT_DIR; 相对路径相对 OUTPUT_DIR; 绝对路径原样。
|
|
|
|
相对路径语义面向平台: OUTPUT_DIR 是节点工作区, 注入相对子目录名即可把产物
|
|
树钉到 OUTPUT_DIR 下的固定位置。独立 docker run 场景传绝对路径或留空。
|
|
"""
|
|
output_dir = os.environ.get("OUTPUT_DIR", "")
|
|
text = (value or "").strip()
|
|
if not text:
|
|
text = output_dir
|
|
if not text:
|
|
sys.exit(f"[hyperparam] neither {label} nor OUTPUT_DIR is set")
|
|
if not os.path.isabs(text):
|
|
if not output_dir:
|
|
sys.exit(f"[hyperparam] relative {label}={text!r} requires OUTPUT_DIR to be set")
|
|
text = os.path.join(output_dir, text)
|
|
return text
|
|
|
|
|
|
def read_hyperparams() -> dict:
|
|
env = os.environ
|
|
task_names = [t.strip() for t in env.get("TASK_NAME", "").split(",") if t.strip()]
|
|
if not task_names:
|
|
sys.exit("[hyperparam] TASK_NAME is required (comma-separated task list)")
|
|
hp = {
|
|
"task_names": task_names,
|
|
"task_config": env.get("TASK_CONFIG", "") or "demo_clean",
|
|
"output_root": resolve_output_root(env.get("OUTPUT_ROOT", "")),
|
|
"video_output_root": resolve_output_root(env.get("VIDEO_OUTPUT_ROOT", ""), "VIDEO_OUTPUT_ROOT")
|
|
if (env.get("VIDEO_OUTPUT_ROOT", "") or "").strip()
|
|
else "",
|
|
"seed": config_override.parse_typed(env.get("SEED", "") or "0", "int", "SEED"),
|
|
# EMBODIMENT / EPISODE_NUM / USE_SEED / COLLECT_DATA / 相机与域随机化覆盖键
|
|
# 全部经 config_override.apply_env_overrides 以同一优先级作用于预设 args
|
|
}
|
|
return hp
|
|
|
|
|
|
def separate_video_tree(output_root: Path, video_root: Path, task_names: list) -> None:
|
|
"""VIDEO_OUTPUT_ROOT 非空时, 把各任务目录下的 videos/ 移到独立视频树。
|
|
|
|
移动后 hdf5 数据集树 (OUTPUT_ROOT) 不再含视频文件, 两个端口的产物目录互斥,
|
|
平台外部化时各自成清单、不重复上传; 独立运行场景不设置该变量, 布局不变。
|
|
"""
|
|
for task_name in task_names:
|
|
src = output_root / task_name / "videos"
|
|
if not src.is_dir():
|
|
continue
|
|
dst = video_root / task_name / "videos"
|
|
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
if dst.exists():
|
|
shutil.rmtree(dst)
|
|
shutil.move(str(src), str(dst))
|
|
print(f"[layout] moved {src} -> {dst}")
|
|
|
|
|
|
def build_episode_instructions(args, episode_info, episode_idx):
|
|
fallback = args["task_name"].replace("_", " ")
|
|
info = episode_info.get("info", {}) if isinstance(episode_info, dict) else {}
|
|
generated = generate_episode_descriptions(
|
|
args["task_name"], [info], int(args.get("language_num") or 100)
|
|
)
|
|
if generated:
|
|
episode_descriptions = generated[0]
|
|
else:
|
|
episode_descriptions = {"seen": [], "unseen": []}
|
|
|
|
episode_descriptions["episode_index"] = episode_idx
|
|
for split in ("seen", "unseen"):
|
|
if not episode_descriptions.get(split):
|
|
episode_descriptions[split] = [fallback]
|
|
|
|
instruction_dir = os.path.join(args["save_path"], "instruction")
|
|
os.makedirs(instruction_dir, exist_ok=True)
|
|
with open(
|
|
os.path.join(instruction_dir, f"episode_{episode_idx:07d}.json"),
|
|
"w",
|
|
encoding="utf-8",
|
|
) as file:
|
|
json.dump(
|
|
{
|
|
"seen": episode_descriptions["seen"],
|
|
"unseen": episode_descriptions["unseen"],
|
|
},
|
|
file,
|
|
ensure_ascii=False,
|
|
indent=2,
|
|
)
|
|
return episode_descriptions
|
|
|
|
|
|
def class_decorator(task_name):
|
|
envs_module = importlib.import_module(f"envs.{task_name}")
|
|
try:
|
|
env_class = getattr(envs_module, task_name)
|
|
env_instance = env_class()
|
|
except Exception as exc:
|
|
raise SystemExit(f"No such task: {task_name} ({exc})") from exc
|
|
return env_instance
|
|
|
|
|
|
def get_embodiment_config(robot_file):
|
|
robot_config_file = os.path.join(robot_file, "config.yml")
|
|
with open(robot_config_file, "r", encoding="utf-8") as f:
|
|
embodiment_args = yaml.load(f.read(), Loader=yaml.FullLoader)
|
|
return embodiment_args
|
|
|
|
|
|
def print_config(args, embodiment_name) -> None:
|
|
print("============= Config =============\n")
|
|
print("\033[95mMessy Table:\033[0m " + str(args["domain_randomization"]["cluttered_table"]))
|
|
print("\033[95mRandom Background:\033[0m " + str(args["domain_randomization"]["random_background"]))
|
|
if args["domain_randomization"]["random_background"]:
|
|
print(" - Clean Background Rate: " + str(args["domain_randomization"]["clean_background_rate"]))
|
|
print("\033[95mRandom Light:\033[0m " + str(args["domain_randomization"]["random_light"]))
|
|
if args["domain_randomization"]["random_light"]:
|
|
print(" - Crazy Random Light Rate: " + str(args["domain_randomization"]["crazy_random_light_rate"]))
|
|
print("\033[95mRandom Table Height:\033[0m " + str(args["domain_randomization"]["random_table_height"]))
|
|
print("\033[95mRandom Head Camera Distance:\033[0m " + str(args["domain_randomization"]["random_head_camera_dis"]))
|
|
print("\033[94mHead Camera Config:\033[0m " + str(args["camera"]["head_camera_type"]) + f", " +
|
|
str(args["camera"]["collect_head_camera"]))
|
|
print("\033[94mWrist Camera Config:\033[0m " + str(args["camera"]["wrist_camera_type"]) + f", " +
|
|
str(args["camera"]["collect_wrist_camera"]))
|
|
front_type = args["camera"].get("front_camera_type")
|
|
print("\033[94mFront Camera Config:\033[0m " + (str(front_type) if front_type else "(embodiment default)"))
|
|
print("\033[94mEmbodiment Config:\033[0m " + embodiment_name)
|
|
print("\n==================================")
|
|
|
|
|
|
def load_task_args(task_name: str, hp: dict) -> dict:
|
|
config_path = os.path.join(CONFIGS_PATH, f"{hp['task_config']}.yml")
|
|
if not os.path.isfile(config_path):
|
|
available = sorted(p.stem for p in Path(CONFIGS_PATH).glob("*.yml") if not p.name.startswith("_"))
|
|
sys.exit(
|
|
f"[config] task config '{hp['task_config']}' not found; available presets: {available}"
|
|
)
|
|
with open(config_path, "r", encoding="utf-8") as f:
|
|
args = yaml.load(f.read(), Loader=yaml.FullLoader)
|
|
|
|
args["task_name"] = task_name
|
|
args["task_config"] = hp["task_config"]
|
|
|
|
# 超参覆盖 (env > 预设 yml > 内置默认), 含 EMBODIMENT / EPISODE_NUM / 相机 / 域随机化
|
|
applied = config_override.apply_env_overrides(args)
|
|
if applied:
|
|
print("[override] " + ", ".join(f"{k} -> {v}" for k, _p, v in applied))
|
|
|
|
embodiment_type = args.get("embodiment")
|
|
with open(os.path.join(CONFIGS_PATH, "_embodiment_config.yml"), "r", encoding="utf-8") as f:
|
|
_embodiment_types = yaml.load(f.read(), Loader=yaml.FullLoader)
|
|
|
|
def get_embodiment_file(embodiment):
|
|
if embodiment not in _embodiment_types:
|
|
sys.exit(
|
|
f"[config] embodiment '{embodiment}' not defined in _embodiment_config.yml; "
|
|
f"available: {sorted(_embodiment_types)}"
|
|
)
|
|
robot_file = _embodiment_types[embodiment]["file_path"]
|
|
if robot_file is None:
|
|
sys.exit(f"[config] embodiment '{embodiment}' has no file_path")
|
|
return robot_file
|
|
|
|
if len(embodiment_type) == 1:
|
|
args["left_robot_file"] = get_embodiment_file(embodiment_type[0])
|
|
args["right_robot_file"] = get_embodiment_file(embodiment_type[0])
|
|
args["dual_arm_embodied"] = True
|
|
embodiment_name = str(embodiment_type[0])
|
|
elif len(embodiment_type) == 3:
|
|
args["left_robot_file"] = get_embodiment_file(embodiment_type[0])
|
|
args["right_robot_file"] = get_embodiment_file(embodiment_type[1])
|
|
args["embodiment_dis"] = embodiment_type[2]
|
|
args["dual_arm_embodied"] = False
|
|
embodiment_name = str(embodiment_type[0]) + "+" + str(embodiment_type[1])
|
|
else:
|
|
sys.exit("[config] number of embodiment config parameters should be 1 or 3")
|
|
|
|
args["left_embodiment_config"] = get_embodiment_config(args["left_robot_file"])
|
|
args["right_embodiment_config"] = get_embodiment_config(args["right_robot_file"])
|
|
|
|
# front_camera_type 注入本体配置 static_camera_list 非 head 条目 (改动点 3)
|
|
config_override.inject_front_camera_type(args, args.get("camera", {}).get("front_camera_type"))
|
|
config_override.validate_camera_types(MERGED_CONFIG_DIR, args)
|
|
|
|
args["embodiment_name"] = embodiment_name
|
|
# 目录名跟随本体: aloha-agilex -> aloha_agilex, 混合双臂 a+b -> a_b (记入 meta.json)
|
|
args["embodiment_dir"] = re.sub(r"[^A-Za-z0-9_]+", "_", embodiment_name).lower()
|
|
# 改动点 6: 产物布局 OUTPUT_ROOT/<task_name>/{data,videos,...}
|
|
args["save_path"] = os.path.join(hp["output_root"], task_name)
|
|
return args
|
|
|
|
|
|
def append_task_description(args, episode_idx) -> None:
|
|
"""改动点 4: hdf5 追加 task_description (简单任务描述, 与随机化 prompts 并存)。"""
|
|
hdf5_path = os.path.join(args["save_path"], "data", f"episode_{episode_idx:07d}.hdf5")
|
|
with h5py.File(hdf5_path, "a") as f:
|
|
if "task_description" not in f:
|
|
f.create_dataset("task_description", data=args["task_name"].replace("_", " "))
|
|
|
|
|
|
def relocate_episode_video(args, episode_idx) -> None:
|
|
"""仓库写入 save_dir/video/, 本设计布局为 save_dir/videos/ (design_v5 §5.3)。"""
|
|
src = os.path.join(args["save_path"], "video", f"episode_{episode_idx:07d}.mp4")
|
|
if not os.path.isfile(src):
|
|
return
|
|
dst_dir = os.path.join(args["save_path"], "videos")
|
|
os.makedirs(dst_dir, exist_ok=True)
|
|
shutil.move(src, os.path.join(dst_dir, f"episode_{episode_idx:07d}.mp4"))
|
|
|
|
|
|
def run(task_env, args, hp):
|
|
epid, suc_num, fail_num, seed_list = hp["seed"], 0, 0, []
|
|
|
|
print(f"Task Name: \033[34m{args['task_name']}\033[0m")
|
|
|
|
# =========== Collect Seed ===========
|
|
os.makedirs(args["save_path"], exist_ok=True)
|
|
|
|
if not args["use_seed"]:
|
|
print("\033[93m" + "[Start Seed and Pre Motion Data Collection]" + "\033[0m")
|
|
args["need_plan"] = True
|
|
|
|
if os.path.exists(os.path.join(args["save_path"], "seed.txt")):
|
|
with open(os.path.join(args["save_path"], "seed.txt"), "r") as file:
|
|
seed_list = file.read().split()
|
|
if len(seed_list) != 0:
|
|
seed_list = [int(i) for i in seed_list]
|
|
suc_num = len(seed_list)
|
|
epid = max(seed_list) + 1
|
|
print(f"Exist seed file, Start from: {epid} / {suc_num}")
|
|
|
|
while suc_num < args["episode_num"]:
|
|
try:
|
|
task_env.setup_demo(now_ep_num=suc_num, seed=epid, **args)
|
|
task_env.play_once()
|
|
|
|
if task_env.plan_success and task_env.check_success():
|
|
print(f"simulate data episode {suc_num} success! (seed = {epid})")
|
|
seed_list.append(epid)
|
|
task_env.save_traj_data(suc_num)
|
|
suc_num += 1
|
|
else:
|
|
print(f"simulate data episode {suc_num} fail! (seed = {epid})")
|
|
fail_num += 1
|
|
|
|
task_env.close_env()
|
|
|
|
if args["render_freq"]:
|
|
task_env.viewer.close()
|
|
except UnStableError as e:
|
|
print(" -------------")
|
|
print(f"simulate data episode {suc_num} fail! (seed = {epid})")
|
|
print("Error: ", e)
|
|
print(" -------------")
|
|
fail_num += 1
|
|
task_env.close_env()
|
|
|
|
if args["render_freq"]:
|
|
task_env.viewer.close()
|
|
time.sleep(0.3)
|
|
except Exception as e:
|
|
print(" -------------")
|
|
print(f"simulate data episode {suc_num} fail! (seed = {epid})")
|
|
print("Error: ", e)
|
|
print(" -------------")
|
|
fail_num += 1
|
|
task_env.close_env()
|
|
|
|
if args["render_freq"]:
|
|
task_env.viewer.close()
|
|
time.sleep(1)
|
|
|
|
epid += 1
|
|
|
|
with open(os.path.join(args["save_path"], "seed.txt"), "w") as file:
|
|
for sed in seed_list:
|
|
file.write("%s " % sed)
|
|
|
|
print(f"\nComplete simulation, failed \033[91m{fail_num}\033[0m times / {epid} tries \n")
|
|
else:
|
|
print("\033[93m" + "Use Saved Seeds List".center(30, "-") + "\033[0m")
|
|
seed_file = os.path.join(args["save_path"], "seed.txt")
|
|
if not os.path.isfile(seed_file):
|
|
sys.exit(f"[seed] use_seed=true but seed file not found: {seed_file}")
|
|
with open(seed_file, "r") as file:
|
|
seed_list = file.read().split()
|
|
seed_list = [int(i) for i in seed_list]
|
|
|
|
# =========== Collect Data ===========
|
|
|
|
if args["collect_data"]:
|
|
print("\033[93m" + "[Start Data Collection]" + "\033[0m")
|
|
|
|
args["need_plan"] = False
|
|
args["render_freq"] = 0
|
|
args["save_data"] = True
|
|
|
|
clear_cache_freq = args["clear_cache_freq"]
|
|
|
|
st_idx = 0
|
|
|
|
def exist_hdf5(idx):
|
|
file_path = os.path.join(
|
|
args["save_path"], "data", f"episode_{idx:07d}.hdf5"
|
|
)
|
|
return os.path.exists(file_path)
|
|
|
|
while exist_hdf5(st_idx):
|
|
st_idx += 1
|
|
|
|
for episode_idx in range(st_idx, args["episode_num"]):
|
|
print(f"\033[34mTask name: {args['task_name']}\033[0m")
|
|
|
|
task_env.setup_demo(now_ep_num=episode_idx, seed=seed_list[episode_idx], **args)
|
|
|
|
traj_data = task_env.load_tran_data(episode_idx)
|
|
args["left_joint_path"] = traj_data["left_joint_path"]
|
|
args["right_joint_path"] = traj_data["right_joint_path"]
|
|
task_env.set_path_lst(args)
|
|
|
|
info_file_path = os.path.join(args["save_path"], "scene_info.json")
|
|
|
|
if not os.path.exists(info_file_path):
|
|
with open(info_file_path, "w", encoding="utf-8") as file:
|
|
json.dump({}, file, ensure_ascii=False)
|
|
|
|
with open(info_file_path, "r", encoding="utf-8") as file:
|
|
info_db = json.load(file)
|
|
|
|
info = task_env.play_once()
|
|
info_db[f"episode_{episode_idx}"] = info
|
|
|
|
with open(info_file_path, "w", encoding="utf-8") as file:
|
|
json.dump(info_db, file, ensure_ascii=False, indent=4)
|
|
|
|
episode_descriptions = build_episode_instructions(args, info, episode_idx)
|
|
task_env.close_env(clear_cache=((episode_idx + 1) % clear_cache_freq == 0))
|
|
task_env.merge_pkl_to_hdf5_video(
|
|
instructions=episode_descriptions["seen"],
|
|
)
|
|
task_env.remove_data_cache()
|
|
assert task_env.check_success(), "Collect Error"
|
|
|
|
# 改动点 4/5/6: task_description 追加, video -> videos 布局, 逐 episode 进度
|
|
append_task_description(args, episode_idx)
|
|
relocate_episode_video(args, episode_idx)
|
|
report_utils.emit_progress(
|
|
f"collect:{args['task_name']}",
|
|
episode=episode_idx + 1,
|
|
maxEpisode=args["episode_num"],
|
|
)
|
|
else:
|
|
print("[collect] COLLECT_DATA=false: seeds collected only, no data written")
|
|
|
|
|
|
def write_task_meta(args, seed_list) -> None:
|
|
meta = {
|
|
"task_name": args["task_name"],
|
|
"task_config": args["task_config"],
|
|
"embodiment": args.get("embodiment_name"),
|
|
"embodiment_dir": args.get("embodiment_dir"),
|
|
"episode_num": args["episode_num"],
|
|
"seeds": seed_list,
|
|
"frequency": args.get("save_freq", 15),
|
|
"cameras": {
|
|
"head_camera_type": args["camera"].get("head_camera_type"),
|
|
"wrist_camera_type": args["camera"].get("wrist_camera_type"),
|
|
"front_camera_type": args["camera"].get("front_camera_type"),
|
|
"collect_head_camera": args["camera"].get("collect_head_camera"),
|
|
"collect_wrist_camera": args["camera"].get("collect_wrist_camera"),
|
|
},
|
|
"domain_randomization": args.get("domain_randomization"),
|
|
}
|
|
meta_path = os.path.join(args["save_path"], "meta.json")
|
|
with open(meta_path, "w", encoding="utf-8") as f:
|
|
json.dump(meta, f, ensure_ascii=False, indent=2)
|
|
print(f"[meta] written: {meta_path}")
|
|
|
|
|
|
def main(hp: dict) -> None:
|
|
output_root = Path(hp["output_root"])
|
|
output_root.mkdir(parents=True, exist_ok=True)
|
|
video_root = Path(hp["video_output_root"]) if hp.get("video_output_root") else None
|
|
|
|
for task_name in hp["task_names"]:
|
|
print(f"\n\033[96m===== Task: {task_name} =====\033[0m")
|
|
task = class_decorator(task_name)
|
|
args = load_task_args(task_name, hp)
|
|
print_config(args, args["embodiment_name"])
|
|
|
|
# 种子列表回读用于 meta.json
|
|
seed_list = []
|
|
seed_file = os.path.join(args["save_path"], "seed.txt")
|
|
run(task, args, hp)
|
|
if os.path.isfile(seed_file):
|
|
with open(seed_file, "r") as f:
|
|
seed_list = [int(s) for s in f.read().split()]
|
|
write_task_meta(args, seed_list)
|
|
|
|
if video_root is not None:
|
|
video_root.mkdir(parents=True, exist_ok=True)
|
|
separate_video_tree(output_root, video_root, hp["task_names"])
|
|
|
|
output_dir = os.environ.get("OUTPUT_DIR", "")
|
|
if output_dir:
|
|
video_port_path = str(video_root) if video_root is not None else str(output_root)
|
|
report_utils.write_artifacts(
|
|
output_dir,
|
|
[
|
|
{"name": "hdf5_dataset", "type": "file", "portId": "dataset_hdf5", "path": str(output_root)},
|
|
{"name": "collect_videos", "type": "video", "portId": "dataset_video", "path": video_port_path},
|
|
],
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sapien_render_check()
|
|
main(read_hyperparams())
|