Files
myWiki/concepts/five-axis-positional-encoding.md

49 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "五轴位置编码 (Five-Axis Positional Encoding)"
created: 2026-06-13
updated: 2026-06-13
type: concept
tags: [computer-vision, position-encoding, transformer, video-generation]
sources: [raw/papers/cheng-flex4dhuman-2026.md]
---
# 五轴位置编码 (Five-Axis Positional Encoding)
Flex4DHuman 的核心技术创新——将标准 [[rotary-position-embedding|RoPE]] 从三维(时间, 高, 宽)扩展为五维位置编码。
## 定义
五轴位置编码是在自注意力机制中同时编码以下五个维度的位置信息:
- **D_time = 16**: 离散时间帧索引(当前帧在序列中的位置)
- **D_view = 8**: 离散视角槽索引(标识不同相机视点)
- **D_SE(3) = 20**: 连续 SE(3) 相机几何编码
- **D_h = 42**: 空间高度
- **D_w = 42**: 空间宽度
总计注意力头维度 D = 128与原始 Wan 2.1 保持一致。
## 工作机制
在 Wan 2.1 中RoPE 维度分配为 (Dt, Dh, Dw) = (44, 42, 42)。Flex4DHuman 将时间轴容量 44 重新分配为三个子轴:
```
(Dtime, Dview, DSE(3), Dh, Dw) = (16, 8, 20, 42, 42)
```
- **时间帧编码** (16维):区分不同时间步的 token
- **视角编码** (8维):离散视角标识,排列不变性,使模型能泛化到任意数量的参考/目标视角
- **SE(3) 编码** (20维):连续相对相机位姿,通过 [[se3-relative-camera-encoding|SE(3) 相对相机编码]] 实现
## 关键特性
- **零额外参数**:不引入新的可学习权重,仅重新分配已有 RoPE 容量
- **预训练继承**:利用 Wan 2.1 在运动数据上学习到的位置先验
- **排列不变性**:离散视角编码支持任意顺序的输入视角
## 参考
- [[flex4dhuman|Flex4DHuman]] — 首次提出该编码方案
- [[se3-relative-camera-encoding|SE(3) 相对相机编码]] — SE(3) 轴的具体实现
- [[rotary-position-embedding|RoPE]] — 基础旋转位置编码