Logo vun Nv Reason Ct

Nv Reason Ct

Organisatioun
NVIDIA-Medtech
nv-reason-ct

Run NV-Reason-CT inference on user-provided 3D NIfTI chest or abdominal CT volumes for engineering and research workflows. Not for diagnosis, treatment, or clinical reporting.

Iwwersiicht

EditeurNVIDIA-Medtech
Repositorymedical-AI-skills
Skill-Nummnv-reason-ct
Stären
40
Forks
7
Matgeliwwert Fichieren
11
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 11 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum NVIDIA-Medtech op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Nv Reason Ct an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/NVIDIA-Medtech/medical-AI-skills/tree/dev/skills/nv-reason-ct
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NVIDIA-Medtech/medical-AI-skills.git /tmp/medical-AI-skills
mkdir -p .claude/skills
cp -r /tmp/medical-AI-skills/skills/nv-reason-ct .claude/skills/nv-reason-ct
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Nv Reason Ct an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Nv Reason Ct automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Nv Reason Ct net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

NV-Reason-CT

Purpose

  • Runs the documented nvidia/NV-Reason-CT Hugging Face Transformers path on one user-provided 3D NIfTI CT volume and text prompt.
  • Emits result_json with input geometry and hash, anatomy-region selection, response text, runtime identity, dependency versions, and limitations.
  • Manifest I/O: inputs are ct_request_or_fixture and optional direct ct_volume; output is result_json on stdout.
  • Not for diagnosis, treatment, triage, patient-facing output, or clinical reporting.

Instructions

  1. Read skill_manifest.yaml before changing arguments, dependencies, side effects, or validation gates.
  2. Run scripts/run_nv_reason_ct.py; do not write replacement inference code or use the Gradio demo for normal runs. Before inference, explain that the selected model and processor contain custom Python code running with the caller's permissions. Review the selected Hub revision or local export and obtain the caller's explicit authorization to load that code; ask if it has not already been granted. Only then pass --trust-model-code. Do not infer this consent from a CT request file, environment setting, cached files, or a successful setup check.
  3. After that authorization, hosts exposing a helper may use run_script("scripts/run_nv_reason_ct.py", args=["PATH_TO_CT.nii.gz", "--trust-model-code", "--anatomy-region", "chest", "--prompt", "PROMPT", "--out-dir", "OUT_DIR"]).
  4. Inspect stdout JSON and the exit status. Preserve JSON for the caller or eval harness, including partial output on failure; do not redirect it away with >. Successful inference writes only stdout, without creating --out-dir. Exit code 3 means generation hit the token ceiling without EOS: the text is incomplete and the completion gate fails. Only then does the wrapper attempt to create --out-dir and save a unique partial_result_*.json. Only a successful save adds output.partial_json_path and prints the path on stderr. If saving fails, stderr warns to retain stdout; the JSON remains available there without a file path. Input, dependency, and inference errors exit 2 with an error on stderr.

Tool scope: Bash runs the committed wrapper and documented setup commands; Read covers skill files, caller-selected inputs, and model assets; Write covers caller-selected outputs and isolated caches. Env is SkillSpector's environment-capability label for the runtime variables listed below, accessed through shell/Python on hosts without a separate environment tool. These declarations do not authorize unrelated file access, printing authentication values, or changing an existing development environment.

Examples

For the end-to-end example, follow EXAMPLES.md to download the upstream Git LFS volumes into a separate checkout, then run examples/example_1.nii.gz through the wrapper for both chest and abdomen. That scan covers both regions according to the upstream README.

Live inference on a chest CT, after explicit custom-code authorization:

bash
python skills/nv-reason-ct/scripts/run_nv_reason_ct.py PATH_TO_CT.nii.gz \
  --trust-model-code \
  --anatomy-region chest \
  --prompt "write a structured chest CT report" \
  --out-dir runs/nv_reason_ct_case

Require exit 0, runtime.mode == "hf_transformers", runtime.mock == false, nonempty response text, and runtime.truncated_by_max_new_tokens == false. A JSON request may also point to the CT volume; replace volume_path in fixtures/example_request.json with an existing authorized file before running it.

For a complete local model-and-processor export saved by upstream SFT or GRPO:

