Back to Skills

nv-segment-ct-finetune

Used for smoke or dataset finetuning of NV-Segment-CT VISTA3D on CT NIfTI labels. Not for clinical validation.

2,791stars324forksUpdated 8/5/2026

Security Assessment

Safe(91/100)
Security Score91/100

About nv-segment-ct-finetune

This NVIDIA MedTech skill wraps smoke-scale and dataset finetuning of the NV-Segment-CT VISTA3D segmentation model on CT NIfTI labels. It solves the problem of driving an upstream MONAI bundle training entrypoint reproducibly: the wrapper stages configs, runs MONAI, and writes a schema-checked result JSON, and the skill instructs the agent not to replace it with handwritten training or inference code or patch upstream bundle files during normal use. Manifest inputs include the dataset directory, datalist, target anatomy, label mapping, and mode flags; outputs are a finetuned checkpoint and a validated result JSON.

The primary entrypoint, `run_finetune.py`, supports a `--smoke` mode for a fast workflow check and a `--sanity` mode that reproduces the MSD Task06 Lung Tumor recipe (fold-0 validation, label mapping from local class to VISTA3D class 23, automatic class-prompt segmentation, a documented patch size, learning rate, and epoch count, with before/after Dice scoring). Prerequisites are precise: Python 3.10+ with CUDA Torch, pinned `monai==1.4.0` and `numpy<2` plus several supporting packages, with a warning that MONAI 1.5.x can crash the upstream loss on boolean labels. Documented side effects are writing generated bundle configs and checkpoints, caching model assets under the Hugging Face cache, and contacting huggingface.co or raw.githubusercontent.com; a reference file shows manual bundle download via `hf download` and a pinned `urllib` fetch of a label dictionary. The included skill card marks it research-and-development only, reports evaluation results, and lists no required credentials.

Target users are medical-imaging engineers finetuning VISTA3D on custom CT segmentation datasets. The skill states it is not for clinical validation.

FAQ

What is the difference between smoke and sanity modes?

`--smoke` runs the shortest workflow check to prove wiring, config generation, checkpoint loading, and runtime compatibility (not a quality bar). `--sanity` reproduces the MSD Task06 Lung Tumor recipe with fold-0 validation and before/after Dice scoring.

What are the strict dependency requirements?

Python 3.10+ with CUDA-capable Torch and exactly `monai==1.4.0` with `numpy<2`, plus packages like nibabel, scipy, typer, PyYAML, fire, pytorch-ignite, einops, and huggingface_hub. MONAI 1.5.x can crash the upstream finetune loss on boolean labels.

How is label mapping chosen?

You pick one of `--target-anatomy` (resolved against the bundle label dictionary), `--label-mapping` (for example mapping local label 1 to VISTA3D class 23), or `--auto-seg` for automatic class-prompt finetuning.

What network access and side effects does it have?

It writes generated bundle configs and checkpoints under the output directory, may cache model assets under the Hugging Face cache, and may contact huggingface.co or raw.githubusercontent.com to fetch bundle assets and a label dictionary.

Is it validated for clinical use?

No. The skill and its skill card state it is for research and development only and is explicitly not for clinical validation.

All Files

11 files
skill-card.md3.9 KB
View
skill_manifest.yaml12.2 KB
View
references/task06-and-results.md3.8 KB
View
validators/output_schema.json6.7 KB
View
scripts/run_finetune.py66.6 KB
View
BENCHMARK.md3.9 KB
View
SKILL.md9.0 KB
View
evals/evals.json1.3 KB
View
skill.oms.sig5.9 KB
View
fixtures/spleen_micro/datalist.json0.5 KB
View
tests/test_run_finetune.py9.5 KB
View

Install nv-segment-ct-finetune

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