Examples¶
KonfAI ships two low-level, YAML-driven examples under examples/. They are
the best starting point when you want to understand the framework before
building a reusable KonfAI App.
Both examples are backed by public demo data on Hugging Face:
VBoussot/konfai-demo/SynthesisVBoussot/konfai-demo/Segmentation
Each example also includes a notebook intended for a fresh environment, including Google Colab.
Choosing an example¶
Start with Segmentation when you want the smallest conservative baseline:
one input group (
CT)one label-map target (
SEG)built-in
UNettraining with
CrossEntropyLossfinal evaluation with Dice
Start with Synthesis when you want to understand more of KonfAI’s configuration model:
custom local Python modules loaded through
classpathpaired image-to-image training
masked evaluation
shared prediction and evaluation configs
a GAN variant with nested patching scopes
A good adoption pattern is:
get Segmentation to run once
adapt that layout to your own data
move to Synthesis only when you need custom modules or more advanced workflow structure
Working from the repository¶
All example commands in this documentation assume you are running from the example directory itself, for example:
cd examples/Segmentation
or:
cd examples/Synthesis
That matters because the shipped YAML files refer to local modules and dataset paths relative to the current working directory.