✨ harden HoloBrain smoke recovery and runtime
This commit is contained in:
parent
66a15d4cf4
commit
baa212e30b
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Preserve the pinned upstream RoboTwin source byte-for-byte. Its historical
|
||||
# formatting contains trailing whitespace that must not fail this repository's
|
||||
# own diff checks.
|
||||
operator-images/builtin/holobrain-vendor/RoboTwin/** -whitespace
|
||||
@ -3394,6 +3394,26 @@ class ShellCommandOperatorTests(unittest.TestCase):
|
||||
model_dir = root / "model"
|
||||
model_dir.mkdir()
|
||||
(model_dir / "robotwin2_0.config.json").write_text("{}", encoding="utf-8")
|
||||
robotwin = root / "RoboTwin"
|
||||
for relative in [
|
||||
"task_config/demo_clean.yml",
|
||||
"task_config/_embodiment_config.yml",
|
||||
"task_config/_camera_config.yml",
|
||||
"envs/beat_block_hammer.py",
|
||||
"description/task_instruction/beat_block_hammer.json",
|
||||
]:
|
||||
path = robotwin / relative
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text("{}\n", encoding="utf-8")
|
||||
(robotwin / "assets" / "embodiments" / "aloha-agilex").mkdir(parents=True)
|
||||
for relative in [
|
||||
"assets/objects/020_hammer/model_data0.json",
|
||||
"assets/objects/020_hammer/collision/base0.glb",
|
||||
"assets/objects/020_hammer/visual/base0.glb",
|
||||
]:
|
||||
path = robotwin / relative
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(b"fixture")
|
||||
export_manifest = {
|
||||
"name": "holobrain-export-manifest.json",
|
||||
"type": "json",
|
||||
@ -3408,6 +3428,7 @@ class ShellCommandOperatorTests(unittest.TestCase):
|
||||
"label": "HoloBrain RoboTwin 评测",
|
||||
"hyperparams": [
|
||||
{"key": "ROBOORCHARDLAB_ROOT", "value": str(repo)},
|
||||
{"key": "ROBOTWIN_ROOT", "value": str(robotwin)},
|
||||
{"key": "ENV_JSON", "value": "{\"HOLOBRAIN_OPERATOR_DRY_RUN\":\"1\"}"},
|
||||
],
|
||||
},
|
||||
@ -3424,6 +3445,7 @@ class ShellCommandOperatorTests(unittest.TestCase):
|
||||
"label": "HoloBrain 模型测试",
|
||||
"hyperparams": [
|
||||
{"key": "ROBOORCHARDLAB_ROOT", "value": str(repo)},
|
||||
{"key": "ROBOTWIN_ROOT", "value": str(robotwin)},
|
||||
{"key": "ENV_JSON", "value": "{\"HOLOBRAIN_OPERATOR_DRY_RUN\":\"1\"}"},
|
||||
],
|
||||
},
|
||||
|
||||
@ -17,6 +17,8 @@ from typing import Any, Callable
|
||||
HelperMap = dict[str, Callable[..., Any]]
|
||||
|
||||
ROBOORCHARDLAB_REPO = "https://github.com/HorizonRobotics/RoboOrchardLab.git"
|
||||
ROBOTWIN_REPO = "https://github.com/RoboTwin-Platform/RoboTwin.git"
|
||||
ROBOTWIN_SOURCE_COMMIT = "bf44be51cf5717a5595ce59447f2cf5263d2aa95"
|
||||
ROBOTWIN_DATASET_REPO = "TianxingChen/RoboTwin2.0"
|
||||
HOLOBRAIN_MODEL_REPO = "HorizonRobotics/HoloBrain_v0.0_Qwen"
|
||||
DEFAULT_CONFIG = "projects/holobrain/configs/config_holobrain_qwen_common.py"
|
||||
@ -30,6 +32,10 @@ DEFAULT_EXPECTED_LMDB_DIRS = (
|
||||
"aloha_agilex_demo_randomized",
|
||||
"ur5_wsg_demo_clean",
|
||||
)
|
||||
TRAINING_DATASET_LMDB_DIRS = {
|
||||
"robotwin2_0": ("aloha_agilex_demo_clean", "aloha_agilex_demo_randomized"),
|
||||
"robotwin2_0_ur5_wsg": ("ur5_wsg_demo_clean",),
|
||||
}
|
||||
DEFAULT_RAW_ROBOTWIN_ZIP_PATTERNS = {
|
||||
"aloha_agilex_demo_clean": ["*aloha-agilex_clean*.zip", "*aloha_agilex_clean*.zip"],
|
||||
"aloha_agilex_demo_randomized": ["*aloha-agilex_randomized*.zip", "*aloha_agilex_randomized*.zip"],
|
||||
@ -948,6 +954,17 @@ def _latest_checkpoint(workspace: pathlib.Path) -> pathlib.Path | None:
|
||||
return max(candidates, key=_checkpoint_mtime) if candidates else None
|
||||
|
||||
|
||||
def _parent_resume_workspaces() -> list[pathlib.Path]:
|
||||
parent_output = os.environ.get("PARENT_NODE_OUTPUT_DIR", "").strip()
|
||||
if parent_output:
|
||||
return [pathlib.Path(parent_output) / "holobrain-workspace"]
|
||||
parent_run_root = os.environ.get("PARENT_RUN_WORKSPACE_ROOT", "").strip()
|
||||
node_id = os.environ.get("NODE_ID", "").strip()
|
||||
if parent_run_root and node_id:
|
||||
return [pathlib.Path(parent_run_root) / "nodes" / node_id / "outputs" / "holobrain-workspace"]
|
||||
return []
|
||||
|
||||
|
||||
def _resolve_resume_checkpoint(params: dict[str, str], kwargs: dict[str, Any], workspace: pathlib.Path) -> tuple[pathlib.Path | None, str]:
|
||||
policy = _text(params, "RESUME_POLICY", "auto").lower()
|
||||
if policy not in {"auto", "explicit", "never"}:
|
||||
@ -966,10 +983,12 @@ def _resolve_resume_checkpoint(params: dict[str, str], kwargs: dict[str, Any], w
|
||||
return selected, "explicit"
|
||||
if policy == "explicit":
|
||||
raise RuntimeError("RESUME_FROM is required when RESUME_POLICY=explicit")
|
||||
selected = _latest_valid_resume_checkpoint(workspace)
|
||||
if selected is not None:
|
||||
kwargs["resume_from"] = str(selected)
|
||||
return selected, policy
|
||||
for candidate_workspace in [workspace, *_parent_resume_workspaces()]:
|
||||
selected = _latest_valid_resume_checkpoint(candidate_workspace)
|
||||
if selected is not None:
|
||||
kwargs["resume_from"] = str(selected)
|
||||
return selected, policy
|
||||
return None, policy
|
||||
|
||||
|
||||
def _select_output_checkpoint(params: dict[str, str], workspace: pathlib.Path) -> tuple[pathlib.Path | None, str]:
|
||||
@ -1029,7 +1048,35 @@ def _dtype_preflight(
|
||||
return payload, path
|
||||
|
||||
|
||||
def _apply_smoke_training_defaults(params: dict[str, str], kwargs: dict[str, Any]) -> dict[str, Any]:
|
||||
def _smoke_training_datasets(
|
||||
params: dict[str, str],
|
||||
payload: dict[str, Any],
|
||||
kwargs: dict[str, Any],
|
||||
) -> list[str]:
|
||||
configured = kwargs.get("training_datasets")
|
||||
if configured is not None:
|
||||
if not isinstance(configured, list) or not all(isinstance(item, str) and item.strip() for item in configured):
|
||||
raise RuntimeError("CONFIG_KWARGS_JSON.training_datasets must be a non-empty string array")
|
||||
selected = [item.strip() for item in configured]
|
||||
if not selected:
|
||||
raise RuntimeError("CONFIG_KWARGS_JSON.training_datasets must not be empty")
|
||||
return selected
|
||||
|
||||
expected = _json_list(params, "EXPECTED_LMDB_DIRS_JSON", payload.get("expectedLmdbDirs") or [])
|
||||
expected_names = {str(item).strip() for item in expected if str(item).strip()}
|
||||
selected: list[str] = []
|
||||
for dataset_name in DEFAULT_EXPECTED_DATASETS:
|
||||
required = set(TRAINING_DATASET_LMDB_DIRS[dataset_name])
|
||||
if required & expected_names:
|
||||
selected.append(dataset_name)
|
||||
return selected or ["robotwin2_0"]
|
||||
|
||||
|
||||
def _apply_smoke_training_defaults(
|
||||
params: dict[str, str],
|
||||
kwargs: dict[str, Any],
|
||||
training_datasets: list[str] | None = None,
|
||||
) -> dict[str, Any]:
|
||||
next_kwargs = dict(kwargs)
|
||||
max_step = max(1, _int(params, "SMOKE_MAX_STEP", 2))
|
||||
next_kwargs.setdefault("max_step", max_step)
|
||||
@ -1037,8 +1084,9 @@ def _apply_smoke_training_defaults(params: dict[str, str], kwargs: dict[str, Any
|
||||
next_kwargs.setdefault("step_log_freq", max(1, min(max_step, _int(params, "SMOKE_LOG_STEP_FREQ", 1))))
|
||||
next_kwargs.setdefault("batch_size", max(1, _int(params, "SMOKE_BATCH_SIZE", 1)))
|
||||
next_kwargs.setdefault("num_workers", max(0, _int(params, "SMOKE_NUM_WORKERS", 0)))
|
||||
next_kwargs.setdefault("training_datasets", ["robotwin2_0"])
|
||||
next_kwargs.setdefault("deploy_datasets", ["robotwin2_0"])
|
||||
selected = list(training_datasets or ["robotwin2_0"])
|
||||
next_kwargs.setdefault("training_datasets", selected)
|
||||
next_kwargs.setdefault("deploy_datasets", selected)
|
||||
return next_kwargs
|
||||
|
||||
|
||||
@ -1379,7 +1427,7 @@ def run_data_prepare(
|
||||
effective_params["ARROW_MAX_EPISODES"] = str(max(1, _int(params, "SMOKE_MAX_EPISODES", 1)))
|
||||
output_path = pathlib.Path(output_dir)
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
default_expected = [DEFAULT_EXPECTED_LMDB_DIRS[0]] if training_mode == "smoke" else list(DEFAULT_EXPECTED_LMDB_DIRS)
|
||||
default_expected = ["ur5_wsg_demo_clean"] if training_mode == "smoke" else list(DEFAULT_EXPECTED_LMDB_DIRS)
|
||||
expected = tuple(
|
||||
str(item).strip()
|
||||
for item in _json_list(effective_params, "EXPECTED_LMDB_DIRS_JSON", default_expected)
|
||||
@ -1490,24 +1538,40 @@ def _materialize_data_for_repo(repo_root: pathlib.Path, params: dict[str, str],
|
||||
raise RuntimeError(f"RoboTwin data root does not exist: {source}")
|
||||
target = repo_root / "projects" / "holobrain" / "data" / "robotwin2.0"
|
||||
if training_mode == "smoke":
|
||||
# The official robotwin2_0 config names both clean and randomized
|
||||
# directories. A real smoke subset may intentionally contain only a
|
||||
# clean LMDB. Build an idempotent overlay and map the second config
|
||||
# path to the same real subset instead of mutating the source mount.
|
||||
kwargs = _json_dict(params, "CONFIG_KWARGS_JSON", {})
|
||||
selected_datasets = _smoke_training_datasets(params, payload, kwargs)
|
||||
unsupported = [name for name in selected_datasets if name not in TRAINING_DATASET_LMDB_DIRS]
|
||||
if unsupported:
|
||||
raise RuntimeError(
|
||||
"Smoke training only supports these RoboTwin datasets: "
|
||||
+ ", ".join(DEFAULT_EXPECTED_DATASETS)
|
||||
+ f"; unsupported: {', '.join(unsupported)}"
|
||||
)
|
||||
# Build an idempotent overlay without mutating the source mount. The
|
||||
# official Aloha config names clean and randomized paths, so a real
|
||||
# clean-only smoke subset may safely expose the same samples at both
|
||||
# paths. UR5/WSG uses a single real directory and needs no alias.
|
||||
if target.is_symlink() or (target.exists() and not target.is_dir()):
|
||||
target.unlink()
|
||||
target.mkdir(parents=True, exist_ok=True)
|
||||
for child in sorted(source.iterdir()):
|
||||
if child.is_dir():
|
||||
_safe_link_or_copy(child, target / child.name)
|
||||
clean = target / "aloha_agilex_demo_clean"
|
||||
randomized = target / "aloha_agilex_demo_randomized"
|
||||
if clean.exists() and not randomized.exists():
|
||||
_safe_link_or_copy(clean, randomized)
|
||||
if not clean.exists() or not randomized.exists():
|
||||
if "robotwin2_0" in selected_datasets:
|
||||
clean = target / "aloha_agilex_demo_clean"
|
||||
randomized = target / "aloha_agilex_demo_randomized"
|
||||
if clean.exists() and not randomized.exists():
|
||||
_safe_link_or_copy(clean, randomized)
|
||||
required_dirs = {
|
||||
directory
|
||||
for dataset_name in selected_datasets
|
||||
for directory in TRAINING_DATASET_LMDB_DIRS[dataset_name]
|
||||
}
|
||||
missing = sorted(directory for directory in required_dirs if not (target / directory).exists())
|
||||
if missing:
|
||||
raise RuntimeError(
|
||||
"Smoke training requires a real aloha_agilex_demo_clean LMDB; "
|
||||
"the idempotent RoboTwin config overlay could not be initialized"
|
||||
"Smoke training data does not satisfy the selected RoboTwin config; "
|
||||
f"missing LMDB directories: {', '.join(missing)}"
|
||||
)
|
||||
else:
|
||||
_safe_link_or_copy(source, target)
|
||||
@ -1538,7 +1602,11 @@ def run_train(
|
||||
logging_dir.mkdir(parents=True, exist_ok=True)
|
||||
kwargs = _json_dict(params, "CONFIG_KWARGS_JSON", {})
|
||||
if training_mode == "smoke":
|
||||
kwargs = _apply_smoke_training_defaults(params, kwargs)
|
||||
kwargs = _apply_smoke_training_defaults(
|
||||
params,
|
||||
kwargs,
|
||||
_smoke_training_datasets(params, data_payload, kwargs),
|
||||
)
|
||||
resume_checkpoint, resume_policy = _resolve_resume_checkpoint(params, kwargs, workspace)
|
||||
initial_checkpoint = _text(params, "INITIAL_CHECKPOINT_PATH")
|
||||
if initial_checkpoint:
|
||||
@ -1684,6 +1752,102 @@ def _model_dir_from_inputs(params: dict[str, str], inputs: list[dict[str, Any]],
|
||||
raise RuntimeError("MODEL_DIR or upstream HoloBrain export manifest is required")
|
||||
|
||||
|
||||
def _select_inference_prefix(params: dict[str, str], export_payload: dict[str, Any], training_mode: str) -> str:
|
||||
available = [str(item).strip() for item in export_payload.get("inferencePrefixes", []) if str(item).strip()]
|
||||
configured = _text(params, "INFERENCE_PREFIX")
|
||||
if configured:
|
||||
if available and configured not in available:
|
||||
raise RuntimeError(
|
||||
f"INFERENCE_PREFIX {configured!r} is not present in the exported model; available: {', '.join(available)}"
|
||||
)
|
||||
return configured
|
||||
if len(available) == 1:
|
||||
return available[0]
|
||||
preferred = "robotwin2_0_ur5_wsg" if training_mode == "smoke" else "robotwin2_0"
|
||||
if not available or preferred in available:
|
||||
return preferred
|
||||
raise RuntimeError("INFERENCE_PREFIX is required when the exported model contains multiple non-default prefixes")
|
||||
|
||||
|
||||
def _prepare_robotwin_runtime(
|
||||
params: dict[str, str],
|
||||
output_path: pathlib.Path,
|
||||
task_names: list[str],
|
||||
inference_prefix: str,
|
||||
) -> tuple[pathlib.Path, pathlib.Path, dict[str, Any]]:
|
||||
source_root = _path(_text(params, "ROBOTWIN_ROOT", os.environ.get("RoboTwin_PATH", "/opt/RoboTwin")))
|
||||
asset_root_text = _text(params, "ROBOTWIN_ASSET_ROOT")
|
||||
asset_root = _path(asset_root_text) if asset_root_text else source_root / "assets"
|
||||
runtime_root = source_root
|
||||
errors: list[str] = []
|
||||
required_source_paths = [
|
||||
source_root / "task_config" / "demo_clean.yml",
|
||||
source_root / "task_config" / "_embodiment_config.yml",
|
||||
source_root / "task_config" / "_camera_config.yml",
|
||||
]
|
||||
for task_name in task_names:
|
||||
required_source_paths.extend(
|
||||
[
|
||||
source_root / "envs" / f"{task_name}.py",
|
||||
source_root / "description" / "task_instruction" / f"{task_name}.json",
|
||||
]
|
||||
)
|
||||
missing_source = [str(path) for path in required_source_paths if not path.exists()]
|
||||
if missing_source:
|
||||
errors.append("missing RoboTwin source files: " + ", ".join(missing_source))
|
||||
|
||||
if asset_root_text and asset_root.resolve() != (source_root / "assets").resolve():
|
||||
runtime_root = output_path / "robotwin-runtime"
|
||||
runtime_root.mkdir(parents=True, exist_ok=True)
|
||||
for child in sorted(source_root.iterdir()) if source_root.is_dir() else []:
|
||||
if child.name in {".git", "assets"}:
|
||||
continue
|
||||
_safe_link_or_copy(child, runtime_root / child.name)
|
||||
if asset_root.exists():
|
||||
_safe_link_or_copy(asset_root, runtime_root / "assets")
|
||||
|
||||
if inference_prefix == "robotwin2_0_ur5_wsg":
|
||||
embodiment = "ur5-wsg"
|
||||
errors.append(
|
||||
"RoboOrchardLab's current RoboTwin evaluator only accepts a combined dual-arm URDF, while official "
|
||||
"UR5-Wsg uses separate left/right embodiments; training and export are supported, but simulator "
|
||||
"evaluation remains blocked until split-layout support is implemented and validated"
|
||||
)
|
||||
else:
|
||||
embodiment = "aloha-agilex"
|
||||
required_asset_paths = [asset_root / "embodiments" / embodiment]
|
||||
if "beat_block_hammer" in task_names:
|
||||
required_asset_paths.extend(
|
||||
[
|
||||
asset_root / "objects" / "020_hammer" / "model_data0.json",
|
||||
asset_root / "objects" / "020_hammer" / "collision" / "base0.glb",
|
||||
asset_root / "objects" / "020_hammer" / "visual" / "base0.glb",
|
||||
]
|
||||
)
|
||||
missing_assets = [str(path) for path in required_asset_paths if not path.exists()]
|
||||
if missing_assets:
|
||||
errors.append("missing RoboTwin simulation assets: " + ", ".join(missing_assets))
|
||||
payload = {
|
||||
"schemaVersion": "droboticflow.holobrain.robotwin-preflight/v1",
|
||||
"valid": not errors,
|
||||
"repository": ROBOTWIN_REPO,
|
||||
"sourceCommit": ROBOTWIN_SOURCE_COMMIT,
|
||||
"sourceRoot": str(source_root),
|
||||
"runtimeRoot": str(runtime_root),
|
||||
"assetRoot": str(asset_root),
|
||||
"inferencePrefix": inference_prefix,
|
||||
"embodiment": embodiment,
|
||||
"taskNames": task_names,
|
||||
"errors": errors,
|
||||
"checkedAt": _utc_now(),
|
||||
}
|
||||
preflight_path = output_path / "holobrain-robotwin-preflight.json"
|
||||
_write_json_atomic(preflight_path, payload)
|
||||
if errors:
|
||||
raise RuntimeError("HoloBrain RoboTwin preflight failed: " + "; ".join(errors))
|
||||
return runtime_root, preflight_path, payload
|
||||
|
||||
|
||||
def run_export(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
@ -1815,12 +1979,19 @@ def run_robotwin_eval(
|
||||
export_payload = _first_payload(inputs, helpers, "holobrain-export-manifest")
|
||||
training_mode = _training_mode(params, str(export_payload.get("trainingMode") or "full"))
|
||||
model_dir = _model_dir_from_inputs(params, inputs, helpers)
|
||||
inference_prefix = _select_inference_prefix(params, export_payload, training_mode)
|
||||
output_json = output_path / "robotwin-eval-result.json"
|
||||
task_names = (
|
||||
[_text(params, "SMOKE_TASK_NAME", "beat_block_hammer")]
|
||||
if training_mode == "smoke"
|
||||
else [str(item) for item in _json_list(params, "TASK_NAMES_JSON", []) if str(item).strip()]
|
||||
)
|
||||
robotwin_root, robotwin_preflight_path, robotwin_preflight = _prepare_robotwin_runtime(
|
||||
params,
|
||||
output_path,
|
||||
task_names,
|
||||
inference_prefix,
|
||||
)
|
||||
gpu_ids = [str(item) for item in _json_list(params, "GPU_IDS_JSON", [0]) if str(item).strip() != ""]
|
||||
eval_mode = _text(params, "SMOKE_EVAL_MODE", "local") if training_mode == "smoke" else _text(params, "EVAL_MODE", "ray")
|
||||
if eval_mode not in {"local", "ray"}:
|
||||
@ -1832,7 +2003,7 @@ def run_robotwin_eval(
|
||||
"--model_dir",
|
||||
str(model_dir),
|
||||
"--inference_prefix",
|
||||
_text(params, "INFERENCE_PREFIX", "robotwin2_0"),
|
||||
inference_prefix,
|
||||
"--episode_num",
|
||||
str(episode_num),
|
||||
"--mode",
|
||||
@ -1854,6 +2025,7 @@ def run_robotwin_eval(
|
||||
if _bool(params, "SAVE_VIDEO", False):
|
||||
command.append("--save_video")
|
||||
env = _command_env(params, output_path)
|
||||
env["RoboTwin_PATH"] = str(robotwin_root)
|
||||
command_path, stdout_path, stderr_path = _run_command(
|
||||
command,
|
||||
project_dir,
|
||||
@ -1866,6 +2038,8 @@ def run_robotwin_eval(
|
||||
"taskNames": task_names,
|
||||
"episodeNum": episode_num,
|
||||
"evalMode": eval_mode,
|
||||
"inferencePrefix": inference_prefix,
|
||||
"robotwinPreflight": robotwin_preflight,
|
||||
},
|
||||
)
|
||||
metrics: dict[str, Any] = {}
|
||||
@ -1882,7 +2056,9 @@ def run_robotwin_eval(
|
||||
"taskNames": task_names,
|
||||
"episodeNum": episode_num,
|
||||
"device": device,
|
||||
"inferencePrefix": inference_prefix,
|
||||
"syntheticResult": False,
|
||||
"robotwinPreflight": robotwin_preflight,
|
||||
},
|
||||
"modelDir": str(model_dir),
|
||||
"metrics": metrics,
|
||||
@ -1897,7 +2073,13 @@ def run_robotwin_eval(
|
||||
output_path,
|
||||
"holobrain-robotwin-eval-report.json",
|
||||
payload,
|
||||
[(command_path, "json"), (stdout_path, "text"), (stderr_path, "text"), (output_json, "json")],
|
||||
[
|
||||
(command_path, "json"),
|
||||
(stdout_path, "text"),
|
||||
(stderr_path, "text"),
|
||||
(output_json, "json"),
|
||||
(robotwin_preflight_path, "json"),
|
||||
],
|
||||
node_data,
|
||||
)
|
||||
|
||||
@ -1918,8 +2100,14 @@ def run_inference_test(
|
||||
export_payload = _first_payload(inputs, helpers, "holobrain-export-manifest")
|
||||
training_mode = _training_mode(params, str(export_payload.get("trainingMode") or "full"))
|
||||
model_dir = _model_dir_from_inputs(params, inputs, helpers)
|
||||
inference_prefix = _text(params, "INFERENCE_PREFIX", "robotwin2_0")
|
||||
inference_prefix = _select_inference_prefix(params, export_payload, training_mode)
|
||||
task_name = _text(params, "TASK_NAME", "beat_block_hammer")
|
||||
robotwin_root, robotwin_preflight_path, robotwin_preflight = _prepare_robotwin_runtime(
|
||||
params,
|
||||
output_path,
|
||||
[task_name],
|
||||
inference_prefix,
|
||||
)
|
||||
episode_num = max(1, _int(params, "EPISODE_NUM", 1))
|
||||
inference_mode = _text(params, "INFERENCE_MODE", "local").lower()
|
||||
if inference_mode not in {"local", "ray"}:
|
||||
@ -1954,6 +2142,7 @@ def run_inference_test(
|
||||
raise RuntimeError("GPU_IDS_JSON must contain at least one GPU id when INFERENCE_MODE=ray")
|
||||
command.extend(["--gpu_ids", *gpu_ids])
|
||||
env = _command_env(params, output_path)
|
||||
env["RoboTwin_PATH"] = str(robotwin_root)
|
||||
command_path, stdout_path, stderr_path = _run_command(
|
||||
command,
|
||||
project_dir,
|
||||
@ -1966,6 +2155,8 @@ def run_inference_test(
|
||||
"taskName": task_name,
|
||||
"episodeNum": episode_num,
|
||||
"inferenceMode": inference_mode,
|
||||
"inferencePrefix": inference_prefix,
|
||||
"robotwinPreflight": robotwin_preflight,
|
||||
},
|
||||
)
|
||||
dry_run = str(env.get("HOLOBRAIN_OPERATOR_DRY_RUN", "")).strip().lower() in TRUE_VALUES
|
||||
@ -1989,6 +2180,7 @@ def run_inference_test(
|
||||
"episodeNum": episode_num,
|
||||
"mode": inference_mode,
|
||||
"device": device,
|
||||
"robotwinPreflight": robotwin_preflight,
|
||||
},
|
||||
"commandPath": str(command_path),
|
||||
"stdoutPath": str(stdout_path),
|
||||
@ -2001,6 +2193,12 @@ def run_inference_test(
|
||||
output_path,
|
||||
"holobrain-inference-result.json",
|
||||
payload,
|
||||
[(command_path, "json"), (stdout_path, "text"), (stderr_path, "text"), (metrics_path, "json")],
|
||||
[
|
||||
(command_path, "json"),
|
||||
(stdout_path, "text"),
|
||||
(stderr_path, "text"),
|
||||
(metrics_path, "json"),
|
||||
(robotwin_preflight_path, "json"),
|
||||
],
|
||||
node_data,
|
||||
)
|
||||
|
||||
@ -10590,7 +10590,7 @@
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "可选覆盖 LMDB 目录;空值时 smoke 只要求 aloha_agilex_demo_clean,full 要求三个官方目录",
|
||||
"description": "可选覆盖 LMDB 目录;空值时 smoke 默认使用三相机 UR5/WSG 真实小数据,full 要求三个官方目录",
|
||||
"key": "EXPECTED_LMDB_DIRS_JSON",
|
||||
"type": "json",
|
||||
"value": ""
|
||||
@ -11061,6 +11061,18 @@
|
||||
"type": "string",
|
||||
"value": "/opt/RoboOrchardLab"
|
||||
},
|
||||
{
|
||||
"description": "镜像内固定版本的 RoboTwin 源码根目录",
|
||||
"key": "ROBOTWIN_ROOT",
|
||||
"type": "string",
|
||||
"value": "/opt/RoboTwin"
|
||||
},
|
||||
{
|
||||
"description": "可选只读仿真资产根目录;为空时使用 ROBOTWIN_ROOT/assets",
|
||||
"key": "ROBOTWIN_ASSET_ROOT",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "导出模型目录;为空时消费上游导出 manifest",
|
||||
"key": "MODEL_DIR",
|
||||
@ -11068,10 +11080,10 @@
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "导出 pipeline config prefix",
|
||||
"description": "导出 pipeline config prefix;空值时从上游 export manifest 自动选择",
|
||||
"key": "INFERENCE_PREFIX",
|
||||
"type": "string",
|
||||
"value": "robotwin2_0"
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "official eval mode:ray 或 local",
|
||||
@ -11242,6 +11254,18 @@
|
||||
"type": "string",
|
||||
"value": "/opt/RoboOrchardLab"
|
||||
},
|
||||
{
|
||||
"description": "镜像内固定版本的 RoboTwin 源码根目录",
|
||||
"key": "ROBOTWIN_ROOT",
|
||||
"type": "string",
|
||||
"value": "/opt/RoboTwin"
|
||||
},
|
||||
{
|
||||
"description": "可选只读仿真资产根目录;为空时使用 ROBOTWIN_ROOT/assets",
|
||||
"key": "ROBOTWIN_ASSET_ROOT",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "导出模型目录;为空时消费上游导出 manifest",
|
||||
"key": "MODEL_DIR",
|
||||
@ -11249,10 +11273,10 @@
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "导出 pipeline config prefix",
|
||||
"description": "导出 pipeline config prefix;空值时从上游 export manifest 自动选择",
|
||||
"key": "INFERENCE_PREFIX",
|
||||
"type": "string",
|
||||
"value": "robotwin2_0"
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"description": "实际执行的 RoboTwin 推理任务",
|
||||
|
||||
@ -44,6 +44,9 @@ type stageManifestRecord struct {
|
||||
var protectedSystemEnv = map[string]struct{}{
|
||||
"WORKFLOW_PREVIOUS_RUN_TIMESTAMP": {},
|
||||
"WORKFLOW_CURRENT_RUN_TIMESTAMP": {},
|
||||
"PARENT_RUN_ID": {},
|
||||
"PARENT_RUN_WORKSPACE_ROOT": {},
|
||||
"PARENT_NODE_OUTPUT_DIR": {},
|
||||
"OPERATOR_ALLOW_SHELL_COMMANDS": {},
|
||||
"OPERATOR_COMMAND_ALLOWLIST_REGEX": {},
|
||||
"OPERATOR_COMMAND_DENYLIST_REGEX": {},
|
||||
@ -392,6 +395,12 @@ func buildNodeEnvWithResources(run *domain.RunRecord, workflow *domain.WorkflowR
|
||||
"OUTPUT_DIR": workspace.OutputDir,
|
||||
"WORKSPACE_ROOT": workspace.RunRoot,
|
||||
}
|
||||
if parentRunID := strings.TrimSpace(run.ParentRunID); parentRunID != "" {
|
||||
parentRunRoot := filepath.Join(filepath.Dir(workspace.RunRoot), filepath.Base(parentRunID))
|
||||
env["PARENT_RUN_ID"] = parentRunID
|
||||
env["PARENT_RUN_WORKSPACE_ROOT"] = parentRunRoot
|
||||
env["PARENT_NODE_OUTPUT_DIR"] = filepath.Join(parentRunRoot, "nodes", node.ID, "outputs")
|
||||
}
|
||||
if run.Trigger == domain.RunTriggerScheduled {
|
||||
env["WORKFLOW_CURRENT_RUN_TIMESTAMP"] = runTimestampEnvValue(firstNonEmpty(run.CurrentRunAt, run.CreatedAt))
|
||||
env["WORKFLOW_PREVIOUS_RUN_TIMESTAMP"] = runTimestampEnvValue(run.PreviousRunAt)
|
||||
|
||||
@ -15,6 +15,7 @@ func TestBuildNodeEnvInjectsPlatformMongoEnvForMongoNode(t *testing.T) {
|
||||
|
||||
run := &domain.RunRecord{
|
||||
ID: "run-1",
|
||||
ParentRunID: "run-parent",
|
||||
WorkflowID: "workflow-1",
|
||||
Trigger: domain.RunTriggerScheduled,
|
||||
PreviousRunAt: "2026-04-21T10:00:00Z",
|
||||
@ -31,7 +32,10 @@ func TestBuildNodeEnvInjectsPlatformMongoEnvForMongoNode(t *testing.T) {
|
||||
Label: "MongoDB 写入",
|
||||
Category: "DATA",
|
||||
Description: "write docs",
|
||||
Hyperparams: []domain.HyperParam{{Key: "MONGO_COLLECTION", Value: "qualityReports"}},
|
||||
Hyperparams: []domain.HyperParam{
|
||||
{Key: "MONGO_COLLECTION", Value: "qualityReports"},
|
||||
{Key: "PARENT_RUN_ID", Value: "user-value-must-not-win"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -78,6 +82,15 @@ func TestBuildNodeEnvInjectsPlatformMongoEnvForMongoNode(t *testing.T) {
|
||||
if env["WORKSPACE_ROOT"] != workspace.RunRoot {
|
||||
t.Fatalf("expected WORKSPACE_ROOT to point at run root, got %q", env["WORKSPACE_ROOT"])
|
||||
}
|
||||
if env["PARENT_RUN_ID"] != "run-parent" {
|
||||
t.Fatalf("expected protected parent run id, got %q", env["PARENT_RUN_ID"])
|
||||
}
|
||||
if env["PARENT_RUN_WORKSPACE_ROOT"] != "/tmp/workspace/system/runs/run-parent" {
|
||||
t.Fatalf("expected parent run workspace root, got %q", env["PARENT_RUN_WORKSPACE_ROOT"])
|
||||
}
|
||||
if env["PARENT_NODE_OUTPUT_DIR"] != "/tmp/workspace/system/runs/run-parent/nodes/node-1/outputs" {
|
||||
t.Fatalf("expected parent node output directory, got %q", env["PARENT_NODE_OUTPUT_DIR"])
|
||||
}
|
||||
expectedPrevious := "2026-04-21T18:00:00+08:00"
|
||||
if env["WORKFLOW_PREVIOUS_RUN_TIMESTAMP"] != expectedPrevious {
|
||||
t.Fatalf("expected previous run timestamp env, got %q", env["WORKFLOW_PREVIOUS_RUN_TIMESTAMP"])
|
||||
|
||||
@ -3,11 +3,15 @@ FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime
|
||||
|
||||
WORKDIR /app
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONPATH=/app:/opt/RoboOrchardLab \
|
||||
PYTHONPATH=/app:/opt/RoboOrchardLab:/opt/RoboTwin \
|
||||
PIP_DEFAULT_TIMEOUT=120 \
|
||||
PIP_RETRIES=10 \
|
||||
USER=droboticflow \
|
||||
LOGNAME=droboticflow \
|
||||
HOME=/tmp/droboticflow-home \
|
||||
ROBOORCHARDLAB_ROOT=/opt/RoboOrchardLab \
|
||||
RoboTwin_PATH=/opt/RoboTwin \
|
||||
NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics \
|
||||
HF_HOME=/opt/hf-cache \
|
||||
HF_HUB_CACHE=/opt/hf-cache/hub \
|
||||
TRANSFORMERS_CACHE=/opt/hf-cache/transformers \
|
||||
@ -19,7 +23,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
libglib2.0-0 \
|
||||
libgl1 \
|
||||
libvulkan1 \
|
||||
linux-libc-dev \
|
||||
mesa-vulkan-drivers \
|
||||
python3-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN printf 'torch==2.6.0\ntorchvision==0.21.0\n' > /tmp/holobrain-constraints.txt
|
||||
@ -61,6 +67,7 @@ RUN python -m pip install --no-cache-dir -c /tmp/holobrain-constraints.txt \
|
||||
"websockets>=10.0"
|
||||
COPY operator-images/builtin/holobrain-vendor/robo_orchard_core /opt/robo_orchard_core
|
||||
COPY operator-images/builtin/holobrain-vendor/RoboOrchardLab /opt/RoboOrchardLab
|
||||
COPY operator-images/builtin/holobrain-vendor/RoboTwin /opt/RoboTwin
|
||||
RUN cd /opt/robo_orchard_core && \
|
||||
python -m pip install --no-cache-dir -e . --no-deps && \
|
||||
cd /opt/RoboOrchardLab && \
|
||||
@ -73,4 +80,4 @@ ENV HF_HUB_OFFLINE=1 \
|
||||
HF_DATASETS_OFFLINE=1
|
||||
RUN mkdir -p /opt/RoboOrchardLab/projects/holobrain/data /tmp/droboticflow-home /workspace /outputs && \
|
||||
chown -R 10001:10001 /opt/RoboOrchardLab/projects/holobrain/data /tmp/droboticflow-home && \
|
||||
chmod -R a+rX /opt/RoboOrchardLab /opt/hf-cache /opt/models
|
||||
chmod -R a+rX /opt/RoboOrchardLab /opt/RoboTwin /opt/hf-cache /opt/models
|
||||
|
||||
30
operator-images/builtin/holobrain-vendor/RoboTwin/.gitignore
vendored
Normal file
30
operator-images/builtin/holobrain-vendor/RoboTwin/.gitignore
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
models/
|
||||
data/*
|
||||
!data/process_stuck.py
|
||||
__pycache__/
|
||||
**/checkpoints/
|
||||
result/
|
||||
envs/curobo
|
||||
*.zip
|
||||
viewer_show.*
|
||||
eval_video/
|
||||
task_config/
|
||||
**/.DS_Store
|
||||
|
||||
# eval result
|
||||
eval_result/
|
||||
|
||||
# Code Generation
|
||||
assets/*
|
||||
!assets/_download.py
|
||||
!assets/files
|
||||
|
||||
policy/weights/*
|
||||
|
||||
envs/curobo/*
|
||||
|
||||
.vscode
|
||||
/config.json
|
||||
|
||||
/*.json*
|
||||
/*.txt
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"repository": "https://github.com/RoboTwin-Platform/RoboTwin.git",
|
||||
"release": "release",
|
||||
"commit": "bf44be51cf5717a5595ce59447f2cf5263d2aa95",
|
||||
"importedFor": "HoloBrain RoboTwin evaluation runtime",
|
||||
"assetPolicy": "Simulation assets are not vendored; mount or provision them separately under assets/.",
|
||||
"licenseFile": "LICENSE"
|
||||
}
|
||||
21
operator-images/builtin/holobrain-vendor/RoboTwin/LICENSE
Normal file
21
operator-images/builtin/holobrain-vendor/RoboTwin/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Tianxing Chen (陈天行)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
175
operator-images/builtin/holobrain-vendor/RoboTwin/README.md
Normal file
175
operator-images/builtin/holobrain-vendor/RoboTwin/README.md
Normal file
@ -0,0 +1,175 @@
|
||||
<h1 align="center">
|
||||
<a href="https://robotwin-benchmark.github.io"><b>RoboTwin</b> Bimanual Robotic Manipulation Platform<br></a>
|
||||
</h1>
|
||||
<h2 align="center">Lastest Version: RoboTwin 2.0<br>🤲 <a href="https://robotwin-platform.github.io/">Webpage</a> | <a href="https://robotwin-platform.github.io/doc/">Document</a> | <a href="https://arxiv.org/abs/2506.18088">Paper</a> | <a href="https://robotwin-platform.github.io/doc/community/index.html">Community</a> | <a href="https://robotwin-platform.github.io/leaderboard">Leaderboard</a></h2>
|
||||
|
||||
https://private-user-images.githubusercontent.com/88101805/463126988-e3ba1575-4411-4a36-ad65-f0b2f49890c3.mp4
|
||||
|
||||
**[2.0 Version (lastest)]** RoboTwin 2.0: A Scalable Data Generator and Benchmark with Strong Domain Randomization for Robust Bimanual Robotic Manipulation<br>
|
||||
<i>Under Review 2025</i>: [Webpage](https://robotwin-platform.github.io/) | [Document](https://robotwin-platform.github.io/doc) | [PDF](https://arxiv.org/pdf/2506.18088) | [arXiv](https://arxiv.org/abs/2506.18088) | [Talk (in Chinese)](https://www.bilibili.com/video/BV18p3izYE63/?spm_id_from=333.337.search-card.all.click) | [机器之心](https://mp.weixin.qq.com/s/SwORezmol2Qd9YdrGYchEA) | [Leaderboard](https://robotwin-platform.github.io/leaderboard)<br>
|
||||
> <a href="https://tianxingchen.github.io/">Tianxing Chen</a><sup>\*</sup>, Zanxin Chen<sup>\*</sup>, Baijun Chen<sup>\*</sup>, Zijian Cai<sup>\*</sup>, <a href="https://10-oasis-01.github.io">Yibin Liu</a><sup>\*</sup>, <a href="https://kolakivy.github.io/">Qiwei Liang</a>, Zixuan Li, Xianliang Lin, <a href="https://geyiheng.github.io">Yiheng Ge</a>, Zhenyu Gu, Weiliang Deng, Yubin Guo, Tian Nian, Xuanbing Xie, <a href="https://www.linkedin.com/in/yusen-qin-5b23345b/">Qiangyu Chen</a>, Kailun Su, Tianling Xu, <a href="http://luoping.me/">Guodong Liu</a>, <a href="https://aaron617.github.io/">Mengkang Hu</a>, <a href="https://c7w.tech/about">Huan-ang Gao</a>, Kaixuan Wang, <a href="https://liang-zx.github.io/">Zhixuan Liang</a>, <a href="https://www.linkedin.com/in/yusen-qin-5b23345b/">Yusen Qin</a>, Xiaokang Yang, <a href="http://luoping.me/">Ping Luo</a><sup>†</sup>, <a href="https://yaomarkmu.github.io/">Yao Mu</a><sup>†</sup>
|
||||
|
||||
**[RoboTwin Dual-Arm Collaboration Challenge@CVPR'25 MEIS Workshop]** RoboTwin Dual-Arm Collaboration Challenge Technical Report at CVPR 2025 MEIS Workshop<br>
|
||||
Official Technical Report: [PDF](https://arxiv.org/pdf/2506.23351) | [arXiv](https://arxiv.org/abs/2506.23351) | [量子位](https://mp.weixin.qq.com/s/qxqs9vvvHsAJ-0hoYANYzQ)<br>
|
||||
|
||||
**[1.0 Version]** RoboTwin: Dual-Arm Robot Benchmark with Generative Digital Twins<br>
|
||||
Accepted to <i style="color: red; display: inline;"><b>CVPR 2025 (Highlight)</b></i>: [PDF](https://arxiv.org/pdf/2504.13059) | [arXiv](https://arxiv.org/abs/2504.13059)<br>
|
||||
> <a href="https://yaomarkmu.github.io/">Yao Mu</a><sup>* †</sup>, <a href="https://tianxingchen.github.io">Tianxing Chen</a><sup>* </sup>, Zanxin Chen<sup>* </sup>, <a href="https://shijiapeng03.github.io">Shijia Peng</a><sup>* </sup>, Zhiqian Lan, Zeyu Gao, Zhixuan Liang, Qiaojun Yu, Yude Zou, Mingkun Xu, Lunkai Lin, Zhiqiang Xie, Mingyu Ding, <a href="http://luoping.me/">Ping Luo</a><sup>†</sup>.
|
||||
|
||||
**[Early Version]** RoboTwin: Dual-Arm Robot Benchmark with Generative Digital Twins (early version)<br>
|
||||
Accepted to <i style="color: red; display: inline;"><b>ECCV Workshop 2024 (Best Paper Award)</b></i>: [PDF](https://arxiv.org/pdf/2409.02920) | [arXiv](https://arxiv.org/abs/2409.02920)<br>
|
||||
> <a href="https://yaomarkmu.github.io/">Yao Mu</a><sup>* †</sup>, <a href="https://tianxingchen.github.io">Tianxing Chen</a><sup>* </sup>, Shijia Peng<sup>*</sup>, Zanxin Chen<sup>*</sup>, Zeyu Gao, Zhiqian Lan, Yude Zou, Lunkai Lin, Zhiqiang Xie, <a href="http://luoping.me/">Ping Luo</a><sup>†</sup>.
|
||||
|
||||
|
||||
|
||||
# 📚 Overview
|
||||
|
||||
| Branch Name | Link |
|
||||
|-------------|------|
|
||||
| 2.0 Version Branch | [main](https://github.com/RoboTwin-Platform/RoboTwin/tree/main) (latest) |
|
||||
| IsaacLab-Arena Branch | [IsaacLab-Arena](https://github.com/RoboTwin-Platform/RoboTwin/tree/IsaacLab-Arena) |
|
||||
| RLinf Branch | [RLinf_support](https://github.com/RoboTwin-Platform/RoboTwin/tree/RLinf_support) |
|
||||
| WBCD 2026 Branch | [WBCD-2026](https://github.com/RoboTwin-Platform/RoboTwin/tree/WBCD-2026) |
|
||||
| 1.0 Version Branch | [1.0 Version](https://github.com/RoboTwin-Platform/RoboTwin/tree/RoboTwin-1.0) |
|
||||
| 1.0 Version Code Generation Branch | [1.0 Version GPT](https://github.com/RoboTwin-Platform/RoboTwin/tree/gpt) |
|
||||
| Early Version Branch | [Early Version](https://github.com/RoboTwin-Platform/RoboTwin/tree/early_version) |
|
||||
| 第十九届“挑战杯”人工智能专项赛分支 | [Challenge-Cup-2025](https://github.com/RoboTwin-Platform/RoboTwin/tree/Challenge-Cup-2025) |
|
||||
| CVPR 2025 Challenge Round 1 Branch | [CVPR-Challenge-2025-Round1](https://github.com/RoboTwin-Platform/RoboTwin/tree/CVPR-Challenge-2025-Round1) |
|
||||
| CVPR 2025 Challenge Round 2 Branch | [CVPR-Challenge-2025-Round2](https://github.com/RoboTwin-Platform/RoboTwin/tree/CVPR-Challenge-2025-Round2) |
|
||||
|
||||
|
||||
|
||||
# 🐣 Update
|
||||
* **2026/02/20**, Usage supported in <a href="https://github.com/starVLA/starVLA">StarVLA</a>, which is a user-friendly codebase for VLA development.
|
||||
* **2026/01/23**, We update IsaacLab-Arena and <a href="https://github.com/RLinf/RLinf">RLinf</a> support (contributed by RLinf team).
|
||||
* **2025/08/28**, We update the RoboTwin 2.0 Paper [PDF](https://arxiv.org/pdf/2506.18088).
|
||||
* **2025/08/25**, We fix ACT deployment code and update the [leaderboard](https://robotwin-platform.github.io/leaderboard).
|
||||
* **2025/08/06**, We release RoboTwin 2.0 Leaderboard: [leaderboard website](https://robotwin-platform.github.io/leaderboard).
|
||||
* **2025/07/23**, RoboTwin 2.0 received Outstanding Poster at ChinaSI 2025 (Ranking 1st).
|
||||
* **2025/07/19**, We Fix DP3 evaluation code error. We will update RoboTwin 2.0 paper next week.
|
||||
* **2025/07/09**, We update endpose control mode, please see [[RoboTwin Doc - Usage - Control Robot](https://robotwin-platform.github.io/doc/usage/control-robot.html)] for more details.
|
||||
* **2025/07/08**, We upload [Challenge-Cup-2025](https://github.com/RoboTwin-Platform/RoboTwin/tree/Challenge-Cup-2025) Branch (第十九届挑战杯分支).
|
||||
* **2025/07/02**, Fix Piper Wrist Bug [[issue](https://github.com/RoboTwin-Platform/RoboTwin/issues/104)]. Please redownload the embodiment asset.
|
||||
* **2025/07/01**, We release Technical Report of RoboTwin Dual-Arm Collaboration Challenge @ CVPR 2025 MEIS Workshop [[arXiv](https://arxiv.org/abs/2506.23351)] !
|
||||
* **2025/06/21**, We release RoboTwin 2.0 [[Webpage](https://robotwin-platform.github.io/)] !
|
||||
* **2025/04/11**, RoboTwin is seclected as <i>CVPR Highlight paper</i>!
|
||||
* **2025/02/27**, RoboTwin is accepted to <i>CVPR 2025</i> !
|
||||
* **2024/09/30**, RoboTwin (Early Version) received <i>the Best Paper Award at the ECCV Workshop</i>!
|
||||
* **2024/09/20**, Officially released RoboTwin.
|
||||
|
||||
# 🛠️ Installation
|
||||
|
||||
See [RoboTwin 2.0 Document (Usage - Install & Download)](https://robotwin-platform.github.io/doc/usage/robotwin-install.html) for installation instructions. It takes about 20 minutes for installation.
|
||||
|
||||
# 🤷♂️ Tasks Informations
|
||||
See [RoboTwin 2.0 Tasks Doc](https://robotwin-platform.github.io/doc/tasks/index.html) for more details.
|
||||
|
||||
<p align="center">
|
||||
<img src="./assets/files/50_tasks.gif" width="100%">
|
||||
</p>
|
||||
|
||||
# 🧑🏻💻 Usage
|
||||
|
||||
## Document
|
||||
|
||||
> Please Refer to [RoboTwin 2.0 Document (Usage)](https://robotwin-platform.github.io/doc/usage/index.html) for more details.
|
||||
|
||||
## Data Collection
|
||||
We provide over 100,000 pre-collected trajectories as part of the open-source release [RoboTwin Dataset](https://huggingface.co/datasets/TianxingChen/RoboTwin2.0/tree/main/dataset).
|
||||
However, we strongly recommend users to perform data collection themselves due to the high configurability and diversity of task and embodiment setups.
|
||||
|
||||
<img src="./assets/files/domain_randomization.png" alt="description" style="display: block; margin: auto; width: 100%;">
|
||||
|
||||
## 1. Task Running and Data Collection
|
||||
Running the following command will first search for a random seed for the target collection quantity, and then replay the seed to collect data.
|
||||
|
||||
```
|
||||
bash collect_data.sh ${task_name} ${task_config} ${gpu_id}
|
||||
# Example: bash collect_data.sh beat_block_hammer demo_randomized 0
|
||||
```
|
||||
|
||||
## 2. Modify Task Config
|
||||
☝️ See [RoboTwin 2.0 Tasks Configurations Doc](https://robotwin-platform.github.io/doc/usage/configurations.html) for more details.
|
||||
|
||||
# 🚴♂️ Policy Baselines
|
||||
## Policies Support
|
||||
[DP](https://robotwin-platform.github.io/doc/usage/DP.html), [ACT](https://robotwin-platform.github.io/doc/usage/ACT.html), [DP3](https://robotwin-platform.github.io/doc/usage/DP3.html), [RDT](https://robotwin-platform.github.io/doc/usage/RDT.html), [PI0](https://robotwin-platform.github.io/doc/usage/Pi0.html), [OpenVLA-oft](https://robotwin-platform.github.io/doc/usage/OpenVLA-oft.html)
|
||||
|
||||
[TinyVLA](https://robotwin-platform.github.io/doc/usage/TinyVLA.html), [DexVLA](https://robotwin-platform.github.io/doc/usage/DexVLA.html) (Contributed by Media Group)
|
||||
|
||||
[LLaVA-VLA](https://robotwin-platform.github.io/doc/usage/LLaVA-VLA.html) (Contributed by IRPN Lab, HKUST(GZ))
|
||||
|
||||
[GO-1](https://robotwin-platform.github.io/doc/usage/GO1.html) (Contributed by GO-1 Team)
|
||||
|
||||
Deploy Your Policy: [Guidance](https://robotwin-platform.github.io/doc/usage/deploy-your-policy.html)
|
||||
|
||||
⏰ TODO: G3Flow, HybridVLA, SmolVLA, AVR, UniVLA
|
||||
|
||||
# 🏄♂️ Experiment & LeaderBoard
|
||||
|
||||
> We recommend that the RoboTwin Platform can be used to explore the following topics:
|
||||
> 1. single - task fine - tuning capability
|
||||
> 2. visual robustness
|
||||
> 3. language diversity robustness (language condition)
|
||||
> 4. multi-tasks capability
|
||||
> 5. cross-embodiment performance
|
||||
|
||||
The full leaderboard and setting can be found in: [https://robotwin-platform.github.io/leaderboard](https://robotwin-platform.github.io/leaderboard).
|
||||
|
||||
# 💽 Pre-collected Large-scale Dataset
|
||||
|
||||
Please refer to [RoboTwin 2.0 Dataset - Huggingface](https://huggingface.co/datasets/TianxingChen/RoboTwin2.0/tree/main/dataset).
|
||||
|
||||
# 👍 Citations
|
||||
If you find our work useful, please consider citing:
|
||||
|
||||
<b>RoboTwin 2.0</b>: A Scalable Data Generator and Benchmark with Strong Domain Randomization for Robust Bimanual Robotic Manipulation
|
||||
```
|
||||
@article{chen2025robotwin,
|
||||
title={Robotwin 2.0: A scalable data generator and benchmark with strong domain randomization for robust bimanual robotic manipulation},
|
||||
author={Chen, Tianxing and Chen, Zanxin and Chen, Baijun and Cai, Zijian and Liu, Yibin and Li, Zixuan and Liang, Qiwei and Lin, Xianliang and Ge, Yiheng and Gu, Zhenyu and others},
|
||||
journal={arXiv preprint arXiv:2506.18088},
|
||||
year={2025}
|
||||
}
|
||||
```
|
||||
|
||||
<b>RoboTwin</b>: Dual-Arm Robot Benchmark with Generative Digital Twins, accepted to <i style="color: red; display: inline;"><b>CVPR 2025 (Highlight)</b></i>
|
||||
```
|
||||
@InProceedings{Mu_2025_CVPR,
|
||||
author = {Mu, Yao and Chen, Tianxing and Chen, Zanxin and Peng, Shijia and Lan, Zhiqian and Gao, Zeyu and Liang, Zhixuan and Yu, Qiaojun and Zou, Yude and Xu, Mingkun and Lin, Lunkai and Xie, Zhiqiang and Ding, Mingyu and Luo, Ping},
|
||||
title = {RoboTwin: Dual-Arm Robot Benchmark with Generative Digital Twins},
|
||||
booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)},
|
||||
month = {June},
|
||||
year = {2025},
|
||||
pages = {27649-27660}
|
||||
}
|
||||
```
|
||||
|
||||
Benchmarking Generalizable Bimanual Manipulation: RoboTwin Dual-Arm Collaboration Challenge at CVPR 2025 MEIS Workshop
|
||||
```
|
||||
@article{chen2025benchmarking,
|
||||
title={Benchmarking Generalizable Bimanual Manipulation: RoboTwin Dual-Arm Collaboration Challenge at CVPR 2025 MEIS Workshop},
|
||||
author={Chen, Tianxing and Wang, Kaixuan and Yang, Zhaohui and Zhang, Yuhao and Chen, Zanxin and Chen, Baijun and Dong, Wanxi and Liu, Ziyuan and Chen, Dong and Yang, Tianshuo and others},
|
||||
journal={arXiv preprint arXiv:2506.23351},
|
||||
year={2025}
|
||||
}
|
||||
```
|
||||
|
||||
<b>RoboTwin</b>: Dual-Arm Robot Benchmark with Generative Digital Twins (early version), accepted to <i style="color: red; display: inline;"><b>ECCV Workshop 2024 (Best Paper Award)</b></i>
|
||||
```
|
||||
@article{mu2024robotwin,
|
||||
title={RoboTwin: Dual-Arm Robot Benchmark with Generative Digital Twins (early version)},
|
||||
author={Mu, Yao and Chen, Tianxing and Peng, Shijia and Chen, Zanxin and Gao, Zeyu and Zou, Yude and Lin, Lunkai and Xie, Zhiqiang and Luo, Ping},
|
||||
journal={arXiv preprint arXiv:2409.02920},
|
||||
year={2024}
|
||||
}
|
||||
```
|
||||
|
||||
# 😺 Acknowledgement
|
||||
|
||||
**Software Support**: D-Robotics, **Hardware Support**: AgileX Robotics, **AIGC Support**: Deemos.
|
||||
|
||||
Contact [Tianxing Chen](https://tianxingchen.github.io) if you have any questions or suggestions.
|
||||
|
||||
# 🏷️ License
|
||||
This repository is released under the MIT license. See [LICENSE](./LICENSE) for additional details.
|
||||
@ -0,0 +1,9 @@
|
||||
from huggingface_hub import snapshot_download
|
||||
|
||||
snapshot_download(
|
||||
repo_id="TianxingChen/RoboTwin2.0",
|
||||
allow_patterns=["background_texture.zip", "embodiments.zip", "objects.zip"],
|
||||
local_dir=".",
|
||||
repo_type="dataset",
|
||||
resume_download=True,
|
||||
)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
@ -0,0 +1,10 @@
|
||||
# Description: This file is used to import all the necessary files for the gpt_api module.
|
||||
from .gpt_agent import * # Core GPT agent logic
|
||||
from .prompt import * # Prompt templates and formatting utilities
|
||||
from .task_info import * # Task metadata, descriptions, and configurations
|
||||
|
||||
# Try importing optional observation handling module
|
||||
try:
|
||||
from .observation_agent import * # Optional: multimodal or perception-specific agent interface
|
||||
except ImportError as e:
|
||||
print(f"Warning: Failed to import observation_agent module: {e}")
|
||||
@ -0,0 +1,37 @@
|
||||
from openai import OpenAI
|
||||
|
||||
kimi_api = "Your key"
|
||||
openai_api = "Your key"
|
||||
deep_seek_api = "Your key"
|
||||
|
||||
# Configure the API and key (using DeepSeek as an example)
|
||||
def generate(message, gpt="deepseek", temperature=0):
|
||||
|
||||
if gpt == "deepseek":
|
||||
MODEL = "deepseek-chat"
|
||||
OPENAI_API_BASE = "https://api.deepseek.com"
|
||||
# Set your API key here
|
||||
OPENAI_API_KEY = deep_seek_api
|
||||
client = OpenAI(api_key=OPENAI_API_KEY, base_url=OPENAI_API_BASE)
|
||||
|
||||
elif gpt == "openai":
|
||||
MODEL = "gpt-4o"
|
||||
OPENAI_API_BASE = "https://api.gptapi.us/v1"
|
||||
OPENAI_API_KEY = openai_api
|
||||
client = OpenAI(api_key=OPENAI_API_KEY, base_url=OPENAI_API_BASE)
|
||||
|
||||
else:
|
||||
raise ValueError(f"Unsupported API provider: {gpt}")
|
||||
|
||||
print('start generating')
|
||||
response = client.chat.completions.create(
|
||||
model=MODEL,
|
||||
messages=message,
|
||||
stream=False,
|
||||
temperature=temperature,
|
||||
)
|
||||
print('end generating')
|
||||
|
||||
return response.choices[0].message.content
|
||||
|
||||
|
||||
@ -0,0 +1,240 @@
|
||||
import base64
|
||||
import os
|
||||
import glob
|
||||
from openai import OpenAI
|
||||
|
||||
from gpt_agent import kimi_api, openai_api, deep_seek_api, generate
|
||||
|
||||
|
||||
def observe_task_execution(episode_id, task_name, task_info, problematic_code=None, save_dir="./camera_images", camera_name=None, generate_dir_name=None):
|
||||
"""
|
||||
Observe task execution by analyzing step-by-step images using an image understanding API.
|
||||
|
||||
Args:
|
||||
episode_id (int): ID of the episode to analyze.
|
||||
task_name (str): Name of the task.
|
||||
task_info (dict): Basic information about the task.
|
||||
problematic_code (str, optional): Potentially faulty code generated in a previous step.
|
||||
save_dir (str): Base directory where images are saved.
|
||||
camera_name (str): Name of the camera used to capture the images.
|
||||
generate_dir_name (str, optional): Name of the subdirectory with generated images.
|
||||
|
||||
Returns:
|
||||
str: Textual description of the observation result.
|
||||
"""
|
||||
client = OpenAI(
|
||||
api_key=kimi_api,
|
||||
base_url="https://api.moonshot.cn/v1",
|
||||
)
|
||||
|
||||
# Check if the save_dir already contains the task name
|
||||
base_task_name = task_name.lower() if task_name else ""
|
||||
if base_task_name and os.path.basename(save_dir) == base_task_name:
|
||||
# If task name is already included in save_dir, use it directly
|
||||
task_dir = save_dir
|
||||
else:
|
||||
# Otherwise, append task name to the path
|
||||
task_dir = os.path.join(save_dir, base_task_name) if base_task_name else save_dir
|
||||
|
||||
# If a generated subdirectory name is specified, add it to the path
|
||||
if generate_dir_name:
|
||||
task_dir = os.path.join(task_dir, generate_dir_name)
|
||||
|
||||
print(f"Looking for task images in: {os.path.abspath(task_dir)}")
|
||||
|
||||
# Check if task directory exists
|
||||
if not os.path.exists(task_dir):
|
||||
return f"Error: Image directory not found at {task_dir}"
|
||||
|
||||
# Get images for the specific episode
|
||||
image_files = sorted(glob.glob(os.path.join(task_dir, f"episode{episode_id}_*.png")))
|
||||
|
||||
if not image_files:
|
||||
return f"Error: No images found for episode {episode_id} in directory {task_dir}"
|
||||
|
||||
# Extract step names from image filenames
|
||||
step_names = []
|
||||
for f in image_files:
|
||||
filename = os.path.basename(f)
|
||||
first_underscore_pos = filename.find('_')
|
||||
if first_underscore_pos != -1:
|
||||
step_name = filename[first_underscore_pos+1:].rsplit('.', 1)[0]
|
||||
step_names.append(step_name)
|
||||
else:
|
||||
step_names.append(filename.rsplit('.', 1)[0])
|
||||
|
||||
# Logging for debugging purposes (from observation_agent.py)
|
||||
print(f"Image search pattern: episode{episode_id}_*.png, number of files found: {len(image_files)}")
|
||||
# for f in image_files[:5]: # Uncomment to print first 5 filenames
|
||||
# print(f" - {os.path.basename(f)}")
|
||||
|
||||
# Construct the prompt
|
||||
prompt = f"""Analyze the execution of the following robot task:
|
||||
Task name: {task_name}
|
||||
Task description: {task_info.get('description', 'No description provided')}
|
||||
Task goal: {task_info.get('goal', 'No goal provided')}
|
||||
|
||||
You will be shown images from each step of the task execution. Please analyze:
|
||||
1. Whether each step was executed successfully.
|
||||
2. If any step failed, identify which one and explain why.
|
||||
3. Whether the overall task was successfully completed.
|
||||
4. If the task failed, provide detailed reasoning.
|
||||
|
||||
You will see execution images for the following steps: {', '.join(step_names)}
|
||||
"""
|
||||
|
||||
if problematic_code:
|
||||
prompt += f"\nHere is a piece of potentially problematic code:\n```python\n{problematic_code}\n```\nPlease analyze if the code is related to the observed issue."
|
||||
|
||||
# Prepare message content for API call
|
||||
user_content = []
|
||||
|
||||
# Add textual prompt
|
||||
user_content.append({
|
||||
"type": "text",
|
||||
"text": prompt
|
||||
})
|
||||
|
||||
# Add images and step names
|
||||
for img_path in image_files:
|
||||
filename = os.path.basename(img_path)
|
||||
first_underscore_pos = filename.find('_')
|
||||
if first_underscore_pos != -1:
|
||||
step_name = filename[first_underscore_pos+1:].rsplit('.', 1)[0]
|
||||
else:
|
||||
step_name = filename.rsplit('.', 1)[0]
|
||||
|
||||
# Add step name
|
||||
user_content.append({
|
||||
"type": "text",
|
||||
"text": f"Step: {step_name}"
|
||||
})
|
||||
|
||||
# Add image as base64
|
||||
try:
|
||||
base64_image = encode_image(img_path)
|
||||
user_content.append({
|
||||
"type": "image_url",
|
||||
"image_url": {
|
||||
"url": f"data:image/png;base64,{base64_image}"
|
||||
}
|
||||
})
|
||||
except Exception as e:
|
||||
print(f"Warning: Failed to encode image {img_path}: {str(e)}")
|
||||
|
||||
# Call the image analysis API
|
||||
try:
|
||||
response = client.chat.completions.create(
|
||||
model="moonshot-v1-32k-vision-preview",
|
||||
messages=[
|
||||
{"role": "system", "content": "You are a robot task execution analysis expert. Please analyze the provided image sequence."},
|
||||
{"role": "user", "content": user_content}
|
||||
]
|
||||
)
|
||||
return response.choices[0].message.content
|
||||
except Exception as e:
|
||||
error_msg = f"Error occurred while calling the image understanding API: {str(e)}"
|
||||
print(error_msg)
|
||||
return error_msg
|
||||
|
||||
|
||||
def encode_image(image_path):
|
||||
"""Encode an image file to a base64 string."""
|
||||
with open(image_path, "rb") as image_file:
|
||||
return base64.b64encode(image_file.read()).decode("utf-8")
|
||||
|
||||
|
||||
def insert_observation_points(task_info, task_code, generate_num_id=0):
|
||||
"""
|
||||
Insert observation function calls at key points in robot task code.
|
||||
|
||||
Args:
|
||||
task_info (dict): Information about the task
|
||||
task_code (str): Original code for the task
|
||||
|
||||
Returns:
|
||||
str: Code with inserted observation points and steps summary
|
||||
"""
|
||||
|
||||
# Extract task name
|
||||
if isinstance(task_info, dict) and 'task_name' in task_info:
|
||||
task_name = task_info.get('task_name')
|
||||
else:
|
||||
# Try to extract from code
|
||||
import re
|
||||
task_name_match = re.search(r'class\s+gpt_(\w+)', task_code)
|
||||
task_name = task_name_match.group(1) if task_name_match else "unknown_task"
|
||||
|
||||
# Prepare the prompt for the LLM
|
||||
prompt = f"""You are an expert in robot programming. I have a robot task code that needs observation functions added for monitoring.
|
||||
|
||||
Task information:
|
||||
{task_info}
|
||||
|
||||
I need you to:
|
||||
1. Identify ONLY the main logical steps in this task implementation that cause SIGNIFICANT SCENE CHANGES
|
||||
2. After each such logical step in the code, insert a camera observation function with this format:
|
||||
`self.save_camera_images(task_name="{task_name}", step_name="stepX_descriptive_name", generate_num_id="generate_num_{generate_num_id}")`
|
||||
where X is the sequential step number and descriptive_name is a brief description of what just happened
|
||||
3. Provide a numbered list of all the steps you've identified in the task
|
||||
4. ADD AN OBSERVATION AT THE BEGINNING OF THE TASK to capture the initial scene state
|
||||
5. ADD AN OBSERVATION AT THE END OF THE TASK to capture the final scene state
|
||||
|
||||
Here's the current code:
|
||||
```python
|
||||
{task_code}
|
||||
```
|
||||
|
||||
IMPORTANT CONSTRAINTS:
|
||||
- ADD FEWER THAN 10 OBSERVATION POINTS in total
|
||||
- ONLY add observations after operations that cause VISIBLE SCENE CHANGES
|
||||
- Do NOT add observations for planning, calculations, or any operations that don't visibly change the scene
|
||||
- Focus on key state changes like: robot arm movements, gripper operations, object manipulations
|
||||
- Skip observations for intermediate movements, planning steps, or calculations
|
||||
- The observation function is already defined in the code
|
||||
- Give each step a descriptive name like "gripper_closed", "move_to_target", etc.
|
||||
- The step number (X in stepX) should increase sequentially
|
||||
- DO NOT MODIFY ANY EXISTING ROBOT OPERATION CODE - only insert observation function calls after existing code without changing the original functionality
|
||||
|
||||
Format your response as follows:
|
||||
|
||||
STEP_LIST:
|
||||
1. First step description
|
||||
2. Second step description
|
||||
...
|
||||
|
||||
MODIFIED_CODE:
|
||||
```python
|
||||
<the entire modified code with observation functions inserted>
|
||||
```
|
||||
"""
|
||||
|
||||
# Get the modified code from LLM in one call
|
||||
response = generate(message=[{
|
||||
"role": "system",
|
||||
"content": "You are an AI assistant that helps with programming robot tasks."
|
||||
}, {
|
||||
"role": "user",
|
||||
"content": prompt
|
||||
}])
|
||||
|
||||
# Extract the step list and modified code
|
||||
try:
|
||||
steps_part, code_part = response.split("MODIFIED_CODE:", 1)
|
||||
steps = steps_part.replace("STEP_LIST:", "").strip()
|
||||
modified_code = code_part.strip()
|
||||
|
||||
# Clean up any potential markdown code block formatting
|
||||
if modified_code.startswith("```python"):
|
||||
modified_code = modified_code[len("```python"):].strip()
|
||||
if modified_code.endswith("```"):
|
||||
modified_code = modified_code[:-3].strip()
|
||||
except ValueError:
|
||||
# Fallback in case the format isn't as expected
|
||||
steps = "Failed to extract step list"
|
||||
modified_code = response
|
||||
|
||||
# Format the output
|
||||
output = f"# task_name: {task_name}\n# task_step:\n{steps}\n\n# task_code:\n```python\n{modified_code}\n```"
|
||||
|
||||
return output
|
||||
@ -0,0 +1,345 @@
|
||||
# ====================== PROMPT =============================
|
||||
|
||||
BASIC_INFO = '''
|
||||
In this environment, distance 1 indicates 1 meter long. Pose is representated as 7 dimention, [x, y, z, qw, qx, qy, qz].
|
||||
For a 7-dimensional Pose object, you can use Pose.p to get the [x, y, z] coordinates and Pose.q to get the [qw, qx, qy, qz] quaternion orientation.
|
||||
All functions which has parameter actor, and all of actor should be in the Actor object.
|
||||
In the world coordinate system, the positive directions of the xyz coordinate axes are right, front, and upper respectively, so the direction vectors on the right, front,
|
||||
and upper sides are [1,0,0], [0,1,0], [0,0,1] respectively. In the same way, we can get the unit vectors of the left side, back side and down side.
|
||||
Each actor in the environment has one or more functional points, which are specific locations designed for interactions.
|
||||
Access functional points using actor.get_functional_point(point_id, return_type), where return_type can be "pose", "p", or "q".
|
||||
'''
|
||||
|
||||
CODE_TEMPLATE = '''
|
||||
from envs._base_task import Base_Task
|
||||
from envs.$TASK_NAME$ import $TASK_NAME$
|
||||
from envs.utils import *
|
||||
import sapien
|
||||
|
||||
class gpt_$TASK_NAME$($TASK_NAME$):
|
||||
def play_once(self):
|
||||
pass
|
||||
'''
|
||||
|
||||
AVAILABLE_ENV_FUNCTION = {
|
||||
"open_gripper":
|
||||
"def open_gripper(self, arm_tag: ArmTag, pos=1.) -> tuple[ArmTag, list[Action]].\
|
||||
Opens the gripper of the specified arm.\
|
||||
Returns: tuple[ArmTag, list[Action]] containing the gripper-open action.\
|
||||
Args:\
|
||||
arm_tag: Which arm's gripper to open\
|
||||
pos: Gripper position (1 = fully open)",
|
||||
"close_gripper":
|
||||
"def close_gripper(self, arm_tag: ArmTag, pos=0.) -> tuple[ArmTag, list[Action]].\
|
||||
Closes the gripper of the specified arm.\
|
||||
Returns: tuple[ArmTag, list[Action]] containing the gripper-close action.\
|
||||
Args:\
|
||||
arm_tag: Which arm's gripper to close\
|
||||
pos: Gripper position (0 = fully closed)",
|
||||
"move":
|
||||
"def move(self, actions_by_arm1: tuple[ArmTag, list[Action]], actions_by_arm2: tuple[ArmTag, list[Action]] = None).\
|
||||
Executes action sequences on one or both robotic arms simultaneously.\
|
||||
No Return.\
|
||||
Args:\
|
||||
actions_by_arm1: Action sequence for the first arm, formatted as (arm_tag, [action1, action2, ...])\
|
||||
actions_by_arm2: Optional, action sequence for the second arm",
|
||||
|
||||
# "move_to_pose":
|
||||
# "def move_to_pose(self, arm_tag: ArmTag, target_pose: list) -> tuple[ArmTag, list[Action]].\
|
||||
# Moves the end-effector of the specified arm to a specific absolute pose.\
|
||||
# Returns: tuple[ArmTag, list[Action]] containing the move-to-pose actions.\
|
||||
# Args:\
|
||||
# arm_tag: The arm to control\
|
||||
# target_pose: Absolute position and/or orientation, length 3 or 7 (xyz + optional quaternion)",
|
||||
|
||||
# "move_by_displacement":
|
||||
# "def move_by_displacement(self, arm_tag: ArmTag, x=0., y=0., z=0., quat=None, move_axis='world') -> tuple[ArmTag, list[Action]].\
|
||||
# Moves the end-effector of the specified arm along relative directions and sets its orientation.\
|
||||
# Returns: tuple[ArmTag, list[Action]] containing the move-by-displacement actions.\
|
||||
# Args:\
|
||||
# arm_tag: The arm to control\
|
||||
# x, y, z: Displacement along each axis (in meters)\
|
||||
# quat: Optional quaternion specifying the target orientation; if not set, uses current orientation\
|
||||
# move_axis: 'world' means displacement is in world coordinates, 'arm' means displacement is in local coordinates",\
|
||||
"move_by_displacement":
|
||||
"def move_by_displacement(self, arm_tag: ArmTag, z=0., move_axis='world') -> tuple[ArmTag, list[Action]].\
|
||||
Moves the end-effector of the specified arm along relative directions and sets its orientation.\
|
||||
Returns: tuple[ArmTag, list[Action]] containing the move-by-displacement actions.\
|
||||
Args:\
|
||||
arm_tag: The arm to control\
|
||||
z: Displacement along the z-axis (in meters)\
|
||||
move_axis: 'world' means displacement is in world coordinates, 'arm' means displacement is in local coordinates",
|
||||
"grasp_actor":
|
||||
"def grasp_actor(self, actor: Actor, arm_tag: ArmTag, pre_grasp_dis=0.1, grasp_dis=0, gripper_pos=0., contact_point_id=None) -> tuple[ArmTag, list[Action]].\
|
||||
Generates a sequence of actions to pick up the specified Actor.\
|
||||
Returns: tuple[ArmTag, list[Action]] containing the grasp actions.\
|
||||
Args:\
|
||||
actor: The object to grasp\
|
||||
arm_tag: Which arm to use\
|
||||
pre_grasp_dis: Pre-grasp distance (default 0.1 meters), the arm will move to this position first\
|
||||
grasp_dis: Grasping distance (default 0 meters), the arm moves from the pre-grasp position to this position and then closes the gripper\
|
||||
gripper_pos: Gripper closing position (default 0, fully closed)\
|
||||
contact_point_id: Optional list of contact point IDs; if not provided, the best grasping point is selected automatically",
|
||||
"place_actor":
|
||||
"def place_actor(self, actor: Actor, arm_tag: ArmTag, target_pose: list | np.ndarray, functional_point_id: int = None, pre_dis=0.1, dis=0.02, is_open=True, **kwargs) -> tuple[ArmTag, list[Action]].\
|
||||
Places a currently held object at a specified target pose.\
|
||||
Returns: tuple[ArmTag, list[Action]] containing the place actions.\
|
||||
Args: \
|
||||
actor: The currently held object\
|
||||
arm_tag: The arm holding the object\
|
||||
target_pose: Target position/orientation, It is recommended to use the return value of actor.get_functional_point(..., 'pose') or pose in actor_list as target_pose\
|
||||
functional_point_id: Optional ID of the functional point; if provided, aligns this point to the target, otherwise aligns the base of the object\
|
||||
pre_dis: Pre-place distance (default 0.1 meters), arm moves to this position first\
|
||||
dis: Final placement distance (default 0.02 meters), arm moves from pre-place to this location, then opens the gripper\
|
||||
is_open: Whether to open the gripper after placing (default True), Set False if you need to keep gripper closed to maintain hold of the object\
|
||||
**kwargs: Other optional parameters:\
|
||||
constrain : {'free', 'align', 'auto'}, default='auto' Alignment strategy:\
|
||||
'free': Only forces the object's z-axis to align with the target point's z-axis, other axes are determined by projection.\
|
||||
'align': Forces all axes of the object to align with all axes of the target point.\
|
||||
'auto': Automatically selects a suitable placement pose based on grasp direction (vertical or horizontal).\
|
||||
pre_dis_axis : {'grasp', 'fp'} or np.ndarray or list, default='grasp'. Specifies the pre-placement offset direction.",
|
||||
"back_to_origin":
|
||||
"def back_to_origin(self, arm_tag: ArmTag) -> tuple[ArmTag, list[Action]].\
|
||||
Returns the specified arm to its predefined initial position.\
|
||||
Returns: tuple[ArmTag, list[Action]] containing the return-to-origin action.\
|
||||
Args:\
|
||||
arm_tag: The arm to return to origin",
|
||||
|
||||
# "get_arm_pose":
|
||||
# "def get_arm_pose(self, arm_tag: ArmTag) -> list[float].\
|
||||
# Gets the current pose of the end-effector of the specified arm.\
|
||||
# Returns: A list of 7 floats: [x, y, z, qw, qx, qy, qz], representing position and orientation.\
|
||||
# Args:\
|
||||
# arm_tag: Which arm to query",
|
||||
}
|
||||
|
||||
FUNCTION_EXAMPLE = '''
|
||||
You can directly use the actors provided in the actor_list:
|
||||
```python
|
||||
# For example, if actor_list contains ["self.object1", "self.object2"]
|
||||
# You can directly use:
|
||||
object1 = self.hammer
|
||||
object2 = self.block
|
||||
```
|
||||
|
||||
# Using ArmTag class to represent arms:
|
||||
arm_tag = ArmTag("left") # Left arm
|
||||
arm_tag = ArmTag("right") # Right arm
|
||||
|
||||
# Example of selecting an arm based on conditions:
|
||||
arm_tag = ArmTag("left" if actor_position[0] < 0 else "right")
|
||||
|
||||
# Each actor in the environment may have multiple functional points that are useful for different interactions.
|
||||
# Functional points provide precise locations for interactions like grasping, placing, or aligning objects.
|
||||
|
||||
# To get a functional point from an actor:
|
||||
```python
|
||||
functional_point_pose = actor.get_functional_point(point_id, "pose") # Returns a complete 7-dimensional Pose object with p (position) and q (orientation)
|
||||
position = functional_point_pose.p # Get [x, y, z] position of the functional point
|
||||
orientation = functional_point_pose.q # Get [qw, qx, qy, qz] quaternion orientation of the functional point
|
||||
```
|
||||
Note: The pose from a functional point is already set according to the expected alignment/direction for the task. For placement, use get_functional_point(point_id, "pose") directly—do NOT construct or rotate your own quaternion.
|
||||
|
||||
# When stacking one object on top of another (for example, placing blockA on top of blockB):
|
||||
target_pose = self.last_actor.get_functional_point(point_id, "pose")
|
||||
# Use this target_pose in place_actor to place the object exactly on top of last_actor at the specified functional point.
|
||||
```python
|
||||
self.move(
|
||||
self.place_actor(
|
||||
actor=self.current_actor, # The object to be placed
|
||||
target_pose=target_pose, # The pose acquired from last_actor
|
||||
arm_tag=arm_tag,
|
||||
functional_point_id=0, # Align functional point 0, or specify as needed
|
||||
pre_dis=0.1,
|
||||
dis=0.02,
|
||||
pre_dis_axis="fp", # Use functional point direction for pre-displacement, if the functional point is used
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
For all actors in `actor_list` that are of type `pose`, such as `middle_pose` or `actor_target_pose`, these are already `Pose` objects (or lists of `Pose`), so you do **not** need to call `.get_pose()` again. You can pass them directly as `target_pose`.
|
||||
Example:
|
||||
```python
|
||||
# Place the actor at actor_pose (already a Pose object)
|
||||
self.move(
|
||||
self.place_actor(
|
||||
self.box,
|
||||
target_pose=self.actor_pose, # already a Pose, no need for get_pose()
|
||||
arm_tag=grasp_arm_tag,
|
||||
functional_point_id=0, # functional_point_id can be retrived from the actor list if the actor has functional points
|
||||
pre_dis=0,
|
||||
dis=0, # set dis to 0 if is_open is False, and the gripper will not open after placing. Set the `dis` to a small value like 0.02 if you want the gripper to open after placing.
|
||||
is_open=False, # if is_open is False, pre_dis and dis will be 0, and the gripper will not open after placing.
|
||||
constrain="free", # if task requires the object to be placed in a specific pose that mentioned in the task description (like "the head of the actor should be toward xxx), you can set constrain to "align", in all of other cases, you should set constrain to "free".
|
||||
pre_dis_axis='fp', # Use functional point direction for pre-displacement, if the functional_point_id is used
|
||||
)
|
||||
)
|
||||
```
|
||||
Note: For the `target_actor`, It's a actor not a Pose, so you need to call `get_pose()` to get its pose. or call `get_functional_point()` to get its functional point.
|
||||
|
||||
|
||||
For the grasping of a certain actor, you can check its position to decide which arm to use:
|
||||
```python
|
||||
# Get the actor's pose
|
||||
actor_pose = self.actor.get_pose() # Use actor_pose.p for position, actor_pose.q for orientation
|
||||
actor_position = actor_pose.p # [x, y, z]
|
||||
|
||||
# Example of selecting an arm based on conditions:
|
||||
arm_tag = ArmTag("left" if actor_position[0] < 0 else "right")
|
||||
|
||||
# Grasp actor with selected arm
|
||||
self.move(
|
||||
self.grasp_actor(actor=self.actor, arm_tag=arm_tag)
|
||||
)
|
||||
```
|
||||
|
||||
Here are some APIs and examples of grasping objects:
|
||||
If you want to grasp an actor, you typically execute the following code:
|
||||
```python
|
||||
# Or grasp with arm_tag
|
||||
self.move(
|
||||
self.grasp_actor(
|
||||
actor=self.actor,
|
||||
arm_tag=arm_tag, # arm_tag can be ArmTag("left") or ArmTag("right")
|
||||
pre_grasp_dis=0.1,
|
||||
grasp_dis=0
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
If you want to pick up an actor and lift it, you can refer to the following sample code:
|
||||
```python
|
||||
# Grasp the object
|
||||
self.move(
|
||||
self.grasp_actor(
|
||||
actor=self.actor,
|
||||
arm_tag=arm_tag, # arm_tag can be ArmTag("left") or ArmTag("right")
|
||||
pre_grasp_dis=0.1,
|
||||
grasp_dis=0
|
||||
)
|
||||
)
|
||||
|
||||
# Lift the object up by moving relative to current position, you should lift the arm up evrery time after grasping an object to avoid collision.
|
||||
self.move(
|
||||
self.move_by_displacement(
|
||||
arm_tag=arm_tag,
|
||||
z=0.07, # Move 7cm upward
|
||||
move_axis='world'
|
||||
)
|
||||
)
|
||||
```
|
||||
The code for grasping with the right arm is similar to the above code.
|
||||
|
||||
Here are some examples of gripper control:
|
||||
```python
|
||||
# Open gripper fully
|
||||
self.move(
|
||||
self.open_gripper(arm_tag=arm_tag, pos=1.0) # arm_tag can be ArmTag("left") or ArmTag("right")
|
||||
)
|
||||
|
||||
# Open gripper halfway
|
||||
self.move(
|
||||
self.open_gripper(arm_tag=arm_tag, pos=0.5) # arm_tag can be ArmTag("left") or ArmTag("right")
|
||||
)
|
||||
|
||||
# Close gripper fully
|
||||
self.move(
|
||||
self.close_gripper(arm_tag=arm_tag, pos=0.0) # arm_tag can be ArmTag("left") or ArmTag("right")
|
||||
)
|
||||
|
||||
# Close gripper halfway
|
||||
self.move(
|
||||
self.close_gripper(arm_tag=arm_tag, pos=0.5) # arm_tag can be ArmTag("left") or ArmTag("right")
|
||||
)
|
||||
```
|
||||
|
||||
Here are some APIs and examples of placing objects:
|
||||
To place an object at a target location, you typically execute the following code:
|
||||
```python
|
||||
# Place the object at a specific target pose
|
||||
self.move(
|
||||
self.place_actor(
|
||||
actor=self.actor,
|
||||
arm_tag=arm_tag,
|
||||
target_pose=self.target_pose, # self.target_pose can be retrived from the actor list.
|
||||
functional_point_id=0, # functional_point_id can be retrived from the actor list if the actor has functional points
|
||||
pre_dis=0.1,
|
||||
dis=0.02, # set dis to 0 if is_open is False, and the gripper will not open after placing. Set the `dis` to a small value like 0.02 if you want the gripper to open after placing.
|
||||
is_open=True, # Controls gripper state after placing: True to release object (default), False to maintain grip on object
|
||||
pre_dis_axis='fp', # Use functional point direction for pre-displacement, if the functional_point_id is used
|
||||
)
|
||||
)
|
||||
|
||||
# Lift the gripper up after placing to avoid collision with the object. (Only needed if is_open is True when placing, which means the object is released)
|
||||
self.move(
|
||||
self.move_by_displacement(
|
||||
arm_tag=arm_tag,
|
||||
z=0.07, # Move 7cm upward
|
||||
move_axis='world' # Move in world coordinates
|
||||
)
|
||||
```
|
||||
|
||||
If you want to align a functional point of the object with the target, you can specify the functional_point_id:
|
||||
```python
|
||||
# Place the object by aligning functional point 0 with the target pose
|
||||
self.move(
|
||||
self.place_actor(
|
||||
actor=self.actor,
|
||||
arm_tag=arm_tag,
|
||||
target_pose=target_pose,
|
||||
functional_point_id=0, # functional_point_id can be retrived from the actor list if the actor has functional points
|
||||
pre_dis=0.1,
|
||||
dis=0.02, # set dis to 0 if is_open is False, and the gripper will not open after placing.
|
||||
pre_dis_axis='fp' # Use functional point direction for pre-displacement, if the functional_point_id is used
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
If both arms need to work together simultaneously, use the move() function with two arm actions:
|
||||
```python
|
||||
# Move both arms simultaneously
|
||||
left_arm_tag = ArmTag("left")
|
||||
right_arm_tag = ArmTag("right")
|
||||
self.move(
|
||||
self.grasp_actor(actor=self.left_actor, arm_tag=left_arm_tag),
|
||||
self.grasp_actor(actor=self.right_actor, arm_tag=right_arm_tag)
|
||||
)
|
||||
|
||||
# Lift both actors up after grasping
|
||||
self.move(
|
||||
self.move_by_displacement(arm_tag=left_arm_tag, z=0.07), # Move left arm up by 10cm
|
||||
self.move_by_displacement(arm_tag=right_arm_tag, z=0.07) # Move right arm up by 10cm
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
Place left object while moving right arm back to origin
|
||||
```python
|
||||
move_arm_tag = ArmTag("left") # Specify which arm is placing the object
|
||||
back_arm_tag = ArmTag("right") # Specify which arm is moving back to origin
|
||||
self.move(
|
||||
self.place_actor(
|
||||
actor=self.left_actor,
|
||||
arm_tag=move_arm_tag,
|
||||
target_pose=target_pose,
|
||||
pre_dis_axis="fp",
|
||||
),
|
||||
self.back_to_origin(arm_tag=back_arm_tag)
|
||||
)
|
||||
```
|
||||
The code for placing with the right arm is similar to the above code.
|
||||
|
||||
To return arms to their initial positions:
|
||||
```python
|
||||
# Return arm to origin
|
||||
self.move(self.back_to_origin(arm_tag=arm_tag))
|
||||
|
||||
# Return both arms to origin simultaneously
|
||||
left_arm_tag = ArmTag("left")
|
||||
right_arm_tag = ArmTag("right")
|
||||
self.move(
|
||||
self.back_to_origin(arm_tag=left_arm_tag),
|
||||
self.back_to_origin(arm_tag=right_arm_tag)
|
||||
)
|
||||
```
|
||||
'''
|
||||
@ -0,0 +1,114 @@
|
||||
import os
|
||||
import yaml
|
||||
import sys
|
||||
import importlib
|
||||
import argparse
|
||||
|
||||
from gpt_agent import *
|
||||
from prompt import *
|
||||
from task_info import *
|
||||
from test_gen_code import setup_task_config, run
|
||||
|
||||
# Global variable definitions
|
||||
SCRIPT_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "script")
|
||||
CONFIGS_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "task_config")
|
||||
|
||||
|
||||
def run_code(task_info, las_error=None, message=None):
|
||||
"""
|
||||
Execute generated code for a robot task based on task information and previous errors.
|
||||
|
||||
Args:
|
||||
task_info (dict): Dictionary containing task metadata (name, description, etc.).
|
||||
las_error (str, optional): Last recorded error message, if any.
|
||||
message (list, optional): Message history for the agent.
|
||||
|
||||
Returns:
|
||||
tuple: (success_rate, error_message, error_count, run_records)
|
||||
"""
|
||||
check_num = 50
|
||||
if message is None:
|
||||
message = []
|
||||
|
||||
print("Running code for task:", task_info['task_name'])
|
||||
|
||||
# Extract task info
|
||||
task_name = task_info['task_name']
|
||||
task_description = task_info['task_description']
|
||||
|
||||
print("Task Name:", task_name)
|
||||
print("Task Description:", task_description)
|
||||
|
||||
task, args = setup_task_config(task_name)
|
||||
|
||||
try:
|
||||
# Updated to match the new return values of run()
|
||||
success_rate, error_message, error_count, run_records = run(task, args, check_num)
|
||||
return success_rate, error_message, error_count, run_records
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("Testing interrupted by user.")
|
||||
return 0, "Testing interrupted by user", 20
|
||||
|
||||
except Exception as e:
|
||||
import traceback
|
||||
error_trace = traceback.format_exc()
|
||||
print(f"An error occurred during testing: {e}\n{error_trace}")
|
||||
return 0, f"Error during testing: {e}", 20
|
||||
|
||||
|
||||
def main(task_info_dic):
|
||||
"""
|
||||
Main function to test generated code for a given robot task.
|
||||
|
||||
Args:
|
||||
task_info_dic (dict): Dictionary containing task information.
|
||||
"""
|
||||
task_info = now_task_info = task_info_dic
|
||||
messages = [{
|
||||
"role": "system",
|
||||
"content": "You need to generate relevant code for some robot tasks in a robot simulation environment based on the provided API."
|
||||
}]
|
||||
las_error_message = None
|
||||
|
||||
# Run the test
|
||||
success_rate, las_error_message, error_count, run_records = run_code(
|
||||
now_task_info, las_error_message, messages
|
||||
)
|
||||
|
||||
# Evaluate result
|
||||
if success_rate >= 0.5:
|
||||
print(f"Successfully generated and executed code for task: {task_info['task_name']}")
|
||||
else:
|
||||
print(f"Failed to generate or execute code for task: {task_info['task_name']}")
|
||||
print("Error message:\n", las_error_message)
|
||||
now_task_info["task_description"] = (
|
||||
f"Failed to generate code, error message: {las_error_message}, "
|
||||
f"error count: {str(error_count)}"
|
||||
)
|
||||
now_task_info["current_code"] = None
|
||||
|
||||
print("Final Success Rate:", success_rate)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Parse command-line arguments
|
||||
parser = argparse.ArgumentParser(description='Run generated code for a robot task.')
|
||||
parser.add_argument('task_name', type=str)
|
||||
now_task = None
|
||||
|
||||
# Get task info from task name string
|
||||
try:
|
||||
task_name = parser.parse_args().task_name.upper()
|
||||
exec(f'now_task = {task_name}')
|
||||
except Exception as e:
|
||||
raise ValueError("Invalid task name specified.") from e
|
||||
|
||||
# Run main function
|
||||
main(now_task)
|
||||
|
||||
|
||||
"""
|
||||
Usage:
|
||||
python code_gen/run_code.py task_name
|
||||
"""
|
||||
@ -0,0 +1,236 @@
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
|
||||
# Add the project root directory to the system path
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from gpt_agent import *
|
||||
from prompt import *
|
||||
from task_info import *
|
||||
from test_gen_code import *
|
||||
|
||||
import argparse
|
||||
|
||||
def generate_code(task_info, las_error=None, message=None):
|
||||
"""Generate code for robot task based on task info and previous errors."""
|
||||
if message is None:
|
||||
message = []
|
||||
|
||||
# Extract task information
|
||||
task_name = task_info['task_name']
|
||||
task_description = task_info['task_description']
|
||||
current_code = task_info['current_code']
|
||||
|
||||
# Get the enriched actor_list
|
||||
original_actor_list = task_info['actor_list']
|
||||
actor_list = enrich_actors(original_actor_list)
|
||||
|
||||
# print("actor_list: ", actor_list)
|
||||
|
||||
available_env_function = str(AVAILABLE_ENV_FUNCTION)
|
||||
function_example = str(FUNCTION_EXAMPLE)
|
||||
|
||||
# Generate code based on error status
|
||||
if las_error is not None:
|
||||
# Handle error case - provide error info to improve generation
|
||||
Prompt = (
|
||||
f"The code is unsuccessful, \n# Last Error Message: \n{las_error}\n\n"
|
||||
f"# Task description: \n{task_description}\n\n"
|
||||
f"# Actor List: \n{actor_list}\n\n"
|
||||
)
|
||||
else:
|
||||
# First attempt case - create initial code file
|
||||
res = f'''
|
||||
from envs._base_task import Base_Task
|
||||
from envs.{task_name} import {task_name}
|
||||
from envs.utils import *
|
||||
import sapien
|
||||
|
||||
class gpt_{task_name}({task_name}):
|
||||
def play_once(self):
|
||||
pass
|
||||
'''
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
with open(file_name, 'w') as file:
|
||||
file.write(res)
|
||||
|
||||
# Construct full prompt with all necessary information
|
||||
Prompt = (
|
||||
f"{BASIC_INFO}\n\n"
|
||||
f"# Task description: \n{task_description}\n\n"
|
||||
f"# Actor List: \n{actor_list}\n\n"
|
||||
f"# Available API: \n{available_env_function}\n\n"
|
||||
f"# Function Example: \n{function_example}\n\n"
|
||||
f"# Current Code:\n{current_code}"
|
||||
)
|
||||
|
||||
# Add prompt to message history
|
||||
message.append({"role": "user", "content": Prompt})
|
||||
|
||||
# Generate code using the model
|
||||
res = generate(message, gpt="deepseek", temperature=0)
|
||||
|
||||
# Extract the relevant portion of the generated code
|
||||
res = f'''
|
||||
from envs._base_task import Base_Task
|
||||
from envs.{task_name} import {task_name}
|
||||
from envs.utils import *
|
||||
import sapien
|
||||
|
||||
class gpt_{task_name}({task_name}):
|
||||
''' + res[res.find('def play_once'):res.rfind("```")]
|
||||
|
||||
# Save generated code to file
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
with open(file_name, 'w') as file:
|
||||
file.write(res)
|
||||
|
||||
print("Task Name: ", task_name)
|
||||
print("Task Description: ", task_description)
|
||||
|
||||
task, args = setup_task_config(task_name)
|
||||
|
||||
try:
|
||||
# Update this section to match the new return values of the run function
|
||||
success_rate, error_message, error_count, run_records = run(task, args)
|
||||
|
||||
return res, success_rate, error_message, error_count, run_records
|
||||
except KeyboardInterrupt:
|
||||
print("Test interrupted by user")
|
||||
return res, 0, "Test interrupted by user", 20
|
||||
except Exception as e:
|
||||
import traceback
|
||||
error_trace = traceback.format_exc()
|
||||
print(f"Error occurred during testing: {e}\n{error_trace}")
|
||||
return res, 0, f"Error occurred during testing: {e}", 20
|
||||
|
||||
|
||||
def main(task_info_dic):
|
||||
"""Main function to generate and test code for robot tasks."""
|
||||
# Initialize variables
|
||||
task_info = now_task_info = task_info_dic
|
||||
messages = [{"role": "system", "content": "You need to generate relevant code for some robot tasks in a robot simulation environment based on the provided API."}]
|
||||
generate_num = 5
|
||||
success_threshold = 0.5
|
||||
las_error_message = None
|
||||
suc_list = []
|
||||
task_name = task_info['task_name']
|
||||
task_description = task_info['task_description']
|
||||
|
||||
# Store the best code and its success rate
|
||||
best_code = None
|
||||
best_success_rate = 0
|
||||
best_run_records = None
|
||||
|
||||
# Create log file name with timestamp
|
||||
import datetime
|
||||
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
log_dir = "envs_gen/logs"
|
||||
os.makedirs(log_dir, exist_ok=True)
|
||||
log_filename = f"{log_dir}/{task_info['task_name']}_{timestamp}.log"
|
||||
|
||||
# Store all attempt records
|
||||
all_attempts = []
|
||||
|
||||
# Try multiple generations until success or limit reached
|
||||
for id in range(generate_num):
|
||||
print(f"Generate code for task: {task_info['task_name']} ({id+1}/{generate_num})")
|
||||
|
||||
# Generate and test code
|
||||
res_code, success_rate, las_error_message, error_count, run_records = generate_code(
|
||||
now_task_info, las_error_message, messages
|
||||
)
|
||||
|
||||
# Track success rates
|
||||
suc_list.append(success_rate)
|
||||
|
||||
# Record this attempt
|
||||
attempt_record = {
|
||||
"attempt_id": id + 1,
|
||||
"success_rate": success_rate,
|
||||
"error_message": las_error_message,
|
||||
"error_count": error_count,
|
||||
"code": res_code,
|
||||
"run_records": run_records
|
||||
}
|
||||
all_attempts.append(attempt_record)
|
||||
|
||||
# Save best code
|
||||
if success_rate > best_success_rate:
|
||||
best_success_rate = success_rate
|
||||
best_code = res_code
|
||||
best_run_records = run_records
|
||||
print(f"New best code found, success rate: {best_success_rate}")
|
||||
|
||||
# Check if generation was successful
|
||||
if success_rate >= success_threshold:
|
||||
print(f"Successfully generated code for task: {task_info['task_name']}")
|
||||
break
|
||||
|
||||
# Handle failure case
|
||||
print(f"Failed to generate code for task: {task_name} (attempt {id+1})\nError message: \n{las_error_message}")
|
||||
|
||||
# Update task description and code for the next attempt
|
||||
print(f"Failed to generate code for task: {task_info['task_name']} {id}\nError massage: \n{las_error_message}")
|
||||
change_info = """The error may be caused by:
|
||||
1. pre_dis_axis is not set correctly in the place_actor function;
|
||||
2. the functional point is not set correctly in the place_actor function;
|
||||
3. The pre_dis or dis is not set correctly in the place_actor function;
|
||||
4. The constrain is not set correctly in the place_actor function, free or align is not constantly fixed, if the code did not have above error, please try to set the constrain to another value.
|
||||
5. The code didn't take into account the note given in the example function.
|
||||
The task can be accomplished only through the existing API and example function, please do not use any other API that is not listed in the available API list and examples.\n"""
|
||||
now_task_info["task_description"] = f"{task_description}\nFailed to generate code, error message: {las_error_message}, error count: {str(error_count)}\n" + change_info
|
||||
now_task_info["current_code"] = res_code
|
||||
|
||||
# Ensure the final saved code is the best one
|
||||
if best_code is not None:
|
||||
task_name = task_info['task_name']
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
print(f"Saving best code, success rate: {best_success_rate}")
|
||||
with open(file_name, 'w') as file:
|
||||
file.write(best_code)
|
||||
|
||||
print(f"Best success rate: {best_success_rate}")
|
||||
print(f"All success rates: {suc_list}")
|
||||
|
||||
# Save log data to file
|
||||
with open(log_filename, 'w') as log_file:
|
||||
log_data = {
|
||||
"task_name": task_info['task_name'],
|
||||
"task_description": task_info['task_description'],
|
||||
"best_success_rate": best_success_rate,
|
||||
"success_rates": suc_list,
|
||||
"best_code": best_code,
|
||||
"best_run_records": best_run_records,
|
||||
"all_attempts": all_attempts
|
||||
}
|
||||
json.dump(log_data, log_file, indent=2)
|
||||
|
||||
print(f"Log has been saved to: {log_filename}")
|
||||
|
||||
return best_success_rate, suc_list, best_code, best_run_records
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Parse command line arguments
|
||||
parser = argparse.ArgumentParser(description='Process some integers.')
|
||||
parser.add_argument('task_name', type=str)
|
||||
now_task = None
|
||||
|
||||
# Get task information based on task name
|
||||
try:
|
||||
task_name = parser.parse_args().task_name.upper()
|
||||
exec(f'now_task = {task_name}')
|
||||
except:
|
||||
raise ValueError("The task name is wrong.")
|
||||
|
||||
# Run main function with task information
|
||||
main(now_task)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Usage:
|
||||
python code_gen/task_generation.py task_name
|
||||
"""
|
||||
@ -0,0 +1,357 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
# Add the project root directory to the path
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from gpt_agent import *
|
||||
from prompt import *
|
||||
from task_info import *
|
||||
from observation_agent import *
|
||||
from test_gen_code import *
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
def generate_code(task_info, las_error=None, observation_feedback=None, message:list=None, generate_num_id=None):
|
||||
# Extract task information
|
||||
if message is None:
|
||||
message = []
|
||||
|
||||
# Extract task information
|
||||
task_name = task_info['task_name']
|
||||
task_description = task_info['task_description']
|
||||
current_code = task_info['current_code']
|
||||
|
||||
# Get the enriched actor list
|
||||
original_actor_list = task_info['actor_list']
|
||||
actor_list = enrich_actors(original_actor_list)
|
||||
|
||||
available_env_function = str(AVAILABLE_ENV_FUNCTION)
|
||||
function_example = str(FUNCTION_EXAMPLE)
|
||||
|
||||
# Generate code
|
||||
if las_error is not None:
|
||||
# Include multimodal observation feedback
|
||||
if observation_feedback:
|
||||
Prompt = (
|
||||
f"The code is unsuccessful, \n# Last Error Message: \n{las_error}\n\n"
|
||||
f"# Visual Observation Feedback: \n{observation_feedback}\n\n"
|
||||
f"# Task Description: \n{task_description}\n\n"
|
||||
f"# Actor List: \n{actor_list}\n\n"
|
||||
)
|
||||
else:
|
||||
Prompt = (
|
||||
f"The code is unsuccessful, \n# Last Error Message: \n{las_error}\n\n"
|
||||
f"# Task Description: \n{task_description}\n\n"
|
||||
f"# Actor List: \n{actor_list}\n\n"
|
||||
)
|
||||
else:
|
||||
res = f'''
|
||||
from envs._base_task import Base_Task
|
||||
from envs.{task_name} import {task_name}
|
||||
from envs.utils import *
|
||||
import sapien
|
||||
|
||||
class gpt_{task_name}({task_name}):
|
||||
def play_once(self):
|
||||
pass
|
||||
'''
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
with open(file_name, 'w', encoding='utf-8') as file:
|
||||
file.write(res)
|
||||
|
||||
# Construct the full prompt with all required information
|
||||
Prompt = (
|
||||
f"{BASIC_INFO}\n\n"
|
||||
f"# Task Description: \n{task_description}\n\n"
|
||||
f"# Actor List: \n{actor_list}\n\n"
|
||||
f"# Available API: \n{available_env_function}\n\n"
|
||||
f"# Function Example: \n{function_example}\n\n"
|
||||
f"# Current Code:\n{current_code}"
|
||||
)
|
||||
message.append({"role": "user", "content": Prompt})
|
||||
|
||||
# Start the generation process
|
||||
res = generate(message)
|
||||
res = f'''
|
||||
from envs._base_task import Base_Task
|
||||
from envs.{task_name} import {task_name}
|
||||
from envs.utils import *
|
||||
import sapien
|
||||
|
||||
class gpt_{task_name}({task_name}):
|
||||
''' + res[res.find('def play_once'):res.rfind("```")]
|
||||
|
||||
# Save the original code for later comparison
|
||||
original_code = res
|
||||
|
||||
analysis_text = "" # Initialize analysis text
|
||||
|
||||
# Insert observation function regardless of error
|
||||
observation_output = insert_observation_points(task_info, res, generate_num_id=generate_num_id)
|
||||
print("Observation Output: ", observation_output)
|
||||
|
||||
# Extract analysis text (if exists)
|
||||
if "# task_step:" in observation_output:
|
||||
try:
|
||||
step_part = observation_output.split("# task_step:")[1]
|
||||
if "# task_code:" in step_part:
|
||||
analysis_text = step_part.split("# task_code:")[0].strip()
|
||||
except:
|
||||
print("Error extracting analysis text")
|
||||
|
||||
# Extract the modified code part
|
||||
if "# task_code:" in observation_output:
|
||||
code_parts = observation_output.split("# task_code:")
|
||||
if len(code_parts) > 1:
|
||||
code_part = code_parts[1].strip()
|
||||
|
||||
# Handle possible markdown code block format
|
||||
if "```python" in code_part:
|
||||
code_content = code_part.split("```python", 1)[1]
|
||||
if "```" in code_content:
|
||||
code_content = code_content.split("```", 1)[0]
|
||||
res = code_content.strip()
|
||||
elif "```" in code_part:
|
||||
code_content = code_part.split("```", 1)[1]
|
||||
if "```" in code_content:
|
||||
code_content = code_content.split("```", 1)[0]
|
||||
res = code_content.strip()
|
||||
else:
|
||||
res = code_part
|
||||
|
||||
# Add analysis text as a comment at the end of the code
|
||||
if analysis_text:
|
||||
formatted_analysis = "\n\n'''\nObservation Point Analysis:\n" + analysis_text + "\n'''\n"
|
||||
res = res + formatted_analysis
|
||||
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
with open(file_name, 'w', encoding='utf-8') as file:
|
||||
file.write(res)
|
||||
|
||||
print("Task Name: ", task_name)
|
||||
print("Task Description: ", task_description)
|
||||
|
||||
task, args = setup_task_config(task_name)
|
||||
|
||||
try:
|
||||
# Update this to match the new return values of run()
|
||||
success_rate, error_message, error_count, run_records = run(task, args)
|
||||
|
||||
return res, success_rate, error_message, error_count, run_records
|
||||
except KeyboardInterrupt:
|
||||
print("Testing interrupted by user")
|
||||
return res, 0, "Testing interrupted by user", 20, []
|
||||
except Exception as e:
|
||||
import traceback
|
||||
error_trace = traceback.format_exc()
|
||||
print(f"Error occurred during testing: {e}\n{error_trace}")
|
||||
return res, 0, f"Error occurred during testing: {e}", 20, []
|
||||
|
||||
|
||||
def main(task_info_dic):
|
||||
# Keys: "task_name", "task_description", "current_code"
|
||||
|
||||
task_info = now_task_info = task_info_dic
|
||||
messages=[{"role": "system", "content": "You need to generate relevant code for some robot tasks in a robot simulation environment based on the provided API."}]
|
||||
generate_num = 5
|
||||
success_threshold = 0.5
|
||||
las_error_message = None
|
||||
observation_feedback = None
|
||||
task_name = task_info['task_name']
|
||||
task_description = task_info['task_description']
|
||||
|
||||
# Save the best code and success rate
|
||||
best_code = None
|
||||
best_success_rate = 0
|
||||
best_run_records = None
|
||||
|
||||
# Create log file
|
||||
import datetime
|
||||
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
log_dir = "envs_gen/logs"
|
||||
os.makedirs(log_dir, exist_ok=True)
|
||||
log_filename = f"{log_dir}/{task_name}_{timestamp}.log"
|
||||
|
||||
# Store all trial records
|
||||
all_attempts = []
|
||||
suc_list = []
|
||||
|
||||
# Set the camera image directory path
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
base_dir = os.path.dirname(script_dir) # Get project root directory
|
||||
camera_dir = os.path.join(base_dir, "camera_images")
|
||||
task_camera_dir = os.path.join(camera_dir, task_name.lower())
|
||||
|
||||
# Clear the camera image directory at the start
|
||||
def clear_images(directory):
|
||||
if os.path.exists(directory):
|
||||
print(f"Clearing image directory: {directory}")
|
||||
for item in os.listdir(directory):
|
||||
item_path = os.path.join(directory, item)
|
||||
try:
|
||||
if os.path.isdir(item_path):
|
||||
clear_images(item_path)
|
||||
print(f"Cleaned directory: {item_path} (directory structure retained)")
|
||||
else:
|
||||
image_extensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp']
|
||||
file_ext = os.path.splitext(item_path)[1].lower()
|
||||
|
||||
if file_ext in image_extensions:
|
||||
os.remove(item_path)
|
||||
print(f"Deleted image: {item_path}")
|
||||
else:
|
||||
print(f"Skipped non-image file: {item_path}")
|
||||
except Exception as e:
|
||||
print(f"Error processing item {item_path}: {e}")
|
||||
|
||||
clear_images(task_camera_dir)
|
||||
|
||||
for id in range(generate_num):
|
||||
print("Generate code for task: ", task_name, f"({id+1}/{generate_num})")
|
||||
|
||||
# Generate code
|
||||
res_code, success_rate, las_error_message, error_count, run_records = generate_code(
|
||||
now_task_info,
|
||||
las_error_message,
|
||||
observation_feedback,
|
||||
messages,
|
||||
generate_num_id=id
|
||||
)
|
||||
|
||||
suc_list.append(success_rate)
|
||||
|
||||
# Record this attempt
|
||||
attempt_record = {
|
||||
"attempt_id": id + 1,
|
||||
"success_rate": success_rate,
|
||||
"error_message": las_error_message,
|
||||
"error_count": error_count,
|
||||
"code": res_code,
|
||||
"run_records": run_records
|
||||
}
|
||||
all_attempts.append(attempt_record)
|
||||
|
||||
# Save the best code
|
||||
if success_rate > best_success_rate:
|
||||
best_success_rate = success_rate
|
||||
best_code = res_code
|
||||
best_run_records = run_records
|
||||
print(f"New best code found with success rate: {best_success_rate}")
|
||||
|
||||
if success_rate >= success_threshold:
|
||||
print("Successfully generated code for task: ", task_name)
|
||||
break
|
||||
|
||||
# Handle failure case
|
||||
print(f"Failed to generate code for task: {task_info['task_name']} {id}\nError message: \n{las_error_message}")
|
||||
change_info = """The error may be caused by:
|
||||
1. pre_dis_axis is not set correctly in the place_actor function;
|
||||
2. the functional point is not set correctly in the place_actor function;
|
||||
3. The pre_dis or dis is not set correctly in the place_actor function;
|
||||
4. The constrain is not set correctly in the place_actor function, free or align is not constantly fixed, if the code did not have above error, please try to set the constrain to another value.
|
||||
5. The code didn't take into account the note given in the example function.
|
||||
The task can be accomplished only through the existing API and example function, please do not use any other API that is not listed in the available API list and examples.\n"""
|
||||
now_task_info["task_description"] = f"{task_description}\nFailed to generate code, error message: {las_error_message}, error count: {str(error_count)}\n" + change_info
|
||||
now_task_info["current_code"] = res_code
|
||||
|
||||
# Analyze run_records to decide which failure case to observe
|
||||
print("Analyzing run records to determine which error to observe...")
|
||||
|
||||
# Define error priorities
|
||||
error_list = [
|
||||
"The code can not run",
|
||||
"The target position of the object is incorrect.",
|
||||
"The left arm failed to grasp the object",
|
||||
"The right arm failed to grasp the object",
|
||||
"Plan execution failed",
|
||||
"Unknown error occurred during execution"
|
||||
]
|
||||
|
||||
observe_index = 0
|
||||
highest_priority = len(error_list)
|
||||
|
||||
for i, record in enumerate(run_records):
|
||||
if record == "success!":
|
||||
continue
|
||||
|
||||
current_priority = len(error_list)
|
||||
for p, error_pattern in enumerate(error_list):
|
||||
if error_pattern in record:
|
||||
current_priority = p
|
||||
break
|
||||
|
||||
if current_priority < highest_priority:
|
||||
highest_priority = current_priority
|
||||
observe_index = i
|
||||
|
||||
if highest_priority == len(error_list) and len(run_records) > 0:
|
||||
observe_index = 0
|
||||
|
||||
print(f"Selected to observe error at index {observe_index}: {run_records[observe_index]}")
|
||||
|
||||
# Get multimodal observation feedback
|
||||
print(f"Selected observation index observe_index={observe_index}, corresponding error: {run_records[observe_index]}")
|
||||
generate_specific_dir = os.path.join(camera_dir, task_name.lower(), f"generate_num_{id}")
|
||||
print(f"Looking for images in: {os.path.abspath(generate_specific_dir)}")
|
||||
observation_feedback = observe_task_execution(
|
||||
episode_id=observe_index,
|
||||
task_name=f"{task_name}",
|
||||
task_info={
|
||||
"description": task_info["task_description"],
|
||||
"goal": "Successfully execute the robot task"
|
||||
},
|
||||
problematic_code=res_code,
|
||||
save_dir=os.path.dirname(generate_specific_dir),
|
||||
generate_dir_name=f"generate_num_{id}"
|
||||
)
|
||||
print("Observation feedback: ", observation_feedback)
|
||||
print("Observation feedback collected")
|
||||
|
||||
# Ensure the best code is saved
|
||||
if best_code is not None:
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
print(f"Saving best code with success rate: {best_success_rate}")
|
||||
with open(file_name, 'w', encoding='utf-8') as file:
|
||||
file.write(best_code)
|
||||
|
||||
# Save log information to file
|
||||
with open(log_filename, 'w', encoding='utf-8') as log_file:
|
||||
log_data = {
|
||||
"task_name": task_name,
|
||||
"task_description": task_info['task_description'],
|
||||
"best_success_rate": best_success_rate,
|
||||
"success_rates": suc_list,
|
||||
"best_code": best_code,
|
||||
"best_run_records": best_run_records,
|
||||
"all_attempts": all_attempts
|
||||
}
|
||||
json.dump(log_data, log_file, indent=2)
|
||||
|
||||
print("Success rate list: ", suc_list)
|
||||
print(f"Best success rate: {best_success_rate}")
|
||||
print(f"Log saved to: {log_filename}")
|
||||
|
||||
return best_success_rate, suc_list, best_code, best_run_records
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Process some integers.')
|
||||
parser.add_argument('task_name', type=str)
|
||||
now_task = None
|
||||
|
||||
try:
|
||||
task_name = parser.parse_args().task_name.upper()
|
||||
exec(f'now_task = {task_name}')
|
||||
except Exception as e:
|
||||
raise ValueError(f"The task name is wrong: {e}")
|
||||
|
||||
main(now_task)
|
||||
|
||||
|
||||
"""
|
||||
Usage:
|
||||
python code_gen/task_generation_mm.py task_name
|
||||
"""
|
||||
@ -0,0 +1,103 @@
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
|
||||
# Add project root directory to system path
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from gpt_agent import *
|
||||
from prompt import *
|
||||
from task_info import *
|
||||
from test_gen_code import *
|
||||
import argparse
|
||||
|
||||
def generate_code_once(task_info):
|
||||
# Extract task information
|
||||
task_name = task_info['task_name']
|
||||
task_description = task_info['task_description']
|
||||
current_code = task_info['current_code']
|
||||
|
||||
# Get the enriched actor_list
|
||||
original_actor_list = task_info['actor_list']
|
||||
actor_list = enrich_actors(original_actor_list)
|
||||
|
||||
available_env_function = str(AVAILABLE_ENV_FUNCTION)
|
||||
function_example = str(FUNCTION_EXAMPLE)
|
||||
|
||||
# Construct prompt
|
||||
prompt = (
|
||||
f"{BASIC_INFO}\n\n"
|
||||
f"# Task Description:\n{task_description}\n\n"
|
||||
f"# Actor List:\n{actor_list}\n\n"
|
||||
f"# Available API:\n{available_env_function}\n\n"
|
||||
f"# Function Example:\n{function_example}\n\n"
|
||||
f"# Current Code:\n{current_code}"
|
||||
)
|
||||
|
||||
message = [
|
||||
{"role": "system", "content": "You need to generate relevant code for some robot tasks in a robot simulation environment based on the provided API."},
|
||||
{"role": "user", "content": prompt}
|
||||
]
|
||||
|
||||
# Generate code from model
|
||||
res = generate(message, gpt="deepseek", temperature=0)
|
||||
|
||||
# Extract the relevant portion of the generated code
|
||||
res = f'''
|
||||
from envs._base_task import Base_Task
|
||||
from envs.{task_name} import {task_name}
|
||||
from envs.utils import *
|
||||
import sapien
|
||||
|
||||
class gpt_{task_name}({task_name}):
|
||||
''' + res[res.find('def play_once'):res.rfind("```")]
|
||||
|
||||
# Save to file
|
||||
file_name = f"envs_gen/gpt_{task_name}.py"
|
||||
os.makedirs(os.path.dirname(file_name), exist_ok=True)
|
||||
with open(file_name, 'w') as f:
|
||||
f.write(res)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def main(task_info):
|
||||
print("Generating code once for task:", task_info['task_name'])
|
||||
code = generate_code_once(task_info)
|
||||
|
||||
print("Generated code saved. Testing...")
|
||||
|
||||
task, args = setup_task_config(task_info['task_name'])
|
||||
|
||||
try:
|
||||
success_rate, error_message, error_count, run_records = run(task, args)
|
||||
print(f"Success Rate: {success_rate}")
|
||||
print("Run Records:", run_records)
|
||||
except Exception as e:
|
||||
import traceback
|
||||
print("Error during run:")
|
||||
print(traceback.format_exc())
|
||||
success_rate, error_message, error_count, run_records = 0, str(e), 1, None
|
||||
|
||||
return code, success_rate, error_message, error_count, run_records
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Process some integers.')
|
||||
parser.add_argument('task_name', type=str)
|
||||
now_task = None
|
||||
|
||||
try:
|
||||
task_name = parser.parse_args().task_name.upper()
|
||||
exec(f'now_task = {task_name}')
|
||||
except Exception as e:
|
||||
raise ValueError(f"The task name is wrong: {e}")
|
||||
|
||||
main(now_task)
|
||||
|
||||
"""
|
||||
Usage:
|
||||
python code_gen/task_generation_simple.py task_name
|
||||
"""
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,317 @@
|
||||
import sys
|
||||
|
||||
sys.path.append("./")
|
||||
|
||||
import sapien.core as sapien
|
||||
from collections import OrderedDict
|
||||
import pdb
|
||||
from envs import *
|
||||
import yaml
|
||||
import importlib
|
||||
import json
|
||||
import traceback
|
||||
import os
|
||||
import time
|
||||
import inspect
|
||||
|
||||
current_file_path = os.path.abspath(__file__)
|
||||
parent_directory = os.path.dirname(current_file_path)
|
||||
|
||||
SCRIPT_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "script")
|
||||
CONFIGS_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "task_config")
|
||||
OBJECTS_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "assets/objects")
|
||||
|
||||
|
||||
def enrich_actors(actor_list):
|
||||
"""
|
||||
Enrich the actor list by adding 'functional_points' and 'contact_points'
|
||||
from the corresponding model metadata file, and remove the 'modelname' field
|
||||
to make it suitable for prompting.
|
||||
|
||||
Args:
|
||||
actor_list (dict): Dictionary of actors with metadata.
|
||||
|
||||
Returns:
|
||||
dict: Enriched actor list with additional keys and without 'modelname'.
|
||||
"""
|
||||
enriched_actor_list = {}
|
||||
|
||||
for actor_key, actor_info in actor_list.items():
|
||||
enriched_actor = actor_info.copy()
|
||||
model_name = actor_info.get("modelname")
|
||||
|
||||
if model_name is not None and model_name != "None":
|
||||
points_info_path = os.path.join(OBJECTS_PATH, model_name, "points_info.json")
|
||||
|
||||
if os.path.exists(points_info_path):
|
||||
try:
|
||||
with open(points_info_path, 'r') as f:
|
||||
points_info = json.load(f)
|
||||
|
||||
if "functional_points" in points_info:
|
||||
enriched_actor["functional_points"] = points_info["functional_points"]
|
||||
|
||||
if "contact_points" in points_info:
|
||||
contact_points = points_info["contact_points"]
|
||||
valid_contact_points = any(
|
||||
point.get("id") is not None and (
|
||||
not isinstance(point.get("id"), list) or len(point.get("id")) > 0
|
||||
) for point in contact_points
|
||||
)
|
||||
enriched_actor["contact_points"] = contact_points if valid_contact_points else None
|
||||
else:
|
||||
enriched_actor["contact_points"] = None
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error reading points_info.json for {model_name}: {e}")
|
||||
print(traceback.format_exc())
|
||||
else:
|
||||
print(f"Warning: File not found: {points_info_path}")
|
||||
else:
|
||||
print("modelname is None or invalid, skipping enrichment.")
|
||||
|
||||
if "modelname" in enriched_actor:
|
||||
del enriched_actor["modelname"]
|
||||
|
||||
enriched_actor_list[actor_key] = enriched_actor
|
||||
|
||||
return enriched_actor_list
|
||||
|
||||
|
||||
def class_decorator_gen(task_name):
|
||||
"""
|
||||
Dynamically import and instantiate the task implementation from the code_gen module.
|
||||
|
||||
Args:
|
||||
task_name (str): Name of the task.
|
||||
|
||||
Returns:
|
||||
object: Instance of the task class.
|
||||
"""
|
||||
envs_module = importlib.import_module(f"envs_gen.gpt_{task_name}")
|
||||
importlib.reload(envs_module)
|
||||
try:
|
||||
env_class = getattr(envs_module, f"gpt_{task_name}")
|
||||
return env_class()
|
||||
except:
|
||||
raise SystemExit("No such task")
|
||||
|
||||
|
||||
def class_decorator_env(task_name):
|
||||
"""
|
||||
Dynamically import and instantiate the task environment from the envs module.
|
||||
|
||||
Args:
|
||||
task_name (str): Name of the task.
|
||||
|
||||
Returns:
|
||||
object: Instance of the task class.
|
||||
"""
|
||||
envs_module = importlib.import_module(f"envs.{task_name}")
|
||||
importlib.reload(envs_module)
|
||||
try:
|
||||
env_class = getattr(envs_module, task_name)
|
||||
return env_class()
|
||||
except:
|
||||
raise SystemExit("No such task")
|
||||
|
||||
|
||||
def create_task_config(task_config_path, task_name):
|
||||
"""
|
||||
Create a new task config file from the template if it doesn't exist.
|
||||
|
||||
Args:
|
||||
task_config_path (str): Path to the target config file.
|
||||
task_name (str): Name of the task.
|
||||
"""
|
||||
with open(os.path.join(SCRIPT_PATH, "_task_config_template.json"), "r") as file:
|
||||
task_config_template = json.load(file)
|
||||
|
||||
# Modify task_name
|
||||
task_config_template["task_name"] = task_name
|
||||
|
||||
# Convert field format
|
||||
if isinstance(task_config_template.get("embodiment"), str):
|
||||
task_config_template["embodiment"] = [task_config_template["embodiment"]]
|
||||
|
||||
# Save as yml
|
||||
with open(task_config_path, "w") as f:
|
||||
yaml.dump(task_config_template, f, default_flow_style=False, sort_keys=False)
|
||||
|
||||
|
||||
def get_embodiment_config(robot_file):
|
||||
"""
|
||||
Load embodiment configuration from the robot folder.
|
||||
|
||||
Args:
|
||||
robot_file (str): Path to the robot folder.
|
||||
|
||||
Returns:
|
||||
dict: Robot configuration.
|
||||
"""
|
||||
robot_config_file = os.path.join(robot_file, "config.yml")
|
||||
with open(robot_config_file, "r", encoding="utf-8") as f:
|
||||
return yaml.load(f.read(), Loader=yaml.FullLoader)
|
||||
|
||||
|
||||
def setup_task_config(task_name):
|
||||
"""
|
||||
Load or create a task configuration and set up robot embodiments.
|
||||
|
||||
Args:
|
||||
task_name (str): Task name.
|
||||
|
||||
Returns:
|
||||
tuple: (Task instance, task configuration dictionary)
|
||||
"""
|
||||
task = class_decorator_gen(task_name)
|
||||
task_config_path = f"./task_config/{task_name}.yml"
|
||||
|
||||
if not os.path.isfile(task_config_path):
|
||||
create_task_config(task_config_path, task_name)
|
||||
print(f"Task config file is missing, please check {task_config_path}")
|
||||
|
||||
with open(task_config_path, "r", encoding="utf-8") as f:
|
||||
args = yaml.load(f.read(), Loader=yaml.FullLoader)
|
||||
|
||||
args["domain_randomization"] = {
|
||||
"random_background": False,
|
||||
"cluttered_table": False,
|
||||
"clean_background_rate": 0.0,
|
||||
"random_head_camera_dis": 0,
|
||||
"random_table_height": 0.0,
|
||||
"random_light": False,
|
||||
"crazy_random_light_rate": 0.0,
|
||||
"random_embodiment": False,
|
||||
}
|
||||
|
||||
embodiment_type = args.get("embodiment")
|
||||
embodiment_config_path = os.path.join("./task_config", "_embodiment_config.yml")
|
||||
with open(embodiment_config_path, "r", encoding="utf-8") as f:
|
||||
_embodiment_types = yaml.load(f.read(), Loader=yaml.FullLoader)
|
||||
|
||||
def get_embodiment_file(embodiment_type):
|
||||
robot_file = _embodiment_types[embodiment_type]["file_path"]
|
||||
if robot_file is None:
|
||||
raise Exception("No embodiment files")
|
||||
return robot_file if os.path.isabs(robot_file) else os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), "..", 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
|
||||
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
|
||||
else:
|
||||
raise Exception("Embodiment items 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"])
|
||||
|
||||
args["embodiment_name"] = (
|
||||
str(embodiment_type[0]) if len(embodiment_type) == 1
|
||||
else str(embodiment_type[0]) + "+" + str(embodiment_type[1])
|
||||
)
|
||||
|
||||
args["need_plan"] = True
|
||||
args["save_path"] = "./data/test"
|
||||
|
||||
return task, args
|
||||
|
||||
|
||||
def run(TASK_ENV, args, check_num=10):
|
||||
"""
|
||||
Run the task in simulation to evaluate success rate.
|
||||
|
||||
Args:
|
||||
TASK_ENV (object): Task environment instance.
|
||||
args (dict): Task configuration.
|
||||
check_num (int): Number of trials to run.
|
||||
|
||||
Returns:
|
||||
tuple: (success rate, most common error message, error count, run records)
|
||||
"""
|
||||
epid, suc_num, fail_num = 0, 0, 0
|
||||
|
||||
error_list = [
|
||||
"The code can not run", "The left arm failed to grasp the object", "The right arm failed to grasp the object",
|
||||
"The target position of the object is incorrect.", "Plan execution failed",
|
||||
"Unknown error occurred during execution"
|
||||
]
|
||||
error_num = [0, 0, 0, 0, 0, 0]
|
||||
run_records = []
|
||||
|
||||
print(f"\033[34mTask name: {args['task_name']}\033[0m")
|
||||
print("\033[93m" + "[Start Testing Task Success Rate]" + "\033[0m")
|
||||
|
||||
print("\n\033[92m=== play_once source code ===\033[0m")
|
||||
play_once_method = TASK_ENV.__class__.play_once
|
||||
print(inspect.getsource(play_once_method))
|
||||
print("\033[92m=== End ===\033[0m\n")
|
||||
|
||||
for epid in range(check_num):
|
||||
error_id = None
|
||||
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})")
|
||||
suc_num += 1
|
||||
run_records.append("success!")
|
||||
else:
|
||||
if not TASK_ENV.plan_success:
|
||||
if hasattr(TASK_ENV, 'left_plan_success') and not TASK_ENV.lefft_plan_success:
|
||||
error_id = 1
|
||||
run_records.append(error_list[1])
|
||||
elif hasattr(TASK_ENV, 'right_plan_success') and not TASK_ENV.right_plan_success:
|
||||
error_id = 2
|
||||
run_records.append(error_list[2])
|
||||
else:
|
||||
error_id = 4
|
||||
run_records.append(error_list[4])
|
||||
else:
|
||||
error_id = 3
|
||||
run_records.append(error_list[3])
|
||||
|
||||
print(f"simulate data episode {suc_num} fail! (seed = {epid})")
|
||||
fail_num += 1
|
||||
|
||||
TASK_ENV.close()
|
||||
if args.get("render_freq"):
|
||||
TASK_ENV.viewer.close()
|
||||
|
||||
except Exception as e:
|
||||
error_id = 0
|
||||
error_list[0] = str(traceback.format_exc())
|
||||
run_records.append(f"Error: {e}")
|
||||
print("-------------")
|
||||
print(f"simulate data episode {suc_num} fail! (seed = {epid})")
|
||||
print("Error:", traceback.format_exc())
|
||||
print("-------------")
|
||||
fail_num += 1
|
||||
TASK_ENV.close()
|
||||
if args.get("render_freq"):
|
||||
TASK_ENV.viewer.close()
|
||||
time.sleep(2)
|
||||
|
||||
if error_id is not None:
|
||||
error_num[error_id] += 1
|
||||
|
||||
if len(run_records) != check_num:
|
||||
print(f"Warning: number of records ({len(run_records)}) does not match number of trials ({check_num})")
|
||||
|
||||
max_error_index = error_num.index(max(error_num)) if sum(error_num) > 0 else 5
|
||||
max_error_count = error_num[max_error_index]
|
||||
|
||||
print(f'\nComplete test, success rate: {suc_num}/{check_num}')
|
||||
print(f'Error message: {error_list}')
|
||||
print(f'Run records: {run_records}')
|
||||
print(f'error_num: {error_num}')
|
||||
|
||||
return suc_num / check_num, error_list[max_error_index], max_error_count, run_records
|
||||
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
task_name=${1}
|
||||
task_config=${2}
|
||||
gpu_id=${3}
|
||||
|
||||
./script/.update_path.sh > /dev/null 2>&1
|
||||
|
||||
export CUDA_VISIBLE_DEVICES=${gpu_id}
|
||||
|
||||
PYTHONWARNINGS=ignore::UserWarning \
|
||||
python script/collect_data.py $task_name $task_config
|
||||
rm -rf data/${task_name}/${task_config}/.cache
|
||||
@ -0,0 +1,34 @@
|
||||
import os
|
||||
import argparse
|
||||
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("task_name")
|
||||
ap.add_argument("task_config")
|
||||
ap.add_argument("index", type=int, help="Index of the episode to delete")
|
||||
args = ap.parse_args()
|
||||
|
||||
target_path = os.path.join("data", args.task_name, args.task_config)
|
||||
txt_path = os.path.join(target_path, "seed.txt")
|
||||
dir_path = os.path.join(target_path, "data")
|
||||
replace_id = args.index
|
||||
|
||||
with open(txt_path, "r") as f:
|
||||
nums = list(map(int, f.read().split()))
|
||||
|
||||
final_id = len(nums) - 1
|
||||
|
||||
last_seed = nums[-1]
|
||||
|
||||
nums[replace_id] = last_seed
|
||||
nums.pop()
|
||||
|
||||
with open(txt_path, "w") as f:
|
||||
f.write(" ".join(map(str, nums)))
|
||||
|
||||
target_file = os.path.join(dir_path, f"episode{replace_id}.pkl")
|
||||
if os.path.exists(target_file):
|
||||
os.remove(target_file)
|
||||
|
||||
last_file = os.path.join(dir_path, f"episode{final_id}.pkl")
|
||||
if os.path.exists(last_file):
|
||||
os.rename(last_file, target_file)
|
||||
@ -0,0 +1,32 @@
|
||||
Look at the image and generate 15 descriptions of the main object shown. Each description should:
|
||||
|
||||
1. THIS IS THE MOST IMPORTANT:Use natural spoken/VERY oral language style(IMPORTANT! just think of what people will normally refer to it as)
|
||||
2. Avoid articles (a, an, the) and commas
|
||||
3. Vary in length. Maximum 6 words, THE SHORTER AND MORE PRECISE, THE MERRIER. AVOID USING DIFFICULT WORDS. BE EASY TO UNDERSTAND AND ORAL.
|
||||
4. Progress from simple to detailed descriptions
|
||||
5. Use different word syntax structures across descriptions
|
||||
6. Be primarily noun-focused phrases
|
||||
7. EMPHASIZE physical properties essential for manipulation:
|
||||
- First explicitly speak out the different features with oral words
|
||||
- COLOR (be specific about shades and patterns)
|
||||
- SHAPE (describe geometric form precisely, and handles/bars)
|
||||
- SIZE (relative dimensions and scale)
|
||||
- TEXTURE/MATERIAL (when visible)
|
||||
- SUBPART's INFO
|
||||
|
||||
8. Each be distinctly different in wording and detail level
|
||||
9. REALLY IMPORTANT!!avoid using abstract words like 'object' 'device' 'container'.
|
||||
10. THIS IS ALSO THE MOST IMPORTANT:confirm that ANY person can know what you are talking about, after only reading ONE DESCRIPTION
|
||||
11. If the object contains multiple parts, describe it using structural phrases including but not limited to "X with Y" (e.g., "bottle with yellow lid"). If no multi-component feature is shown, neglect this requirement.
|
||||
12. Do not use question marks or interrogative sentences
|
||||
The user will first tell you the object's GROUND TRUTH SHORT NAME (maybe with unnecessary prefixs and surfixs, which you can neglect), which will help you recognize it.
|
||||
IMPORTANT:Make sure the object's text name (without id prefixs or _ symbols) are present in ALL!!!!! of the descriptions you generate
|
||||
|
||||
Format your response as required by the response_format.
|
||||
|
||||
Example (if the image showed a Coca-Cola can):
|
||||
1. red can
|
||||
2. Coca-Cola can
|
||||
3. small metallic red soda can
|
||||
4. red can with white Coca-Cola label
|
||||
5. palm-sized beverage can
|
||||
@ -0,0 +1,12 @@
|
||||
# TASK: ABSTRACT ROBOTIC TASK DESCRIPTIONS
|
||||
|
||||
## OBJECTIVE
|
||||
1. Provide a concise description of the task flow.
|
||||
2. Avoid including very detailed specifics (e.g., exact coordinates),
|
||||
but make sure each '<' '>' wraped highlight point is clearly mentioned in each of the instruction
|
||||
3. Use natural, action-oriented verbs like "grab", "slide", "set", "stick", "drop", "place", etc., instead of technical jargon.
|
||||
4. Vary sentence structures (e.g., questions, commands, requests) and maintain a natural, conversational tone.
|
||||
5. Generate a given number of alternative descriptions based on the input.
|
||||
6. Avoid question marks and unnecessary words.
|
||||
7. Avoid adding unnecessary ADJECTIVES or adverbs at the end of sentences!!!!!
|
||||
8. Clearly or implicitly include all steps of the task in each instruction.
|
||||
@ -0,0 +1,6 @@
|
||||
# schema requirements
|
||||
|
||||
## OBJECTIVE
|
||||
1. Use placeholders in the format {X} for objects, where X is defined in a schema.
|
||||
2. Ensure all object placeholders ({A-Z}) are included in every instruction, but REFERENCE TO ARMS, INCLUDING arm placeholders ({a-z}) MUST be omitted in 50% of the instructions.
|
||||
3. Make sure instructions flow naturally when placeholders ({A-Za-z}) are replaced with actual objects or arm notations.
|
||||
@ -0,0 +1,5 @@
|
||||
task_name=${1}
|
||||
setting=${2}
|
||||
max_num=${3}
|
||||
|
||||
python utils/generate_episode_instructions.py $task_name $setting $max_num
|
||||
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 获取传入的参数
|
||||
object_name=${1}
|
||||
object_id=${2}
|
||||
|
||||
# 检查是否提供了足够的参数
|
||||
if [ -z "$object_name" ]; then
|
||||
echo "Error: object_name is required."
|
||||
echo "Usage: $0 <object_name> [object_id]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 检查 object_id 是否为空
|
||||
if [ -z "$object_id" ]; then
|
||||
# 如果 object_id 为空,传递一个空字符串
|
||||
python utils/generate_object_description.py "$object_name"
|
||||
else
|
||||
# 如果 object_id 不为空,正常传递
|
||||
python utils/generate_object_description.py "$object_name" --index "$object_id"
|
||||
fi
|
||||
@ -0,0 +1,4 @@
|
||||
task_name=${1}
|
||||
instruction_num=${2}
|
||||
|
||||
python utils/generate_task_description.py $task_name $instruction_num
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"red bottle",
|
||||
"plastic bottle",
|
||||
"yellow text bottle",
|
||||
"bottle with red cap",
|
||||
"handheld plastic bottle",
|
||||
"red bottle with screw cap",
|
||||
"medium-size plastic bottle",
|
||||
"red bottle with narrow neck",
|
||||
"smooth red cylindrical bottle",
|
||||
"red bottle with curved grooves",
|
||||
"red bottle with white bottom text",
|
||||
"plastic bottle with bright red color"
|
||||
],
|
||||
"unseen": [
|
||||
"shiny red bottle",
|
||||
"bottle with white and yellow label",
|
||||
"bottle with yellow Chinese characters"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"yellow bottle",
|
||||
"plastic bottle",
|
||||
"bottle for liquid",
|
||||
"medium-sized bottle",
|
||||
"bottle with screw cap",
|
||||
"smooth plastic bottle",
|
||||
"handheld curvy bottle",
|
||||
"yellow bottle with blue label",
|
||||
"yellow bottle with dark label",
|
||||
"medium plastic bottle with cap",
|
||||
"plastic bottle with curved sides",
|
||||
"yellow bottle for liquid storage"
|
||||
],
|
||||
"unseen": [
|
||||
"curvy yellow plastic bottle",
|
||||
"smooth bottle with blue text",
|
||||
"yellow bottle with white cap"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"brown bottle",
|
||||
"plastic bottle",
|
||||
"bottle with green cap",
|
||||
"bottle with flat sides and logo",
|
||||
"medium-sized brown plastic bottle",
|
||||
"medium bottle with glossy surface",
|
||||
"smooth plastic bottle with white cap",
|
||||
"smooth brown bottle with green label",
|
||||
"dark brown bottle with a squared body",
|
||||
"rectangular brown body with white top",
|
||||
"rectangular-shaped bottle with round cap",
|
||||
"brown bottle with rounded rectangular shape"
|
||||
],
|
||||
"unseen": [
|
||||
"liquid container dark brown plastic",
|
||||
"bottle with green label and white lid",
|
||||
"medium-sized plastic bottle with capped top"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"yellow bottle",
|
||||
"plastic bottle",
|
||||
"bottle with white cap",
|
||||
"bottle with green label",
|
||||
"smooth bottle with rounded edges",
|
||||
"medium rectangular yellow bottle",
|
||||
"yellow bottle with a green design",
|
||||
"bottle with a smooth plastic body",
|
||||
"bottle with green and white labels",
|
||||
"yellow container with rounded edges",
|
||||
"yellow plastic bottle with white top",
|
||||
"rectangular bottle with cylindrical neck"
|
||||
],
|
||||
"unseen": [
|
||||
"yellow rectangular bottle",
|
||||
"hand-sized yellow plastic bottle",
|
||||
"yellow bottle for liquid storage"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"green bottle",
|
||||
"plastic bottle",
|
||||
"bottle with yellow cap",
|
||||
"handheld plastic bottle",
|
||||
"medium bottle with green body",
|
||||
"green bottle with white label",
|
||||
"smooth green and yellow bottle",
|
||||
"bottle with glossy plastic finish",
|
||||
"plastic bottle with colored label",
|
||||
"green bottle with black text label",
|
||||
"cylindrical bottle with rounded cap",
|
||||
"cylindrical liquid bottle with yellow top"
|
||||
],
|
||||
"unseen": [
|
||||
"medium-sized drink bottle",
|
||||
"bottle with green base and black prints",
|
||||
"yellow-capped bottle with smooth surface"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"long thin bottle",
|
||||
"Coca-Cola bottle",
|
||||
"red-capped bottle",
|
||||
"plastic drink bottle",
|
||||
"narrow-necked bottle",
|
||||
"hand-sized soda bottle",
|
||||
"medium dark brown bottle",
|
||||
"smooth bottle with red lid",
|
||||
"dark drink bottle with logo",
|
||||
"brown bottle with red label",
|
||||
"bottle with ridges on bottom",
|
||||
"bottle with white neck and red top"
|
||||
],
|
||||
"unseen": [
|
||||
"brown bottle",
|
||||
"plastic soda bottle",
|
||||
"bottle with red screw cap"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"blue bottle",
|
||||
"plastic bottle",
|
||||
"handheld bottle",
|
||||
"cylindrical bottle",
|
||||
"bottle for liquids",
|
||||
"medium-sized bottle",
|
||||
"bottle with blue cap",
|
||||
"white and blue bottle",
|
||||
"smooth plastic bottle",
|
||||
"blue bottle with label",
|
||||
"medium bottle for beverages",
|
||||
"white bottle with blue accents"
|
||||
],
|
||||
"unseen": [
|
||||
"bottle with ridged neck",
|
||||
"blue-capped plastic bottle",
|
||||
"bottle with curved neck design"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"smooth brown bottle",
|
||||
"bottle with white cap",
|
||||
"medium plastic bottle",
|
||||
"plastic bottle for liquids",
|
||||
"bottle with dark brown color",
|
||||
"plastic bottle with printed label",
|
||||
"medium bottle with smooth texture",
|
||||
"cylindrical bottle with narrow neck",
|
||||
"rounded bottle with printed details",
|
||||
"handheld brown bottle with white lid",
|
||||
"bottle with brown body and white top",
|
||||
"white-capped brown cylindrical bottle"
|
||||
],
|
||||
"unseen": [
|
||||
"brown bottle",
|
||||
"lightweight plastic brown bottle",
|
||||
"brown cylindrical bottle with label"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"plastic bottle",
|
||||
"medium green bottle",
|
||||
"smooth green bottle",
|
||||
"handheld green bottle",
|
||||
"bottle with narrow top",
|
||||
"bottle with rounded neck",
|
||||
"medium-sized green bottle",
|
||||
"smooth green plastic bottle",
|
||||
"bottle with ridges near base",
|
||||
"green bottle with indented base",
|
||||
"bottle with white printed label",
|
||||
"medium green bottle with capped neck"
|
||||
],
|
||||
"unseen": [
|
||||
"green bottle",
|
||||
"green bottle with white label",
|
||||
"green plastic bottle with ridged bottom"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"white bottle",
|
||||
"smooth bottle",
|
||||
"plastic bottle",
|
||||
"medium-sized bottle",
|
||||
"white cylindrical bottle",
|
||||
"white bottle for liquids",
|
||||
"bottle with tapering neck",
|
||||
"white bottle with red text",
|
||||
"bottle with orange screw cap",
|
||||
"white bottle with orange lid",
|
||||
"handheld white bottle with cap",
|
||||
"cylindrical bottle with red writing"
|
||||
],
|
||||
"unseen": [
|
||||
"bottle with orange cap",
|
||||
"bottle with glossy surface",
|
||||
"plastic bottle with printed label"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"milk-bottle shape design",
|
||||
"smooth cylindrical bottle",
|
||||
"medium-sized plastic bottle",
|
||||
"medium cylinder-shaped bottle",
|
||||
"gray bottle with slight shine",
|
||||
"bottle with cute ghost drawing",
|
||||
"plastic bottle with ghost print",
|
||||
"hand-sized bottle with screw cap",
|
||||
"bottle shaped like small cylinder",
|
||||
"light gray colored container bottle",
|
||||
"rounded body bottle made of plastic",
|
||||
"smooth surface bottle with gray shade"
|
||||
],
|
||||
"unseen": [
|
||||
"light gray bottle",
|
||||
"bottle with rounded cap top",
|
||||
"gray bottle for holding drinks"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"blue bottle",
|
||||
"plastic bottle",
|
||||
"medium water bottle",
|
||||
"portable bottle for liquids",
|
||||
"light blue cylindrical bottle",
|
||||
"plastic bottle with black top",
|
||||
"rounded bottle with black lid",
|
||||
"bottle with black textured cap",
|
||||
"light blue bottle with strap-loop",
|
||||
"light blue bottle with smooth body",
|
||||
"blue water bottle with textured lid",
|
||||
"cylindrical bottle with rounded edges"
|
||||
],
|
||||
"unseen": [
|
||||
"smooth blue water bottle",
|
||||
"bottle with attached loop on cap",
|
||||
"cylindrical plastic bottle for carrying water"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"black bottle",
|
||||
"yellow capped drink bottle",
|
||||
"medium bottle with yellow cap",
|
||||
"smooth black bottle with ridges",
|
||||
"beverage bottle with black body",
|
||||
"yellow-capped cylindrical bottle",
|
||||
"bottle with blue and yellow print",
|
||||
"plastic bottle with colorful label",
|
||||
"black plastic bottle with Pepsi logo",
|
||||
"drink bottle with rounded yellow lid",
|
||||
"black cylindrical bottle with ridges",
|
||||
"medium black bottle with printed label"
|
||||
],
|
||||
"unseen": [
|
||||
"bottle with ridges near base",
|
||||
"plastic bottle with blue label",
|
||||
"hand-sized bottle with ridged bottom"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"white bottle",
|
||||
"smooth plastic bottle",
|
||||
"bottle with white screw-top lid",
|
||||
"bottle with brown carrying loop",
|
||||
"yellow and blue patterned bottle",
|
||||
"white bottle with rounded bottom",
|
||||
"medium bottle with screw-top cap",
|
||||
"bottle decorated in floral prints",
|
||||
"plastic bottle with floral designs",
|
||||
"plastic bottle with yellow flowers",
|
||||
"cylindrical bottle with handle loop",
|
||||
"white bottle with blue leaf designs"
|
||||
],
|
||||
"unseen": [
|
||||
"medium-sized bottle for liquids",
|
||||
"bottle with attached loop and lid",
|
||||
"white bottle with colorful patterns"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"smooth bottle",
|
||||
"plastic bottle",
|
||||
"rounded bottle",
|
||||
"bottle for liquids",
|
||||
"glossy plastic bottle",
|
||||
"palm-sized pink bottle",
|
||||
"bottle with yellow accent",
|
||||
"bottle with glossy finish",
|
||||
"bright pink cylindrical bottle",
|
||||
"small pink bottle with black top",
|
||||
"bright pink bottle with black cap",
|
||||
"rounded plastic bottle with color patterns"
|
||||
],
|
||||
"unseen": [
|
||||
"pink bottle",
|
||||
"small bottle",
|
||||
"bottle with white text"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"green bottle",
|
||||
"light green drink bottle",
|
||||
"bottle with green screw cap",
|
||||
"handheld light green bottle",
|
||||
"curved plastic bottle with cap",
|
||||
"green bottle with textured cap",
|
||||
"smooth bottle with printed label",
|
||||
"green bottle with glossy surface",
|
||||
"plastic bottle for holding liquid",
|
||||
"green cylindrical plastic container",
|
||||
"green bottle with grip-friendly cap",
|
||||
"light green bottle with printed text"
|
||||
],
|
||||
"unseen": [
|
||||
"medium green plastic bottle",
|
||||
"plastic bottle with tapered body",
|
||||
"medium-sized green cylindrical bottle"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"yellow bottle",
|
||||
"plastic bottle",
|
||||
"handheld bottle",
|
||||
"rectangular bottle",
|
||||
"yellow body bottle",
|
||||
"bottle for liquids",
|
||||
"bottle with white cap",
|
||||
"smooth yellow plastic bottle",
|
||||
"yellow bottle with green label",
|
||||
"yellow bottle with flower design",
|
||||
"bottle with green and white label",
|
||||
"yellow bottle with cylindrical cap"
|
||||
],
|
||||
"unseen": [
|
||||
"medium bottle",
|
||||
"bottle with printed label",
|
||||
"bottle with rounded edges"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"orange bottle",
|
||||
"plastic bottle",
|
||||
"smooth orange bottle",
|
||||
"curved orange soda bottle",
|
||||
"bottle for holding drinks",
|
||||
"grooved orange drink bottle",
|
||||
"light and medium-sized bottle",
|
||||
"orange drink bottle with label",
|
||||
"medium bottle with colorful label",
|
||||
"ridged orange bottle with grooves",
|
||||
"cylindrical orange plastic bottle",
|
||||
"round-bottom bottle with white cap"
|
||||
],
|
||||
"unseen": [
|
||||
"bottle with white cap",
|
||||
"bottle with ridged orange grip",
|
||||
"white capped orange plastic bottle"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"orange bottle",
|
||||
"plastic bottle",
|
||||
"yellow label bottle",
|
||||
"medium orange bottle",
|
||||
"smooth plastic bottle",
|
||||
"bottle with orange cap",
|
||||
"medium bottle with orange lid",
|
||||
"white and orange plastic bottle",
|
||||
"bottle with ribbed orange bottom",
|
||||
"orange and white bottle with cap",
|
||||
"drinking bottle with yellow label",
|
||||
"cylindrical orange and white bottle"
|
||||
],
|
||||
"unseen": [
|
||||
"bottle with curved body",
|
||||
"bottle with yellow sticker label",
|
||||
"curvy orange bottle with white section"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"orange bottle",
|
||||
"plastic bottle",
|
||||
"bottle for liquids",
|
||||
"smooth plastic bottle",
|
||||
"bottle with yellow cap",
|
||||
"bottle with narrow neck",
|
||||
"bottle with printed label",
|
||||
"orange cylindrical bottle",
|
||||
"medium-sized orange bottle",
|
||||
"yellow-capped plastic bottle",
|
||||
"plastic bottle with sealed yellow cap",
|
||||
"cylindrical orange bottle with yellow top"
|
||||
],
|
||||
"unseen": [
|
||||
"handheld orange bottle",
|
||||
"label-covered orange bottle",
|
||||
"orange bottle with smooth texture"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"orange bottle",
|
||||
"bottle with yellow cap",
|
||||
"smooth orange cylindrical bottle",
|
||||
"orange bottle with bold labeling",
|
||||
"liquid container with orange body",
|
||||
"yellow-capped bottle for beverages",
|
||||
"yellow-capped orange plastic bottle",
|
||||
"handheld medium-sized liquid bottle",
|
||||
"small bottle with bright yellow lid",
|
||||
"rounded bottom orange plastic bottle",
|
||||
"rounded orange bottle with yellow top",
|
||||
"cylindrical orange bottle with smooth surface"
|
||||
],
|
||||
"unseen": [
|
||||
"medium plastic bottle",
|
||||
"medium bottle for liquids",
|
||||
"plastic orange bottle with rounded base"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"brown bottle",
|
||||
"plastic bottle",
|
||||
"white-capped bottle",
|
||||
"bottle holding liquid",
|
||||
"bottle with black label",
|
||||
"hand-sized plastic bottle",
|
||||
"small curved plastic bottle",
|
||||
"bottle with white screw cap",
|
||||
"curved bottle with white top",
|
||||
"small bottle with decorative design",
|
||||
"bottle with brown and white patterns",
|
||||
"smooth brown and white patterned bottle"
|
||||
],
|
||||
"unseen": [
|
||||
"glossy brown bottle",
|
||||
"brown bottle with glossy swirls",
|
||||
"cylindrical bottle with curved sides"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bottle",
|
||||
"seen": [
|
||||
"brown bottle",
|
||||
"green-capped bottle",
|
||||
"bottle with green cap",
|
||||
"small brown plastic bottle",
|
||||
"small drink bottle with logo",
|
||||
"hand-sized bottle with grooves",
|
||||
"plastic bottle with ribbed pattern",
|
||||
"cylindrical bottle with white label",
|
||||
"smooth plastic bottle for beverages",
|
||||
"brown bottle with green screw-on cap",
|
||||
"bottle with tapered cylindrical shape",
|
||||
"brown bottle with white printed label"
|
||||
],
|
||||
"unseen": [
|
||||
"plastic Starbucks bottle",
|
||||
"bottle with coffee-colored body",
|
||||
"bottle with Starbucks logo on label"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"white bowl",
|
||||
"round white bowl",
|
||||
"simple serving bowl",
|
||||
"bowl for holding items",
|
||||
"bowl with black interior",
|
||||
"bowl with deep black hollow",
|
||||
"white bowl with curved shape",
|
||||
"smooth bowl with curved edges",
|
||||
"medium bowl for food or items",
|
||||
"white bowl with smooth texture",
|
||||
"ceramic bowl with glossy surface",
|
||||
"round ceramic bowl with black inner"
|
||||
],
|
||||
"unseen": [
|
||||
"palm-sized glossy bowl",
|
||||
"black and white round bowl",
|
||||
"medium-sized white serving bowl"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"gray bowl",
|
||||
"ceramic bowl",
|
||||
"medium ceramic bowl",
|
||||
"medium bowl for food",
|
||||
"light gray round bowl",
|
||||
"light gray ceramic bowl",
|
||||
"ceramic bowl light gray",
|
||||
"medium-sized smooth bowl",
|
||||
"round bowl with open top",
|
||||
"bowl with smooth surface",
|
||||
"open-top round light gray bowl"
|
||||
],
|
||||
"unseen": [
|
||||
"simple round bowl",
|
||||
"smooth light gray bowl",
|
||||
"light gray smooth round bowl"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"blue bowl",
|
||||
"ceramic bowl",
|
||||
"bowl with shiny texture",
|
||||
"bowl with brown outer rim",
|
||||
"small bowl with brown edge",
|
||||
"curved bowl light blue shade",
|
||||
"glazed bowl with curved sides",
|
||||
"rounded bowl with light blue color",
|
||||
"medium-sized bowl for holding food",
|
||||
"ceramic bowl with earthy brown trim",
|
||||
"dark inside bowl light blue outside",
|
||||
"blue bowl with slightly rounded base"
|
||||
],
|
||||
"unseen": [
|
||||
"smooth bowl with glossy finish",
|
||||
"small smooth brown-rimmed bowl",
|
||||
"light blue bowl with darkened rim"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"round bowl",
|
||||
"bowl with yellow dots",
|
||||
"small smooth white bowl",
|
||||
"round bowl with open top",
|
||||
"yellow-spotted ceramic bowl",
|
||||
"medium bowl with glossy finish",
|
||||
"simple round bowl with yellow spots",
|
||||
"smooth ceramic bowl for serving food",
|
||||
"white bowl with circular yellow spots",
|
||||
"hand-sized bowl with a smooth texture",
|
||||
"bowl with white base and yellow accents",
|
||||
"glossy white bowl featuring yellow circles"
|
||||
],
|
||||
"unseen": [
|
||||
"white bowl",
|
||||
"yellow-patterned bowl with shiny surface",
|
||||
"dish-shaped white bowl with yellow designs"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"bowl",
|
||||
"gray bowl",
|
||||
"ceramic bowl",
|
||||
"smooth gray bowl",
|
||||
"medium-sized bowl",
|
||||
"smooth light gray bowl",
|
||||
"light gray ceramic bowl",
|
||||
"rounded bowl with open top",
|
||||
"light gray medium-sized bowl",
|
||||
"gray bowl with rounded edges",
|
||||
"gray bowl with polished surface",
|
||||
"gray ceramic bowl with open top"
|
||||
],
|
||||
"unseen": [
|
||||
"rounded bowl",
|
||||
"bowl for holding items",
|
||||
"curved bowl with smooth texture"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"gray bowl",
|
||||
"smooth bowl",
|
||||
"ceramic bowl",
|
||||
"medium-sized bowl",
|
||||
"concave gray bowl",
|
||||
"light gray food bowl",
|
||||
"light gray round bowl",
|
||||
"concave bowl gray ceramic",
|
||||
"round bowl polished surface",
|
||||
"smooth light gray round bowl",
|
||||
"medium ceramic bowl for food",
|
||||
"round bowl with smooth finish"
|
||||
],
|
||||
"unseen": [
|
||||
"bowl for holding liquid",
|
||||
"ceramic bowl medium in size",
|
||||
"polished ceramic bowl light gray"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bowl",
|
||||
"seen": [
|
||||
"smooth green bowl",
|
||||
"round plastic bowl",
|
||||
"food-holding green bowl",
|
||||
"rounded light green bowl",
|
||||
"light green bowl for food",
|
||||
"two-hand-sized green bowl",
|
||||
"deep bowl with round shape",
|
||||
"medium-sized light green bowl",
|
||||
"bowl with deep smooth interior",
|
||||
"bowl with slightly ridged sides",
|
||||
"smooth-textured light green bowl",
|
||||
"plastic bowl with concave interior"
|
||||
],
|
||||
"unseen": [
|
||||
"light green bowl",
|
||||
"bowl with ridged exterior",
|
||||
"green round bowl for liquids"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "plate",
|
||||
"seen": [
|
||||
"dish plate",
|
||||
"food plate",
|
||||
"round plate",
|
||||
"smooth ceramic plate",
|
||||
"medium plate for food",
|
||||
"medium round flat plate",
|
||||
"flat round greenish plate",
|
||||
"medium round ceramic plate",
|
||||
"smooth greenish table plate",
|
||||
"greenish-gray flat dinner plate",
|
||||
"ceramic plate with smooth surface",
|
||||
"flat ceramic plate with smooth texture"
|
||||
],
|
||||
"unseen": [
|
||||
"gray plate",
|
||||
"gray plate for dining",
|
||||
"smooth round plate for serving"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "fluted block",
|
||||
"seen": [
|
||||
"dark gray fluted block",
|
||||
"irregular fluted block",
|
||||
"block with matte finish",
|
||||
"angled block in dark gray",
|
||||
"block with angled surfaces",
|
||||
"smooth-sided dark gray block",
|
||||
"solid dark gray fluted block",
|
||||
"solid block with angled faces",
|
||||
"gray block with corner indent",
|
||||
"block with smooth gray texture",
|
||||
"irregular dark gray angled block",
|
||||
"hard gray block with inner shape"
|
||||
],
|
||||
"unseen": [
|
||||
"medium fluted block",
|
||||
"structural fluted block",
|
||||
"dark gray block with inner corner"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "fluted block",
|
||||
"seen": [
|
||||
"medium fluted block",
|
||||
"dark gray trapezoid",
|
||||
"solid dark gray block",
|
||||
"block with curved side",
|
||||
"fluted block with curve",
|
||||
"curved gray fluted block",
|
||||
"medium gray block with curve",
|
||||
"block with trapezoidal sides",
|
||||
"smooth gray trapezoidal block",
|
||||
"solid trapezoidal fluted block",
|
||||
"smooth medium trapezoidal block",
|
||||
"trapezoidal block with curved groove"
|
||||
],
|
||||
"unseen": [
|
||||
"dark gray fluted block",
|
||||
"gray block with indentation",
|
||||
"matte gray trapezoidal block"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "french fries",
|
||||
"seen": [
|
||||
"red fries packet",
|
||||
"McDonald's fries bag",
|
||||
"small red fries packet",
|
||||
"bright red fries holder",
|
||||
"thin crispy potato fries",
|
||||
"red box with golden sticks",
|
||||
"rectangular red fries packet",
|
||||
"golden fries in red packaging",
|
||||
"red container with yellow fries",
|
||||
"crispy fries in hand-sized pouch",
|
||||
"golden fries in smooth red pouch",
|
||||
"McDonald's logo on red fries box"
|
||||
],
|
||||
"unseen": [
|
||||
"hand-sized fries container",
|
||||
"golden fries in red holder",
|
||||
"golden crispy fries inside red box"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "French fries",
|
||||
"seen": [
|
||||
"Red fries box",
|
||||
"Small red box fries inside",
|
||||
"French fries in red packaging",
|
||||
"Palm-sized red fries container",
|
||||
"Bright red box with fries inside",
|
||||
"Light yellow fries in red holder",
|
||||
"Golden fries sticks in red carton",
|
||||
"Open-top red box filled with fries",
|
||||
"Potato fries packaged in red carton",
|
||||
"Rectangular red carton holding fries",
|
||||
"Handheld fries pack bright red color",
|
||||
"Golden fries crispy red package container"
|
||||
],
|
||||
"unseen": [
|
||||
"Golden fries in red carton box",
|
||||
"Crispy potato fries with red box",
|
||||
"Red carton box fries crispy golden"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "french fries",
|
||||
"seen": [
|
||||
"yellow fries",
|
||||
"crispy french fries",
|
||||
"medium fries serving",
|
||||
"hand-sized fries box",
|
||||
"fries in red container",
|
||||
"golden thin potato fries",
|
||||
"crispy thin fries in box",
|
||||
"golden fries with red box",
|
||||
"rectangular fries container",
|
||||
"yellow crispy fries with box",
|
||||
"fried potato in multicolor box",
|
||||
"red container filled with fries"
|
||||
],
|
||||
"unseen": [
|
||||
"potato fries sticks",
|
||||
"multicolor fries box",
|
||||
"fries with colorful packaging"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "french fries",
|
||||
"seen": [
|
||||
"golden fries",
|
||||
"long thin fries",
|
||||
"crispy french fries",
|
||||
"red pouch with fries",
|
||||
"medium-sized fries pouch",
|
||||
"palm-sized fries container",
|
||||
"french fries in red carton",
|
||||
"red carton with golden fries",
|
||||
"smooth red pouch crispy fries",
|
||||
"golden fries in open red pouch",
|
||||
"golden yellow fried potato sticks",
|
||||
"crispy fried potato sticks in pouch"
|
||||
],
|
||||
"unseen": [
|
||||
"hand-size fries bag",
|
||||
"fried potato snack in red holder",
|
||||
"cardboard pouch holding crispy fries"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "hamburg",
|
||||
"seen": [
|
||||
"round hamburg",
|
||||
"smooth hamburg",
|
||||
"bread bun hamburg",
|
||||
"light brown hamburg",
|
||||
"medium-sized hamburg",
|
||||
"brownish round hamburg",
|
||||
"hamburg with uneven top",
|
||||
"medium, squishy hamburg",
|
||||
"soft brown bread hamburg",
|
||||
"round, soft bread hamburg",
|
||||
"hamburg with white patches",
|
||||
"hamburg with patterned brown surface"
|
||||
],
|
||||
"unseen": [
|
||||
"palm-sized hamburg",
|
||||
"hamburg with white sides",
|
||||
"hamburg with light brown top"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "hamburg",
|
||||
"seen": [
|
||||
"orange hamburg",
|
||||
"small rounded hamburg",
|
||||
"hamburg with yellow mark",
|
||||
"irregular shaped hamburg",
|
||||
"hand-sized orange hamburg",
|
||||
"decorative rounded hamburg",
|
||||
"smooth orange and white hamburg",
|
||||
"orange hamburg with white underside",
|
||||
"white part with orange edges hamburg",
|
||||
"rounded hamburg with painted details",
|
||||
"yellow marked white and orange hamburg",
|
||||
"orange-white hamburg with yellow highlight"
|
||||
],
|
||||
"unseen": [
|
||||
"hamburg with soft texture",
|
||||
"hamburg with curved surfaces",
|
||||
"hamburg with white and orange"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "hamburg",
|
||||
"seen": [
|
||||
"white hamburg",
|
||||
"hamburg with crumpled edges",
|
||||
"palm-sized hamburg packaging",
|
||||
"smooth white hamburg packaging",
|
||||
"yellow and brown patterned hamburg",
|
||||
"white hamburg with creased wrapper",
|
||||
"hamburg with printed illustrations",
|
||||
"hamburg with yellow and brown marks",
|
||||
"white hamburg with yellow and brown stains",
|
||||
"smooth white hamburg wrap with yellow spots",
|
||||
"rectangular hamburg wrap with printed design",
|
||||
"wrapped hamburg with white plastic-like cover"
|
||||
],
|
||||
"unseen": [
|
||||
"rounded rectangular hamburg wrap",
|
||||
"hamburg with uneven white surface",
|
||||
"small yellow-marked hamburg wrapper"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "hamburg",
|
||||
"seen": [
|
||||
"hand-sized hamburg",
|
||||
"easy-to-hold hamburg",
|
||||
"small soft hamburg in paper",
|
||||
"hamburg with printed wrapper",
|
||||
"hamburg wrapped in white paper",
|
||||
"golden brown and white hamburg",
|
||||
"soft hamburg with smooth wrapper",
|
||||
"wrapped hamburg with green design",
|
||||
"hamburg with smooth paper wrapping",
|
||||
"hamburg with rounded rectangular shape",
|
||||
"rectangular hamburg with rounded edges",
|
||||
"white wrapper enclosing golden hamburg"
|
||||
],
|
||||
"unseen": [
|
||||
"golden brown hamburg",
|
||||
"small rectangular hamburg",
|
||||
"golden brown food within wrapper"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "hamburg",
|
||||
"seen": [
|
||||
"yellow hamburg box",
|
||||
"yellow box for hamburg",
|
||||
"rectangular hamburg box",
|
||||
"hamburg box with foldable top",
|
||||
"foldable hamburg cardboard box",
|
||||
"smooth yellow hamburg packaging",
|
||||
"medium-sized yellow hamburg package",
|
||||
"bright yellow hamburg box with logo",
|
||||
"medium-sized box with hamburg design",
|
||||
"yellow hamburg box with white accents",
|
||||
"white and yellow printed hamburg holder",
|
||||
"white lid with yellow bottom hamburg box"
|
||||
],
|
||||
"unseen": [
|
||||
"cardboard hamburg container",
|
||||
"hamburg pack with printed details",
|
||||
"rectangular cardboard box for hamburg"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "hamburg",
|
||||
"seen": [
|
||||
"small hamburg box",
|
||||
"smooth hamburg box",
|
||||
"hamburg box with lid",
|
||||
"green top hamburg box",
|
||||
"rectangular hamburg box",
|
||||
"yellow bottom hamburg box",
|
||||
"easy-to-carry hamburg box",
|
||||
"box with green hamburg lid",
|
||||
"hamburg box with rounded edges",
|
||||
"yellow and green hamburg holder",
|
||||
"green and yellow hamburg container",
|
||||
"rectangular hamburg container with smooth finish"
|
||||
],
|
||||
"unseen": [
|
||||
"compact hamburg box",
|
||||
"stackable hamburg box",
|
||||
"cardboard hamburg box"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "shoe-box",
|
||||
"seen": [
|
||||
"orange shoe-box",
|
||||
"bright orange shoe-box",
|
||||
"smooth bright orange box",
|
||||
"orange cardboard shoe-box",
|
||||
"rectangular orange shoe-box",
|
||||
"smooth orange box for shoes",
|
||||
"Nike-branded orange shoe-box",
|
||||
"orange Nike shoe-box with logo",
|
||||
"shoe-box with Nike printed logo",
|
||||
"medium-sized box with Nike swoosh",
|
||||
"rectangular shoe-box with orange lid",
|
||||
"medium orange box with smooth surface"
|
||||
],
|
||||
"unseen": [
|
||||
"medium cardboard shoe-box",
|
||||
"orange box for keeping shoes",
|
||||
"rectangular Nike box for shoes"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "tray",
|
||||
"seen": [
|
||||
"beige tray",
|
||||
"tray for holding items",
|
||||
"smooth rectangular tray",
|
||||
"light beige smooth tray",
|
||||
"medium rectangular flat tray",
|
||||
"flat tray with rounded corners",
|
||||
"plastic tray for carrying items",
|
||||
"smooth light beige plastic tray",
|
||||
"medium beige tray with flat base",
|
||||
"tray with smooth plastic surface",
|
||||
"rectangular beige tray for objects",
|
||||
"tray with rounded rectangular shape"
|
||||
],
|
||||
"unseen": [
|
||||
"rectangular beige tray",
|
||||
"medium beige plastic tray",
|
||||
"beige tray with soft edges"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "tray",
|
||||
"seen": [
|
||||
"orange tray",
|
||||
"rectangular tray",
|
||||
"smooth plastic tray",
|
||||
"medium bright orange tray",
|
||||
"medium-sized plastic tray",
|
||||
"bright orange rectangular tray",
|
||||
"plastic tray for holding items",
|
||||
"bright orange tray for serving",
|
||||
"plastic tray with shiny texture",
|
||||
"orange tray with smooth surface",
|
||||
"smooth glossy orange medium tray",
|
||||
"bright orange tray with glossy finish"
|
||||
],
|
||||
"unseen": [
|
||||
"rectangular tray with rounded edges",
|
||||
"rectangular bright orange serving tray",
|
||||
"medium-sized tray with rounded corners"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "tray",
|
||||
"seen": [
|
||||
"medium plastic tray",
|
||||
"rectangular green tray",
|
||||
"tray for serving items",
|
||||
"dark green serving tray",
|
||||
"tray for holding objects",
|
||||
"tray with rounded corners",
|
||||
"smooth texture green tray",
|
||||
"flat green rectangular tray",
|
||||
"solid green palm-sized tray",
|
||||
"single-piece dark green tray",
|
||||
"plastic tray with curved edges",
|
||||
"dark green rectangular plastic tray"
|
||||
],
|
||||
"unseen": [
|
||||
"green tray",
|
||||
"smooth green tray",
|
||||
"medium green tray for carrying"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "tray",
|
||||
"seen": [
|
||||
"brown tray",
|
||||
"rectangular tray",
|
||||
"smooth plastic tray",
|
||||
"brown tray with rim",
|
||||
"medium dark brown tray",
|
||||
"tray for holding things",
|
||||
"rectangular plastic tray",
|
||||
"medium-sized dark brown tray",
|
||||
"dark rectangular serving tray",
|
||||
"flat tray with smooth surface",
|
||||
"tray with slightly raised edges",
|
||||
"flat brown tray with raised edges"
|
||||
],
|
||||
"unseen": [
|
||||
"medium flat tray",
|
||||
"tray for carrying items",
|
||||
"flat brown serving tray"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "kettle",
|
||||
"seen": [
|
||||
"green kettle",
|
||||
"medium kettle with spout",
|
||||
"kettle with smooth finish",
|
||||
"smooth bright green kettle",
|
||||
"bright green painted kettle",
|
||||
"kettle with butterfly design",
|
||||
"green kettle with black handle",
|
||||
"medium green kettle with spout",
|
||||
"round kettle with black handle",
|
||||
"metal kettle with butterfly logo",
|
||||
"green kettle with butterfly print",
|
||||
"painted kettle with butterfly logo"
|
||||
],
|
||||
"unseen": [
|
||||
"round green kettle",
|
||||
"bright green kettle",
|
||||
"green water-boiling kettle"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "kettle",
|
||||
"seen": [
|
||||
"gray kettle",
|
||||
"smooth gray kettle",
|
||||
"curved spout kettle",
|
||||
"kettle with round lid",
|
||||
"black handle on kettle",
|
||||
"kettle with black handle",
|
||||
"kettle for boiling water",
|
||||
"metal kettle for pouring water",
|
||||
"rounded kettle with black grip",
|
||||
"gray kettle with smooth surface",
|
||||
"rounded kettle with curved spout",
|
||||
"medium kettle with curved tube spout"
|
||||
],
|
||||
"unseen": [
|
||||
"metal kettle with lid",
|
||||
"medium-sized metal kettle",
|
||||
"gray kettle with wide base"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "kettle",
|
||||
"seen": [
|
||||
"white kettle",
|
||||
"round white kettle",
|
||||
"medium round kettle",
|
||||
"kettle with red handle",
|
||||
"red-handled white kettle",
|
||||
"ribbed red kettle handle",
|
||||
"smooth kettle with red handle",
|
||||
"kettle with smooth metal body",
|
||||
"metal kettle with curved spout",
|
||||
"white kettle with curved spout",
|
||||
"metal kettle with plastic handle",
|
||||
"round kettle with dark red details"
|
||||
],
|
||||
"unseen": [
|
||||
"kettle for boiling water",
|
||||
"medium-sized white kettle",
|
||||
"white kettle with ribbed handle"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "dustbin",
|
||||
"seen": [
|
||||
"trash bin",
|
||||
"black dustbin",
|
||||
"plastic dustbin",
|
||||
"black garbage bin",
|
||||
"smooth black dustbin",
|
||||
"dustbin with lid and bag",
|
||||
"black bin with white liner",
|
||||
"dustbin with white inner bag",
|
||||
"black and white trash holder",
|
||||
"rectangular black trash holder",
|
||||
"medium black garbage container",
|
||||
"medium-sized black plastic dustbin"
|
||||
],
|
||||
"unseen": [
|
||||
"smooth surface dustbin",
|
||||
"simple black garbage bin",
|
||||
"curved rectangular trash can"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "plant-pot",
|
||||
"seen": [
|
||||
"red green plant-pot",
|
||||
"square red plant-pot",
|
||||
"small glossy plant-pot",
|
||||
"handheld glossy plant-pot",
|
||||
"watermelon-themed plant-pot",
|
||||
"plant-pot with green leaves",
|
||||
"ceramic watermelon plant-pot",
|
||||
"rounded watermelon plant-pot",
|
||||
"green rimmed square plant-pot",
|
||||
"green and red ceramic plant-pot",
|
||||
"plant-pot with watermelon print",
|
||||
"decorative plant-pot for small plants"
|
||||
],
|
||||
"unseen": [
|
||||
"red and green ceramic pot",
|
||||
"red pot with black seeds design",
|
||||
"ceramic pot shaped like watermelon"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "plant pot",
|
||||
"seen": [
|
||||
"plant pot",
|
||||
"orange plant pot",
|
||||
"smooth orange plant pot",
|
||||
"two-hand-size plant pot",
|
||||
"medium plant pot for soil",
|
||||
"rectangular dark orange pot",
|
||||
"angled rectangular plant pot",
|
||||
"dark orange pot for gardening",
|
||||
"plastic pot for holding plants",
|
||||
"plastic orange rectangular planter",
|
||||
"plastic rectangular orange plant holder",
|
||||
"medium rectangular pot with smooth sides"
|
||||
],
|
||||
"unseen": [
|
||||
"dark orange soil pot",
|
||||
"smooth-textured orange pot",
|
||||
"rectangular plastic plant pot"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "plant-pot",
|
||||
"seen": [
|
||||
"black plant-pot",
|
||||
"purple-flowered plant-pot",
|
||||
"plant-pot with green leaves",
|
||||
"purple flowers in plant-pot",
|
||||
"medium pot with green plants",
|
||||
"medium rectangular plant-pot",
|
||||
"pot with purple flowering plants",
|
||||
"black pot with spreading greenery",
|
||||
"smooth black rectangular plant-pot",
|
||||
"plant-pot holding soil and flowers",
|
||||
"black rectangular pot with flowers",
|
||||
"rectangular plant-pot with open top"
|
||||
],
|
||||
"unseen": [
|
||||
"black base with leafy plants",
|
||||
"plastic pot containing plants",
|
||||
"decorative plant-pot with leafy plants"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "plant pot",
|
||||
"seen": [
|
||||
"black plant pot",
|
||||
"small plastic plant pot",
|
||||
"plant pot with green leaves",
|
||||
"dark black pot with greenery",
|
||||
"plant pot small with dark hue",
|
||||
"plant pot smooth black surface",
|
||||
"green plant in black plant pot",
|
||||
"black pot with curved inward edges",
|
||||
"compact black pot holding fake plant",
|
||||
"rounded edge black pot with greenery",
|
||||
"smooth black pot with green plant top",
|
||||
"plastic black pot with synthetic plant"
|
||||
],
|
||||
"unseen": [
|
||||
"hand-sized plant pot",
|
||||
"rounded rectangular black plant pot",
|
||||
"small pot with decorative artificial leaves"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "plant-pot",
|
||||
"seen": [
|
||||
"purple plant-pot",
|
||||
"smooth plant-pot",
|
||||
"floral plant-pot",
|
||||
"ceramic plant-pot",
|
||||
"decorative plant-pot",
|
||||
"ceramic pot for plants",
|
||||
"medium purple plant-pot",
|
||||
"painted purple plant-pot",
|
||||
"oval-shaped purple plant-pot",
|
||||
"rounded rectangular plant-pot",
|
||||
"purple pot with rounded edges",
|
||||
"medium-sized ceramic plant-pot"
|
||||
],
|
||||
"unseen": [
|
||||
"floral-patterned plant-pot",
|
||||
"plant-pot with flower designs",
|
||||
"purple pot with smooth surface"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "dumbbell rack",
|
||||
"seen": [
|
||||
"gym dumbbell rack",
|
||||
"rack for dumbbells",
|
||||
"metal dumbbell rack",
|
||||
"silver dumbbell rack",
|
||||
"two-tier dumbbell rack",
|
||||
"rack with dumbbell slots",
|
||||
"rectangular dumbbell rack",
|
||||
"smooth metal dumbbell rack",
|
||||
"two-layer silver metal rack",
|
||||
"silver rack for gym dumbbells",
|
||||
"blue and silver dumbbell holder",
|
||||
"dumbbell rack with wide shelves"
|
||||
],
|
||||
"unseen": [
|
||||
"medium dumbbell rack",
|
||||
"compact dumbbell rack for weights",
|
||||
"blue-framed dumbbell rack with shelves"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "dumbbell rack",
|
||||
"seen": [
|
||||
"dumbbell rack",
|
||||
"gym dumbbell rack",
|
||||
"metal dumbbell rack",
|
||||
"two-tier dumbbell rack",
|
||||
"sturdy dumbbell holder",
|
||||
"dumbbell rack with slots",
|
||||
"black slots on metal rack",
|
||||
"rack for storing dumbbells",
|
||||
"angled white dumbbell stand",
|
||||
"dumbbell rack for gym weights",
|
||||
"medium-sized gym dumbbell rack",
|
||||
"smooth white frame dumbbell rack"
|
||||
],
|
||||
"unseen": [
|
||||
"white dumbbell storage rack",
|
||||
"angled dumbbell storage stand",
|
||||
"white rack with black holders"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "dumbbell rack",
|
||||
"seen": [
|
||||
"rack for dumbbells",
|
||||
"weight holder rack",
|
||||
"black dumbbell rack",
|
||||
"metal dumbbell rack",
|
||||
"gym dumbbell holder",
|
||||
"medium dumbbell rack",
|
||||
"black rack for weights",
|
||||
"sturdy metal dumbbell rack",
|
||||
"gray and black dumbbell rack",
|
||||
"compact dumbbell storage rack",
|
||||
"dumbbell rack with smooth bars",
|
||||
"rectangular dumbbell holder frame"
|
||||
],
|
||||
"unseen": [
|
||||
"metal rack with gray supports",
|
||||
"rack for organizing gym dumbbells",
|
||||
"dumbbell rack with horizontal bars"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "dumbbell rack",
|
||||
"seen": [
|
||||
"red dumbbell rack",
|
||||
"rack with dumbbells",
|
||||
"black dumbbells on rack",
|
||||
"sturdy rack for dumbbells",
|
||||
"rack for holding dumbbells",
|
||||
"red rack for gym dumbbells",
|
||||
"black and red dumbbell rack",
|
||||
"red rack with multiple slots",
|
||||
"dumbbell rack with curved slots",
|
||||
"metal and plastic dumbbell rack",
|
||||
"rectangular-shaped dumbbell rack",
|
||||
"dumbbell rack with black weights"
|
||||
],
|
||||
"unseen": [
|
||||
"medium dumbbell rack",
|
||||
"compact dumbbell rack",
|
||||
"red curved slots dumbbell rack"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bookcase",
|
||||
"seen": [
|
||||
"light brown bookcase",
|
||||
"rectangular wooden bookcase",
|
||||
"bookcase with vertical slots",
|
||||
"medium wooden book organizer",
|
||||
"light brown shelves for books",
|
||||
"smooth brown bookcase for books",
|
||||
"bookcase with varied book sizes",
|
||||
"bookcase with flat wooden shelves",
|
||||
"wooden bookcase with smooth texture",
|
||||
"grain-textured light brown bookcase",
|
||||
"rectangular bookcase with side panels",
|
||||
"rectangular bookcase with smooth grain"
|
||||
],
|
||||
"unseen": [
|
||||
"medium-sized bookshelf",
|
||||
"bookcase holding multiple books",
|
||||
"bookcase with vertical wooden supports"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bookcase",
|
||||
"seen": [
|
||||
"bookcase made from wood material",
|
||||
"medium shelf for books and items",
|
||||
"bookcase with books and plant pot",
|
||||
"wooden bookcase with open sections",
|
||||
"medium rectangular shelf with slots",
|
||||
"rectangular shelf for books and decor",
|
||||
"orange-brown bookcase with smooth wood",
|
||||
"wooden storage unit with vertical panels",
|
||||
"compact orange-brown bookcase with items",
|
||||
"bookshelf having distinct circular cutouts",
|
||||
"rectangular bookcase having dividers inside",
|
||||
"orange-brown storage piece with smooth finish"
|
||||
],
|
||||
"unseen": [
|
||||
"orange-brown bookcase",
|
||||
"bookcase with circular hole design",
|
||||
"orange bookshelf featuring grain texture"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bookcase",
|
||||
"seen": [
|
||||
"wooden bookcase",
|
||||
"light brown bookcase",
|
||||
"compact tabletop bookcase",
|
||||
"medium-sized wooden bookcase",
|
||||
"organized shelves in bookcase",
|
||||
"bookcase with multicolored books",
|
||||
"books neatly stacked in bookcase",
|
||||
"rectangular bookcase with shelves",
|
||||
"small bookcase with multiple sections",
|
||||
"bookcase holding books and small items",
|
||||
"bookcase with visible books and shelves",
|
||||
"light brown rectangular bookcase with compartments"
|
||||
],
|
||||
"unseen": [
|
||||
"bookcase with smooth finish",
|
||||
"clean and smooth wooden bookcase",
|
||||
"functional wooden bookcase for storage"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "bookcase",
|
||||
"seen": [
|
||||
"light blue bookcase",
|
||||
"bookcase with open slots",
|
||||
"rectangular blue bookcase",
|
||||
"shiny light blue bookcase",
|
||||
"medium-sized smooth bookcase",
|
||||
"bookcase with handle cut-outs",
|
||||
"bookcase with flat panel dividers",
|
||||
"blue bookcase with glossy surface",
|
||||
"bookcase with rectangular openings",
|
||||
"bookcase with storage compartments",
|
||||
"plastic bookcase with smooth finish",
|
||||
"bookcase featuring ergonomic handles"
|
||||
],
|
||||
"unseen": [
|
||||
"boxy plastic bookcase",
|
||||
"compact light blue bookcase",
|
||||
"bookcase divided into sections"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "laptop",
|
||||
"seen": [
|
||||
"medium-sized laptop",
|
||||
"silver keyboard laptop",
|
||||
"black and silver laptop",
|
||||
"portable folding laptop",
|
||||
"laptop with silver keyboard",
|
||||
"matte laptop with smooth screen",
|
||||
"compact black and silver computer",
|
||||
"Toshiba laptop with folding design",
|
||||
"black laptop with reflective screen",
|
||||
"rectangular laptop with Toshiba logo",
|
||||
"device with flat keyboard and screen",
|
||||
"folding laptop with screen and keyboard"
|
||||
],
|
||||
"unseen": [
|
||||
"laptop computer",
|
||||
"portable Toshiba laptop",
|
||||
"computer with black screen"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "laptop",
|
||||
"seen": [
|
||||
"slim laptop",
|
||||
"portable slim laptop",
|
||||
"compact silver laptop",
|
||||
"lightweight silver laptop",
|
||||
"medium-sized silver laptop",
|
||||
"laptop with black keyboard",
|
||||
"laptop with smooth surface",
|
||||
"laptop with metallic finish",
|
||||
"metal laptop with black keys",
|
||||
"silver laptop with dark keys",
|
||||
"rectangular laptop with screen",
|
||||
"laptop with foldable screen design"
|
||||
],
|
||||
"unseen": [
|
||||
"silver laptop",
|
||||
"foldable laptop",
|
||||
"folding laptop with black keyboard"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
{
|
||||
"raw_description": "laptop",
|
||||
"seen": [
|
||||
"metal laptop",
|
||||
"silver laptop",
|
||||
"keyboard laptop",
|
||||
"black screen laptop",
|
||||
"wood surrounded laptop",
|
||||
"smooth textured laptop",
|
||||
"black and silver laptop",
|
||||
"medium foldable silver laptop",
|
||||
"laptop with black textured screen",
|
||||
"silver laptop with foldable parts",
|
||||
"silver laptop with black keyboard",
|
||||
"laptop with wood panel background"
|
||||
],
|
||||
"unseen": [
|
||||
"foldable laptop",
|
||||
"medium laptop with silver body",
|
||||
"laptop with glossy black display"
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user