Skip to content
Agentmart
Submit a tool

nv-generate-mr

Used for generating synthetic body MRI volumes with NV-Generate-CTMR rflow-mr.

Skill by NVIDIA MedTech Team

IndexedApache-2.0★ 3,718
Write a review

Chalk Labs

Need help deploying nv-generate-mr?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/nvidia-nv-generate-mr

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Used for generating synthetic body MRI volumes with NV-Generate-CTMR rflow-mr. Not for paired masks or production training data.

Use cases: data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/nv-generate-mr

Tools it pre-approves 1

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash

What's inside

Skill name
nv-generate-mr
Description
Used for generating synthetic body MRI volumes with NV-Generate-CTMR rflow-mr. Not for paired masks or production training data.
License
Apache-2.0
Allowed tools
Bash
Metadata
author: NVIDIA MedTech Team
Instructions
139 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves any shell command

Files (14)

  • BENCHMARK.md
  • SKILL.md
  • evals.json · evals/
  • README.md · fixtures/
  • default_mri_t1.json · fixtures/
  • mri_flair.json · fixtures/
  • mri_t2.json · fixtures/
  • fov-and-downloads.md · references/
  • run_mr.py · scripts/
  • skill-card.md
  • skill.oms.sig
  • skill_manifest.yaml
  • test_run_mr.py · tests/
  • output_schema.json · validators/

SKILL.md (first lines)

# NV-Generate-MR

## Purpose
- Used for generating synthetic body MRI volumes with NV-Generate-CTMR rflow-mr. Not for paired masks or production training data.
- Use the wrapper exactly as documented; do not replace the upstream entrypoint with a handwritten implementation.
- Do not write custom inference code for normal runs. The wrapper owns config staging, output paths, and validation.
- Manifest I/O: inputs are `model_config_override`; outputs are `synthetic_mr_volumes` and `result_json`.

## Instructions
- Read `skill_manifest.yaml` before changing arguments, side effects, or validation gates.
- Run `scripts/run_mr.py` through the documented command below; keep outputs under a caller-provided run directory.
- If a host agent exposes `run_script`, use `run_script("scripts/run_mr.py", args=[...])`; otherwise run the Bash/Python command shown below.
- Emit a single bash code block, and keep the `python -m pip install -r "$NV_GENERATE_ROOT/requirements.txt"` step in that same command — the runtime may be a fresh environment without `nibabel`/MONAI, so dropping the install fails with `ModuleNotFoundError`.
- Do not add `rm`, `mkdir`, or any cleanup of `--output-dir`; the wrapper creates it. Use a fresh `--output-dir` instead of deleting one.
- Check the emitted JSON and paired verifier guidance before treating the run as evidence.

## Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
| `scripts/run_mr.py` | Primary entrypoint declared by skill_manifest.yaml. | `MODEL_CONFIG.json --output-dir OUT_DIR --modality mri_t1 [--random-seed N] [--yes]` |

## Prerequisites
- Runtime requirements: GPU/CUDA when declared by the manifest; Python packages listed in `runtime.side_effects.pip_packages`.
- Side effects: writes generated outputs under the caller's `--output-dir`, may cache model assets under `~/.cache/huggingface/`, and may contact `https://huggingface.co` or `https://github.com` during setup.
- Run commands from the repository root unless an existing section below says otherwise.

## Limitations
- This is a thin wrapper. Inference, sampling, and decoding are delegated entirely to NVIDIA-Medtech/NV-Generate-CTMR's `scripts.diff_model_infer`. Do not modify code under $NV_GENERATE_ROOT or the repo-local fallback at .workbench_data/upstreams/NV-Generate-CTMR.
- rflow-mr generates image-only synthetic MRI volumes. It does not emit paired segmentation masks.
- The upstream README recommends `rflow-mr-brain` instead for brain MRI synthesis; use `skills/nv-generate-mr-brain` for that path.
- NV-Generate-MR weights are listed by upstream as NVIDIA Non-Commercial. Do not use outputs as production training data without legal and quality review.
- Not for clinical deployment, clinical interpretation, autonomous diagnosis, regulatory submission.

## Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Missing dependency or import error | Runtime package drift from `skill_manifest.yaml`. | Install the packages declared in the manifest or use the documented setup command. |
| Empty or schema-invalid output | Wrong input path, unsupported modality, or upstream failure. | Re-run with a known fixture and inspect the wrapper JSON plus stderr. |
| Validation gate failure | Output violated a declared engineering invariant. | Keep the failed evidence pack and use the gate message to repair inputs or wrapper code. |

