FocusGate:可靠性门控的视线预测先验融合——ICASSP 2027投稿解读

论文信息

项目 内容
标题 Knowing When to Trust a Prior: Reliability-Gated Cue Fusion for Video Gaze Prediction
作者 Yueqian Lin, Yiheng Wang, Hai “Helen” Li, Yiran Chen
机构 Duke University, Durham, NC, USA
投稿 ICASSP 2027
arXiv 2610.08663
代码 待发布

核心创新

FocusGate解决了一个反直觉的问题:gaze-free先验(如散焦图、人脸检测、深度图)仍然携带gaze-trained模型没有学到的信号,但前提是你知道什么时候该信任它们。

一句话总结:通过逐帧可靠性门控,选择性融合散焦先验到gaze预测模型中,在所有16个模型-域单元上显著提升sAUC。

问题背景

视频视线预测的先验融合困境

融合策略 效果 原因
无条件融合散焦先验 ❌ 有害 深焦场景中散焦图退化为噪声
不融合 ❌ 丢失信号 浅焦场景中散焦图指向叙事焦点
FocusGate门控融合 ✅ 有益 逐帧判断散焦图是否可靠

核心矛盾

方法详解

整体架构

FocusGate由三个核心组件构成:

  1. 基线融合器:8个gaze-free先验的加权rank-sum
  2. 散焦估计器:预测每像素in-focus概率
  3. 可靠性门控:基于散焦图形状统计判断是否启用

可靠性门控设计

门控基于散焦图P的三个形状统计量:

统计量 含义 阈值
Spread p90 - p10 ≥ 0.55
Separation 双峰分离度 ≥ 0.45
Sharp area 锐利区域占比 3% ≤ x ≤ 70%

当三个条件同时满足时,门控开启(c_t=1);否则关闭(c_t=0),预测退回基线。

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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
import torch
import torch.nn as nn
import numpy as np
from typing import Tuple

class FocusGate(nn.Module):
"""
FocusGate: 可靠性门控的先验融合模块

论文: arXiv:2610.08663 (ICASSP 2027投稿)

功能:
1. 从散焦图计算3个形状统计量
2. 基于阈值判断帧是否可靠
3. 可靠时融合散焦先验,不可靠时退回基线
"""

def __init__(
self,
spread_thresh: float = 0.55,
sep_thresh: float = 0.45,
sharp_min: float = 0.03,
sharp_max: float = 0.70,
defocus_weight: float = 0.25
):
super().__init__()
self.spread_thresh = spread_thresh
self.sep_thresh = sep_thresh
self.sharp_min = sharp_min
self.sharp_max = sharp_max
self.defocus_weight = defocus_weight

def compute_shape_stats(self, defocus_map: torch.Tensor) -> dict:
"""
计算散焦图的3个形状统计量

Args:
defocus_map: (B, H, W) in-focus概率, 值域[0,1]

Returns:
stats字典
"""
B = defocus_map.shape[0]
flat = defocus_map.reshape(B, -1)

# Spread: p90 - p10
p10 = torch.quantile(flat, 0.10, dim=-1)
p90 = torch.quantile(flat, 0.90, dim=-1)
spread = p90 - p10

# Separation: 双峰分离度
high_mean = (flat * (flat > 0.5).float()).sum(-1) / \
((flat > 0.5).float().sum(-1) + 1e-8)
low_mean = (flat * (flat <= 0.5).float()).sum(-1) / \
((flat <= 0.5).float().sum(-1) + 1e-8)
separation = high_mean - low_mean

# Sharp area: 锐利区域占比
sharp_frac = (flat > 0.5).float().mean(-1)

return {
'spread': spread,
'separation': separation,
'sharp_frac': sharp_frac
}

def forward(
self,
base_pred: torch.Tensor, # (B, H, W) 基线预测
defocus_map: torch.Tensor # (B, H, W) 散焦图
) -> Tuple[torch.Tensor, torch.Tensor]:
"""
门控融合

Args:
base_pred: 基线预测 (B, H, W)
defocus_map: 散焦图 (B, H, W)

Returns:
fused: (B, H, W) 融合后预测
gate: (B,) 门控状态
"""
stats = self.compute_shape_stats(defocus_map)

# 门控判定
gate = (
(stats['spread'] >= self.spread_thresh) &
(stats['separation'] >= self.sep_thresh) &
(stats['sharp_frac'] >= self.sharp_min) &
(stats['sharp_frac'] <= self.sharp_max)
).float() # (B,)

# rank归一化散焦图
defocus_rank = self._rank_normalize(defocus_map)

# 门控融合: gate=1时加入散焦先验,gate=0时退回基线
fused = base_pred + gate.unsqueeze(-1).unsqueeze(-1) * \
self.defocus_weight * defocus_rank

return fused, gate

def _rank_normalize(self, x: torch.Tensor) -> torch.Tensor:
"""逐帧rank归一化到[0,1]"""
B = x.shape[0]
flat = x.reshape(B, -1)
# 对每帧的像素排序
sorted_vals, _ = torch.sort(flat, dim=-1)
# 计算rank(midrank处理ties)
ranks = torch.zeros_like(flat)
for b in range(B):
ranks[b] = torch.searchsorted(sorted_vals[b], flat[b])
ranks = ranks / (flat.shape[-1] - 1)
return ranks.reshape(x.shape)


class DefocusEstimator(nn.Module):
"""
散焦估计器

论文中两个版本:
1. Scratch estimator: U-Net, 2.76M参数
2. Recipe estimator: MobileNetV3-L + 深度蒸馏 + 高频通道
"""

def __init__(self, backbone='mobilenetv3'):
super().__init__()

if backbone == 'mobilenetv3':
# Recipe estimator (论文中效果更好)
import torchvision.models as models
self.encoder = models.mobilenet_v3_large(weights='DEFAULT')
self.encoder.classifier = nn.Identity()

self.head = nn.Sequential(
nn.Conv2d(960, 256, 1),
nn.BatchNorm2d(256),
nn.ReLU6(inplace=True),
nn.Conv2d(256, 1, 1),
nn.Sigmoid()
)

# 高频输入通道
self.high_freq_conv = nn.Conv2d(1, 3, 1)
else:
# Scratch U-Net
self.encoder = nn.Sequential(
nn.Conv2d(4, 64, 3, padding=1),
nn.ReLU(inplace=True),
nn.MaxPool2d(2),
nn.Conv2d(64, 128, 3, padding=1),
nn.ReLU(inplace=True),
nn.MaxPool2d(2),
nn.Conv2d(128, 256, 3, padding=1),
nn.ReLU(inplace=True),
nn.MaxPool2d(2),
)
self.decoder = nn.Sequential(
nn.ConvTranspose2d(256, 128, 2, stride=2),
nn.ReLU(inplace=True),
nn.ConvTranspose2d(128, 64, 2, stride=2),
nn.ReLU(inplace=True),
nn.ConvTranspose2d(64, 1, 2, stride=2),
nn.Sigmoid()
)

def forward(self, x: torch.Tensor) -> torch.Tensor:
"""预测in-focus概率图"""
if hasattr(self, 'high_freq_conv'):
# 高频通道
gray = x.mean(dim=1, keepdim=True)
high_freq = gray - torch.nn.functional.avg_pool2d(
gray, 3, stride=1, padding=1
)
x_hf = self.high_freq_conv(high_freq)
x = torch.cat([x, x_hf], dim=1)

if hasattr(self, 'decoder'):
feat = self.encoder(x)
out = self.decoder(feat)
else:
feat = self.encoder(x)
out = self.head(feat)

return out.squeeze(1)


class FullFocusGate(nn.Module):
"""
完整FocusGate系统

包含:
1. 多个gaze-free先验(中心高斯、人脸、谱残差等)
2. 散焦估计器
3. 可靠性门控
"""

def __init__(self):
super().__init__()
self.defocus_estimator = DefocusEstimator(backbone='mobilenetv3')
self.gate = FocusGate()

# 先验权重 (论文中by coordinate ascent fitted)
self.weights = {
'center': 1.0,
'face': 2.0, # gamma=0.5
'spectral_residual': 0.0, # swept to zero
'dino_attn': 1.5, # gamma=3
'depth': 0.0, # swept to zero
'flow': 1.0,
'defocus': 0.25,
}

def forward(self, frame, priors):
"""
Args:
frame: (B, 3, H, W) 输入帧
priors: dict of (B, H, W) 先验图
"""
# 1. 基线融合
base = torch.zeros_like(priors['center'])
for name, (w, gamma) in [
('center', (1.0, 1)),
('face', (2.0, 0.5)),
('dino_attn', (1.5, 3)),
('flow', (1.0, 1)),
]:
base += w * priors[name].clamp(0, 1).pow(gamma)

# 2. 散焦估计
defocus = self.defocus_estimator(frame)

# 3. 门控融合
fused, gate = self.gate(base, defocus)

return fused, gate


