基于EEG的驾驶员疲劳检测:信号处理与分类方法

EEG 疲劳检测方法

背景

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
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
import numpy as np
from scipy import signal

class EEGFatigueDetector:
"""EEG 疲劳检测器"""

def __init__(self, fs: int = 256):
self.fs = fs
self.bands = {
'delta': (0.5, 4),
'theta': (4, 8),
'alpha': (8, 13),
'beta': (13, 30),
'gamma': (30, 50)
}

def extract_features(self, eeg_signal: np.ndarray) -> dict:
"""
提取频域特征

Args:
eeg_signal: EEG 信号 (channels, time)

Returns:
features: 频带功率比
"""
features = {}

for band_name, (low, high) in self.bands.items():
# 带通滤波
sos = signal.butter(4, [low, high], btype='band', fs=self.fs, output='sos')
filtered = signal.sosfiltfilt(sos, eeg_signal, axis=1)

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

# 疲劳指标:theta/alpha 比值
features['fatigue_index'] = (
features['theta_power'] / (features['alpha_power'] + 1e-6)
)

return features

def classify_fatigue(self, features: dict) -> str:
"""分类疲劳等级"""
fatigue_index = features['fatigue_index'].mean()

if fatigue_index > 2.0:
return 'severe_fatigue'
elif fatigue_index > 1.5:
return 'mild_fatigue'
else:
return 'alert'

总结

EEG 提供高精度疲劳检测,但接触式传感器限制车载应用。


参考链接:


基于EEG的驾驶员疲劳检测:信号处理与分类方法
https://dapalm.com/2026/07/24/2026-07-24-eeg-based-fatigue-detection/
作者
Mars
发布于
2026年7月24日
许可协议