Skip to content

aisu-programming/Preprocessor-for-EEG-Signals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preprocessor-for-EEG-Signals

Resource

Tutorial

  1. Clone this project.
    • For Windows:
      git clone --recurse-submodules https://github.com/aisu-programming/Preprocessor-for-EEG-Signals.git
    • For Mac: (Unclear, need to test)
      git clone https://github.com/aisu-programming/Preprocessor-for-EEG-Signals.git
      cd Preprocessor-for-EEG-Signals
      git submodule init
      git submodule update
  2. Download the datasets below and put them in directory "datasets".
  3. Rename the file ".env_sample" to ".env".

Dataset

  • Automatically download
    ./download_datasets.sh

Environment

  • With pip:
    pip install -r requirements.txt
    pip install torch  # Based on your environment, see more in the requirements.txt
  • Can also use conda.

Tip

When running MacOS on Apple Silicon, also install tensorflow-metal to utilize GPU usage:

pip install tensorflow-metal

You'll want to run with a higher batch size to get the benefits.

Example: Baselines

  • For baseline program in TensorFlow version - baselines_tensorflow.py
    1. If you are working on a Mac platform, set TF_USE_LEGACY_KERAS to True by:
      export TF_USE_LEGACY_KERAS=True
    2. Run the script:
      python baselines_tensorflow.py
  • For baseline program in PyTorch version - baselines_pytorch.py
    Simply run the script:
    python baselines_pytorch.py
  • For running on HPC Greene
    Adjust the command with slurm command prefix
    srun -c 16 --mem=64GB --gres=gpu:1 --time=02:00:00 --pty python baselines_pytorch.py