Skip to content

Repository files navigation

Raidionics Validation & Metrics Computation

Backend for k-fold cross-validation and metrics computation over 2D-3D medical data.

Part of the Raidionics ecosystem.

License Python PyPI version codecov Open In Colab Paper


Table of contents


Overview

This library computes cross-validation performance and segmentation metrics for the Raidionics ecosystem. It supports both 2D and 3D inputs and can run for multiple segmentation classes simultaneously.

It can be used in three ways:

Mode Best for
Python module Integrating metrics computation into your own pipeline
CLI Quick, scriptable runs from a config file
Docker Reproducible environments, no local Python setup needed

⚠️ The only hard requirement is that your data follows the expected folder structure. For custom structures, kfold_model_validation.py is the place to start adapting the code.


Installation

pip install raidionicsval

Or install the latest development version directly from GitHub:

pip install git+https://github.com/dbouget/validation_metrics_computation.git

Quick start

cd /path/to/validation_metrics_computation
cp blank_main_config.ini main_config.ini

Edit main_config.ini with your paths and parameters (see Utils/resources.py for a full description of every field), then run the validation task first, followed by the study task:

raidionicsval -c main_config.ini

Notebooks

Two Jupyter notebooks demonstrate the library end-to-end:

Notebook Colab GitHub
Validation Open In Colab View
Study Open In Colab View

A sample dataset for testing is available here.


Usage

CLI

raidionicsval -c CONFIG (-v debug)

CONFIG must point to a valid .ini configuration file.

Python module

from raidionicsval import compute

compute(config_filename="/path/to/main_config.ini")

Docker

docker pull dbouget/raidionics-val:v1.1.1-py39-cpu

docker run \
  -v /home/<username>/<resources_path>:/workspace/resources \
  -t -i --network=host --ipc=host --user $(id -u) \
  dbouget/raidionics-val:v1.1.1-py39-cpu \
  -c /workspace/resources/<path>/<to>/main_config.ini -v <verbose>

For the interactive shell variant, permission notes, and path-mapping details, see the full Docker guide.


Data format

Full details on expected folder layouts, naming conventions, and the cross-validation folds file are documented in docs/data_format.md, covering:

  • Original data folder structure (index-based and non-index-based)
  • Inference results folder structure
  • The cross_validation_folds.txt file format

How to cite

If you use Raidionics in your research, please cite the software and associated papers. Citation metadata is provided in CITATION.cff — click "Cite this repository" in the sidebar for ready-to-use APA/BibTeX formats, covering both the validation/metrics methodology (Frontiers in Neurology, 2022) and the main software release (Scientific Reports, 2023).


License

Distributed under the BSD-2-Clause License.

About

Validation and metrics computation over 3D medical volumes (backend for Raidionics)

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages