This repo contains the code of our MICCAI 2025 paper: "pyOpenNFT: an open-source Python framework for ML-based real-time fMRI and EEG-fMRI neurofeedback"
Ekaterina Antipushina, Nikita Davydov, Riccardo De Feo, Evgeny Prilepin, Artem Nikonorov, Yury Koush
Skoltech, Samara University
📄 Paper | 🖥️ Project page
Prerequisites: Python 3.10, Poetry
-
Clone project from GitHub
git clone https://github.com/[your-repo]/pyOpenNFT.git cd pyOpenNFT
-
Install Poetry in PowerShell (Windows):
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
-
Setup environment:
poetry env use /path/to/python.exe poetry install
-
Run GUI version:
python .\projects\opennft_gui_proj.py
pyOpenNFT/
├── projects/
│ ├── opennft_gui_proj.py # GUI version
│ └── opennft_nogui_proj.py # Non-GUI version
├── config/ # Configuration files (.ini, .json)
├── data/
│ ├── watch/ # Incoming fMRI data folder
│ ├── work/ # Processed data output
│ └── structural/ # Anatomical images
├── prediction_server/ # EEG-fMRI prediction API
└── pyopennft/ # Core framework code
pyOpenNFT supports displaying neurofeedback predictions generated by an external system, as long as this system provides a RESTful API endpoint. To utilize this feature, you need the following lines in the config file, as exemplified in NF_SVM_cont_215.ini
:
PredictionRESTReq=http://127.0.0.1:8000/get_prediction
PredictionRESTTimeInterval=1
In the first line PredictionRESTReq
is where pyOpenNFT will send GET requests, expecting a single value as a response, and PredictionRESTTimeInterval
defines the frequency of these requests (specified in seconds).
For an implementation of a prediction server, including training code, refer to this repository
@inproceedings{antipushina2025pyopennft,
title={pyOpenNFT: an open-source Python framework for ML-based real-time fMRI and EEG-fMRI neurofeedback},
author={Antipushina, Ekaterina and Davydov, Nikita and De Feo, Riccardo and Prilepin, Evgeny and Nikonorov, Artem and Koush, Yury},
booktitle={Medical Image Computing and Computer Assisted Intervention--MICCAI 2025},
year={2025}
}