认知分心检测论文解读:深度学习方法与挑战

前言

认知分心(Cognitive Distraction)是驾驶员监控领域的”圣杯”问题。与视觉分心(看手机)、手动分心(打电话)不同,认知分心发生时,驾驶员的眼睛可能仍在注视道路,但大脑已经”走神”。

Euro NCAP 2026 明确要求 DMS 系统检测认知分心状态,但现有商业化方案普遍存在误检率高、鲁棒性差的问题。


一、认知分心的定义与挑战

1.1 什么是认知分心?

分心类型 定义 可检测特征
视觉分心 眼睛离开道路 视线方向、头部姿态
手动分心 手离开方向盘 手部位置、动作识别
认知分心 大脑”走神” 仅有部分视觉特征

核心挑战: 认知分心发生时,驾驶员可能:

  • 眼睛仍注视道路
  • 头部保持正常姿态
  • 手部无异常动作

1.2 论文核心观点

“While there are different types of distraction (manual, visual, cognitive), cognitive distraction is particularly challenging, being only partially related to visual features detectable through cameras or an eye tracker system.”

— IEEE Journal, 2025


二、论文方法详解

2.1 问题定义

给定时间窗口内的驾驶员视频序列,检测认知分心状态。

输入:

  • 连续帧序列(N帧)
  • 眼动数据(可选)
  • 驾驶行为信号(可选)

输出:

  • 认知分心概率(0-1)
  • 分心等级(轻度/中度/重度)

2.2 核心方法:多时间窗口分析

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
"""
论文核心方法复现:多时间窗口认知分心检测

基于 IEEE 论文:Deep Learning-Based Real-Time Driver Cognitive Distraction Detection
"""

import numpy as np
import torch
import torch.nn as nn
from typing import Tuple, List

class CognitiveDistractionDetector(nn.Module):
"""
认知分心检测模型

核心思想:通过多时间窗口分析,捕捉眼动规律性变化
"""

def __init__(
self,
feature_dim: int = 128,
hidden_dim: int = 256,
num_windows: int = 3,
window_sizes: List[int] = [30, 60, 120] # 1s, 2s, 4s @ 30fps
):
super().__init__()

self.window_sizes = window_sizes
self.num_windows = num_windows

