认知分心检测:EEG+眼动融合的驾驶员内部状态监测方案

认知分心检测:EEG+眼动融合的驾驶员内部状态监测方案

论文来源: Frontiers in Neuroergonomics 2025
核心方法: EEG脑电+眼动追踪融合
检测指标: theta/alpha频段能量、眼动熵值


认知分心:DMS最难检测的状态

与视觉分心不同,认知分心发生在驾驶员视线仍在道路但注意力分散的情况:

  • 思考工作问题
  • 情绪波动
  • 疲劳初期
  • 通话中(免提)

传统DMS无法检测认知分心,因为驾驶员的眼睛可能仍在看前方。


论文核心贡献

1. EEG特征与认知状态

EEG频段 频率范围 认知状态关联
Delta 0.5-4 Hz 深度睡眠
Theta 4-8 Hz 认知负荷、疲劳
Alpha 8-12 Hz 放松、注意力下降
Beta 12-30 Hz 活跃思维
Gamma 30-100 Hz 高级认知

关键发现:

  • 额叶theta能量增加 → 认知负荷升高
  • 顶枕叶alpha能量增加 → 注意力下降
  • theta/alpha比值 → 认知分心敏感指标

2. 眼动特征与认知分心

眼动指标 正常驾驶 认知分心
扫视频率 3-5次/秒 1-2次/秒(减少)
凝视熵值 0.8-1.0 0.3-0.5(降低)
后视镜检查 每分钟3-5次 每分钟0-1次(减少)
视野范围 广泛 狭窄(隧道效应)

核心发现:认知分心导致眼动变得”僵硬”和”规律”


融合检测方法

架构图

graph TD
    A[EEG传感器] --> B[频段能量提取]
    C[眼动追踪] --> D[眼动熵值计算]
    B --> E[特征融合]
    D --> E
    E --> F[深度学习分类器]
    F --> G{认知状态}
    G -->|正常| H[继续监测]
    G -->|分心| I[警告提醒]

实现代码

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
"""
EEG+眼动融合的认知分心检测
"""
import numpy as np
from scipy import signal
from typing import Tuple

class CognitiveDistractionDetector:
"""认知分心检测器"""

def __init__(self, fs_eeg: int = 256, fs_eye: int = 60):
"""
初始化检测器

Args:
fs_eeg: EEG采样率
fs_eye: 眼动采样率
"""
self.fs_eeg = fs_eeg
self.fs_eye = fs_eye

# EEG频段定义
self.freq_bands = {
'theta': (4, 8),
'alpha': (8, 12),
'beta': (12, 30)
}

def extract_eeg_features(self, eeg_data: np.ndarray) -> dict:
"""
从EEG信号提取频段特征

Args:
eeg_data: EEG数据 (channels, samples)

Returns:
features: 频段能量特征
"""
features = {}

for band_name, (f_low, f_high) in self.freq_bands.items():
# 带通滤波
sos = signal.butter(4, [f_low, f_high],
btype='band', fs=self.fs_eeg, output='sos')
filtered = signal.sosfiltfilt(sos, eeg_data, axis=1)

# 计算能量
power = np.mean(filtered ** 2, axis=1)
features[f'{band_name}_power'] = power

# 计算theta/alpha比值(认知分心敏感指标)
features['theta_alpha_ratio'] = (
features['theta_power'] / (features['alpha_power'] + 1e-6)
)

return features

def extract_eye_features(self, gaze_data: np.ndarray) -> dict:
"""
从眼动数据提取熵值特征

Args:
gaze_data: 凝视数据 (samples, 2) - (x, y)坐标

Returns:
features: 眼动特征
"""
# 1. 计算扫视速度
velocity = np.diff(gaze_data, axis=0)
speed = np.sqrt(velocity[:, 0]**2 + velocity[:, 1]**2)

# 2. 计算凝视熵值(Stationary Gaze Entropy)
# 熵值降低表示眼动变得规律(认知分心标志)
gaze_entropy = self._calculate_gaze_entropy(gaze_data)

# 3. 计算空间分布熵
spatial_entropy = self._calculate_spatial_entropy(gaze_data)

# 4. 扫视频率
saccade_count = self._count_saccades(speed)
saccade_rate = saccade_count / (len(gaze_data) / self.fs_eye)

return {
'gaze_entropy': gaze_entropy,
'spatial_entropy': spatial_entropy,
'saccade_rate': saccade_rate,
'mean_speed': np.mean(speed)
}

def _calculate_gaze_entropy(self, gaze_data: np.ndarray) -> float:
"""计算凝视熵值"""
# 离散化凝视位置
bins = 20
x_bins = np.linspace(0, 1, bins + 1)
y_bins = np.linspace(0, 1, bins + 1)

# 计算直方图
hist, _ = np.histogramdd(gaze_data, bins=[x_bins, y_bins])

# 归一化为概率
prob = hist.flatten() / hist.sum()

# 计算熵
entropy = -np.sum(prob * np.log2(prob + 1e-10))

return entropy

def _calculate_spatial_entropy(self, gaze_data: np.ndarray) -> float:
"""计算空间分布熵"""
# 使用2D网格计算空间覆盖度
grid_size = 10
grid = np.zeros((grid_size, grid_size))

# 映射到网格
x_idx = np.clip(gaze_data[:, 0] * grid_size, 0, grid_size - 1).astype(int)
y_idx = np.clip(gaze_data[:, 1] * grid_size, 0, grid_size - 1).astype(int)

grid[x_idx, y_idx] = 1

# 计算覆盖比例(熵的近似)
coverage = np.sum(grid) / (grid_size * grid_size)

