Code Monkey home page Code Monkey logo

lsl001006 / ic-gan_fmri_reconstruction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ozcelikfu/ic-gan_fmri_reconstruction

0.0 0.0 0.0 65.35 MB

Official repository for the paper "Reconstruction of Perceived Images from fMRI Patterns and Semantic Brain Exploration using Instance-Conditioned GANs" by Furkan Ozcelik, Bhavin Choksi, Milad Mozafari, Leila Reddy, Rufin VanRullen.

License: MIT License

Shell 1.56% C++ 1.22% Python 86.84% MATLAB 0.63% Cuda 2.70% Jupyter Notebook 6.96% Dockerfile 0.09%

ic-gan_fmri_reconstruction's Introduction

IC-GAN fMRI Reconstruction

Official repository for the IJCNN 2022 (Accepted Oral) paper "Reconstruction of Perceived Images from fMRI Patterns and Semantic Brain Exploration using Instance-Conditioned GANs" by Furkan Ozcelik, Bhavin Choksi, Milad Mozafari, Leila Reddy, Rufin VanRullen.

Results

The following are a few reconstructions obtained :

Requirements

  • Create conda environment using environment.yml in ic_gan directory by entering conda env create -f environment.yml . You can also create environment by checking requirements yourself.
  • For preparation of Kamitani images you should also include some required libraries pip install pandas scikit-image imageio
  • Before loading ICGAN model you should download the pretrained model and required library using:
cd ic_gan
chmod u+x download-weights.sh
sh ./download-weights
pip install pytorch-pretrained-biggan
  • For copyright reasons, we cannot share images used in this study. You can request access to Imagenet images used in Generic Object Decoding study by applying this form as stated in KamitaniLab/GenericObjectDecoding repository. Downloaded "images" directory should be added to KamitaniData dir.
  • Inverted noise and dense vectors are provided in this link together with extracted instance features but you can extract the instance features your self by applying first 2 steps stated below. (Noise and Dense vector inversion codes will be provided in future.)

Usage Instructions

After setting up the environment and downloading the images provided with form;

  1. Preprocess images using
    cd KamitaniData 
    python kamitani_image_prepare.py
    
  2. Extract instance features of Kamitani images using python extract_features.py
  3. Train regression models using python train_regression.py -sub 3 (You can change the subject num between 1-5) You need extracted features in order to run this code successfully.
  4. Reconstruct images from test fMRI data using python reconstruct_images.py -sub 3
  5. Explore ROI semantics by ROI maximization using python explore_roi_semantics.py -sub 3

References

ic-gan_fmri_reconstruction's People

Contributors

ozcelikfu avatar bhavinc 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.