Fast and lightweight MRSegmentator CLI powered by the KonfAI framework.
Project description
MRSegmentator-KonfAI
Fast and lightweight CLI for whole-body MRI segmentation using MRSegmentator models within the KonfAI framework.
🧩 Overview
MRSegmentator-KonfAI is a lightweight command-line interface (CLI) for running
MRSegmentator models through the
KonfAI deep learning framework.
It provides fast and efficient inference for whole-body MRI segmentation, including on low-resource hardware.
Pretrained models are automatically downloaded from
Hugging Face Hub.
🚀 Installation
From PyPI:
python -m pip install mrsegmentator-konfai
From source:
git clone https://github.com/vboussot/KonfAI.git
python -m pip install -e apps/mrsegmentator
⚙️ Usage
Run inference on an MRI scan:
mrsegmentator-konfai -i path/to/input.nii.gz -o ./Output/
Optional arguments
| Flag | Description | Default |
|---|---|---|
-i, --input |
Path to the input MRI volume | required |
-o, --output |
Path to save the segmentation | ./Output/ |
--gt |
Path to reference segmentation (ground truth), if available (enables evaluation workflows) | unset |
--mask |
Path to region-of-interest mask used for evaluation and uncertainty analysis | unset |
-f, --folds |
Number of model folds to ensemble (1–5) | 2 |
-uncertainty |
Save uncertainty maps | False |
--gpu |
GPU list (e.g. 0 or 0,1) |
CPU if unset |
--cpu |
Number of CPU cores (if no GPU) | 1 |
-q, --quiet |
Suppress console output | False |
Example
mrsegmentator-konfai -i path/to/input.nii.gz -o ./Output/ --gt path/to/reference.nii.gz --mask path/to/mask.nii.gz --gpu 0 -f 3 -uncertainty
🧠 Features
- ⚡ Fast inference powered by KonfAI
- 🤗 Automatic model download from Hugging Face
- 🧩 Multi-model ensembling
- 🧠 Supports evaluation workflows with reference data, and uncertainty estimation without reference
- 🧾 Multi-format compatibility: supports all major medical image formats handled by ITK
📖 Reference
If you use MRSegmentator-KonfAI in your work, please cite the original MRSegmentator work in addition to this CLI tool.
-
Häntze, H. et al. (2025).
Segmenting Whole-Body MRI and CT for Multiorgan Anatomic Structure Delineation.
Radiology: Artificial Intelligence, 7(6). https://doi.org/10.1148/ryai.240777 -
Boussot, V., & Dillenseger, J.-L. (2025).
KonfAI: A Modular and Fully Configurable Framework for Deep Learning in Medical Imaging.
arXiv preprint arXiv:2508.09823
🔗 Links
- 🧠 Original MRSegmentator: github.com/hhaentze/MRSegmentator
- 🤗 Model Hub: huggingface.co/VBoussot/MRSegmentator-KonfAI
- 📦 PyPI Package: pypi.org/project/mrsegmentator-konfai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mrsegmentator_konfai-1.5.0.tar.gz.
File metadata
- Download URL: mrsegmentator_konfai-1.5.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5023adf0f1a33d7cc5f5b5ec0b3f7d481a60d6c14bb60dd636cd1c719f28ca4b
|
|
| MD5 |
9fe93ad7799a6bf302ac36d1ef37a952
|
|
| BLAKE2b-256 |
7174104ca57646654eddf0dbe26c36218b4ea141c1c4c1c79ee36c8728efeb14
|
Provenance
The following attestation bundles were made for mrsegmentator_konfai-1.5.0.tar.gz:
Publisher:
publish.yml on vboussot/KonfAI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mrsegmentator_konfai-1.5.0.tar.gz -
Subject digest:
5023adf0f1a33d7cc5f5b5ec0b3f7d481a60d6c14bb60dd636cd1c719f28ca4b - Sigstore transparency entry: 835642706
- Sigstore integration time:
-
Permalink:
vboussot/KonfAI@cf679906cfa7c7b68aadece435ec870d6a13c64e -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/vboussot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf679906cfa7c7b68aadece435ec870d6a13c64e -
Trigger Event:
push
-
Statement type:
File details
Details for the file mrsegmentator_konfai-1.5.0-py3-none-any.whl.
File metadata
- Download URL: mrsegmentator_konfai-1.5.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
039f296812e5dc058c3b0fd9b32fdb696173d8a45c63c777b99ee05b7da7ca75
|
|
| MD5 |
23df11aa76cc32c4fc31916ce4ec9cfa
|
|
| BLAKE2b-256 |
e00996b8e22699aba07f189d5f4f467a3cc45eaed213384060957f8c786fb6df
|
Provenance
The following attestation bundles were made for mrsegmentator_konfai-1.5.0-py3-none-any.whl:
Publisher:
publish.yml on vboussot/KonfAI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mrsegmentator_konfai-1.5.0-py3-none-any.whl -
Subject digest:
039f296812e5dc058c3b0fd9b32fdb696173d8a45c63c777b99ee05b7da7ca75 - Sigstore transparency entry: 835642719
- Sigstore integration time:
-
Permalink:
vboussot/KonfAI@cf679906cfa7c7b68aadece435ec870d6a13c64e -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/vboussot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf679906cfa7c7b68aadece435ec870d6a13c64e -
Trigger Event:
push
-
Statement type: