Skip to content

A research project which uses GNN to analyze physiological signals.

Notifications You must be signed in to change notification settings

truemogician/Physiological-Signal-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is the repository of my undergraduate research project. The goal of this project is to find the relationship between EEG signals and different mental states of human. Currently, this project uses a GNN model to classify EEG signals into 2 states: rest and motor. The architecture of this model originates from the correlation of brain signals within the same brain areas. So this project also implements a visualization tool to show the connectivity matrix, the parameters of the GNN layer in the model.

Environment

The environment of this project is managed by conda. To get the environment ready, here's the steps:

  1. Install conda if you haven't.
  2. Add conda to your system path.
  3. Run the following command from project root: conda env create -f environment.yml -n {env_name}. Replace {env_name} with the name you want to give to the environment. This environment takes 8.02GB on my Windows 11 machine, so make sure you have enough space.
  4. To execute scripts in this project, run conda activate {env_name} first to activate the environment.

Dataset

Currently, this research project uses WAY-EEG-GAL only.

To get the data ready, here's the steps:

  1. Download the dataset from figshare. This dataset includes 12 sub-datasets, one for each participant. The sizes of those sub-datasets vary from 700MB to 1000MB, here's the basic information and download page of them. You don't need to downloa all of them, but if I recommend downloading at least 2 of them, so that you can test the code on different participants.
    participant size download page
    1 799.88MB P1.zip
    2 905.53MB P2.zip
    3 709.43MB P3.zip
    4 764.96MB P4.zip
    5 803.37MB P5.zip
    6 822.52MB P6.zip
    7 988.70MB P7.zip
    8 745.41MB P8.zip
    9 793.71MB P9.zip
    10 812.92MB P10.zip
    11 847.04MB P11.zip
    12 866.80MB P12.zip
  2. Move the downloaded zip files into data/WAY-EEG-GAL folder.
  3. Run the following command from project root: python script/dump_all.py data/WAY-EEG-GAL. If you want to preserve the zip files for whatever reason, you can add --no-delete option to the command. Note that this script relies on the original file names, so if you want it to work, don't rename the zip files.
  4. After the command succeeds, the data is now ready to be used. The structure of the data folder should looks like following:
    data
    └── WAY-EEG-GAL
        ├── sub-01
        │   ├── raw
        │   │   ├── HS_P1_S1.mat
        │   │   ├── ...
        │   │   ├── HS_P1_S9.mat
        │   │   ├── WS_P1_S1.mat
        │   │   ├── ...
        │   │   └── WS_P1_S9.mat
        │   ├── series-01
        │   │   ├── metadata.json
        │   │   └── samples.npz
        │   ├── series-02
        │   │   ...
        │   └── series-09
        ├── ...
        └── sub-12
    
    The raw folder contains the original mat files extracted from the zip files. These MatLab files are not further used in this project, so you may delete them at your will. You'll save approximately 75% of the disk space by doing so.

About

A research project which uses GNN to analyze physiological signals.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages