Skip to content

OpenNFT/pyOpenNFT

Repository files navigation

pyOpenNFT

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


Install and Quick Start

Prerequisites: Python 3.10, Poetry

  1. Clone project from GitHub

    git clone https://github.com/[your-repo]/pyOpenNFT.git
    cd pyOpenNFT
  2. Install Poetry in PowerShell (Windows):

    (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
  3. Setup environment:

    poetry env use /path/to/python.exe
    poetry install
  4. Run GUI version:

    python .\projects\opennft_gui_proj.py

Directory Structure

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

Requesting NF prediction from an external interface

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


Citation

@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}
}

About

A Python framework for real-time fMRI neurofeedback training

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6