update: actpred 默认图像分辨率 64→224

This commit is contained in:
qing committed 2026-08-11 02:35:22 +08:00
1 parent fee1241e49
commit 6d79fc919f
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -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 | 输入图像帧数(含当前帧,旧帧在前)|
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)