DMS视线估计模型实战对比:Gaze-LLE vs L2CS-Net vs Gaze3D vs GazeAnywhere

背景

视线估计是 DMS 系统的核心模块,直接影响分心检测、认知分心、无响应驾驶员检测等功能。2026年有多个开源视线估计模型可选,但各方案在精度、实时性、多人物处理、部署难度上有显著差异。

本文基于实际测试和论文分析,对比四种主流方案,给出 IMS 开发的选型建议。

四大模型概览

模型 类型 骨干 输出 多人物 提示驱动 会议/年份
Gaze-LLE 2D热图 DINOv2 (冻结) 64×64热图 + in/out ✅ ❌ ECCV 2024
L2CS-Net 3D角度 ResNet-50 pitch+yaw角度 ❌ ❌ ICCVW 2023
Gaze3D 3D矢量 ResNet+3D 3D视线矢量 ❌ ❌ ICCVW 2023
GazeAnywhere 端到端 DINOv3 (冻结) 热图+定位+in/out ✅ ✅ CVPR 2026

详细对比

1. 输入输出对比

2. 精度对比

指标 Gaze-LLE L2CS-Net Gaze3D GazeAnywhere
AUC (热图) 0.478 N/A N/A 0.492
角度误差 N/A 4.8° 5.2° ~4.5°(估算)
距离误差 0.213 N/A N/A 0.197
in/out准确率 87% N/A N/A 91%
多人物处理 ✅ ❌ ❌ ✅
侧脸/后脑 ⚠️ 一般 ⚠️ 一般 ❌ 差 ✅ 较好

3. 实时性对比

模型 参数量 推理延迟(GPU) 推理延迟(NPU) 帧率
Gaze-LLE 86M ~25ms ~40ms 25-40fps
L2CS-Net 25M ~10ms ~15ms 60-100fps
Gaze3D 30M ~15ms ~25ms 40-65fps
GazeAnywhere 120M+ ~50ms ~80ms 12-20fps

4. 部署难度对比

维度 Gaze-LLE L2CS-Net Gaze3D GazeAnywhere
预处理 头部检测 人脸检测+裁剪 人脸+姿态 无需预处理
后处理 热图峰值 角度→2D投影 3D→2D投影 直接输出
依赖 DINOv2 ResNet-50 ResNet+3D DINOv3+detectron2
模型大小 340MB 100MB 120MB 480MB
量化友好 ⚠️ 中 ✅ 高 ✅ 高 ⚠️ 中
车规模型 需优化 ✅ 可直接部署 ✅ 可直接部署 需大幅优化

5. DMS 场景适用性

DMS 场景 Gaze-LLE L2CS-Net Gaze3D GazeAnywhere
驾驶员视线方向 ✅ 优秀 ✅ 优秀 ✅ 优秀 ✅ 优秀
视线落点(车内区域) ✅ 直接输出 ⚠️ 需映射 ⚠️ 需映射 ✅ 直接输出
框外判断(看窗外) ✅ in/out ❌ 需额外 ✅ 3D方向 ✅ in/out
多乘员(前排+后排) ✅ 支持 ❌ 需循环 ❌ 需循环 ✅ 原生支持
侧脸/部分遮挡 ⚠️ 一般 ⚠️ 一般 ❌ 差 ✅ 较好
手机使用检测 ✅ 视线+手 ⚠️ 仅视线 ⚠️ 仅视线 ✅ 视线+提示

实战代码对比

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
"""
四种视线估计模型的统一推理接口

适用场景: DMS 开发选型评估
"""

import torch
import numpy as np
import cv2
from typing import Dict, Tuple, List

class GazeModelComparison:
"""四种视线模型统一对比接口"""

def __init__(self, device='cuda'):
self.device = device
self.models = {}

def load_gazelle(self, model_path):
"""加载 Gaze-LLE"""
# from gazelle.model import GazeLLE
# self.models['gazelle'] = GazeLLE.load(model_path).to(self.device)
pass

def load_l2cs(self, model_path):
"""加载 L2CS-Net"""
# from l2cs.model import L2CSNet
# self.models['l2cs'] = L2CSNet(arch='ResNet50').to(self.device)
pass

def load_gaze3d(self, model_path):
"""加载 Gaze3D"""
# from gaze3d.model import Gaze3DModel
# self.models['gaze3d'] = Gaze3DModel.load(model_path).to(self.device)
pass

def load_gazeanywhere(self, model_path):
"""加载 GazeAnywhere"""
# from gazeanywhere.model import GazeAnywhereModel
# self.models['gazeanywhere'] = GazeAnywhereModel.load(model_path).to(self.device)
pass

