Command Palette

Search for a command to run...

Назад к скиллам
скилл № 38811

tao-analyze-detection-kpi

Run TAO Data Services KPI analysis for object detection, comparing inference annotations against ground truth to compute per-class TP/FP/FN/TN, precision…

БесплатноЗапускает вложенные скрипты
NVIDIAот NVIDIA★ 4 269 звёзд на GitHub

Установить tao-analyze-detection-kpi в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

TAO Analyze Detection KPI

Use this skill to run TAO Data Services KPI analysis for object detection. The skill compares inference annotations against ground truth over one or more KPI sources and writes a per-class metrics CSV. It does not run inference; an upstream step must produce the inference annotations first.

The container entrypoint is:

analytics kpi_analyze -e /absolute/path/to/kpi_analyze.yaml

Inputs

The user provides either a finished spec or the paths to fill into the template.

Required spec fields:

Field Meaning
data.input_format KITTI or COCO. Uppercase — see Pitfalls.
data.kpi_sources List of sources. Each entry requires image_dir, ground_truth_ann_path, and inference_ann_path; all three are asserted at startup.
data.mapping Path to a class-mapping YAML: a list of single-key dicts whose value is a LIST of aliases. See assets/example_mapping.yaml — a bare string here silently zeroes every metric.
results_dir Output directory for kpi_calc.csv.

Common optional fields. The Default column is what TAO DS uses when the field is absent; assets/default_kpi_analyze.yaml already carries the recommended value for each, so filling the template needs none of them changed:

Field Default Meaning
kpi.iou_threshold 0.5 IoU at or above which a prediction counts as a true positive.
kpi.conf_threshold 0.5 Predictions below this are dropped. The template uses 0.0, which keeps the whole PR curve so a threshold can be swept afterwards without re-running inference. On the pinned image that is safe: unmatched ground truth carries a -1.0 sentinel and lands in FN at any threshold. On a build predating that fix, 0.0 scored every missed box as a true positive — TP became the ground-truth count and FN was always 0 — so use a small positive value there.
kpi.num_recall_points 11 Recall points for the interpolated PR curve. The template keeps 101 (COCO-style), matching the reference ITS pipeline. 11 selects VOC-style sampling and reports different numbers for the same detections.
kpi.ignore_sqwidth 0 Boxes narrower than this are ignored. The template keeps 0, matching the reference ITS pipeline, which scores every box. A higher value raises AP by dropping the hardest detections rather than by detecting them.
kpi.filter false Enable source filtering.
kpi.is_internal false When true, drops every class except person and appends a Summary row.
visualize.platform local local writes a PR-curve plot into results_dir; wandb logs a run and table instead.
visualize.tag null Tag recorded on every row.

For a Grounding DINO loop, inference_ann_path is the labels/ directory TAO inference writes under {results_dir}/inference/labels/, and input_format is KITTI.

The default template is assets/default_kpi_analyze.yaml.

Quick Start

Run from the bank root, the plugin folder that $TAO_SKILL_BANK_PATH names.

Write the spec into the results directory. The run does not retain it, so a completed run otherwise cannot tell you which settings produced kpi_calc.csv. Keeping them together makes the result reproducible from the run alone.

RESULTS_DIR=/absolute/path/for/this/run          # results_dir in the spec
SPEC="$RESULTS_DIR/kpi_analyze.yaml"        # spec lives beside its outputs
RUN_ROOT=/absolute/path/that/contains/images/annotations/and/results

python3 skills/tao-analyze-detection-kpi/scripts/verify_kpi_analyze_spec.py \
  --spec "$SPEC"

DS_IMAGE="$(scripts/resolve_versions_key.py images.tao_toolkit.data_services)"

docker run --rm --gpus all --shm-size=8g --network=host \
  -v "$RUN_ROOT:$RUN_ROOT" \
  -w "$RUN_ROOT" \
  "$DS_IMAGE" \
  analytics kpi_analyze -e "$SPEC"

Pass --gpus all even though the analysis itself is CPU-only. The TAO launcher calls nvidia-smi -L unconditionally before dispatching any subtask, so a container started without GPU access dies with FileNotFoundError: 'nvidia-smi' before kpi_analyze runs.

Do not pass --user $(id -u):$(id -g); some TAO DS images call getpass.getuser() at startup and fail when the UID is not in the image's passwd file.

Generate A Spec

If the user provides paths instead of a ready spec, copy the template and fill in the nulls. Every tuning value it already carries is the one this stage wants — change one only deliberately.

cp skills/tao-analyze-detection-kpi/assets/default_kpi_analyze.yaml "$SPEC"

Fill data.kpi_sources (one entry per source), data.mapping and results_dir, all as absolute paths, then validate:

python3 skills/tao-analyze-detection-kpi/scripts/verify_kpi_analyze_spec.py --spec "$SPEC"
data:
  input_format: KITTI
  kpi_sources:
  - image_dir: /absolute/path/kpi/images               # no trailing slash
    ground_truth_ann_path: /absolute/pa
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Read
  2. 02Bash

Вложенные файлы

  • assets/default_kpi_analyze.yaml
  • assets/example_mapping.yaml
  • evals/evals.json
  • references/skill_info.yaml
  • scripts/verify_kpi_analyze_spec.py

FAQ

Что делает скилл tao-analyze-detection-kpi?

Run TAO Data Services KPI analysis for object detection, comparing inference annotations against ground truth to compute per-class TP/FP/FN/TN, precision, recall, accuracy, and AP at a fixed IoU. Use when an object detection workflow needs per-class mAP reported after inference, or when the user asks to "run KPI analyze", "compute detection mAP", or "score my OD predictions against ground truth".

Как установить скилл tao-analyze-detection-kpi?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tao-analyze-detection-kpi запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить tao-analyze-detection-kpi с