Instructions to use VBoussot/ImpactReg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KonfAI
How to use VBoussot/ImpactReg with KonfAI:
pip install "konfai[imaging]" konfai-apps
# List the apps this repository holds konfai-apps list VBoussot/ImpactReg # Run one of them on an image konfai-apps infer VBoussot/ImpactReg:<app> -i image.nii.gz -o Output
- Notebooks
- Google Colab
- Kaggle
Commit History
Today
-
Require itk-impact 0.2.2 for ConvexAdam
Verified signatureIts regions read the moving image with ITK's edge rules and take its statistics on the fixed grid, 4e-5 mm from the whole run (0.149 mm with 0.2.0), and its Static maps are no longer held whole in memory.69a916f
Yesterday
-
Run ConvexAdam's IMPACT presets' networks in float16
Verified signatureOn PsCBCTThorax Train-S1-003, whole, on the GPU, float16 and float32 alternated twice: 104.3 s against 104.8 s, then 78.9 s against 81.3 s; the fields are 0.017 mm apart on average (p95 0.040 mm) for a mean displacement of 1.40 mm. TS/M730 alone runs 30% faster in float16.d0e9e18 -
Run FireANTs#anatomix's network in float16
Verified signatureAnatomix alone on the GPU: 152 ms in float32, 112 ms in float16 for a 160x192x192 input. On PsCBCTThorax Train-S1-003, whole, the two fields are 0.0048 mm apart on average (p95 0.016 mm).34c76dc -
Run FireANTs#impact_mrct's networks in float16
Verified signatureOn PsCBCTThorax Train-S1-003, whole, on the GPU: 250 s in float32, 163 s in float16, with the two fields 0.0045 mm apart on average (p95 0.015 mm) for a mean displacement of 1.25 mm.8d08b70 -
Drop FireANTs' feature_overlap, which no route reads any more
Verified signature0d058ab -
Interpolate elastix's images with single-precision B-spline coefficients
Verified signatureBSplineInterpolatorFloat in every elastix map: the coefficients take half the bytes, which a registration out of core pages in 1.3 to 1.8 times faster. At order 1 the result is unchanged; at order 3 it moves by rounding (0.001 to 0.1 mm), whole and sampled alike. Every elastix build since 5.0.1 has the component.5d05f9d
2 days ago
-
Read the models at 6d9a85f, re-exported to take the whole image's statistics
Verified signatureThe TS, MIND and MRSeg networks of the konfai branch of VBoussot/impact-torchscript-models take the statistics of their normalisations from outside (norms, norm_input, norm_count), so that a region gives the whole image's features; without them they are the former exports to the bit. 6d9a85f is 1e4d0a5 with the IMPACT-Seg models added.7d0971d -
Merge main: the demo samples and the 1.8.7 seg cast into one app per engine
Verified signatureEach engine app names the sample of its default preset (ConvexAdam#composite, Elastix#rigid_bspline, FireANTs#syn): konfai-apps refuses any key of a preset entry but description, set and tiles. The int32 cast of Evaluation_with_seg was already in the engine configs. The per-preset folders main had modified stay removed.f95c08d -
FireANTs#impact: LNCC on l2-normalised features
Verified signatureThe L1 distance on raw M291 features made PsCBCTThorax worse than its initial alignment (TRE 1.27 to 2.03 mm on three development cases). LNCC on l2-normalised features gives 0.82 mm there, raises L2R_ThoraxCBCT's Dice from 0.507 to 0.556, and changes nothing on PelvicReference.11f06c3
3 days ago
-
ConvexAdam: no affine before the coarse search; the sampled strategy
Verified signatureConvexAdam is a coarse coupled-convex search then an Adam refinement; it has no affine stage, and the one impact-reg-konfai had put before them is gone from the engine. Prediction.yml and Prediction_tile.yml drop linear and linear_iterations. On 27 public pairs the composite preset without it gives the same TRE (median -0.013 mm, 15 better / 12 worse) in 0.55 of the time. The README describes impact-reg-konfai register --out-of-core sampled: the preset in one pass on the native pair, what each engine does on it and the compact transform written beside the field. The ConvexAdam app requires itk-impact 0.2.0, whose stages run by regions (--out-of-core sampled). The README's ConvexAdam#impact_mrct row says what it runs: the coarse search alone, on the segmentation head of TS/M730. Needs the impact-reg-konfai that drops these parameters.cc97d81
18 days ago
-
Size tiles for the most demanding preset that tiles
Verified signatureMerging the engines into one app per engine kept the SyN and composite tile costs, so a tiled FireANTs#anatomix or #impact_mrct pass, or ConvexAdam#impact_cbct, got tiles about three and two times too large for the memory they need. The tile costs now take the maximum over the presets that tile, as the global costs already do: FireANTs 1950/3050, ConvexAdam 650/1200 bytes per voxel (VRAM/RAM). SyN and composite tiles get smaller than they need until presets can declare their own costs.89e10b4 -
Let Elastix#rigid write its affine as the native form
Verified signaturetransform_type 'affine' goes from the engines: 'native', their default, writes the affine linear maps compose to. The rigid preset no longer declares it.de5eed6 -
Keep a TTA run's copies
Verified signatureThe engines reduced their TTA copies to a mean in the run (reduction Mean): impact-reg-konfai register --tta --uncertainty could keep only that mean in the ensemble's stack. They now declare the copies' stack (reduction Concat, then InferenceStack's mean), which konfai-apps keeps under -uncertainty and turns back into a Mean otherwise: each copy is a member.01e64eb
19 days ago
-
Measure a native transform without reference on the fixed grid
Verified signatureThe engines write elastix's rigid then B-spline as such where it is the result (one preset, no TTA, registered whole), and a B-spline has no grid of its own: Evaluation_no_reference.yml samples it on the fixed image's (TransformToField), and its tab takes the fixed image, needed for such a transform alone. A field is measured on its own grid, as before.91d0930 -
List the uncertainty configs as tabs in app.json
Verified signatureinputs_uncertainties, as inputs_evaluations: the map of the stack alone, the landmarks' spread, its calibration against the TRE, and the disagreement of a moving segmentation, each with the references it reads beside the stack.b59cec0 -
Count the background in the segmentation disagreement
Verified signatureLeft out of the vote, the background made a binary segmentation agree everywhere: where one member has the structure and another has not, the only member left agreed with itself.92ea2d7 -
Measure an ensemble's uncertainty from its stack
Verified signatureUncertainty.yml read members re-stacked one per channel, and took the standard deviation of their vectors' lengths. It now reads the ensemble's stack as KonfAI writes it (each member's components, their count in the header): the standard deviation of each component, then its norm, the spread of the vectors in mm, with its mean and 95th percentile. Three configs measure against references: the spread of the fixed landmarks pushed through every member, its Spearman correlation with the TRE, and the disagreement of the moving segmentation pulled through every member. Run them with konfai-apps uncertainty APP -i STACK [--gt ...].3e1837e -
Score registrations with and without a reference
Verified signatureSegmentations: Jaccard, relative volume difference, HD95, ASSD and surface Dice beside the Dice. Images: NMI, NCC, LNCC beside the MAE, and the share of the fixed grid sent outside the moving image. The Jacobian config becomes the measures without reference (Jacobian, bending energy, displacement lengths), and a new one measures the inverse consistency of a registration and the one registered back.40ac1ea
20 days ago
-
Evaluate a registration from its transform
Verified signatureEach engine's evaluations take the transform (-i) and the fixed and moving data (--gt, in that order) and pull the moving side through the transform in the config: konfai-apps eval scores a Transform.h5 directly, and pipeline scores the transform it just wrote. The segmentation Dice scores the moving segmentation against the fixed one in int32, as impact-reg-konfai's own copy does. Evaluation_with_jacobian.yml measures a displacement field alone.9f583c9 -
One app per engine, its configurations as presets
Verified signatureThe twelve apps were three engines (ConvexAdam, elastix, FireANTs), most a few lines of Prediction.yml apart, with the same evaluation and uncertainty files copied into each. Each engine is now one app, its base config the most used one (Composite, Rigid_BSpline, SyN), and each former app a preset of it: a list of --set, chosen as ConvexAdam#composite (konfai-apps and impact-reg-konfai with presets). A key a former app left out is set back to the model's default where the base sets another; the five that had no tile pass say "tiles": false. Every preset resolves to its former app's config, the tile pass included, and registers a pair as it did, within the GPU's run-to-run spread.54e3b3f
24 days ago
-
Generic_Rigid writes its transform as an affine
Verified signaturetransform_type: affine (impact-reg-konfai 1.8.8): the rigid map's result is written as the one AffineTransform it is, an ITK transform file or an RFC-5 'affine' store, in place of a displacement field sampled on the fixed grid.cfa1293
25 days ago
-
Declare where the linear stage starts
Verified signaturemoments_init: com in Generic_Rigid, Generic_Rigid_BSpline and FireANTs_SyN: two sparse subjects that aligned frames leave side by side start from their centres of mass. A pair covering different lengths of a body takes moments_init: cof.8454ce0
27 days ago
-
README: which impact-reg-konfai versions read main
Verified signature9307a78 -
Each preset names its demo sample, a case of the fidopt corpus
Verified signature4b7eec7
28 days ago
-
Evaluation_with_seg: cast labels to int32 in the three presets of v1.8.7 too
Verified signature6ffd54f -
Merge tag 'v1.8.7' into plan/main-presets
Verified signaturev1.8.7 # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQRnPuW9t7psxtNBRlaXoT3cgaKwWwUCasKW2QAKCRCXoT3cgaKw # W9ioAQCmMaYrKqG3QwWEUvGcPyUlQ5H0AXVO0bKt/LTY72SOEgD8CTzncbtw0iWo # NptgsfLU5Qzo+2gl+vBsAAQ6pUTUqgY= # =U/Wo # -----END PGP SIGNATURE----- # gpg: Signature made Sun 04 Oct 2026 08:11:37 PM CEST # gpg: using EDDSA key 673EE5BDB7BA6CC6D341465697A13DDC81A2B05B # gpg: Good signature from "vboussot <valentin@fideus.io>" [ultimate]268783a
29 days ago
-
Evaluation_with_seg: cast labels to int32, not uint8
Verified signatureuint8 folded every label above 255 into another (256 became background), so the segmentation metrics of a registration scored the wrong structures for a label map with more than 255 labels.31fcdb4 -
Lengths in voxels of the fixed image
Verified signatureimpact-reg-konfai measures every length in the fixed image's finest voxel. The presets were tuned in millimetres on ~2 mm anatomy, so every physical length is halved: voxel_size, final_grid_spacing, FinalGridSpacingInPhysicalUnits and ImpactVoxelSize. FireANTs' translation gets its own step, translation_lr = affine_lr / 2; affine_lr keeps the rotation and the matrix (unitless).82e9c02
-
The fidopt baselines move to their own repository, fideus-labs/fidopt
Verified signature8c197ec -
No SynthMorph app: the FreeSurfer licence is not an open one
Verified signature4634497 -
The benchmark is fidopt
Verified signature6f387be -
ConvexAdam_MIND: the authors' cost, balance and step
Verified signaturedistance L2 (an SSD over the MIND channels, in the coarse search as in the Adam stage), normalize false (the raw similarity against the diffusion weight, as the authors balance them) and learning rate 2 in the image's voxels (their 1 in the half-resolution grid's). On the check case the port now comes within 0.005 Dice of the authors' package instead of 0.025; what remains is border conventions of the coarse stage.1396c9d -
ConvexAdam_MIND as a preset of itk-impact's ConvexAdam at the authors' settings
Verified signatureNo linear stage, MIND at the image's resolution (no voxel_size), grid 6, search 4, 80 Adam steps, weight 1.25, grid 2, three smoothing passes; itk-impact 0.1.6 and impact-reg-konfai 1.8.7 pinned. A native port of the authors' method, not their code: within 0.03 Dice of their package on the benchmark's check case.8b2856d -
The baselines run through impact-reg-konfai register, like the presets
Verified signaturef66d7c2 -
The 12 registration baselines of ImagingBenchmarks as apps, next to the presets
Verified signatureANTs_SyN, NiftyReg, Deeds, Greedy, Demons, CorrField, ConvexAdam_MIND, UniGradICON, MultiGradICON, Anatomix_ConvexAdam, SynthMorph, BrainMorph: each folder carries its model.py, which runs the authors' code at a pinned version fetched on first use (a git checkout, a release archive checked by hash, a cmake or make build, or an environment uv makes on its own Python), with the benchmark's settings in Prediction.yml. baselines.py is what they share, copied into each folder by build.py. Each app was checked against the benchmark's own line on one case.19c25c8
-
build: pin itk-impact to 0.1.6 in the ConvexAdam presets
Verified signatureThe four ConvexAdam presets asked for itk-impact>=0.1.6, so a later release that changes the stages' interface would break an installed impact-reg-konfai 1.8.7. They now ask for the release they are written against.09d2a19
-
feat: presets for impact-reg-konfai 1.8.7, without integrator_n and with their model files
Verified signatureThe 1.8.7 presets of 7fc77d1 again, on top of the 1.8.6 restore: the FireANTs configs no longer pass integrator_n, which RegistrationNet dropped, each app.json declares the model files it downloads (model_files, at the models revision KonfAI pins), and the ConvexAdam presets ask for itk-impact 0.1.6, whose shared IMPACT loss they call.efdeefe -
Restore 8acfab54 for impact-reg-konfai 1.8.6
Verified signaturePuts main back as it was at 8acfab54, which impact-reg-konfai 1.8.6 reads. The 1.8.7 files stay at 7fc77d1c, the revision 1.8.7 pins, and come back to main with its release.06efc39 -
Presets for impact-reg-konfai 1.8.7: one IMPACT loss, sized from their declared cost
Verified signature7fc77d1
-
Write the configs in KonfAI 1.8.7's spellings
Verified signatureThe sink is OutputDataset, and a repeated stage is keyed Name, Name#2 in the order it runs; KonfAI 1.8.7 refuses OutSameAsGroupDataset and Name/N.8acfab5
-
fix: drop ImpactWriteFeatureMaps, which elastix-IMPACT replaced
Verified signatureThe parameter became ImpactFeatureMapOutputDirectory upstream. It was set to its own default in both maps, so dropping it changes nothing on either version and stops the newer elastix warning about a parameter it no longer reads.2652081 -
fix: the ConvexAdam presets run the settings ConvexAdam runs
Verified signatureThe two presets carried their own tuning -- a fifth of the step size over nearly twice the iterations, a coarser Adam grid, a lighter regulariser -- and the refinement ran on an unsmoothed control grid, which no preset could change until konfai exposed the setting. They now take the reference's own values: grid 6, half-width 4, 80 iterations at step 1.0, lambda 1.25, the Adam grid at half the image, and the three smoothing passes the method applies at every iteration. Measured against the reference implementation on four ThoraxCBCT pairs (mean Dice over 57 structures, 0.369 unregistered): 0.471 for convexAdam's own defaults, 0.450 for these settings here, 0.424 once the preset's linear pre-alignment runs first. The pre-alignment is kept, being what makes the preset usable on a pair that starts far apart, and it is the one setting left to revisit. Needs konfai 1.8.6 for control_grid_smoothing.bd726b5 -
feat: nine base presets, one per engine and per recommended pairing
Verified signatureSixteen presets narrowed to nine that a user can choose between: the two elastix intensity ones, the two configurations the IMPACT study recommends (TS/M730 early layers in Jacobian for CT and CBCT, its last layer with MIND in Static for MR and CT), the coarse ConvexAdam on MIND and the same pass followed by its refinement, FireANTs on its own, FireANTs driven by IMPACT, and the anatomix pipeline. FireANTs_Anatomix reproduces the configuration anatomix's authors register with: anatomix and MIND features extracted once and registered as feature volumes, each reduced to its principal components so both fit on one card, on their 6x4x2x1 schedule. Measured on ten PSMAReg pairs: 0.743 Dice against 0.730 for their own pipeline and 0.145 unregistered. It needs konfai 1.8.6, for the Static mode and for the rounding anatomix's input requires. The presets that were dropped were variants of these with another feature model. Each remaining one writes under its own name, which two of them did not…90b796d
-
feat: no VRAM plan, every preset leaves its patch free and blends its tiles
Verified signatureNo app declares a `vram_plan` any more. Every preset leaves its patch free (`patch_size: [0, 0, 0]`): the volume runs as one patch when it fits, and the engine is handed exactly what it was without a patch. Otherwise konfai tiles it on the measured VRAM, the fewest equal patches that fit, overlapping by 20 % and blended with a `Cosinus` window: without a declared overlap and window the last patch written won, which left a seam in the displacement field where a patch starts. A registration forwards one pair: its batch stays 1.ae888a5
-
Drop the config keys konfai 1.8 no longer reads
Verified signatureimages_log, Dataset.filter, Dataset.use_cache, Dataset.Patch.mask, OutputDataset.inverse_transform, Predictor.Concat, the Evaluator's is_input/patch_transforms and StepLR's verbose: nothing binds them since konfai 1.8.2, so every run printed an unknown-key warning. Found by building each workflow file and reading strict_config's report; each edit checked to parse to the old tree minus those keys. The ImpactSynth MR sCT on a test case is bit-identical before and after.9b707f7
-
Write the registration result as Transform.h5 through the itktransform backend
Verified signatureb7287c9
-
Drop the mask key from Patch, which konfai never binds
Verified signaturekonfai binds a config by walking the callable's signature and does not check for unknown keys, so 'mask' was silently dropped -- Patch takes patch_size, overlap, pad_value and extend_slice, and nothing else. The key promised masked patching and configured nothing. It cannot be honoured as written either: the blend weights each patch by its share of a total summed over the WHOLE grid, so a skipped patch leaves its neighbours' shares summing to less than one and the overlap band decays smoothly to zero -- measured, a constant displacement falling 1.0 to 0 across the band. Skipping requires renormalising over the live set, which means the volume-sized weight buffer and the final division this design exists to avoid.fc7e61a -
A preset declares its displacement field, and only that
Verified signatureThe moved image was the required output and the field the optional one, which is backwards: the field IS the registration, and the moved image is that field applied to the moving -- something the orchestrator derives. Declaring both made every preset write a second output nobody needed, and a tiled preset blend it across every patch seam before throwing it away. outputs_dataset now carries DisplacementField alone, and app.json marks it required. Needs the impact-reg-konfai that derives the moved image (>=1.8.0); an older one looks for a Moved and fails to find it.ee3e448
-
Add per-app icons and declare the registration task
Verified signature3d2686d
-
Require impact_reg_konfai 1.7.0 for the OME-Zarr displacement field
Verified signatureab82a1c