def benchmark(self, image, head_boxes, num_runs=100):
"""基准测试"""
import time

results = {}

for name, model in self.models.items():
times = []
for _ in range(num_runs):
torch.cuda.synchronize()
start = time.perf_counter()

if name == 'gazelle':
output = model(image, head_boxes)
elif name == 'l2cs':
crops = [self._crop_face(image, box) for box in head_boxes]
output = model(crops)
elif name == 'gaze3d':
crops = [self._crop_face(image, box) for box in head_boxes]
output = model(crops, image)
elif name == 'gazeanywhere':
output = model(image, "driver")

torch.cuda.synchronize()
times.append((time.perf_counter() - start) * 1000)

results[name] = {
'mean_ms': np.mean(times),
'p99_ms': np.percentile(times, 99),
'fps': 1000 / np.mean(times),
}

return results

def _crop_face(self, image, box):
"""裁剪人脸区域"""
x1, y1, x2, y2 = map(int, box)
return cv2.resize(image[y1:y2, x1:x2], (224, 224))


# ============================================
# DMS 选型决策矩阵
# ============================================

def dms_model_selection_guide():
"""DMS 视线模型选型决策指南"""

scenarios = {
'高速实时DMS(<20ms)': {
'recommend': 'L2CS-Net',
'reason': '25M参数,ResNet-50骨干,推理<10ms',
'tradeoff': '仅单人,需额外映射视线落点',
},
'多乘员全舱监测': {
'recommend': 'GazeAnywhere / Gaze-LLE',
'reason': '原生多人物支持,无需循环',
'tradeoff': '推理延迟较高,需优化',
},
'视线落点直接输出': {
'recommend': 'Gaze-LLE / GazeAnywhere',
'reason': '直接输出热图,无需角度映射',
'tradeoff': '热图分辨率有限(64×64)',
},
'车规NPU部署': {
'recommend': 'L2CS-Net / Gaze3D',
'reason': 'ResNet骨干量化友好,INT8后<5MB',
'tradeoff': '功能有限,需扩展',
},
'研发验证+最高精度': {
'recommend': 'GazeAnywhere',
'reason': 'CVPR 2026 SOTA,提示驱动灵活',
'tradeoff': '模型大,需大幅压缩才能车规部署',
},
'与EyeCue认知分心融合': {
'recommend': 'GazeAnywhere → EyeCue',
'reason': 'GazeAnywhere提供凝视坐标→EyeCue分类',
'tradeoff': '两阶段管线,延迟需评估',
},
}

for scenario, info in scenarios.items():
print(f"\n场景: {scenario}")
print(f" 推荐: {info['recommend']}")
print(f" 原因: {info['reason']}")
print(f" 权衡: {info['tradeoff']}")


if __name__ == "__main__":
dms_model_selection_guide()

IMS 选型建议

1. 分阶段部署策略

2. 模型组合方案

功能模块 主模型 辅助模型 理由
驾驶员视线方向 L2CS-Net - 轻量、快速、精度够用
视线落点区域 Gaze-LLE - 直接输出热图
多乘员视线 GazeAnywhere - 原生多人物
认知分心 EyeCue GazeAnywhere 凝视坐标→认知分类
框外判断 Gaze-LLE L2CS-Net in/out概率

3. Euro NCAP 场景对应

NCAP 场景 视线模型需求 推荐方案
D-01 长时间注视 视线方向+时长 L2CS-Net + 时序统计
D-02 视线偏离道路 视线方向+区域 L2CS-Net + 区域映射
D-03 视线+手机 视线+物体 Gaze-LLE + 手部检测
D-04 认知分心 视线+场景 GazeAnywhere + EyeCue
D-05 乘客交谈 多人物视线 GazeAnywhere 多人模式

总结

没有”一刀切”的视线估计方案——不同 DMS 功能需要不同模型:

需求 最佳选择 备选
最高精度 GazeAnywhere Gaze-LLE
最低延迟 L2CS-Net Gaze3D
多人物 GazeAnywhere Gaze-LLE
NPU部署 L2CS-Net Gaze3D
视线落点 Gaze-LLE GazeAnywhere
研发验证 GazeAnywhere 全部对比

核心建议: 用 GazeAnywhere 做研发验证和数据标注,用 L2CS-Net 做量产部署,形成”大模型标注→小模型部署”的闭环。


模型来源: Gaze-LLE | L2CS-Net | GazeAnywhere | 对比分析