bash
python skills/nv-reason-ct/scripts/run_nv_reason_ct.py \
  --model ./data/nv_reason_ct_sft_example --check-setup --fail-on-not-ready
python skills/nv-reason-ct/scripts/run_nv_reason_ct.py PATH_TO_CT.nii.gz \
  --model ./data/nv_reason_ct_sft_example --anatomy-region chest --trust-model-code

The directory must contain the full model, custom code, tokenizer, and processor assets, not just adapters or an intermediate optimizer checkpoint. Review local custom code before loading it. Local exports bypass Hub revision resolution and load with local_files_only=True; they record runtime.model_source == "local", an absolute runtime.model path, and null revision/resolved_revision. Keep export content hashes separately: a path is not immutable provenance. Do not pass --revision for local exports; NV_REASON_CT_REVISION is ignored for them. --model-id remains an alias for --model. This does not sandbox custom Python code or validate model compatibility beyond the upstream loading contract.

For an abdominal crop, pass --anatomy-region abdomen. Pass --anatomy-region none only for a manually cropped input; upstream preprocessing then uses a centered crop. Pass --no-thinking for a concise response without thinking output.

The region defaults match upstream inference.py: write a structured chest CT report or write a structured abdominal CT report. To exercise another documented prompt in an engineering check, pass --prompt "full chest CT reasoning analysis" (or the abdominal equivalent), or preserve the caller's focused question verbatim. Supply a scan that actually covers the requested anatomy; the wrapper does not establish that coverage.

Each invocation loads the model and starts a new single-turn conversation. The upstream README also documents model reuse and follow-up history, but this wrapper does not preserve earlier turns. Do not simulate a follow-up by silently discarding history or carry answers between scans. Upstream training JSONL files are not runnable demo fixtures: they contain records but no CT volumes. Use the upstream examples/ volumes or a caller-owned authorized NIfTI scan; do not use reference assistant answers as inference prompts.

Available Scripts

ScriptPurposeArguments
scripts/run_nv_reason_ct.pyRead-only setup checks and inference on an existing NIfTI volume.CT_OR_REQUEST --trust-model-code [--anatomy-region chest|abdomen|none] [--prompt TEXT] [--thinking|--no-thinking] [--out-dir OUT_DIR]; --check-setup needs neither CT input nor code-execution consent.

Prerequisites

  • Python 3.11+ for the wrapper, a CUDA-capable NVIDIA GPU with bfloat16 support for live inference, and enough memory for the model plus volumetric visual tokens.
  • Follow NV-Reason-CT's installation instructions in a fresh environment. The upstream repository owns dependency requirements and compatibility guidance; this skill does not duplicate its requirements file or enforce package-version constraints. Use the upstream inference setup, not the training extras. The wrapper never installs or upgrades packages.
  • The manifest inventories required packages, including huggingface-hub for model access. Setup reports package availability and installed versions; the historical environment below is advisory evidence, not an installation prescription. Review the selected environment's dependency security separately.
  • Model assets may download from https://huggingface.co under ~/.cache/huggingface/. Set HF_TOKEN when repository access requires authentication.
  • The upstream examples are available from the public NV-Reason-CT repository and require Git LFS. Download actual volumes with git lfs pull; a small text pointer named .nii.gz is not a CT image. Do not install Git LFS globally or change an existing checkout's configuration without authorization; the example guide uses checkout-local configuration.
  • Run a read-only setup check before downloading weights or starting inference. It checks the NV-Reason-CT processor/code assets and all indexed weight shards in only the selected cached Hub snapshot or local export. This is offline file-presence inspection, without model initialization or integrity verification. Other model layouts may require different assets:
bash
python skills/nv-reason-ct/scripts/run_nv_reason_ct.py --check-setup

This diagnostic command exits 0 when it produces a report, even if setup is not ready. For an automation gate after staging model assets, use --check-setup --fail-on-not-ready: exit 0 means ready_for_live_cuda_inference, exit 1 means setup is not ready, and exit 2 means an argument or execution error. Inspect the JSON recommendation in either mode. Readiness covers imports, CUDA/bfloat16, and asset presence, not package-version compatibility or a vulnerability audit; version_constraints_checked is false. Enable offline settings only after the selected model assets and custom code are cached.

