GazeAnywhere:可提示的视线目标估计基础模型 | CVPR 2026 论文解读

论文信息

项目 内容
标题 Gaze Target Estimation Anywhere with Concepts
作者 Xu Cao, Houze Yang, Vipin Gunda, Zhongyi Zhou, Tianyu Xu, Adarsh Kowdle, Inki Kim, James M. Rehg
会议 CVPR 2026
链接 arXiv:2608.11367
代码 GitHub: IrohXu/GazeAnywhere
模型权重 HuggingFace: IrohXu/GazeAnywhere
数据集 Gaze-Co (120K 标注图像对)

核心创新

GazeAnywhere 首次提出 Promptable Gaze Target Estimation (PGE) 任务:通过自然语言或视觉提示指定 gaze 分析的对象,端到端完成人物定位 + 视线目标估计。

三大突破:

  1. 消除多阶段流水线 — 不再需要单独的人脸检测/姿态估计步骤
  2. 自然语言提示 — 如”穿红衬衫的男孩”直接指定分析对象
  3. SAM 3 风格基础模型 — 冻结编码器 + Transformer 检测器融合

方法详解

1. 传统方案 vs GazeAnywhere

维度 传统方案 GazeAnywhere
输入 人脸边界框 + 姿态 自然语言/视觉提示
流程 多阶段(检测→裁剪→估计) 端到端
错误传播 ✅ 级联错误 ❌ 无级联
灵活性 需重新训练适配新场景 提示驱动
多人物 需逐个处理 同时处理多人物

2. 架构设计

3. Gaze-Co 数据集

属性 数值
图像对数 120,000
提示标注 4类(外观/位置/动作/姿态)
来源数据集 GazeFollow + VideoAttentionTarget + ChildPlay
基准测试集 8,975 prompted instances

4. 提示类型

1
2
3
4
5
6
7
# 四种提示类型示例
prompts = {
'appearance': "light brown hair girl with blue and white striped shirt",
'position': "person at point [0.52, 0.48]",
'action': "person holding a phone",
'pose': "person facing left"
}

5. 推理代码

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
"""
GazeAnywhere 推理示例

环境: Python 3.12+, PyTorch 2.7+, CUDA 12.6+
"""

# 安装
# pip3 install torch==2.7.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
# pip3 install -r requirements.txt
# pip3 install "git+https://github.com/facebookresearch/detectron2.git@017abbfa5f2c2a2afa045200c2af9ccf2fc6227f#egg=detectron2" --no-build-isolation

# 推理命令
"""
python tools/inference.py \
--config_file configs/gazeanywhere_config.py \
--model_weights /path/to/GazeAnywhere/model.safetensors \
--image_path assets/example.jpg \
--text "light brown hair girl with blue and white striped shirt" \
--save_path visualization.jpg \
--use_dark_inference
"""

# Python API 调用
import torch
from gazeanywhere.config import get_cfg
from gazeanywhere.model import GazeAnywhereModel
from gazeanywhere.utils import load_image, visualize_gaze

# 加载模型
cfg = get_cfg()
cfg.merge_from_file("configs/gazeanywhere_config.py")
model = GazeAnywhereModel(cfg)
model.load_weights("path/to/model.safetensors")
model.eval().cuda()

# 推理
image = load_image("driver_cabin.jpg")
prompt = "driver in the seat"

with torch.no_grad():
output = model.inference(image, prompt)
# output包含:
# - person_location: 人物位置
# - in_frame_prob: 框内/框外概率
# - gaze_heatmap: 64×64 视线热图

visualize_gaze(image, output, save_path="gaze_result.jpg")

6. AnyGaze Agent

GazeAnywhere 还发布了 AnyGaze Agent,将视线估计与 Gemini API 连接,实现自然语言交互式分析:

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
"""
AnyGaze Agent: 视线估计 + LLM 推理

示例交互:
Q: "驾驶员在看哪里?是否分心?"
A: "驾驶员视线偏向右侧中控区域,持续3秒,可能正在操作中控屏幕,
属于视觉分心。建议触发一级警告。"
"""