return coverage

def _count_saccades(self, speed: np.ndarray,
threshold: float = 100.0) -> int:
"""计算扫视次数"""
saccades = speed > threshold
saccade_count = np.sum(np.diff(saccades.astype(int)) > 0)
return saccade_count

def detect_distraction(self, eeg_data: np.ndarray,
gaze_data: np.ndarray) -> dict:
"""
检测认知分心

Args:
eeg_data: EEG数据 (channels, samples)
gaze_data: 凝视数据 (samples, 2)

Returns:
result: 检测结果
"""
# 提取特征
eeg_features = self.extract_eeg_features(eeg_data)
eye_features = self.extract_eye_features(gaze_data)

# 认知分心判定
# 1. theta/alpha比值升高
theta_alpha_high = eeg_features['theta_alpha_ratio'] > 1.5

# 2. 凝视熵值降低
gaze_entropy_low = eye_features['gaze_entropy'] < 2.0

# 3. 扫视频率降低
saccade_rate_low = eye_features['saccade_rate'] < 2.0

# 综合判定
is_distracted = theta_alpha_high and (gaze_entropy_low or saccade_rate_low)

return {
'is_distracted': is_distracted,
'theta_alpha_ratio': eeg_features['theta_alpha_ratio'],
'gaze_entropy': eye_features['gaze_entropy'],
'saccade_rate': eye_features['saccade_rate'],
'confidence': self._calculate_confidence(
eeg_features, eye_features
)
}

def _calculate_confidence(self, eeg_features: dict,
eye_features: dict) -> float:
"""计算检测置信度"""
# 基于多特征一致性计算置信度
scores = []

# theta/alpha比值偏离程度
scores.append(min(eeg_features['theta_alpha_ratio'] / 2.0, 1.0))

# 熵值偏离程度
scores.append(min(2.5 / (eye_features['gaze_entropy'] + 0.1), 1.0))

return np.mean(scores)


# 测试代码
if __name__ == "__main__":
# 模拟数据
np.random.seed(42)
eeg_data = np.random.randn(14, 2560) # 14通道,10秒
gaze_data = np.random.rand(600, 2) # 600个采样点,10秒

detector = CognitiveDistractionDetector()
result = detector.detect_distraction(eeg_data, gaze_data)

print(f"认知分心检测: {result['is_distracted']}")
print(f"置信度: {result['confidence']:.2f}")
print(f"theta/alpha比值: {result['theta_alpha_ratio']:.2f}")
print(f"凝视熵值: {result['gaze_entropy']:.2f}")

量产化挑战

1. EEG传感器限制

挑战 传统EEG 车载方案
电极数量 32-64通道 1-4通道(耳EEG)
佩戴方式 医用帽 座椅集成/耳机
信号质量 易受噪声干扰
成本 $1000+ <$50

解决方案:耳EEG(Ear-EEG)

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
class EarEEGProcessor:
"""耳EEG处理"""

def __init__(self):
# 仅使用少量通道
self.channels = ['left_ear', 'right_ear']

def extract_features(self, ear_eeg: np.ndarray) -> dict:
"""
从耳EEG提取特征

Args:
ear_eeg: 耳EEG数据 (2, samples)

Returns:
features: 提取的特征
"""
# 差分信号(左右耳)
diff_signal = ear_eeg[0] - ear_eeg[1]

# 频带能量
theta_power = self._band_power(diff_signal, 4, 8)
alpha_power = self._band_power(diff_signal, 8, 12)

return {
'theta_power': theta_power,
'alpha_power': alpha_power,
'theta_alpha_ratio': theta_power / (alpha_power + 1e-6)
}

2. 眼动追踪替代方案

当驾驶员视线在道路时,眼动特征可能不够明显。

替代指标:

指标 检测方法 适用性
后视镜检查 视线落点检测 需后视镜标注
驾驶行为 方向盘/踏板数据 间接指标
反应时间 事件响应延迟 需要场景触发

IMS开发启示

技术路线

graph LR
    A[现有DMS] --> B[眼动熵值检测]
    B --> C[认知分心初筛]
    C --> D[EEG辅助确认]
    D --> E[高置信度警告]

优先级排序

优先级 功能 原因
P0 眼动熵值计算 无需额外硬件
P0 后视镜检查频率 高可靠指标
P1 驾驶行为融合 低成本辅助
P2 耳EEG集成 高成本,长期规划

测试场景清单

场景编号 场景描述 通过条件
COG-01 正常驾驶(专注) 不误报
COG-02 思考复杂问题 检测准确率>70%
COG-03 情绪波动 检测准确率>60%
COG-04 通话中(免提) 检测准确率>80%
COG-05 疲劳vs认知分心区分 区分准确率>70%

总结

认知分心检测的核心要点:

  1. EEG特征:theta/alpha比值是敏感指标
  2. 眼动特征:熵值降低表示眼动”僵硬”
  3. 融合方案:多模态提高检测置信度
  4. 量产挑战:耳EEG是可行方案

IMS开发建议:优先实现眼动熵值检测,作为认知分心的初级筛查;长期规划EEG传感器集成。


参考论文:

  • Frontiers in Neuroergonomics 2025: “Combining EEG and eye-tracking for cognitive monitoring”
  • bioRxiv 2026: “Predicting driver distraction using single channel ear EEG”

认知分心检测:EEG+眼动融合的驾驶员内部状态监测方案
https://dapalm.com/2026/07/29/2026-07-29-cognitive-distraction-detection-eeg-eye-movement/
作者
Mars
发布于
2026年7月29日
许可协议