nv-generate-mr-brain-finetune
Installation
SKILL.md
NV-Generate-MR-Brain-Finetune
Purpose
- Used for finetuning the NV-Generate-CTMR
rflow-mr-braindiffusion UNet from user-supplied NIfTI training volumes. - Not for clinical interpretation, regulatory use, or approving synthetic data for production training.
- The wrapper stages the config glue locally and delegates execution to existing upstream scripts:
scripts.diff_model_create_training_data,scripts.diff_model_train, and optionallyscripts.diff_model_infer. It does not execute the notebook. - Manifest I/O: inputs are
datalistanddata_base_dir; outputs arefinetuned_checkpoint, optionalinference_outputs, andresult_json. - The underlying training contract is the upstream config/env JSON (the same one driven from cell
[10]oftrain_diff_unet_tutorial.ipynb). The wrapper stages those JSON files for you and exposes the most-tuned fields as CLI flags; the sections below document the fields, their defaults, and how to monitor/tune a run.
Instructions
- Read
skill_manifest.yamlbefore changing arguments, side effects, or validation gates. - Run
scripts/run_mr_brain_finetune.pyfrom the Medical AI Skills repo root. - If a host agent exposes
run_script, userun_script("scripts/run_mr_brain_finetune.py", args=[...]); otherwise run the Bash/Python command below. - Use
--preflightfirst when checking a new datalist; remove--preflightonly when the user explicitly wants to launch GPU finetuning. - For a staged preflight input bundle directory, use
BUNDLE/preflight_datalist.jsonas the datalist andBUNDLE/preflight_datasetas--data-base-dirwhen those files are present.
Examples
Validate and stage a preflight finetune check from an input bundle (the recommended first step — no GPU, no training). This is the single canonical command; replace INPUT_BUNDLE and OUT_DIR with your paths: