dongyangli-del / EEG_Image_decode

Using vision-language models to decode natural image perception from non-invasive brain recordings.
MIT License
78 stars 15 forks source link

EEG data extract dimension mismatch #1

Closed jonxuxu closed 5 months ago

jonxuxu commented 6 months ago

Thanks for creating this project! Upon trying to run ATM_S_insubject_retrieval.py, in the extract_eeg function the mask is size 50 while the eeg_data is size 100:

https://github.com/dongyangli-del/EEG_Image_decode/blob/cc44779fed59cf87edc8682ec6d74f44240cc91a/Retrieval/eegdatasets_leaveone.py#L294 *** IndexError: The shape of the mask [50] at index 0 does not match the shape of the indexed tensor [66160, 17, 100] at index 2

Is there a reason you only take the last 50 time points when reading the data? times = torch.from_numpy(data.item()['times']).detach()[50:] As seen in https://github.com/dongyangli-del/EEG_Image_decode/blob/cc44779fed59cf87edc8682ec6d74f44240cc91a/Retrieval/eegdatasets_leaveone.py#L165

dongyangli-del commented 6 months ago

@jonxuxu Hello, thank you for your question. We have noticed that you are using the preprocessed data of THING-EEG data set. Considering that the preprocessing methods of THING-EEG are different from ours, please use our preprocessing code to process the raw data. . Or use the Baidu cloud disk link we provided in the readme file.

jonxuxu commented 6 months ago

Thank you, I will try that! If you ever plan on uploading to another cloud host that would be great - we cannot download from Baidu cloud without a BaiduNetDisk account, which requires a Chinese phone number and for us to register inside China.

dongyangli-del commented 6 months ago

@jonxuxu We are trying to upload the dataset used by the entire project to osf.io and update the osf project ID in the readme file, which will be available later today.