Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to define the dataset size as the input to EEGNet model #40

Open
AminHosseiniNejad opened this issue May 24, 2022 · 4 comments
Open

Comments

@AminHosseiniNejad
Copy link

Hello,
I am working on a course project using 4 channels of EEG signals and 256 as sampling rate for BCI application of binary image classification. My training dataset size is 1004256 and my label array is of 1001 size, in which I trimmed 100 epochs of signals in each an image was shown to the user. I can see that the input size is considered as channelssamples in your codes, but I don not know how to reshape the size of the training and test data sets to make compatible with your codes, so I would appreciate it if you could direct me on that. Thank you and looking forward to hearing back from you soon.
Regards
Amin

@okbalefthanded
Copy link

the model assumes the input shape to follow the (Channels x Samples x 1) format, assuming the training size to be you should reshape your data to (N x Channels x Samples x 1) format.

@AminHosseiniNejad
Copy link
Author

Thank you. I have been tuning the network hyperparameters to get good results, but every time the loss and accuracy plots during both training and validation are so fluctuating, like in the attached image, and my accuracy scores for both training and validation are almost 0.5 almost all the time. My device sampling rate is 256 Hz, so I increased both the kernel length and the averaging size in both the blocks 1 and 2 in EEGNet network by twice.
I have been running the training process with a wide variety of number of epochs, from 1000 t0 20000, different batch sizes, and different learning rates, but as I said, every time I get almost the same unrealistic results. Any advices or ideas would be appreciated.
Regards
Amin

output
n

@okbalefthanded
Copy link

Make sure to collect good quality data before any training, although EEGNet is quite robust, It can't work well on too much noisy data. In the preprocessing stage filter the unnecessary frequencies and normalize the data It will help the network.

What type of experiments are you working on ?

@AminHosseiniNejad
Copy link
Author

Thank you for you time answering to my questions. I am using a Muse s headband, having 2 sensors on forehead and 2 sensors behind ears, to build a BCI application for binary image classification as my university course project. I have been trying different ML techniques, but no acceptable success yet. In addition to outliers removal and data normalization, what preprocessing steps would you recommend me to do?
Regards
Amin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants