bids app using deepMReye to decode eye motion for fMRI time series data
Project description
bidsMReye
BIDS app for decoding gaze position from the eyeball MR-signal using deepMReye (1).
To be used on preprocessed BIDS derivatives (e.g. fMRIprep outputs). No eye-tracking data required.
By default, bidsMReye uses a pre-trained version of deepMReye trained on 5 datasets incl. guided fixations (2), smooth pursuit (3,4,5) and free viewing (6). Other pretrained versions are optional. Dedicated model training is recommended.
The pipeline automatically extracts the eyeball voxels. This can be used also for other multivariate pattern analyses in the absence of eye-tracking data. Decoded gaze positions allow computing eye movements.
Some basic quality control and outliers detection is also performed:
- for each run
- at the group level
For more information, see the User Recommendations. If you have other questions, please reach out to the developer team.
Install
Better to use the docker image as there are known install issues of deepmreye on Apple M1 for example.
Docker
Build
docker build --tag cpplab/bidsmreye:latest --file docker/Dockerfile .
Pull
Pull the latest docker image:
docker pull cpplab/bidsmreye:latest
Python package
You can also get the package from pypi if you want.
pip install bidsmreye
Conda installation
NOT TESTED YET
To encapsulate bidsMReye in a virtual environment install with the following commands:
conda create --name bidsmreye python=3.10
conda activate bidsmreye
conda install pip
pip install bidsmreye
The tensorflow dependency supports both CPU and GPU instructions.
Note that you might need to install cudnn first
conda install -c conda-forge cudnn
Dev install
Clone this repository.
git clone git://github.com/cpp-lln-lab/bidsmreye
Then install the package:
cd bidsMReye
make install_dev
Usage
Requirements
bidsmreye requires your input fmri data:
- to be minimally preprocessed (at least realigned),
- with filenames and structure that conforms to a BIDS derivative dataset.
Two bids apps are available to generate those types of preprocessed data:
Obviousvly your fmri data must include the eyes of your participant for bidsmreye to work.
CLI
Type the following for more information:
bidsmreye --help
Preparing the data
prepapre
means that bidsmreye will extract the data coming from the
eyes from the fMRI images.
If your data is not in MNI space, bidsmreye will also register the data to MNI.
bidsmreye bids_dir output_dir participant prepare
Computing the eye movements
generalize
use the extracted timeseries to predict the eye movements
using the default pre-trained model of deepmreye.
This will also generate a quality control report of the decoded eye movements.
bidsmreye bids_dir output_dir participant generalize
Doing it all at once
all
does "prepare" then "generalize".
bidsmreye bids_dir output_dir participant all
Group level summary
bidsmreye bids_dir output_dir group qc
Demo
Please look up the documentation
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Pauline Cabee 💻 🤔 🚇 |
Remi Gau 💻 🤔 ⚠️ 🚧 |
Ying Yang 🐛 📓 |
This project follows the all-contributors specification. Contributions of any kind welcome!
If you train deepMReye, or if you have eye-tracking training labels and the extracted eyeball voxels, consider sharing it to contribute to the pretrained model pool.
Project details
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
File details
Details for the file bidsmreye-0.5.0.tar.gz
.
File metadata
- Download URL: bidsmreye-0.5.0.tar.gz
- Upload date:
- Size: 9.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70aedb5500c9e27f3b964b9bb307d7068ec653c64de046b70e625ac97cae35ef |
|
MD5 | 6d9da5dd98ca7485c357d41ad3fbd6d5 |
|
BLAKE2b-256 | 31835771903b02bf82a7c7a846610190a68eb5b862a7171bac309b34e2213f28 |
File details
Details for the file bidsmreye-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: bidsmreye-0.5.0-py3-none-any.whl
- Upload date:
- Size: 47.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774058f5d155cd8a147c00294b2872e210e1d7e073e48cc4b232df117cda4dab |
|
MD5 | 3b5bd1508a9d2547b7dfa5b27235a0c9 |
|
BLAKE2b-256 | 26ad7457ac4bd5df3e16c5ca7d6e52d7367b39db3033debca3fc96165711357c |