# AnyGaze Agent 集成示例
class AnyGazeAgent:
def __init__(self, gaze_model, llm_client):
self.gaze = gaze_model
self.llm = llm_client # Gemini API

def analyze(self, image, question):
# 1. 视线估计
gaze_result = self.gaze.inference(image, "driver")

# 2. 提取视线信息
gaze_info = {
'in_frame': gaze_result['in_frame_prob'],
'heatmap_peak': gaze_result['heatmap'].max(),
'peak_location': gaze_result['heatmap'].argmax(),
}

# 3. LLM 推理
context = f"""
驾驶员视线分析:
- 框内概率: {gaze_info['in_frame']:.2f}
- 视线焦点: ({gaze_info['peak_location'] % 64}, {gaze_info['peak_location'] // 64})
- 热图峰值: {gaze_info['heatmap_peak']:.3f}
"""

answer = self.llm.generate(question, context)
return answer

性能对比

模型 类型 多人物 提示驱动 开源 DMS适用性
GazeAnywhere 端到端 ✅ ✅ ✅ ⭐⭐⭐⭐⭐
Gaze-LLE 2D热图 ✅ ❌ ✅ ⭐⭐⭐⭐
L2CS-Net 3D角度 ❌ ❌ ✅ ⭐⭐⭐
Gaze3D 3D矢量 ❌ ❌ ✅ ⭐⭐⭐
ViTGaze Transformer ✅ ❌ ✅ ⭐⭐⭐⭐

IMS 开发启示

1. 对 DMS 视线估计的影响

当前方案 GazeAnywhere 方案 改进
需要人脸检测预处理 端到端,无需预处理 减少级联错误
单人处理 多人同时处理 后排乘员也可分析
固定模型输出 自然语言提示灵活指定 “驾驶员” vs “副驾驶”
需手工校准 自动识别目标 降低部署成本

2. 部署挑战与对策

挑战 原因 对策
模型太大 DINOv3 骨干冻结但检测器仍重 量化 INT8 + 蒸馏
推理延迟 基础模型未优化实时性 降低输入分辨率 640→320
车内场景 训练数据偏室外 补充车内场景微调
多人物 后排乘员部分遮挡 融合 UWB 雷达补全

3. 与 EyeCue 的互补性

维度 EyeCue GazeAnywhere
任务 认知分心二分类 视线目标定位
输入 视频+凝视坐标 单帧+提示
输出 专注/分心 视线热图
会议 IJCAI 2026 CVPR 2026
互补 GazeAnywhere 提供凝视坐标 → EyeCue 做认知分心分类

融合方案: GazeAnywhere 替代 EyeCue 中的外部眼动设备,从 DMS 摄像头直接获取凝视坐标。

4. 与现有 DMS 视线方案对比

方案 精度 多人物 实时性 部署难度
GazeAnywhere SOTA ✅ ⚠️ 需优化 中
L2CS-Net 中 ❌ ✅ <20ms 低
Gaze-LLE (DINOv2) 高 ✅ ⚠️ ~50ms 中
自研方案 可变 需开发 可控 高

总结

GazeAnywhere 代表了视线估计从任务专用模型向基础模型的演进:

  1. SAM 3 风格架构 — 冻结编码器 + 轻量检测器
  2. 提示驱动 — 自然语言指定分析对象
  3. 端到端 — 消除级联错误
  4. 开源开放 — 代码+权重+数据集全部开放
  5. AnyGaze Agent — 连接 LLM 实现交互式分析

对 IMS 团队的建议:

  • 获取 HuggingFace 权重,在车内场景数据上微调
  • 评估推理延迟,目标 <50ms 满足 Euro NCAP 实时要求
  • 与 EyeCue 认知分心方案融合,形成完整的 DMS 管线
  • 关注 GazeAnywhere 1.5(2026年9月发布,更大训练集)

论文来源: arXiv:2608.11367 | 代码: GitHub | 会议: CVPR 2026