img2fmri: a python package for predicting group-level fMRI responses to visual stimuli using deep neural networks
Project description
img2fmri
img2fmri: a python package for predicting group-level fMRI responses to visual stimuli using deep neural networks
Users are encouraged to read the background science information for an overview of the model and its intended uses (science_overview.pdf).
Installation
To install, users must first install FSL and AFNI, two neuroimaging packages that we use in our pipeline to generate fMRI responses.
After cloning this repository, users should install Conda and create an environment with python 3.9, e.g.:
conda create --name name_of_environment python=3.9
conda activate name_of_environment
Users can enter this repository, then install package dependencies with:
cd img2fmri
python -m pip install -r requirements.txt
Users are now able to use the command-line interface for predicting fMRI responses as outlined in the section below.
Jupyter notebook installation
In order to run the jupyter notebook analyses in overview.ipynb, users should also install jupyter-lab and then ipykernel, in order to add your conda environment to jupyter-lab to use with the analyses.
python -m pip install jupyterlab
conda install ipykernel
ipython kernel install --user --name=name_of_environment
then refresh notebook to see and change the jupyter notebook's kernel to your new conda environment in top right corner.
Usage
Users are encouraged to view the overview.ipynb notebook, which shows the import and use of the img2fmri.predict()
function, as well as its extension to movies using utils.extract_frames()
and utils.load_frames()
.
img2fmri can also be used as a command-line interface, as:
python img2fmri.py [-h] --input input_dir [--output output_dir] [--rois each roi here]
[--sigma sigma_val] [--center_crop center_crop]
Support or Questions
Users are encouraged to email Max Bennett with questions or issues.
License
This package is licensed under an MIT license in LICENSE.txt
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
Built Distribution
Hashes for img2fmri-0.0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ec40dfbbfcf8daa991333dacfcac852ec17343c585e5eb29ce5984d4d3e5e25 |
|
MD5 | 6bfe0855c74aa9201ffd5dd37b3a4573 |
|
BLAKE2b-256 | 67fa83d170b6234bc38342ad8fbb1e1d97308e170557d0e2a2a9b2c21543f83d |