A Modular and configurable Deep Learning framework with YAML and PyTorch
Project description
🧠 KonfAI
KonfAI is a modular deep learning framework for medical imaging built around YAML-driven workflows.
It lets you define complete pipelines, from data loading to prediction and evaluation, through configuration instead of orchestration scripts.
- reproducible workflows with explicit configs and outputs
- modular components for datasets, transforms, models, losses, and metrics
- designed for research, experimentation, and agent-driven workflows
KonfAI has been used in several top-performing challenge projects: 🔗 SynthRAD2025 – Task 1 • 🔗 SynthRAD2025 – Task 2 • 🔗 CURVAS PDACVI 2025 • 🔗 TrackRAD 2025 • 🔗 Panther • 🔗 CURVAS
Paper:
KonfAI: A Modular and Fully Configurable Framework for Deep Learning in Medical Imaging
🚀 Why KonfAI?
Most frameworks focus on models. KonfAI focuses on pipelines.
- 🧩 Compose full workflows from modular components
- 🔁 Iterate without rewriting Python scripts
- 📦 Turn experiments into reusable KonfAI Apps
- 🤖 Use KonfAI as a backend for LLM-driven experimentation through KonfAI-MCP
⚡ Quickstart
Install and run your first workflow:
git clone https://github.com/vboussot/KonfAI.git
cd KonfAI
python -m pip install -e .
cd examples/Segmentation
python -m pip install -U "huggingface_hub[cli]"
hf download VBoussot/konfai-demo \
--repo-type dataset \
--include "Segmentation/**" \
--local-dir Dataset
mv Dataset/Segmentation/* Dataset/
rmdir Dataset/Segmentation
rm -rf Dataset/.cache
This downloads a small public demo subset and prepares the layout expected by the example:
Dataset/
├── 1PC006/
│ ├── CT.mha
│ └── SEG.mha
└── ...
CTis the input imageSEGis the segmentation label map
Then launch the first training run:
konfai TRAIN -y --gpu 0 --config Config.yml
Then:
konfai PREDICTION -y --gpu 0 --config Prediction.yml --models Checkpoints/SEG_BASELINE/<checkpoint>.pt
konfai EVALUATION -y --config Evaluation.yml
If you do not have a GPU available, replace --gpu 0 with --cpu 1.
Edit these files first:
Config.yml→ trainingPrediction.yml→ exported outputsEvaluation.yml→ metrics on saved predictions
Notebook entry points:
examples/Segmentation/Segmentation_demo.ipynbexamples/Synthesis/Synthesis_demo.ipynb
For editable installs and optional extras such as server or cluster, see:
🤖 Agent-Ready by Design
KonfAI is designed to serve as a deterministic backend for LLM-driven experimentation.
Through KonfAI-MCP Server, agents can:
- inspect datasets
- generate or refine configurations
- launch experiments
- analyze results and iterate
All executions remain:
- reproducible
- structured
- grounded in YAML workflows
👉 KonfAI bridges the gap between LLM reasoning and real experimental execution.
📦 KonfAI Apps
A KonfAI App is a self-contained workflow package built with KonfAI.
It can expose:
- inference
- evaluation
- uncertainty estimation
- full pipelines
- fine-tuning
Apps live in apps/ and
can be used through:
| Interface | Entry point |
|---|---|
| 🖥️ CLI | konfai-apps |
| 🐍 Python API | konfai_apps.KonfAIApp |
| 🌐 Remote server | konfai-apps-server + konfai-apps --host ... |
| 🧠 3D Slicer | SlicerKonfAI |
Use Apps when a workflow is already stable and you want a cleaner user-facing interface than the low-level YAML CLI.
📚 Documentation
The README is only the entry point. The full documentation is available here:
🐳 Docker
KonfAI ships a Docker setup for CLI-oriented workflows.
- Dockerfile:
docker/Dockerfile - guide:
docs/source/usage/docker.md - image:
vboussot/konfai
Example:
docker run --rm -it \
--gpus all \
-v "$(pwd):/workspace" \
-w /workspace \
vboussot/konfai TRAIN --gpu 0 -c examples/Synthesis/Config.yml
🤝 Contributing
Contributions are welcome.
Typical ways to help:
- improve examples and notebooks
- clarify documentation
- add tests for real user paths
- extend models, transforms, or apps
Local setup:
git clone https://github.com/vboussot/KonfAI.git
cd KonfAI
python -m pip install -e .
python -m pip install pytest pre-commit
Useful commands:
pytest -q
pre-commit run --all-files
make -C docs html
Contributor guide:
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 konfai-1.5.5.tar.gz.
File metadata
- Download URL: konfai-1.5.5.tar.gz
- Upload date:
- Size: 7.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdd1cb8029aab75b9197726a815d54b438819b8c9e1c2506428abac60a6dddbd
|
|
| MD5 |
1bb8e272e0ed8996e898f847270597fd
|
|
| BLAKE2b-256 |
fcf2c8dc41e986756f8a83a1722d07dbdc83737b72f9b416345a9a51ae1e8bb7
|
Provenance
The following attestation bundles were made for konfai-1.5.5.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:
konfai-1.5.5.tar.gz -
Subject digest:
fdd1cb8029aab75b9197726a815d54b438819b8c9e1c2506428abac60a6dddbd - Sigstore transparency entry: 1592470884
- Sigstore integration time:
-
Permalink:
vboussot/KonfAI@33fb162b0ac0a1abd963c18aa193734358414289 -
Branch / Tag:
refs/tags/v1.5.5 - Owner: https://github.com/vboussot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33fb162b0ac0a1abd963c18aa193734358414289 -
Trigger Event:
push
-
Statement type:
File details
Details for the file konfai-1.5.5-py3-none-any.whl.
File metadata
- Download URL: konfai-1.5.5-py3-none-any.whl
- Upload date:
- Size: 7.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66fd09d788321e94992c93b017cab9eafbf1f6a46015344253a4b335d06b72b7
|
|
| MD5 |
7b162ab8432956c330c881d75cdefdc9
|
|
| BLAKE2b-256 |
333d75bc397cba21c3c9cbfa2cf92cbb130f7fb5dd5a832f7473d4019c6782e4
|
Provenance
The following attestation bundles were made for konfai-1.5.5-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:
konfai-1.5.5-py3-none-any.whl -
Subject digest:
66fd09d788321e94992c93b017cab9eafbf1f6a46015344253a4b335d06b72b7 - Sigstore transparency entry: 1592455321
- Sigstore integration time:
-
Permalink:
vboussot/KonfAI@33fb162b0ac0a1abd963c18aa193734358414289 -
Branch / Tag:
refs/tags/v1.5.5 - Owner: https://github.com/vboussot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33fb162b0ac0a1abd963c18aa193734358414289 -
Trigger Event:
push
-
Statement type: