Back to Skills

nv-generate-mr-brain

Used for generating synthetic brain MRI volumes with NV-Generate-CTMR rflow-mr-brain. Not for production training data.

2,779stars322forksUpdated 8/4/2026

Security Assessment

Safe(92/100)
Security Score92/100

About nv-generate-mr-brain

The nv-generate-mr-brain skill is a thin wrapper for generating synthetic, image-only brain MRI volumes using NVIDIA's NV-Generate-CTMR rflow-mr-brain model. It solves the problem of correctly invoking a complex upstream diffusion/autoencoder inference pipeline without reimplementing it: the wrapper owns config staging, output paths, and validation, and delegates all sampling and decoding to the pinned upstream NVIDIA-Medtech/NV-Generate-CTMR repository. It is explicitly for research and engineering-verification workflows and not for production training data.

The skill exposes a single entrypoint, scripts/run_mr_brain.py, driven by a model config JSON with an output directory, modality (for example mri_t1), optional random seed, and an optional confirmation flag. It documents a manifest (skill_manifest.yaml) that declares inputs and outputs, prescribes running the documented command exactly (including a pip install of the upstream requirements so fresh environments do not fail on missing packages like nibabel or MONAI), and forbids adding rm, mkdir, or cleanup of the output directory since the wrapper manages it. Side effects include writing NIfTI volumes and a result JSON under the caller's output directory, optionally caching model assets under the HuggingFace cache, and contacting huggingface.co or github.com during setup to fetch model weights. A reference file covers field-of-view settings and the model-only weight download.

Target users are developers and researchers who need synthetic brain MRI volumes for R&D and verification. The skill is clear about limitations: it produces image-only volumes with no segmentation masks, outputs are not safe as production training data without independent quality review, and it is not for clinical deployment, interpretation, autonomous diagnosis, or regulatory submission.

FAQ

What does this skill generate?

Image-only synthetic brain MRI volumes (NIfTI files) plus a result JSON summary, using the upstream NV-Generate-CTMR rflow-mr-brain workflow. It does not emit paired segmentation masks.

Can the output be used to train production models or for clinical use?

No. The outputs are synthetic and not safe as training data for production medtech models without independent quality review, and the skill is explicitly not for clinical deployment, interpretation, autonomous diagnosis, or regulatory submission.

How do I run it?

Run scripts/run_mr_brain.py through the documented command, passing a model config JSON, an --output-dir, and a --modality such as mri_t1, with an optional --random-seed. Keep the pip install of the upstream requirements in the same command so fresh environments have nibabel and MONAI available.

What are the prerequisites and side effects?

GPU/CUDA when declared by the manifest and the Python packages listed in the manifest. It writes outputs under your --output-dir, may cache model assets under the HuggingFace cache, and may contact huggingface.co or github.com during setup to fetch model weights.

Should I modify the inference code?

No. It is a thin wrapper; inference, sampling, and decoding are delegated entirely to the upstream NV-Generate-CTMR repository. Do not modify upstream code, and use a fresh --output-dir rather than deleting an existing one.

All Files

14 files
fixtures/mri_t2.json0.2 KB
View
skill-card.md4.1 KB
View
evals/evals.json1.2 KB
View
references/fov-and-downloads.md0.9 KB
View
skill.oms.sig6.6 KB
View
fixtures/default_mri_t1.json0.3 KB
View
scripts/run_mr_brain.py25.9 KB
View
tests/test_run_mr_brain.py5.9 KB
View
BENCHMARK.md3.9 KB
View
fixtures/README.md1.0 KB
View
SKILL.md7.8 KB
View
fixtures/mri_flair_skull_stripped.json0.3 KB
View
skill_manifest.yaml7.3 KB
View
validators/output_schema.json5.5 KB
View

Install nv-generate-mr-brain

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

nvidia/skills