Skip to main content

License PyPI version Python CI Paper

IMPACT-Reg logo

IMPACT-Reg-KonfAI

Fast and lightweight CLI for multimodal medical image registration using IMPACT-Reg presets within the KonfAI framework.


🧩 Overview

IMPACT-Reg-KonfAI is the command-line interface (CLI) for running IMPACT-Reg registration presets published in the VBoussot/ImpactReg Hugging Face repository, through the KonfAI deep learning framework.

IMPACT-Reg introduces a semantic similarity metric for multimodal registration, driven by deep features extracted from large pretrained segmentation and foundation models (MIND, TotalSegmentator, MRSegmentator). It plugs into an Elastix-based multi-resolution deformable pipeline to achieve robust cross-modality alignment while keeping deformations smooth and physically plausible.

A registration run combines:

  • fixed and moving images
  • one or more registration presets resolved from the published preset database (each preset is a KonfAI app)
  • optional image, segmentation, or landmark references (with an optional mask) for evaluation

🧠 Features

  • ⚡ Fast registration powered by KonfAI
  • 🤗 Automatic preset, parameter-map, and model download from Hugging Face
  • 🧩 Multi-preset ensembling (transforms averaged into a single displacement field)
  • 🧠 Semantic IMPACT metric on deep features from pretrained segmentation / foundation models
  • 📐 Evaluation workflows against image, segmentation, and landmark references
  • 🧾 Multi-format compatibility: supports all major medical image formats handled by ITK

🗂️ Available presets

Presets are resolved dynamically from the published preset database (PresetDatabase.json) and passed as the first positional argument(s). Current presets include generic rigid / rigid + BSpline strategies and IMPACT-driven deformable presets tuned per modality pair (MR/CT, CBCT/CT) and anatomy (generic, head & neck).

List the presets exposed by your installation with:

impact-reg-konfai register --help

🚀 Installation

From PyPI:

python -m pip install impact-reg-konfai

From source:

git clone https://github.com/fideus-labs/KonfAI.git
cd KonfAI
# konfai and konfai-apps must come from the same checkout: this app pins both to its own
# setuptools_scm version, which only exists on PyPI at a release tag.
python -m pip install -e . -e konfai-apps -e apps/impact_reg

⚙️ Usage

The CLI is organised into sub-commands, matching the registration workflow:

Sub-command Purpose
register Register a moving image onto a fixed image with one or more presets. Several presets are ensembled (their displacement fields are averaged). Writes the transform under the name and in the form the preset declared, the moved image derived from it, and, with --uncertainty, the per-preset fields (kept under Ensemble/ for uncertainty).
eval Evaluate a registration on any subset of modalities: image (MAE), segmentation (Dice), landmarks (TRE). At least one modality is required.
uncertainty Voxel-wise spread map from an ensemble of displacement fields.

Register a moving image onto a fixed image (ensemble several presets by listing them):

impact-reg-konfai register <PRESET> [<PRESET_2> ...] -f fixed.nii.gz -m moving.nii.gz -o ./Output --gpu 0

Evaluate a registration on any subset of modalities; the transform comes from a prior register:

impact-reg-konfai eval \
  --transform ./Output/P000/DVF.mha \
  -f fixed.nii.gz -m moving.nii.gz --mask roi.nii.gz \
  --gt-fixed-seg fixed_seg.nii.gz --gt-moving-seg moving_seg.nii.gz \
  --gt-fixed-fid fixed.fcsv --gt-moving-fid moving.fcsv \
  -o ./Output --gpu 0

Estimate uncertainty from the per-preset displacement fields written by register:

