This repository contains the official implementation of the AWRP encoding process from the paper:
"Enhancing EEG-Based Emotion Recognition Using Asymmetric Windowing Recurrence Plots"
Published in IEEE Access, 2024
DOI: 10.1109/ACCESS.2024.3409384
AWRP_encoding_DEAP.py
: AWRP generator for the DEAP dataset (32 subjects, 40 trials each, 32 channels).AWRP_encoding_SEED_sub1.py
: AWRP generator for subject 1 of the SEED dataset (15 trials, 64 channels).
This implementation converts EEG signals into Asymmetric Windowing Recurrence Plots (AWRPs) by:
- Segmenting EEG signals into fixed-length windows.
- Generating recurrence plots (RPs) from each segment.
- Combining adjacent RPs into averaged RPs (ARPs).
- Arranging ARPs into a 2D image grid to form the final AWRP.
- Saving AWRPs as
.png
images per subject-trial-channel.
- Python 3.8+
- NumPy
- SciPy
- Matplotlib
- OpenCV (
cv2
) - pyts
- Pillow
- psutil
Install with:
pip install numpy scipy matplotlib opencv-python pyts pillow psutil
For DEAP dataset (32 subjects):
python AWRP_encoding_DEAP.py
For SEED dataset (subject 1 only):
python AWRP_encoding_SEED_sub1.py
π§ Note: The SEED script is tailored for subject 1. To process other subjects, trial key names (
djc_eegX
) must be updated accordingly based on the SEED dataset's structure.
- AWRPs are saved as
.png
images in folders:AWRP_DEAP_8/
AWRP_SEED_8/
- Timing and memory usage logs are written to:
avg_time-memory_usage_AWRP_8.txt
If you use this code, please cite our paper:
@article{prabowo2024,
author = {Wahyu Prabowo, Dwi and Akhmad Setiawan, Noor and Debayle, Johan and Nugroho, Hanung Adi},
journal = {IEEE Access},
title = {Enhancing EEG-Based Emotion Recognition Using Asymmetric Windowing Recurrence Plots},
year = {2024},
volume = {12},
doi = {10.1109/ACCESS.2024.3409384}
}
This code is for academic use only. For other purposes, please contact the authors.