This is a GitHub repository for my Individual Project for the MSc Computing degree at Imperial College London. This project attempts to reconstruct musical stimuli from EEG signals using generative models. The report can be accessed here here.
The dataset used for training can be found here (NMED-T) and here (Film Music). Save the dataset in ~/data/
There are two preprocessing pipelines. For preprocessing the Film Music dataset from scratch, use the MATLAB scripts in code/preprocessing/matlab. For preprocessing and segmenting the NMED-T dataset for training preparation, use files in code/preprocessing/python. The preprocessed data should be saved under data/nmed-t-prep/
There are three models that can be trained: CNN, cGAN and cCGAN. These can be found in code/model/models
Training script example:
python ./code/model/train.py --dataroot ./data/nmed-t-prep --name cgan_resnet_9_batch_8 --gpu_ids 0 --model pix2pix --netG resnet_9blocks --dataset_mode supervised --display_id -1 --input_nc 1 --output_nc 1 --batch_size 8 --netD basic
Set
--label_smoothing
to traing with label smoothing
The code for the GANs has been largely inspired from the original pix2pix/cycleGAN paper.