pyOpenNFT: An open-source Python framework for ML-based real-time fMRI and EEG-fMRI neurofeedback

pyOpenNFT is a fully Python-based pyOpenNFT framework was designed for greater flexibility, modularity, and real-time processing efficiency. Its functionality was also extended with a ML-based prediction server for the fMRI NF signal using processed EEG records. The framework streamlines fMRI data acquisition and/or EEG-based prediction, NF signal estimation, and quality assessment (rtQA) without necessarily requiring a GUI. The FastAPI-based implementation for an EEG-based predictor integrates a Lab Streaming Layer (LSL) interface for processed EEG records and delivers real-time predictions of fMRI time-series for target brain regions. The system supports the visualization of additional NF sources by querying a RESTful interface, facilitating interoperability with external applications.

Refer to GitHub, and to manuscripts (Antipushina E., Davydov N., et al., 2025, MICCAI) and (De Feo et al., 2025, bioarxiv) for further descriptions.

An open-source Python/Matlab framework for real-time fMRI neurofeedback training

OpenNFT is a GUI-based multi-processing open-source software package for real-time fMRI neurofeedback training and quality assessment. This package is based on best practices of the platform-independent interpreted programming languages Python and Matlab to facilitate concurrent functionality, high modularity, and the ability to extend the software in Python or Matlab depending on end-user preferences. OpenNFT includes, but is not limited to, the functionality of SPM, PsychoPy and Psychtoolbox software suits. The OpenNFT’s GUI, synchronization module and multi-processing core are implemented in Python, whilst computational modules for real-time data processing and neurofeedback are implemented in Matlab.

Refer to GitHub, and to manuscripts (Koush et al., 2017, Neuroimage), (Koush et al., 2017, Data in Brief) and (Davydov et al., 2022, Neuroinformatics) for further descriptions.

Project leader

  • Yury Koush

Core software team

  • Evgeny Prilepin
  • Artem Nikonorov
  • Nikita Davydov
  • Riccardo De Feo
  • Ekaterina Antipushina
  • Yury Koush

Collaborators

  • Lucas Peek
  • Dimitri Van De Ville
  • Ronald Sladky
  • Frank Scharnowski
  • John Ashburner
  • Peter Zeidman
  • Sergei Bibikov
  • Tibor Auer

Support

The development of this open-source software was and is supported by funding sources directly and indirectly:

  • Samara University (SU)
  • Skolkovo Institute of Science and Technology (Skoltech)
  • Swiss National Science Foundation (SNSF)
  • École Polytechnique Fédérale de Lausanne (EPFL)
  • Aligned Research Group
  • Wyss Center Geneva
  • University of Geneva
  • University College London (UCL)
  • University of Zurich