- Notifications
You must be signed in to change notification settings - Fork1
fMRI deep image reconstruction
License
tensorlayer/fMRI-deep-image-reconstruction
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a Tensorflow / Tensorlayer implementation of α-GAN for generating images to be used in EEG & fMRI deep image reconstruction.
α-GAN:Variational Approaches for Auto-Encoding Generative Adversarial Networks
Tensorflow - v1.8.0
Tensorlayer - v1.9.0
The training dataset must first be converted into a.tfrecord format.
This can be done by going toutils.py and modifyingclass_text_to_int(label) to contain the list of classes, and runningconvert_tfrecord(data_dir, save_dir, filename). An example is provided at the bottom ofutils.py which you can run by executingutils.py.
(data_dir should contain all the folders with the dataset labels, and all the dataset images should be in their respective folder)
Before training the α-GAN, make sure the directory paths inconfig.py correspond to the dataset locations.
Execute the training by running the following command
python3 main.pyThis will train the α-GAN and save the model incheckpoints_dir every epoch.
Generator testing is split into two parts: training set, and generation performance. These two are saved insave_gan_dir andsave_test_gan_dir respectively.
This extracts the features from the given folder of images using the trained encoder, and stores them inencoded_feat.pkl.
python3 main.py --mode=encodeThis reconstructs the folder of images from the encoding section by using the extracted features fromencoded_feat.pkl to generate images.
python3 main.py --mode=genpython3 main.py --mode=generateAbout
fMRI deep image reconstruction
Resources
License
Uh oh!
There was an error while loading.Please reload this page.