With the progress of embodied intelligence, emotion recognition based on electroencephalogram has been paid more and more attention by researchers. However, the challenge of low accuracy and strong representation noise in small sample EEG signals remains serious. Thus, a Triplet Attention Transformer (TaFormer) model is proposed based on the 4-dimensional dense representation (4DR) of EEG. It can extract the cross-dimensional shallow features, spatial global dependent features, and temporal long-term dependent features of EEG signals, respectively. By modelling multi-dimensional deep features and multi-feature fusion information based on dual-channel Dynamic Feature Fusion (DFF), important features are retained while less informative redundant features are deleted, and dynamic adaptive multi-feature fusion with high efficiency is achieved for efficient recognition of real emotions. The proposed method achieves excellent classification accuracy of 98.88%, 97.66%, 89.55% and 99.85% under subject-dependent conditions on the datasets of DEAP, SEED, DREAMER and HBUED, respectively. The experimental results show that the efficient fusion of cross-dimensional shallow features, spatial global features and temporal long-term dependent features based on dense representations has a positive effect on emotion recognition.
einops==0.8.1
numpy==1.24.4
scikit_learn==1.3.2
scipy==1.15.3
setproctitle==1.3.3
torch==1.13.1+cu116
torchsummary==1.5
numpy==1.24.4
scikit_learn==1.3.2
scipy==1.15.3
setproctitle==1.3.3
torch==1.13.1+cu116
torchsummary==1.5
pip install -r requirements.txt
python DEAP_TaFormer_DE_a.py
If TaFormer helps your research or work, please cite TaFormer.
If you have any questions, please email imliudecheng@163.com