From 624b926e336c5cff572d7642dddd9a45eae60770 Mon Sep 17 00:00:00 2001 From: gouhanke <12219217+gouhanke@user.noreply.gitee.com> Date: Thu, 12 Feb 2026 17:14:23 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20=E6=B7=BB=E5=8A=A0=E6=8E=A8=E7=90=86?= =?UTF-8?q?=E6=97=B6=E7=BC=A9=E6=94=BE=EF=BC=8C=E5=8A=A0=E5=A4=A7=E9=87=87?= =?UTF-8?q?=E6=95=B0=E4=BB=A5=E5=8F=8A=E6=8E=A8=E7=90=86=E6=97=B6=E7=89=A9?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=BE=E7=BD=AE=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roboimi/demos/vla_scripts/eval_vla.py | 4 ++++ roboimi/utils/act_ex_utils.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roboimi/demos/vla_scripts/eval_vla.py b/roboimi/demos/vla_scripts/eval_vla.py index 97fe38f..9c358e4 100644 --- a/roboimi/demos/vla_scripts/eval_vla.py +++ b/roboimi/demos/vla_scripts/eval_vla.py @@ -103,10 +103,14 @@ def prepare_observation(obs: Dict, camera_names: list) -> Dict: Returns: agent 格式的观测字典 """ + import cv2 + # 转换图像: numpy -> tensor, HWC -> CHW images = {} for cam_name in camera_names: img = obs['images'][cam_name] + # Resize 到 224x224(与训练时一致) + img = cv2.resize(img, (224, 224), interpolation=cv2.INTER_LINEAR) img = rearrange(img, 'h w c -> c h w') img = torch.from_numpy(img / 255.0).float() images[cam_name] = img diff --git a/roboimi/utils/act_ex_utils.py b/roboimi/utils/act_ex_utils.py index 3c1648e..d08f203 100644 --- a/roboimi/utils/act_ex_utils.py +++ b/roboimi/utils/act_ex_utils.py @@ -27,8 +27,8 @@ def sample_insertion_pose(): def sample_transfer_pose(): # Box - x_range = [0.0, 0.05] - y_range = [0.95, 1.05] + x_range = [-0.05, 0.05] + y_range = [0.90, 1.05] z_range = [0.47, 0.47] ranges = np.vstack([x_range, y_range, z_range])