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.2.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d2541bd6f4bc1bda8779c35d20e45dcdd464277bf86c97785a8d7f57ad347b9 |
|
MD5 | 8902c215404bf5d7e08fefd7b5466372 |
|
BLAKE2b-256 | 962ad1604f34700ba42efd247f0317f09b9054bc37e31c0f12b74a79d48dc636 |