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
LICENSE
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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