This repository contains the code for classifying neurodegenerative diseases (NDDs) from EEG signals using Convolutional Neural Networks (CNNs). The code is written in Python and uses the PyTorch library. The dataset used in this project is the A dataset of EEG recordings from: Alzheimer's disease, Frontotemporal dementia and Healthy subjects from OpenNeuro.
- Python 3.6+
- PyTorch 1.7.0+ (with CUDA support)
- NumPy
- Matplotlib
- Scikit-learn
- MNE (with CUDA support)
- tqdm
- Pandas
- Seaborn
Files in the repository root:
data_prep.py
: Contains code for loading and preprocessing the EEG data.data_vis.py
: Contains code for visualizing the EEG data.eeg_dataset.py
: Contains the EEGDataset class for loading the EEG data.eeg_net.py
: Contains the EEGNet class for the CNN model.hyperparameter_tuning.py
: Contains code for hyperparameter tuning.test.py
: Contains code for testing the model.train_batch.py
: Contains code for training the model using a vanilla batch training approach.train_kfold.py
: Contains code for training the model using k-fold cross-validation.mne_tests.ipynb
: Jupyter notebook for testing the MNE library.eegnet.db
: SQLite database for storing hyperparameters and model performance.
Folders in the repository:
data-imgs/
&images/
: Contains images generated by the code.images_train(train_type)
: Contains images generated during respective training.model-data/
: Contains the dataset used in the project.models/
: Contains the trained models.
The following colab notebook can be used to test the latest model:
README and code will be updated if needed.