Skip to main content

This package uses Generative Adversarial Networks (GANs) to augment EEG data to enhance classification performance.

Project description

EEG-GAN

We here use Generative Adversarial Networks (GANs) to create trial-level synthetic EEG samples. We can then use these samples as extra data to train whichever classifier we want to use (e.g., Support Vector Machine, Neural Network).

You can find our documentation here

Feel free to contribute!

Running GANs on Brown's Oscar Cluster with 8GPUs (internal information for current developpers)

This method requires a different virtual environment than within the repo. Here are instructions on how to do this using Open on Demand (ood.ccv.brown.edu).

First, start a Virtual Desktop by going to the 'My Interactive Sessions' tab at the top and then selecting Desktop (Advanced). You will then be confronted with a range of fields with defaults. Change 'Partition' to 'GPU' and insert '8' under Num GPUs. You can also change the number of CPUs and RAM ize if you like, but defaults should work. Hit the 'Launch' button at the bottom when you are ready and it will bring you back to your 'My Interactive Sessions' tab with a session for 'Desktop (Advanced)' starting. The session will eventually establish (should not take long) and a 'Launch Desktop (Advanced)' button will appear.

Launching the desktop will take you to a virtual desktop. Open terminal and navigate to where you would like to create your virtual environment. You will then build the environment as such:

Load modules

module load python/3.9.0
module load gcc/10.2
module load cuda/11.7.1
module load cudnn/8.2.0

Create and activate virtual environment

python3 -m venv myVirtualEnv

source ./myVirtualEnv/bin/activate

Install packages

Note that the following packages are all the same as the requirements.txt except for torch, torchvision, torchaudio, torchsummary. TODO: Add new requirements.txt

pip3 install torch torchvision torchaudio torchsummary 
pip install pandas==1.3.4
pip install numpy==1.21.4
pip install matplotlib==3.5.0
pip install scipy==1.8.0
pip install einops==0.4.1
pip install scikit-learn==1.1.2

Run gans training

That should be all and now you should get no errors when running:

python gan_training_main.py ddp

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eeggan-0.0.3.tar.gz (35.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eeggan-0.0.3-py3-none-any.whl (20.5 MB view details)

Uploaded Python 3

File details

Details for the file eeggan-0.0.3.tar.gz.

File metadata

  • Download URL: eeggan-0.0.3.tar.gz
  • Upload date:
  • Size: 35.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for eeggan-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ab7a38d84cd84e10bbeeeafcd021827a9555f60c438674f057fec00a57223aa2
MD5 c39bb2bfb64dca3ef18218142e6031d8
BLAKE2b-256 ec82bf13c61acc41c2661857b2acd0f68f324802e28034c30a46d80a61c7def0

See more details on using hashes here.

File details

Details for the file eeggan-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: eeggan-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for eeggan-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 47f56c8dc8ea6806b813ec1f60448dff283f3b6297baf3bd93f00d2bd9b89b81
MD5 c00bc8b85536cc044cad3b2d98f60d30
BLAKE2b-256 490a591012e48ab7f6a109cc3a72966ce1bc48af169e9a05284f02363d164a34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page