AGENT SKILL

totalsegmentator

Use TotalSegmentator as an installed package for medical-image segmentation, task discovery, runtime configuration, output parsing, DICOM handling, auxiliary analysis, and advanced training boundaries.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
totalsegmentator
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use TotalSegmentator as an installed package for medical-image segmentation, task discovery, runtime configuration, output parsing, DICOM handling, auxiliary analysis, and advanced training boundaries.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

TotalSegmentator

Use this skill when a user asks about TotalSegmentator, the TotalSegmentator CLI, the totalsegmentator Python package, anatomical CT/MR segmentation tasks, model-weight or license setup, segmentation output parsing, DICOM/NIfTI handling, or TotalSegmentator-style nnU-Net retraining.

TotalSegmentator outputs are research/workflow artifacts unless the surrounding product has its own approved clinical validation. Preserve input provenance, verify task/class choices, and prefer machine-readable JSON outputs over scraping stdout.

Quick Start

  1. Discover capabilities first when task or class names are uncertain: totalseg_info --json or capability-discovery.
  2. Build segmentation commands through segmentation-workflows; add --report <path.json> for automation.
  3. Parse run_report.json, statistics.json, multilabel outputs, probabilities, and combined masks through outputs-and-statistics.
  4. Use runtime-configuration for install/import checks, CPU/GPU/MPS decisions, model weights, offline setup, licenses, and usage-stat settings.
  5. Use dicom-and-formats before long runs when inputs are DICOM folders/zips, DICOM output is requested, or crop-to-body preprocessing is needed.

Route by User Intent

User intent Read this
List tasks, classes, modalities, license flags, or valid --roi_subset names capability-discovery
Build or run a CT/MR segmentation CLI/API workflow segmentation-workflows
Validate reports, statistics, masks, multilabel headers, probabilities, or combined masks outputs-and-statistics
Fix install/import/backend issues, choose devices, pre-stage weights, configure offline or licensed tasks runtime-configuration
Validate NIfTI/DICOM inputs, DICOM SEG/RTSTRUCT outputs, modality detection, or crop-to-body preprocessing dicom-and-formats
Use contrast phase, CT/MR modality, body stats, or Evans index helper CLIs auxiliary-analysis
Plan retraining, dataset conversion, benchmark evaluation, or model-contribution work advanced-training

Safe Install and Smoke Check

Install the public package in the user's chosen environment:

pip install TotalSegmentator

Then run safe checks that do not download model weights:

totalseg_info --json
python scripts/check_install.py --task total --class-name liver --json

The root helper verifies package metadata, importability, registry access, selected task/class names, and console-script availability. It does not run segmentation, validate licenses against the network, or download weights.

Common Workflows

  • Automation pipeline: discover task/classes with totalseg_info --json, build a TotalSegmentator command with --report and optional --statistics, then parse JSON files through the outputs sub-skill.
  • CPU-only run: choose --device cpu, add --fast or a small --roi_subset, and use the segmentation troubleshooting reference for memory/runtime limits.
  • Offline deployment: use runtime configuration to set a writable TotalSegmentator home, pre-stage weights, save any required license, and run read-only diagnostics before inference.
  • DICOM output: validate the input as DICOM first, install the needed optional DICOM output dependency, and avoid requesting DICOM output from NIfTI input.
  • Advanced research: use the training sub-skill only for explicit retraining/evaluation/contribution requests; ordinary segmentation should stay in the segmentation workflow.

Runtime References

Boundaries

  • Do not hard-code task/class lists from memory; use totalseg_info or totalsegmentator.registry.
  • Do not run heavyweight segmentation, model downloads, licensed tasks, or training by default when the user only needs planning or validation.
  • Do not expose license numbers, local cache paths, or environment paths in shared reports.
  • Do not treat skipped native examples or heavyweight tests as passing; record why they are skipped and use safe JSON/helper checks where possible.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351