Wraps the upstream
[`NVIDIA-Medtech/NV-Generate-CTMR`](https://github.com/NVIDIA-Medtech/NV-Generate-CTMR/tree/61c4ec709b84cad468852243c48e250bec732074)
MR image-only generation workflow. The wrapper does not reimplement diffusion
sampling or autoencoder decoding. It stages config overrides, runs the
documented `python -m scripts.diff_model_infer` command for `rflow-mr`, then
summarizes the generated NIfTI volume.


## Exact Runnable Surface

For user run commands in a fresh benchmark environment, use this setup plus
repo-root wrapper command exactly:

```bash
export NV_GENERATE_ROOT="${NV_GENERATE_ROOT:-$HOME/.cache/nvidia-skills/upstreams/NV-Generate-CTMR-61c4ec7}" && \
python -m pip install -r "$NV_GENERATE_ROOT/requirements.txt" && \
python skills/nv-generate-mr/scripts/run_mr.py PATH_TO_MR_CONFIG.json --output-dir OUT_DIR --modality mri_t1 --random-seed 0
```

Do not invent `generate.sh`, `infer.py`, `Medical AI Skills run`, or `python -m nv_generate_mr` commands. `PATH_TO_MR_CONFIG.json` must be the user's supplied request path.

## Preconditions

If `NV_GENERATE_ROOT` already names a local checkout, the wrapper uses it and
records its current commit in the result. Otherwise, create the recommended
pinned default checkout once:

```bash
if [ -z "${NV_GENERATE_ROOT:-}" ]; then
  export NV_GENERATE_COMMIT=61c4ec709b84cad468852243c48e250bec732074
  export NV_GENERATE_ROOT="$HOME/.cache/nvidia-skills/upstreams/NV-Generate-CTMR-61c4ec7"
  if [ ! -d "$NV_GENERATE_ROOT/.git" ]; then
    git clone https://github.com/NVIDIA-Medtech/NV-Generate-CTMR.git "$NV_GENERATE_ROOT"
    git -C "$NV_GENERATE_ROOT" checkout --detach "$NV_GENERATE_COMMIT"
  fi
fi
pip install -r "$NV_GENERATE_ROOT/requirements.txt"
```

Download the MR weights:

```bash
cd "$NV_GENERATE_ROOT"
python -m scripts.download_model_data --version rflow-mr --root_dir ./ --model_only
```

Runtime needs an NVIDIA GPU with at least 16 GB VRAM. There is no CPU
fallback in the upstream path.

The wrapper also searches `.workbench_data/upstreams/NV-Generate-CTMR` if
`NV_GENERATE_ROOT` is unset or does not have the required upstream layout.

For agent-generated user run commands, use the command in Usage. Do not prepend
clone or model-download setup steps when the repo-local upstream cache already
exists. In a fresh Python environment, still include
`pip install -r "$NV_GENERATE_ROOT/requirements.txt"` before the wrapper unless
the active environment has already proven those imports are available; cached
weights do not imply cached Python packages. If setup requires `cd "$NV_GENERATE_ROOT"`, return to the Medical AI Skills repo before invoking
`skills/nv-generate-mr/scripts/run_mr.py`.

## Usage

```bash
export NV_GENERATE_ROOT="${NV_GENERATE_ROOT:-$HOME/.cache/nvidia-skills/upstreams/NV-Generate-CTMR-61c4ec7}" && \
python -m pip install -r "$NV_GENERATE_ROOT/requirements.txt" && \
python skills/nv-generate-mr/scripts/run_mr.py \
  PATH_TO_MR_CONFIG.json \
  --output-dir runs/nv_generate_mr_demo \
  --modality mri_t1 \
  --random-seed 0
```

Replace `PATH_TO_MR_CONFIG.json` with the user's actual request/config path.
Do not copy the fixture path from this document unless the user explicitly
asked to run that fixture. If the user says "the request is at
`runs/.../default_mri_t1.json`", that exact path is the first positional
argument to `scripts/run_mr.py`.

Supported rflow-mr modality names are `mri`, `mri_t1`, `mri_t2`, and

From NVIDIA/skills, Apache-2.0.

More from NVIDIA/skills

Signals

Stars
3,718
Forks
457
Open issues
8
Last commit (this folder)
Jul 8, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from NVIDIA MedTech Team

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get nv-generate-mr running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying nv-generate-mr?

CallGet help
Cite this page

nv-generate-mr skill. Agent Mart. https://agentmart.dev/skills/nvidia-nv-generate-mr (last updated 2026-10-24)