# 测试
if __name__ == "__main__":
print("=" * 60)
print("FocusGate 可靠性门控融合 - 测试")
print("=" * 60)

B, H, W = 2, 224, 224

# 模拟散焦图
# 场景1: 浅景深(双峰,门控开启)
defocus_shallow = torch.zeros(B, H, W)
defocus_shallow[:, :H//2, :] = 0.9 # 上半部分锐利
defocus_shallow[:, H//2:, :] = 0.1 # 下半部分模糊

# 场景2: 深景深(均匀,门控关闭)
defocus_deep = torch.full((B, H, W), 0.5)
defocus_deep += torch.randn(B, H, W) * 0.05

base_pred = torch.randn(B, H, W).sigmoid()

gate_module = FocusGate()

# 浅景深
fused_shallow, gate_shallow = gate_module(base_pred, defocus_shallow)
print(f"\n浅景深场景:")
print(f" 门控状态: {gate_shallow.tolist()}")
print(f" 融合变化: {(fused_shallow - base_pred).abs().mean():.6f}")

# 深景深
fused_deep, gate_deep = gate_module(base_pred, defocus_deep)
print(f"\n深景深场景:")
print(f" 门控状态: {gate_deep.tolist()}")
print(f" 融合变化: {(fused_deep - base_pred).abs().mean():.6f}")

print(f"\n门控效果验证:")
print(f" 浅景深门控开启: {gate_shallow.mean():.2f} (应≈1)")
print(f" 深景深门控关闭: {gate_deep.mean():.2f} (应≈0)")

实验结果

主要结果

模型 年份 参数 ms/帧 Film Sports Web DIEM
TASED-Net 2019 21M 50 78.4 77.0 72.6 74.0
++FocusGate — +1ms 51 79.9* 79.8* 73.6* 76.6*
UNISAL 2020 3.7M 172 77.8 80.5 69.7 73.9
++FocusGate — — 173 79.0* 81.3* 71.2* 75.4*
ViNet-S 2025 9.5M 69 80.7 81.2 73.5 77.3
++FocusGate — — 70 81.4* 81.8* 74.0* 78.2*
ViSAGE 2026 6.9B 9916 81.3 80.5 75.8 78.4
++FocusGate — +1ms — 81.9* 81.7* 75.9 79.4*
FocusGate (独立) — 174 174 80.0 78.3 72.7 76.8

关键发现: FocusGate仅增加1ms延迟(+1%),在所有16个模型-域单元上提升sAUC,其中15个显著。

门控消融

散焦估计器 无条件融合 门控融合 改善
Scratch (U-Net) −0.94† (有害) +0.04 (中性) +0.98
Recipe (MobileNetV3) — +0.68* (有益) —

领域迁移效应

域 无条件融合 门控融合
Film −0.94† +0.04
Sports −1.40† +0.68*
Web 0.00 +0.30

IMS开发启示

1. 可靠性门控的通用框架

FocusGate的核心思想——“知道什么时候不该信任某个先验”——可以直接应用到IMS多个模块:

IMS模块 先验 可靠性问题 FocusGate式方案
视线区域分类 头姿先验 头姿大角度旋转时不可靠 旋转角度门控
疲劳检测 PERCLOS阈值 眨眼频率自然波动 时间窗可靠性门控
分心检测 视线偏离度 追踪丢失时不可靠 追踪置信度门控
乘员分类 重量传感器 儿童座椅导致误分类 多传感器一致性门控

2. 视频视线预测增强

应用 当前方案 FocusGate增强
DMS视线热力图 单帧视线→区域 融合散焦+人脸+DINO先验
注意力分布 视线统计 +景深+运动+注意力先验
场景理解 独立检测 +可靠性门控融合

3. 部署考量

因素 分析
延迟 +1ms(仅门控判断),几乎零成本
散焦估计 MobileNetV3-L, 15ms/帧
阈值固定 在CUHK上固定,不需gaze数据调参
通用性 可附加到任何gaze预测器

总结

FocusGate的核心贡献是将”先验融合”从无条件变为有条件,通过逐帧可靠性判断,避免不可靠先验的负面影响。

关键数据:

  • 16/16模型-域单元全部提升
  • 15/16达到统计显著
  • 仅+1ms延迟
  • 超越2019-2020监督模型(仅用因果16帧均值)

IMS落地建议: 将可靠性门控思想应用到所有”先验融合”场景——不是所有先验在所有帧上都有用,关键是在正确的帧上信任正确的先验。

信息来源: arXiv:2610.08663