Inference without --trust-model-code exits 2 before model lookup or loading. With it, the wrapper warns on stderr before loading custom code, including the resolved Hub commit or local export path. This flag is an acknowledgement, not a sandbox, code audit, or signature verification. The setup report's model_code_opt_in_required remains true even when assets are ready. The manifest's default command does not supply consent; use the documented explicit CLI invocation for authorized live inference.

For a disposable run, keep caches separate from installed packages: set HF_HOME, HF_HUB_CACHE, HF_MODULES_CACHE, XDG_CACHE_HOME, and TORCH_HOME to subdirectories of a caller-owned temporary directory before launching Python. After the process exits, remove only those explicitly identified task caches when cleanup is requested, retaining input scans and result JSON. Do not purge a shared Hugging Face cache or change an existing development environment.

Verified environment baseline

The live CUDA path was reverified on 2026-09-21 with the upstream examples/example_1.nii.gz in both chest and abdomen modes, using the versions below. These are recorded successful-run settings, not required versions, an upstream compatibility guarantee, or a security recommendation. Select the environment using upstream guidance and a PyTorch CUDA build compatible with the host driver; the recorded PyTorch distribution version was 2.12.0, and torch.__version__ reported 2.12.0+cu130.

The historical Transformers version below is affected by CVE-2026-9856. Consult upstream maintainers for a compatible, security-reviewed environment; this skill has not verified a remediated live baseline. Moving dependency ownership upstream does not resolve that finding.

ComponentVerified version or setting
Python3.12.3
PyTorch2.12.0 (2.12.0+cu130 runtime build)
CUDA reported by PyTorch13.0
Transformers5.6.2
dynamic-network-architectures0.4.3
MONAI1.6.0
NiBabel5.4.2
SciPy1.16.0
NumPy2.5.2
Pillow11.2.1
timm1.0.22
einops0.8.2
safetensors0.7.0
huggingface-hub1.30.0
packaging25.0

The verified inference settings were one 48 GB NVIDIA RTX 6000 Ada GPU (driver 580.178.04), bfloat16 model weights, SDPA attention, deterministic decoding (do_sample=False), thinking enabled, and max_new_tokens=2048. The upstream example generated 438 tokens with the chest crop and 453 with the abdomen crop; neither response was truncated. Both matched the upstream CLI after trimming surrounding whitespace, using the same reviewed immutable model revision and offline assets in a disposable environment. All three upstream volumes also passed input/geometry/hash checks. This is a recorded baseline, not a fresh run of every subsequent skill revision. It verifies inference wiring, not clinical correctness. Lower-memory GPUs and other PyTorch/CUDA combinations have not yet been verified by this skill.

Environment variables:

VariableWhen to use
NV_REASON_CT_MODELOverride the Hub model id or select a complete local export.
NV_REASON_CT_REVISIONSelect a reviewed Hub model revision; prefer an immutable revision for evidence runs. Ignored for local exports.
HF_HOMEPoint to a caller-managed Hugging Face cache.
HF_HUB_CACHESet an explicit model cache under HF_HOME when isolating a run; overrides any inherited shared Hub cache location.
HF_MODULES_CACHEIsolate downloaded Transformers custom-code modules for a disposable run.
XDG_CACHE_HOMEIsolate supporting library caches for a disposable run.
TORCH_HOMEIsolate Torch asset caches for a disposable run.
HF_TOKENAuthenticate model access when required.
TRANSFORMERS_OFFLINESet to 1 only after all model and custom-code files are cached.
HF_HUB_OFFLINESet to 1 only after all Hugging Face assets are cached.
CUDA_VISIBLE_DEVICESRestrict which GPU the wrapper may use.

Inference uses the upstream contract: AutoModelForImageTextToText and AutoProcessor with trust_remote_code=True, bfloat16, SDPA attention, images3d=[CT_PATH], deterministic generation, and anatomy-aware chest or abdomen cropping. For Hub models, each run resolves the requested revision once and uses that immutable commit for model weights, processor assets, and custom code. Output records runtime.model_source == "hub", retains the requested runtime.revision, and records the commit in runtime.resolved_revision. Keep private revision identifiers in local evidence until approved for disclosure. CUDA is always required; select a GPU with CUDA_VISIBLE_DEVICES.

Limitations

  • The wrapper loads upstream custom code only after explicit --trust-model-code opt-in. Review that code and use an isolated environment and an immutable reviewed revision for evidence runs. Neither offline mode nor a local export prevents arbitrary actions by custom code.
  • It checks readable 3D NIfTI structure, positive voxel spacing, a finite affine, and file identity. It does not verify de-identification, Hounsfield-unit calibration, anatomy coverage, crop quality, or clinical correctness.
  • Model output can hallucinate, omit findings, or present unreliable reasoning. Reviewable reasoning text is generated output, not proof of the model's internal computation.
  • CT scans and model weights must be supplied separately. The upstream examples demonstrate inference wiring and provide no clinical ground truth. A successful setup check is not completed model inference.
  • The moving main revision is suitable only for development. Replace it with the reviewed immutable public release revision before publication.
  • This wrapper does not cover the Gradio UI, finetuning, retraining, clinical deployment, or patient-facing use.

Troubleshooting

ErrorCauseFix
Model-code consent required (exit 2)Inference was requested without explicit opt-in.Explain the code-execution risk and obtain authorization for the selected model, then pass --trust-model-code. Do not auto-consent for the caller. --check-setup remains available without it.
Missing or broken dependency in --check-setupA required package is unavailable or cannot import.Inspect setup.dependencies and follow upstream installation guidance in a fresh environment. Installed versions are recorded, not enforced by this skill.
Inference API or dependency compatibility errorImport checks passed but the installed stack may not support the selected model.Compare the reported versions with upstream guidance; retain the error for upstream review. Setup success alone does not prove compatibility.
Authentication or repository-not-found errorModel assets are not public or the current account lacks access.Set an authorized HF_TOKEN; do not copy tokens into commands, fixtures, or logs.
Cache is incomplete in --check-setupThe selected revision or some of its required assets are absent.Inspect missing_files, then download the selected revision with authorized access before enabling offline mode. Files cached for another revision do not satisfy this check.
Incomplete local exportTraining saved only adapters, an intermediate checkpoint, or no processor assets.Supply the complete model-and-processor export from upstream training; do not substitute a Hub revision for missing files.
CUDA unavailable or bfloat16 unsupportedInference is running on an unsupported device or isolated GPU context.Use a compatible CUDA host before retrying inference.
NIfTI shape or spacing errorInput is unreadable, 4D, or has invalid geometry metadata.Supply one 3D .nii or .nii.gz CT volume with valid spacing and affine metadata.
Git LFS pointer instead of a CT volumeThe checkout contains the small pointer file, not the NIfTI data.Run git lfs pull --include="examples/*.nii.gz" in the upstream checkout, then retry.
Poor chest or abdomen cropAutomatic anatomy heuristics do not fit the scan geometry.Inspect upstream preprocessing, manually crop the CT, and pass --anatomy-region none.
Empty or truncated responseGeneration stopped without text, or reached the token limit without EOS (exit 3).Preserve any partial JSON and stderr; do not treat it as a completed response. Verify setup and input, then adjust --max-new-tokens if truncation is reported.

License

This skill's documentation, wrapper, and tests are licensed under Apache-2.0. See LICENSE for the full terms.

The separately obtained upstream NV-Reason-CT model code, weights, and example data retain their upstream terms, including OpenMDW-1.1. The skill's Apache-2.0 license does not relicense those assets. Retain the applicable licenses and notices when redistributing either the skill or upstream materials.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Nv Reason Ct?

Run NV-Reason-CT inference on user-provided 3D NIfTI chest or abdominal CT volumes for engineering and research workflows. Not for diagnosis, treatment, or clinical reporting.

Firwat Nv Reason Ct op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Nv Reason Ct besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Nv Reason Ct an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/NVIDIA-Medtech/medical-AI-skills/tree/dev/skills/nv-reason-ct an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Nv Reason Ct benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Nv Reason Ct benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Nv Reason Ct domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Nv Reason Ct gratis?

Jo. De Skill gëtt vum NVIDIA-Medtech ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