impact-reg-konfai uncertainty --dvf ./Output/P000/Ensemble/*.mha -o ./Output/P000

register arguments

Flag Description Default
PRESET One or more presets from the published preset database (several are ensembled) required
-f, --fixed-images Fixed image(s), or a dataset directory required
-m, --moving-images Moving image(s), or a dataset directory required
--fixed-mask, --moving-mask Optional masks restricting the metric region unset
-o, --output Output directory ./Output/
--tta Test-time-augmentation draws per preset 0
--uncertainty Keep the per-preset fields under Ensemble/ for a later uncertainty run False
--fields-only Write the transforms and stop; skip deriving the moved images False
--set NAME=VALUE Override a preset parameter (repeatable, forwarded to konfai-apps infer) unset
--tmp-dir Where the intermediates are staged system temp
--gpu / --cpu GPU id(s) / CPU worker processes CPU if unset
-q, --quiet Suppress console output False

eval arguments (at least one modality required)

Flag Description Default
--transform Transform(s) from a prior register (identity if omitted) unset
-f, -m Fixed / moving images: image modality (MAE) unset
--gt-fixed-seg, --gt-moving-seg Fixed / moving segmentations: seg modality (Dice) unset
--gt-fixed-fid, --gt-moving-fid Fixed / moving landmarks: fid modality (TRE) unset
--mask Evaluation mask(s) for the image modality unset
--preset Preset providing the evaluation configs first available

uncertainty arguments

Flag Description Default
--dvf Two or more ensemble displacement fields (e.g. the per-preset fields from register) required
-o, --output Output directory ./Output/

See the full help of any sub-command with:

impact-reg-konfai register --help

⚡ Performance

Measured on the CT/MR pairs of benchmarks/perf/bench_apps.py (2026-09-09, preset FireANTs_SyN, single NVIDIA RTX PRO 5000 (24 GB)). Peak RAM = process-tree resident set; peak VRAM = over baseline.

Case (voxels) Time Peak RAM Peak VRAM
S (240 × 220 × 200 on 248 × 246 × 141) 91 s 5.9 GB 15.5 GB
M (249 × 246 × 246, both) 108 s 6.3 GB 16.0 GB
L (512 × 512 × 531, both) out of memory on 24 GB

The elastix presets stream out of core; the FireANTs presets hold the pair on the card.


📦 Notes

  • Available presets are resolved dynamically from the published IMPACT-Reg preset database.
  • Multiple presets can be provided in one command; their displacement fields are averaged into a single field.
  • The wrapper orchestrates the preset KonfAI apps (model inference), then ensembles, evaluates, and estimates uncertainty on their outputs.

📚 References

If you use IMPACT-Reg-KonfAI in your work, please cite KonfAI and the IMPACT-Reg paper.

  • Boussot, V., Hémon, C., Nunes, J.-C., Dowling, J., Rouzé, S., Lafond, C., Barateau, A., & Dillenseger, J.-L. IMPACT-Reg: A Generic Semantic Loss for Multimodal Medical Image Registration.

  • 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

Metadata

Release files for impact-reg-konfai 1.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for impact-reg-konfai 1.8.4
File Size Uploaded
impact_reg_konfai-1.8.4.tar.gz 927.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for impact-reg-konfai 1.8.4
File Interpreter ABI Platform
impact_reg_konfai-1.8.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / impact_reg_konfai-1.8.4.tar.gz

Download URL impact_reg_konfai-1.8.4.tar.gz
Size 927.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1c631596d44b44c24ecd95d471ff74db9a2fd21896fdecfe36a6b2a3dd2d46bf
BLAKE2b-256 checksum
How to use checksums
2d57b7562a614366a0e722f44331bf7f2153d7f929e2daa9d3a15f23536b1b30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / impact_reg_konfai-1.8.4-py3-none-any.whl

Download URL impact_reg_konfai-1.8.4-py3-none-any.whl
Size 75.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
460cd4eeea5d3acd23bc48275c1d6d70d68fb4bd28134b2623351edac286bf96
BLAKE2b-256 checksum
How to use checksums
cf2f5ced45abcd24ee9ec9afe8f8b8b1f862c3f490a7c702c7eb06f5be03ec79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

1.8.7

2 release files

1.8.6

2 release files

1.8.5

2 release files

This release

1.8.4 This release

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page