有关校正的代码和详细的实验,请参阅https://github.com/neuspeech/eeg-to-text。为了避免进一步的混乱,我们存档了此存储库。
运行conda env create -f environment.yml以创建实验中使用的conda环境(名为“ eegtotext”)。
.mat文件移至~/datasets/ZuCo/task1-SR/Matlab_files , ~/datasets/ZuCo/task2-NR/Matlab_files , ~/datasets/ZuCo/task3-TSR/Matlab_files 。.mat文件移至~/datasets/ZuCo/task2-NR-2.0/Matlab_files 。 运行bash ./scripts/prepare_dataset.sh /prepare_dataset.sh将其运行到preprocess .mat文件并准备情感标签。
对于每个任务,所有.mat文件将被转换为一个存储在~/datasets/ZuCo/<task_name>/<task_name>-dataset.pickle中的.pickle文件。
Zuco( sentiment_labels.json )的情感数据集将存储在~/datasets/ZuCo/task1-SR/sentiment_labels/sentiment_labels.json中。
过滤的斯坦福情绪树木银行的情感数据集将存储在~/datasets/stanfordsentiment/ternary_dataset.json中
要训练脑电图解码模型,请运行bash ./scripts/train_decoding.sh 。
为了评估训练有素的脑电图对文本解码模型,请运行bash ./scripts/eval_decoding.sh 。
有关可用参数的详细配置,请参阅/config.py中的函数get_config(case = 'train_decoding')
我们首先分别训练解码器和分类器,然后评估PILELINE的Zuco Task1-SR数据。
要运行整个培训和评估过程,请运行bash ./scripts/train_eval_zeroshot_pipeline.sh 。
有关可用参数的详细配置,请参阅/config.py中的函数get_config(case = 'eval_sentiment')
@inproceedings{wang2022open,
title={Open vocabulary electroencephalography-to-text decoding and zero-shot sentiment classification},
author={Wang, Zhenhailong and Ji, Heng},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={36},
number={5},
pages={5350--5358},
year={2022}
}