# 多窗口特征提取器
self.window_encoders = nn.ModuleList([
nn.Sequential(
nn.Linear(feature_dim, hidden_dim),
nn.ReLU(),
nn.Dropout(0.3),
nn.Linear(hidden_dim, hidden_dim // 2)
) for _ in range(num_windows)
])

# 时序注意力机制
self.attention = nn.MultiheadAttention(
embed_dim=hidden_dim // 2,
num_heads=4,
dropout=0.2
)

# 分类头
self.classifier = nn.Sequential(
nn.Linear(hidden_dim // 2 * num_windows, 128),
nn.ReLU(),
nn.Dropout(0.3),
nn.Linear(128, 3) # 3类:正常/轻度/重度
)

def extract_window_features(
self,
features: torch.Tensor,
window_size: int
) -> torch.Tensor:
"""
提取时间窗口内的统计特征

Args:
features: (B, T, D) 特征序列
window_size: 窗口大小(帧数)

Returns:
window_feat: (B, D') 窗口特征
"""
B, T, D = features.shape

# 滑动窗口提取
if T >= window_size:
# 取最后 window_size 帧
window = features[:, -window_size:, :]
else:
# 零填充
pad = torch.zeros(B, window_size - T, D, device=features.device)
window = torch.cat([pad, features], dim=1)

# 统计特征
mean_feat = window.mean(dim=1)
std_feat = window.std(dim=1)
max_feat = window.max(dim=1)[0]
min_feat = window.min(dim=1)[0]

# 趋势特征(线性拟合斜率)
time_steps = torch.arange(window_size, device=features.device).float()
time_steps = (time_steps - time_steps.mean()) / (time_steps.std() + 1e-8)

# 简化版趋势:首尾差值
trend = window[:, -1, :] - window[:, 0, :]

# 拼接所有特征
window_feat = torch.cat([mean_feat, std_feat, max_feat, min_feat, trend], dim=-1)

return window_feat

def forward(
self,
features: torch.Tensor,
eye_gaze: torch.Tensor = None
) -> Tuple[torch.Tensor, torch.Tensor]:
"""
前向传播

Args:
features: (B, T, D) 时序特征
eye_gaze: (B, T, 2) 眼动数据(可选)

Returns:
logits: (B, 3) 分类输出
attention_weights: 注意力权重
"""
B, T, D = features.shape

# 多窗口特征提取
window_features = []
for i, window_size in enumerate(self.window_sizes):
# 提取窗口统计特征
raw_feat = self.extract_window_features(features, window_size)
# 编码
encoded_feat = self.window_encoders[i](raw_feat)
window_features.append(encoded_feat)

# 堆叠窗口特征
window_stack = torch.stack(window_features, dim=1) # (B, num_windows, D')

# 时序注意力
attn_output, attn_weights = self.attention(
window_stack, window_stack, window_stack
)

# 展平并分类
flat_feat = attn_output.view(B, -1)
logits = self.classifier(flat_feat)

return logits, attn_weights


# 测试代码
if __name__ == "__main__":
# 模拟数据
batch_size = 4
seq_len = 180 # 6秒 @ 30fps
feature_dim = 128

# 创建模型
model = CognitiveDistractionDetector(feature_dim=feature_dim)

# 模拟输入
features = torch.randn(batch_size, seq_len, feature_dim)

# 前向传播
logits, attn_weights = model(features)

# 输出结果
probs = torch.softmax(logits, dim=-1)
print(f"输入形状: {features.shape}")
print(f"输出形状: {logits.shape}")
print(f"分类概率: {probs}")
print(f"注意力权重形状: {attn_weights.shape}")

2.3 关键发现

论文实验结果:

方法 准确率 召回率 F1-score
单时间窗口 78.3% 74.2% 76.2%
多时间窗口 85.6% 82.1% 83.8%
+ 眼动数据 89.2% 86.5% 87.8%
+ 注意力机制 91.5% 89.3% 90.4%

三、眼动规律性特征

3.1 核心洞察

认知分心时,眼动模式会发生微妙变化:

特征 正常驾驶 认知分心
扫视频率 高(2-4次/秒) 低(<2次/秒)
注视时长 短(<0.5秒) 长(>1秒)
扫视幅度 大(覆盖道路) 小(凝视一点)
眨眼频率 正常(15-20次/分) 降低(<10次/分)

3.2 PERCLOS 指标的局限性

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def calculate_perclos_limitation():
"""
PERCLOS 指标的局限性

PERCLOS 只能检测疲劳(闭眼),无法检测认知分心
"""

# 正常驾驶场景
normal_eye_openness = [0.8, 0.9, 0.85, 0.88, 0.9] # 眼睛开度

# 认知分心场景(眼睛仍然睁开)
distracted_eye_openness = [0.85, 0.87, 0.86, 0.84, 0.85]

# PERCLOS 计算结果
perclos_normal = sum(x < 0.2 for x in normal_eye_openness) / len(normal_eye_openness)
perclos_distracted = sum(x < 0.2 for x in distracted_eye_openness) / len(distracted_eye_openness)

print(f"正常驾驶 PERCLOS: {perclos_normal * 100:.1f}%") # 0%
print(f"认知分心 PERCLOS: {perclos_distracted * 100:.1f}%") # 0%
print("\n结论:PERCLOS 无法区分认知分心!")

3.3 需要的高级特征

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
def extract_cognitive_features(gaze_data: np.ndarray) -> dict:
"""
提取认知分心相关特征

Args:
gaze_data: (N, 2) 眼动数据,归一化坐标

Returns:
features: 特征字典
"""

# 1. 扫视频率(Saccade Frequency)
gaze_diff = np.diff(gaze_data, axis=0)
saccade_threshold = 0.05 # 归一化坐标阈值
saccade_count = np.sum(np.linalg.norm(gaze_diff, axis=1) > saccade_threshold)
saccade_freq = saccade_count / len(gaze_data) * 30 # Hz

# 2. 注视时长分布(Fixation Duration)
fixation_mask = np.linalg.norm(gaze_diff, axis=1) < saccade_threshold
fixation_durations = []
current_duration = 0
for is_fixation in fixation_mask:
if is_fixation:
current_duration += 1
else:
if current_duration > 0:
fixation_durations.append(current_duration / 30) # 秒
current_duration = 0

mean_fixation = np.mean(fixation_durations) if fixation_durations else 0

# 3. 扫视幅度(Saccade Amplitude)
saccade_amplitudes = np.linalg.norm(gaze_diff, axis=1)[
np.linalg.norm(gaze_diff, axis=1) > saccade_threshold
]
mean_saccade_amp = np.mean(saccade_amplitudes) if len(saccade_amplitudes) > 0 else 0

# 4. 凝视熵(Gaze Entropy)
# 将视野划分为网格,计算熵
grid_size = 10
hist, _ = np.histogramdd(gaze_data, bins=grid_size)
hist = hist.flatten()
hist = hist / hist.sum()
hist = hist[hist > 0] # 移除零值
gaze_entropy = -np.sum(hist * np.log2(hist))

# 5. 规律性指数(Regularity Index)
# 自相关系数
autocorr = np.correlate(gaze_data[:, 0], gaze_data[:, 0], mode='full')
autocorr = autocorr[len(autocorr)//2:]
regularity_index = autocorr[1] / autocorr[0] if autocorr[0] > 0 else 0

return {
'saccade_freq': saccade_freq,
'mean_fixation': mean_fixation,
'mean_saccade_amp': mean_saccade_amp,
'gaze_entropy': gaze_entropy,
'regularity_index': regularity_index
}


# 测试
if __name__ == "__main__":
# 模拟正常驾驶眼动(高频扫视)
np.random.seed(42)
normal_gaze = np.random.rand(180, 2) # 6秒 @ 30fps

# 模拟认知分心眼动(凝视一点)
distracted_gaze = np.random.randn(180, 2) * 0.05 + 0.5

normal_features = extract_cognitive_features(normal_gaze)
distracted_features = extract_cognitive_features(distracted_gaze)

print("正常驾驶特征:")
for k, v in normal_features.items():
print(f" {k}: {v:.3f}")

print("\n认知分心特征:")
for k, v in distracted_features.items():
print(f" {k}: {v:.3f}")

四、Euro NCAP 2026 要求

4.1 测试场景

Euro NCAP 2026 DSM 协议定义的认知分心测试场景:

场景编号 描述 检测要求
CD-01 深度思考(心算任务) ≤10秒检测
CD-02 白日梦(凝视道路) ≤15秒检测
CD-03 通话中认知负荷 ≤5秒检测

4.2 评分标准

评分项 权重 通过条件
眼动追踪 30% 连续追踪 ≥90% 时间
认知分心检测 20% 检测率 ≥80%
误报率 20% 误报率 ≤5%
响应时间 30% 检测时延 ≤10秒

五、IMS 开发启示

5.1 技术路线选择

方案 优点 缺点 推荐度
纯视觉 成本低、易部署 准确率低 ⭐⭐
视觉 + 眼动仪 准确率高 成本高 ⭐⭐⭐⭐
多模态融合 准确率最高 复杂度高 ⭐⭐⭐⭐⭐

5.2 具体建议

短期(Euro NCAP 2026 合规):

  1. 实现基础眼动追踪(PERCLOS + 视线方向)
  2. 添加简单认知分心检测(基于凝视时长和扫视频率)
  3. 确保误报率 <5%

中长期(技术迭代):

  1. 引入多时间窗口分析
  2. 训练深度学习模型(需标注数据)
  3. 探索生理信号融合(方向盘压力、踏板模式)

5.3 数据集需求

数据类型 数量 来源
正常驾驶 10,000+ 小时 实车采集
认知分心(标注) 1,000+ 小时 实验室采集
眼动数据 500+ 小时 专业眼动仪

六、开源资源

6.1 相关论文

论文 会议/期刊 链接
Deep Learning-Based Real-Time Driver Cognitive Distraction Detection IEEE TITS 2025 IEEE Xplore
Keeping Drivers Focused: A Deep Learning Model for Driver Distraction Detection arXiv 2024 ResearchGate

6.2 开源数据集

数据集 描述 链接
State Farm Distracted Driver 10类分心行为 Kaggle
DMD (Driver Monitoring Dataset) 多模态驾驶数据 GitHub

总结

认知分心检测是 DMS 领域的前沿难题,关键要点:

  1. 核心挑战: 认知分心仅有部分视觉特征,传统 PERCLOS 方法失效
  2. 解决思路: 多时间窗口分析 + 眼动规律性特征 + 深度学习
  3. Euro NCAP 要求: 2026 年强制检测,检测率 ≥80%,误报率 ≤5%
  4. IMS 建议: 短期实现基础检测,中长期引入多模态融合

参考论文:

  1. Deep Learning-Based Real-Time Driver Cognitive Distraction Detection, IEEE TITS, 2025
  2. Integrated deep learning framework for driver distraction detection, Nature Scientific Reports, 2025

Euro NCAP 官方文档:


认知分心检测论文解读:深度学习方法与挑战
https://dapalm.com/2026/04/20/2026-04-20-cognitive-distraction-detection/
作者
Mars
发布于
2026年4月20日
许可协议