SGAP-Gaze:场景网格注意力实现驾驶员注视点估计新突破

论文信息

项目 内容
标题 SGAP-Gaze: Scene Grid Attention Based Point-of-Gaze Estimation Network for Driver Gaze
发表 arXiv:2604.19888, 2026
链接 https://arxiv.org/abs/2604.19888
关键词 point-of-gaze, scene grid, attention, driver gaze

核心创新

现有视线估计预测3D视线方向向量,但不知道 驾驶员在看场景中的哪个点。SGAP-Gaze直接预测注视点(Point-of-Gaze, PoG),引入场景网格注意力机制。

1. 问题定义

1.1 视线方向 vs 注视点

方法 输出 问题
视线方向(3D向量) (pitch, yaw) 不知看向哪里
注视点(PoG) 场景坐标(x,y) 直接可用但更难

1.2 驾驶场景的注视区域

区域 含义 DMS价值
道路前方 正常驾驶 ✅ 安全
后视镜 检查后车 ✅ 安全
仪表盘 车辆信息 ⚠️ 短暂OK
中控屏 导航/多媒体 🟡 分心
手机 严重分心 🔴 危险
副驾座位 社交分心 🟡 中等

2. SGAP方法

2.1 场景网格注意力

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
import torch
import torch.nn as nn

class SGAPGaze(nn.Module):
"""
SGAP-Gaze: Scene Grid Attention Point-of-Gaze Estimation

创新: 将场景图像分成网格,用注意力机制
学习驾驶员注视落在哪个网格区域

输入: 驾驶员面部图 + 场景图
输出: 注视点坐标(x, y) + 网格注意力图
"""

def __init__(self, grid_size: int = 8, feat_dim: int = 256):
super().__init__()
self.grid_size = grid_size

# 驾驶员面部编码器
self.face_encoder = nn.Sequential(
nn.Conv2d(3, 32, 3, stride=2, padding=1), nn.ReLU(),
nn.Conv2d(32, 64, 3, stride=2, padding=1), nn.ReLU(),
nn.Conv2d(64, 128, 3, stride=2, padding=1), nn.ReLU(),
nn.AdaptiveAvgPool2d((1, 1)), nn.Flatten(),
nn.Linear(128, feat_dim)
)

# 场景编码器(网格化)
self.scene_encoder = nn.Sequential(
nn.Conv2d(3, 32, 3, stride=2, padding=1), nn.ReLU(),
nn.Conv2d(32, 64, 3, stride=2, padding=1), nn.ReLU(),
nn.Conv2d(64, 128, 3, stride=2, padding=1), nn.ReLU(),
nn.Conv2d(128, 256, 3, padding=1), nn.ReLU(),
)

# 场景网格注意力
self.grid_attention = nn.MultiheadAttention(
embed_dim=feat_dim,
num_heads=8,
batch_first=True
)

# 注视点回归头
self.pog_head = nn.Sequential(
nn.Linear(feat_dim * 2, 128), nn.ReLU(),
nn.Linear(128, 2) # (x, y) 归一化坐标
)

def forward(self, face_img: torch.Tensor, scene_img: torch.Tensor) -> dict:
"""
Args:
face_img: (B, 3, 128, 128) 驾驶员面部
scene_img: (B, 3, 256, 256) 前方场景

Returns:
pog: (B, 2) 注视点坐标
attention_map: (B, grid*grid) 网格注意力
"""
# 驾驶员特征
face_feat = self.face_encoder(face_img) # (B, 256)

# 场景网格特征
scene_feat = self.scene_encoder(scene_img) # (B, 256, H', W')
B, C, H, W = scene_feat.shape

# 展平为网格序列
grid_feats = scene_feat.view(B, C, H * W).permute(0, 2, 1) # (B, H*W, 256)

# 用面部特征查询场景网格
query = face_feat.unsqueeze(1) # (B, 1, 256)
attn_out, attn_weights = self.grid_attention(
query, grid_feats, grid_feats
)

# 注视点回归
combined = torch.cat([face_feat, attn_out.squeeze(1)], dim=1)
pog = self.pog_head(combined)

return {
'pog': pog,
'attention_map': attn_weights.squeeze(1),
'grid_size': (H, W)
}


# 测试
if __name__ == "__main__":
model = SGAPGaze(grid_size=8, feat_dim=256)

face = torch.randn(4, 3, 128, 128)
scene = torch.randn(4, 3, 256, 256)

out = model(face, scene)

print(f"面部输入: {face.shape}")
print(f"场景输入: {scene.shape}")
print(f"注视点: {out['pog'].shape} (归一化坐标)")
print(f"注意力图: {out['attention_map'].shape}")
print(f"网格尺寸: {out['grid_size']}")

2.2 驾驶区域分类

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DRIVING_GAZE_ZONES = {
'road_ahead': {'bbox': (0.3, 0.2, 0.7, 0.6), 'risk': 'safe'},
'left_mirror': {'bbox': (0.0, 0.3, 0.15, 0.5), 'risk': 'safe'},
'right_mirror': {'bbox': (0.85, 0.3, 1.0, 0.5), 'risk': 'safe'},
'instrument': {'bbox': (0.3, 0.6, 0.7, 0.8), 'risk': 'caution'},
'center_screen': {'bbox': (0.3, 0.5, 0.7, 0.7), 'risk': 'distraction'},
'phone': {'bbox': (0.0, 0.5, 0.3, 0.8), 'risk': 'danger'},
'passenger': {'bbox': (0.0, 0.0, 0.3, 0.5), 'risk': 'moderate'},
}

def classify_gaze_zone(pog_x: float, pog_y: float) -> str:
"""根据注视点分类驾驶区域"""
for zone, info in DRIVING_GAZE_ZONES.items():
x1, y1, x2, y2 = info['bbox']
if x1 <= pog_x <= x2 and y1 <= pog_y <= y2:
return zone
return 'other'

3. 性能对比

方法 输出类型 精度 实时性 场景理解
传统CNN 3D向量 4.5° 快 ❌
GazeCapture 3D向量 6.8° 快 ❌
TransGaze-Object 物体类别 85% 中 ✅
SGAP-Gaze 场景坐标 精准 快 ✅

4. IMS开发启示

4.1 从视线方向到注视点的价值

DMS功能 视线方向 注视点(PoG)
手机使用检测 ⚠️ 间接推断 ✅ 直接判定
分心区域 粗略估计 ✅ 精确区域
后视镜检查 ⚠️ 难区分 ✅ 明确判定
仪表扫视频率 ⚠️ 不可靠 ✅ 可计数
凝视隧道效应 ⚠️ 不精确 ✅ 精确量化

4.2 部署建议

步骤 行动 复杂度
1 定义驾驶区域映射 低
2 训练SGAP-Gaze模型 中
3 双摄像头(面部+场景) 中
4 实时区域分类 低

5. 总结

SGAP-Gaze解决了DMS的一个根本问题:知道驾驶员在看哪里 而非 眼睛指向哪个方向。

对IMS团队:

  • 评估 双摄像头方案(面部+场景)的可行性
  • 定义 驾驶区域映射(路/镜/仪表/手机)
  • 训练 场景网格注意力模型
  • 对标 Euro NCAP分心场景(D-02等)

论文: https://arxiv.org/abs/2604.19888