有關校正的代碼和詳細的實驗,請參閱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}
}