Epilepsy affects over 50 million people worldwide, and accurate seizure detection is crucial for patient care. This study compares classical deep learning and graph-based approaches for detecting seizures from EEG signals recorded from 97 patients. Convolutional and recurrent models are evaluated against graph convolutional networks that encode electrode topology. The best classical model, a modified convolutional autoencoder, achieves a validation F1 score of 74.8 percent, while the best graph-based model, a spatio-temporal GCN, reaches 70.6 percent. Results show that spatial modeling improves robustness but compact convolutional models remain more effective.
-
Install Pixi if not already done.
-
Run the following in the root of the repository (requires cuda 12.2, same as the cluster):
pixi install
-
Clear the cache and reload VS Code window.
-
You should find the kernel as the default kernel in VS Code.
-
Install Pixi if not already done.
-
Launch a compute node:
Sinteract -t 12:00:00 -g gpu:1 -m 16G
-
Run the following in the root of the repository to install dependencies (do that in the compute node):
pixi install
-
Clear the cache and reload VS Code window.
-
You should find the kernel as the default kernel in VS Code.
If you prefer to use a Python virtual environment instead of Pixi, you can follow these steps. Note that this is not the recommended way, as Pixi provides a more robust and reproducible environment.
To set up the environment on the EPFL cluster, follow these steps:
# Be up to date
git pull
# Create a new environment (if not already done)
module purge
slmodules -r future
module load gcc python
python -m venv --system-site-packages venvs/graph-eeg
# Activate the virtual environment
source venvs/graph-eeg/bin/activate
# Install dependencies
python -m pip install --upgrade pip
pip install jupyter
# Install project dependencies (IMPORTANT: load first)
module load openmpi py-torch
pip install -r requirements.txtOnce the environment is created, you can use the following command to launch a jupyter lab session:
# Launch a compute node
Sinteract -t 12:00:00 -g gpu:1 -m 16G
# Start from clean environment
module purge
# Load the required modules
slmodules -r future
module load gcc python
# Load the environment
source venvs/graph-eeg/bin/activate
module load openmpi py-torch
# Launch jupyter lab
ipnport=$(shuf -i8000-9999 -n1)
## in the foreground
jupyter lab --no-browser --port=$ipnport
## in the background
nohup jupyter lab --no-browser --port=8888 &To update the environment, you can run:
# Start from clean environment
module purge
# Load the required modules
slmodules -r future
module load gcc python
# Load the environment
source venvs/graph-eeg/bin/activate
# VERY IMPORTANT to first load the modules
module load openmpi py-torch
# Update the environment
pip install -r requirements.txt