Tao Analyze Detection Kpi
NVIDIAOfficialCreated by NVIDIA Corporation
- Skill
- Review and audit
- Software development
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured way to evaluate object detection models using TAO Data Services. It compares inference annotations against ground truth to calculate key performance indicators including True Positives, False Positives, False Negatives, precision, recall, accuracy, and Average Precision (AP) at a fixed IoU. The process generates a per-class metrics CSV and optional PR curve plots, enabling developers to quantify model performance across different datasets.
What it does
- Calculates per-class detection metrics like TP, FP, FN, and AP.
- Supports both KITTI and COCO annotation formats.
- Generates a comprehensive per-class metrics CSV report.
- Produces PR curve visualizations for performance analysis.
- Allows for custom class mapping to aggregate multiple labels into canonical classes.
- Enables threshold-based filtering for precision-recall evaluation.
When to use it
- When you need to validate object detection model performance after inference.
- When comparing model predictions against ground truth datasets.
- When you need to generate standardized mAP reports for model evaluation.
- When you need to sweep confidence thresholds to analyze the precision-recall curve.
Advantages
- Provides granular per-class performance insights.
- Supports flexible class mapping to handle diverse label naming conventions.
- Enables reproducible evaluation by keeping spec files alongside results.
- Integrates directly with TAO Data Services for consistent metric calculation.
Usage examples
- “Compute the detection mAP for my latest object detection model run.”
- The agent will guide you to configure the kpi_analyze.yaml spec with your inference and ground truth paths, then execute the analysis to produce a kpi_calc.csv report.
- “Score my OD predictions against ground truth using a 0.5 IoU threshold.”
- The agent will verify your input paths and mapping file, then run the KPI analysis container to output the precision, recall, and AP metrics.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/tao-analyze-detection-kpi/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-analyze-detection-kpi.zip -d .agents/skills
Documentation by NVIDIA Corporation
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.yamlInputs
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 tao-skill-bank repo root.
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/data/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 /etc/passwd.
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/data/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/data/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/path/kpi/labels
inference_ann_path: /absolute/path/results/inference/labels
mapping: /absolute/path/mapping.yaml
results_dir: /absolute/path/results/analyze_kpiThe template is the only place a default value lives, so nothing can disagree
with it. verify reports the three settings that change what the numbers mean —
conf_threshold, num_recall_points, ignore_sqwidth — so the spec that ran is
recoverable from its output.
Preflight
Verify Docker access:
docker info > /dev/nullResolve and pull the data-services image if needed:
DS_IMAGE="$(scripts/resolve_versions_key.py images.tao_toolkit.data_services)"
docker image inspect "$DS_IMAGE" > /dev/null || docker pull "$DS_IMAGE"Validate the spec:
python3 skills/data/tao-analyze-detection-kpi/scripts/verify_kpi_analyze_spec.py --spec "$SPEC"Confirm
RUN_ROOTcontains the spec, everyimage_dir, both annotation paths per source, the mapping file, and the results directory. MountRUN_ROOTto the same absolute path inside Docker.
Outputs
| Artifact | Location |
|---|---|
| Per-class metrics CSV | results_dir/kpi_calc.csv |
| PR curve plot | results_dir/ (only when visualize.platform: local) |
kpi_calc.csv columns: Sequence Name, TP, FP, FN, TN, Pr, Re, Acc, AP — one row per sequence per class. A per-class result table and the aggregate mAP are also printed to stdout; capture the log if the caller needs the mAP value, since it is not written to the CSV.
Pitfalls
Ground truth may be 15- or 16-field KITTI. The parser names 15 columns for ground truth
and 16 for predictions, but reads with index_col=False, so a trailing conf_score on a GT
file is truncated rather than shifted. Feeding GT straight from tooling that writes a score
column is fine — verified byte-identical results either way. The ParserWarning about
"length of header or names does not match length of data" describes exactly that truncation
and is not a sign of corruption.
input_format is uppercase here. analytics kpi_analyze accepts only KITTI or COCO. This differs from gap_analysis object_detection, which takes lowercase kitti / coco. Passing lowercase to this action fails to construct the data object.
Sequence Name is derived from the path, not configured. It is image_dir.split('/')[-2] — the second-to-last component of image_dir. A trailing slash or a flat image directory shifts which component is picked, so two sources can collide under one name. Lay out image_dir so that component is the sequence identifier you want.
data.mapping values are LISTS of aliases, not strings. This is the single most
destructive thing to get wrong: the file is a YAML list of single-key dicts whose value is a
list of source names that fold into that canonical class.
- bicycle:
- Bicycle
- Motorcycle
- bicycle
- twowheeler
- car:
- car
- Heavy Truck
- Vehicleconstruct_category_map stores the value verbatim (cat_map[k] = v), so writing
- car: car — a bare string — yields a value that downstream code iterates character by
character. Class matching then fails for every box, and the run still exits 0: the result
is TP=0, FN=0, every prediction counted a false positive, and mAP: 0.0, with no error and
no warning.
The tell is a perfect-looking run with all-zero metrics. Sanity-check by scoring a
ground-truth set against a copy of itself — with a correct mapping that returns TP = every
box and mAP: 1.0; anything else means the mapping, not the model.
data.mapping is required. The Hydra schema marks it mandatory even though the underlying category-map builder can derive classes from the label directory when it is absent. Supply the YAML.
Two different conf_threshold defaults. The dataclass default is 0.5, the shipped spec template uses 0.0. Whichever you rely on, set it explicitly — an unset value silently changes which predictions are scored.
is_internal: true is destructive to the report. It drops every class except person and appends a Summary row. Leave it false unless you specifically want the internal person-only KPI.
Troubleshooting
<key> not found in kpi_sources: every source entry needs all three of image_dir, ground_truth_ann_path, inference_ann_path.
Paths not found inside Docker: use a RUN_ROOT mount where host and container paths are identical, and confirm the images and annotation directories are under that mount.
Empty or all-zero metrics: usually conf_threshold above the model's score range, or an input_format that does not match the annotations on disk.
wandb errors or hangs: set visualize.platform: local to write a PR-curve plot instead of logging to wandb.
Files
- ATTRIBUTION.mdAdded by AutoGineer945 B
- BENCHMARK.md7.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md10.3 KiB
- assets/default_kpi_analyze.yaml1.8 KiB
- assets/example_mapping.yaml716 B
- config/skillspector-baseline.yaml1.4 KiB
- evals/evals.json975 B
- references/skill_info.yaml560 B
- scripts/verify_kpi_analyze_spec.pyScript7.2 KiB
- skill-card.md4.3 KiB
- skill.oms.sig5.7 KiB
BENCHMARK.md
Skill Benchmark: tao-analyze-detection-kpi
✅ Overall verdict: PASS — Recommended for publication
Publication Recommendation
Recommended for publication based on the completed evaluation evidence in this report.
Evaluation Metadata
Skill:
tao-analyze-detection-kpiEvaluation date: 2026-10-16
Evaluator version:
1.5.6Agents: Claude Code (
aws/anthropic/bedrock-claude-opus-4-8), Codex (openai/openai/gpt-5.5)Tasks: 1 evaluation tasks (1 positive)
Dataset digest:
sha256:6faa124b8e84816c70c039ea26e67277f789709cb91e2065fd3e7fb51dc74b35(skill-evaluator-dataset-snapshot/1)Attempts per task: 1
Environment:
k8s-sandboxTier 2 evidence: required for publication
Tier 3 evidence: required for publication
Each task attempt ran in its own isolated sandbox pod.
What This Report Answers
The three-tier evaluation checks whether the skill:
is safe to use;
produces correct answers;
is discovered and activated when needed;
helps the agent complete the user's goal and expected workflow; and
avoids wasted skill and tool usage.
Results at a Glance
| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) |
|---|---|---|
| Overall | 97.7% — baseline ran, but no comparable score was available; uplift unavailable | 70.7% — baseline ran, but no comparable score was available; uplift unavailable |
| Security | 100.0% → 100.0% (±0.0 points) | 100.0% → 100.0% (±0.0 points) |
| Correctness | 0.0% → 100.0% (+100.0 points) | 20.0% → 100.0% (+80.0 points) |
| Discoverability | 100.0% — baseline ran, but no comparable score was available; uplift unavailable | 0.0% — baseline ran, but no comparable score was available; uplift unavailable |
| Effectiveness | 25.0% → 90.0% (+65.0 points) | 30.0% → 55.0% (+25.0 points) |
| Efficiency | 98.4% — baseline ran, but no comparable score was available; uplift unavailable | 99.7% → 98.5% (-1.2 points) |
How to read this table: baseline is the same task attempted without the target skill. Scores are rounded to one decimal; threshold-adjacent values use additional precision so their displayed band matches the verdict. Uplift is derived from those displayed scores and shown in percentage points.
Example: 47.0% → 92.0% (+45.0 points) means the skill-assisted run scored 92.0%, 45.0 percentage points above its 47.0% no-skill baseline.
A partial dimension was calculated from only the available configured signals; review the detailed report before relying on it.
Token Usage
Actual Tier 3 execution usage is reported for every observed agent/case pair and both conditions.
| Agent | Dataset case | With skill | Without skill | Delta | Change | Coverage |
|---|---|---|---|---|---|---|
| claude-code | All cases | 64,423 | 408,619 | -344,196 | -84.23% | skill 1/1; base 1/1 |
| claude-code | tao-analyze-detection-kpi-basic | 64,423 | 408,619 | -344,196 | -84.23% | skill 1/1; base 1/1 |
| codex | All cases | 14,014 | 13,530 | +484 | +3.58% | skill 1/1; base 1/1 |
| codex | tao-analyze-detection-kpi-basic | 14,014 | 13,530 | +484 | +3.58% | skill 1/1; base 1/1 |
| ALL AGENTS | Dataset aggregate | 78,437 | 422,149 | -343,712 | -81.42% | skill 2/2; base 2/2 |
Prompt tokens include cached reads, so total tokens are prompt + completion (cached is not added twice). The Efficiency score uses (prompt - cached) + completion. N/A means the relevant trajectory counters were not available; coverage is never estimated.
Tier Status
| Tier | Purpose | Status | Evidence |
|---|---|---|---|
| Tier 1 | Static validation | PASSED WITH OBSERVATIONS | 11 validator(s); 19 finding(s) |
| Tier 2 | Semantic deduplication | PASSED | 2 validator(s); 0 finding(s) |
| Tier 3 | Live agent evaluation | PASS | 2 agent(s); 1 task(s) |
Findings and Observations
<details> <summary>Show detailed findings and successful checks</summary>
MEDIUM QUALITY/quality_correctness: No documented scripts in table format (
skills/data/tao-analyze-detection-kpi/SKILL.md)MEDIUM QUALITY/quality_correctness: Instructions don't mention 'run_script' (
skills/data/tao-analyze-detection-kpi/SKILL.md)MEDIUM QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.tags' (
skills/data/tao-analyze-detection-kpi/SKILL.md)MEDIUM QUALITY/quality_discoverability: Description uses first/second person (
skills/data/tao-analyze-detection-kpi/SKILL.md)MEDIUM SCHEMA/frontmatter_field_placement: Root field 'tags' is ignored; use 'metadata.tags' (
skills/data/tao-analyze-detection-kpi/SKILL.md)14 additional finding(s) are available in the full evaluation artifacts.
</details>
Scoring Methodology
<details> <summary>Show dimension definitions, source signals, and thresholds</summary>
| Dimension | Question | Scored signals |
|---|---|---|
| Security | Is it safe to use? | security (100%) |
| Correctness | Is the answer correct? | accuracy (100%) |
| Discoverability | Was the right skill loaded when needed? | skill_execution (100%) |
| Effectiveness | Did the skill help complete the task? | goal_accuracy (50%) + behavior_check (50%) |
| Efficiency | Did it avoid wasted tool calls and token usage? | skill_efficiency (50%) + token_efficiency (50%) |
Dimension bands: PASS at 50% or above; NEUTRAL from 40% to below 50%; FAIL below 40%.
Overall Tier 3 lift: PASS at +5 points or more; FAIL at -10 points or less; values between those bands are NEUTRAL.
Overall verdict: PASS only when every configured dimension passes for at least one supported agent. Lift is reported as diagnostic evidence and does not override this gate.
The 50% attempt pass threshold is a separate per-task gate; it is not the dimension pass threshold.
Effectiveness is the equal-weight mean of goal completion (
goal_accuracy) and expected workflow adherence (behavior_check).Efficiency is 50% tool-call productivity (the backward-compatible
skill_efficiencywire id) and 50%token_efficiency. Positive-case skill routing is scored under Discoverability, not Efficiency; a negative case without a routing target is N/A. N/A sources are omitted, remaining weights are renormalized, and the dimension is marked partial.
Signals present in this run:
security(Security): unsafe operations, secret leakage, and unauthorized access.skill_execution(Skill Execution): whether the expected skill was selected, decoys were avoided, and the workflow executed.skill_efficiency(Tool Productivity): tool-call productivity (legacy wire id; routing is scored under Discoverability).accuracy(Accuracy): final-answer correctness against the reference answer.goal_accuracy(Goal Accuracy): whether the user's goal was achieved.behavior_check(Behavior Check): whether the expected workflow behavior was followed.token_efficiency(Token Efficiency): actual uncached prompt plus completion usage (50% of Efficiency).
</details>
Freshness
Regenerate this benchmark when the skill, evaluation dataset, target agent/model, evaluator version, environment, or scoring policy changes.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs a command-line tool, Needs Python
The author says: Requires docker, nvidia-container-toolkit, and the TAO data-services container pinned in versions.yaml.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- References to credential files
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Corporation
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/tao-analyze-detection-kpi · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-analyze-detection-kpi.zip