Skip to main content

Fast and lightweight MRSegmentator CLI powered by the KonfAI framework.

Project description

PyPI version Python License KonfAI

MRSegmentator-KonfAI

Fast and lightweight MRI segmentation built on the MRSegmentator model using 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 inference for MRI segmentation tasks, even on low-resource hardware.
Models are automatically downloaded from Hugging Face Hub.


🚀 Installation

From PyPI:

pip install mrsegmentator-konfai

From source:

git clone https://github.com/vboussot/MRSegmentator-KonfAI.git
cd MRSegmentator-KonfAI
pip install .

⚙️ Usage

Run inference on an MRI scan:

mrsegmentator-konfai -i path/to/input.nii.gz -o path/to/output_seg.nii.gz

Optional arguments

Flag Description Default
-i, --input Path to the input MRI volume required
-o, --output Path to save the segmentation Seg.nii.gz
-f, --folds Number of model folds to ensemble (1–5) 2
-g, --gpu List of GPUs to use (e.g. 0, 0,1) CPU if unset
--cpu Number of CPU cores to use (if no GPU) 1
-quiet Suppress console output off

Example:

mrsegmentator-konfai -i subject01.nii.gz -o seg_subject01.nii.gz --gpu 0 -f 3

🧠 Features

  • Fast inference using KonfAI
  • 🤗 Automatic model download from Hugging Face
  • 🧩 Support for ensemble models (multi-fold prediction)
  • 🧾 Multi-format compatibility: supports all major medical image formats handled by ITK

📖 Reference

This package is based on the original MRSegmentator by
Henrik Haentze et al., a deep-learning-based method for full body MRI segmentation.

For scientific use, please cite the original MRSegmentator work in addition to this CLI tool.


🧾 License

This repository is released under the Apache 2.0 License.
Original MRSegmentator license and copyright remain with their respective authors.


🔗 Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mrsegmentator_konfai-1.4.5.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mrsegmentator_konfai-1.4.5-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file mrsegmentator_konfai-1.4.5.tar.gz.

File metadata

  • Download URL: mrsegmentator_konfai-1.4.5.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mrsegmentator_konfai-1.4.5.tar.gz
Algorithm Hash digest
SHA256 20bec78447c87fc33f7dba711ba307e15b5325ed24b71a219382cb4afcf4ec4e
MD5 6352bd90a34db0cb1263c38a5342fd4d
BLAKE2b-256 cb199d2ac49a94bfaaa4bf9bf0b354c1a57f9f6f1262310d880df73640ee308c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrsegmentator_konfai-1.4.5.tar.gz:

Publisher: publish.yml on vboussot/KonfAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrsegmentator_konfai-1.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for mrsegmentator_konfai-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f38d3917f096586a6b2870f6ffd5a6821fbacaa5c8c1f4c6b803b0638323e19f
MD5 56759acc40a395ad5d31acf0c901c269
BLAKE2b-256 bda6d38c6080f772d6278df85925b6bf379861693296fc4dd65ba1592af67be3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrsegmentator_konfai-1.4.5-py3-none-any.whl:

Publisher: publish.yml on vboussot/KonfAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page