GazeDiT:扩散模型生成注视准确的合成眼图像,视线追踪训练数据的新来源

arXiv 2609.17814 论文解读

“GazeDiT: Gaze-Accurate Diffusion Image Generation for Eye Tracking via Spatial Conditioning”, arXiv, 2026.09

论文信息

项目 内容
标题 GazeDiT: Gaze-Accurate Diffusion Image Generation for Eye Tracking via Spatial Conditioning
arXiv 2609.17816
日期 2026年9月15日
核心 扩散模型生成gaze-accurate合成眼图像,用于视线追踪训练

核心创新

用扩散模型(Diffusion Model)生成合成眼图像,且注视标签准确到足以提升真实世界视线追踪性能。

关键突破:解决了合成训练数据的”gaze accuracy”问题——以往合成眼图像的注视标签与真实注视方向有偏差,GazeDiT通过空间条件控制确保生成的图像与注视标签一致。

与DistillGaze的互补关系

组合效果: GazeDiT生成 + DistillGaze训练 = 端到端无真实标注视线追踪管道。

方法:空间条件扩散

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
"""
GazeDiT: 基于空间条件的注视准确扩散图像生成

核心思路:
1. 标准扩散模型生成图像,但注视方向可能不准确
2. GazeDiT添加空间条件控制→强制生成图像的注视方向与标签一致
3. 生成的图像用于训练视线追踪模型

与普通合成渲染(Blender)的区别:
- Blender: 3D渲染,精确但纹理/噪声不真实
- GazeDiT: 扩散模型生成,纹理真实+注视标签精确
"""

import torch
import torch.nn as nn
import torch.nn.functional as F

class GazeDiTGenerator(nn.Module):
"""
GazeDiT: 注视准确扩散图像生成器

架构:扩散模型 + 空间条件

输入:
- gaze_direction: (yaw, pitch) 注视方向
- eye_region_mask: 眼部区域空间位置
- identity_features: 身份特征(可选)
- noise_level: 扩散步数

输出:
- 合成眼图像(注视方向与标签一致)
"""

def __init__(self, img_size=64, gaze_dim=2):
super().__init__()
self.img_size = img_size

# 扩散模型骨干(简化版)
self.time_embed = nn.Sequential(
nn.Linear(1, 128), nn.SiLU(),
nn.Linear(128, 256)
)

# 注视条件嵌入
self.gaze_embed = nn.Sequential(
nn.Linear(gaze_dim, 128), nn.SiLU(),
nn.Linear(128, 256)
)

# 空间条件(眼部区域位置)
self.spatial_embed = nn.Conv2d(1, 32, 3, padding=1)

# UNet去噪器(简化)
self.denoiser = nn.Sequential(
nn.Conv2d(3 + 32, 64, 3, padding=1), nn.SiLU(),
nn.Conv2d(64, 64, 3, padding=1), nn.SiLU(),
nn.Conv2d(64, 64, 3, padding=1), nn.SiLU(),
nn.Conv2d(64, 1, 3, padding=1) # 灰度IR输出
)

# 注视一致性验证器
self.gaze_verifier = nn.Sequential(
nn.AdaptiveAvgPool2d(1),
nn.Flatten(),
nn.Linear(64, 128), nn.SiLU(),
nn.Linear(128, gaze_dim) # 验证生成图像的注视方向
)

def forward(self, x_noisy, t, gaze, spatial_mask):
"""
去噪步骤

Args:
x_noisy: 带噪声的图像 (B, 1, H, W)
t: 扩散时间步 (B,)
gaze: 注视方向 (B, 2) [yaw, pitch]
spatial_mask: 眼部空间位置 (B, 1, H, W)
"""
# 时间嵌入
t_emb = self.time_embed(t.float().unsqueeze(-1) / 1000)

# 注视条件嵌入
g_emb = self.gaze_embed(gaze)

# 空间条件
s_emb = self.spatial_embed(spatial_mask)

# 拼接条件
cond = s_emb + t_emb.unsqueeze(-1).unsqueeze(-1) + g_emb.unsqueeze(-1).unsqueeze(-1)

# 去噪
denoised = self.denoiser(torch.cat([x_noisy, cond], dim=1))

# 注视一致性验证
verified_gaze = self.gaze_verifier(cond)

return denoised, verified_gaze


# ==================== 生成管道 ====================
class GazeDataPipeline:
"""
GazeDiT → DistillGaze 端到端管道

1. GazeDiT生成合成眼图像(注视标签精确)
2. 采集未标注真实IR图像(被动收集)
3. DistillGaze两步蒸馏训练
4. 部署256K模型
"""

def __init__(self):
self.generator = GazeDiTGenerator()
# DistillGaze training framework (见博客#02)

def generate_synthetic_dataset(self, n_samples=10000):
"""生成合成数据集"""
# 均匀采样注视方向
yaw = torch.uniform(-30, 30, (n_samples,)) # 度
pitch = torch.uniform(-30, 30, (n_samples,))
gaze = torch.stack([yaw, pitch], dim=1)

# 生成图像
images = []
for i in range(n_samples):
noise = torch.randn(1, 1, 64, 64)
spatial = torch.ones(1, 1, 64, 64) * 0.5
denoised, _ = self.generator(noise, torch.tensor([100]),
gaze[i:i+1], spatial)
images.append(denoised.detach())

return torch.cat(images), gaze

def evaluate_gaze_accuracy(self, images, true_gaze):
"""评估生成图像的注视准确性"""
with torch.no_grad():
_, verified = self.generator(images, torch.zeros(images.shape[0]),
true_gaze, torch.ones_like(images))
error = torch.abs(verified - true_gaze).mean()
return error.item()


# ==================== 测试 ====================
if __name__ == "__main__":
pipeline = GazeDataPipeline()

print("=== GazeDiT + DistillGaze 管道 ===")
print("Step 1: GazeDiT生成合成眼图像(注视标签精确)")
print("Step 2: 采集未标注真实IR图像(被动)")
print("Step 3: DistillGaze Stage 1: DINOv3→86M Teacher")
print("Step 4: DistillGaze Stage 2: 86M→256K Student")
print("Step 5: 部署256K模型")
print()
print("优势:")
print(" - 零真实标注")
print(" - 新设备仅需更新相机参数")
print(" - 256K模型,CPU可运行")
print(" - 1.44°精度")
print()
print("对比Blender渲染:")
print(" Blender: 精确但纹理/噪声不真实 → synthetic-to-real gap")
print(" GazeDiT: 扩散生成,纹理真实 + 注视标签精确")
print(" → 更小的synthetic-to-real gap")

生成质量评估

维度 Blender渲染 GazeDiT扩散 优势
注视标签精度 ✅ 像素级 ✅ 空间条件控制 平局
纹理真实度 ⚠️ 偏合成 ✅ 接近真实 GazeDiT
噪声特性 ❌ 无传感器噪声 ✅ 可模拟 GazeDiT
3D资产需求 ✅ 需要眼模型 ❌ 不需要 GazeDiT
相机参数适配 ✅ 精确控制 ⚠️ 需训练 Blender
多样性 ⚠️ 受3D资产限制 ✅ 扩散采样 GazeDiT
生成速度 ✅ 快(渲染) ⚠️ 扩散较慢 Blender

IMS开发启示

1. 合成数据管道的完整形态

2. 对DMS的部署路径

步骤 工具 输入 输出
1 Blender/GazeDiT 相机参数+注视方向 合成眼图像+标签
2 被动收集 正常驾驶 未标注真实IR
3 DistillGaze Stage 1 合成+未标注真实 86M Teacher
4 DistillGaze Stage 2 Teacher→Student 256K模型
5 部署 256K模型 CPU推理<1ms

3. 与NVIDIA Omniverse的关系

组件 角色 来源
NVIDIA Omniverse 3D场景渲染(座舱+乘员) NVIDIA
GazeDiT 2D眼图像生成(注视准确) arXiv
DistillGaze 训练框架(两步蒸馏) ECCV
组合 Omniverse场景+GazeDiT眼部+DistillGaze训练 完整管道

局限性

  1. 扩散生成慢:相比Blender渲染,扩散模型生成速度较慢
  2. 注视一致性:扩散生成可能偏离标注注视方向,需验证器
  3. arXiv预印:未经同行评审
  4. 仅眼部图像:未扩展到全脸/全身
  5. 训练数据依赖:扩散模型需初始眼图像训练

结论

GazeDiT与DistillGaze组合形成端到端无标注视线追踪管道:

  1. GazeDiT生成注视准确的合成眼图像——比Blender渲染纹理更真实
  2. DistillGaze用合成+未标注真实图像训练——无需标注周期
  3. 256K模型CPU运行——全系标配可行

对IMS的启示:合成数据生成正从3D渲染走向扩散模型,两者互补而非替代。


参考来源:

  • arXiv: 2609.17814 (GazeDiT, 2026.09.15)
  • ECCV 2026: DistillGaze (两步蒸馏)
  • Blender: 3D渲染合成眼图像
  • DINOv3: Meta AI Visual Foundation Model