Nidl is a Python library to perform distributed training and evaluation of deep learning models on large-scale neuroimaging data (anatomical volumes and surfaces, fMRI).
It follows the PyTorch design for the training logic and the scikit-learn API for the models (in particular fit, predict and transform).
Supervised, self-supervised and unsupervised models are available (with pre-trained weights) along with open datasets.
- Official source code repo: https://github.com/neurospin-deepinsight/nidl
- HTML documentation (stable release): https://neurospin-deepinsight.github.io/nidl
1. Setup a virtual environment
We recommend that you install nidl in a virtual Python environment,
either managed with the standard library venv or with conda.
Either way, create and activate a new python environment.
With venv:
python3 -m venv /<path_to_new_env>
source /<path_to_new_env>/bin/activateWindows users should change the last line to \<path_to_new_env>\Scripts\activate.bat
in order to activate their virtual environment.
With conda:
conda create -n nidl python=3.12
conda activate nidl2. Install nidl with pip
Execute the following command in the command prompt / terminal in the proper python environment:
python3 -m pip install -U nidlTry importing nidl in a python / iPython session:
import nidlIf no error is raised, you have installed nidl correctly.
Examples are available in the gallery.
The required dependencies to use the software are listed in the file pyproject.toml.