GithubHelp home page GithubHelp logo

ziqiren / vae-gan-celeba Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rufinv/vae-gan-celeba

0.0 0.0 0.0 30 KB

Code and notebooks related to the paper: "Reconstructing Faces from fMRI Patterns using Deep Generative Neural Networks" by VanRullen & Reddy, 2019

License: MIT License

Python 100.00%

vae-gan-celeba's Introduction

VAE-GAN-CelebA

Python code related to the paper: "Reconstructing Faces from fMRI Patterns using Deep Generative Neural Networks" by VanRullen & Reddy (2019)

This folder contains:

  • a link to a pre-trained VAE-GAN model checkpoint 'vaegan_celeba.ckpt' (~15 epochs on CelebA dataset=50,000 batches of 64 images)
  • a set of .py functions for the VAE-GAN face decomposition/reconstruction model, in particular:
    • VAEGAN_image2latent.py => goes from any image file to the corresponding 1024D latent encoding (saved as a Matlab .mat file)
    • VAEGAN_latent2image.py => goes from a 1024D latent encoding (Matlab .mat file) to the corresponding image(s)
  • (optional) a link to download the fMRI datasets (4 subjects, each saw > 8,000 faces in the scanner) and some Matlab analysis code

Example usage:

VAEGAN_image2latent.py -i example.jpg     #this will create example_z.mat with the 1024 latent vars
VAEGAN_latent2image.py -i example_z.mat   #this will generate example_z_g.jpg (and also example_z_g.mat)

Requirements:

  • Python >= 3.4
  • Tensorflow >= 1.8
  • matplotlib, numpy, scipy, skimage

vae-gan-celeba's People

Contributors

rufinv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.