Set of models for attention estimation from EEG: transformer EEG, RNN and resnet based CNN.
The three proposed models are direcly available in models.py:
- Transformer based approach as described in the paper MultiTransformer.ipynb.
- Multi dimensional RNN MultiTransformer.ipynb.
- Resnet based CNN CNN_EEG.ipynb.
The considered inputs for the two considered datasets are proposed in the corresponding directory (car for the driving EEG dataset and phydaa for name related dataset). The file feature file for the first dataset being too voluminous and in a concern of reproducibility, we provide also the preprocessing scripts to extract the differential entropy feature matrices (preprocessing/). For the CNN approach, it is necessary to first generate the image by running CNN_EEG.ipynb for the first time.
During the training, the metrics evolution are reported in runs directory with tensorboard (https://www.tensorflow.org/tensorboard/) and the final training results are saved in res/.
Due to issues with limited size for files in github. Feature map examples have been published on Figshare, to proceed the code download them and placed them in the corresponding directory depending on the dataset. More it is necessary to approve the License from each considered datasets. For other analysis please refer to both datasets:
- PhyDAA Paper - Download Link
- Sustained Attention during Driving Task Paper - Download Link
Installation with pip: pip install -r requirement.txt
Import of the environment with conda: conda env create -f environment.yml
If you are interested in our work, don't hesitate to contact us.
Wish you the best in your research projects!