From 6d79fc919f4c233672c0cfe8864860be5b96e65b Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Tue, 11 Aug 2026 02:35:22 +0800 Subject: [PATCH] =?UTF-8?q?update:=20actpred=20=E9=BB=98=E8=AE=A4=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E5=88=86=E8=BE=A8=E7=8E=87=2064=E2=86=92224?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actpred/README.md | 4 ++-- actpred/config.py | 2 +- actpred/dataset.py | 2 +- actpred/test_actpred.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/actpred/README.md b/actpred/README.md index 318e43d..f6e7032 100644 --- a/actpred/README.md +++ b/actpred/README.md @@ -9,7 +9,7 @@ Transformer(pre-LN)自注意力融合,取 [PRED] token 回归下一步动 ## 架构 ``` -F 帧图像 (F×3×64×64) ─► 共享 CNN 编码器 ─► F 个 token ─► proj → d_model ┐ +F 帧图像 (F×3×224×224) ─► 共享 CNN 编码器 ─► F 个 token ─► proj → d_model ┐ ├─► [img×F, act×H, PRED] + 位置编码 动作历史 (H×D) ─► Linear proj → d_model ─► H 个 token ────────┤ │ 可学习 [PRED] token ────────────────────────────────────────┘ ▼ @@ -110,7 +110,7 @@ recorder.flush() | 参数 | 默认值 | 说明 | |------|--------|------| -| `--image-size` | 64 | 图像缩放尺寸 | +| `--image-size` | 224 | 图像缩放尺寸 | | `--action-dim` | 18 | 动作向量维度(对齐 bot4cj 18 列:10 舵机 + 2 云台 + 扬声器频率 + 延时 + 4 预留)| | `--history-len` | 5 | 历史动作窗口长度 | | `--frame-len` | 3 | 输入图像帧数(含当前帧,旧帧在前)| diff --git a/actpred/config.py b/actpred/config.py index 21c4dd7..85c1e98 100644 --- a/actpred/config.py +++ b/actpred/config.py @@ -5,7 +5,7 @@ from typing import Optional @dataclass class DataConfig: - image_size: int = 64 + image_size: int = 224 action_dim: int = 18 history_len: int = 5 frame_len: int = 3 diff --git a/actpred/dataset.py b/actpred/dataset.py index fd4e924..489198d 100644 --- a/actpred/dataset.py +++ b/actpred/dataset.py @@ -16,7 +16,7 @@ def _natural_key(p): class ActionDataset(Dataset): def __init__(self, data_dir: str, history_len: int, action_dim: int, - image_size: int = 64, normalize_actions: bool = False, + image_size: int = 224, normalize_actions: bool = False, action_stats_path: str = None, episode_indices: list = None, frame_len: int = 3): self.history_len = history_len diff --git a/actpred/test_actpred.py b/actpred/test_actpred.py index 84e426e..c20bf44 100644 --- a/actpred/test_actpred.py +++ b/actpred/test_actpred.py @@ -263,7 +263,7 @@ class TestConfig(unittest.TestCase): def test_default_config(self): cfg = Config() - self.assertEqual(cfg.data.image_size, 64) + self.assertEqual(cfg.data.image_size, 224) self.assertEqual(cfg.data.action_dim, 18) self.assertEqual(cfg.data.history_len, 5) self.assertEqual(cfg.data.frame_len, 3)