Tao Run Deft Object Detection
NVIDIAOfficialCreated by NVIDIA Corporation
- Skill
- Workflow
- 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 executes a multi-stage, iterative workflow designed to improve object detection model performance through smart data augmentation. It manages a complete loop including zero-shot baseline inference, KPI analysis, per-class gap analysis, SigLIP-based embedding, unique-neighbor mining from a source pool, dataset staging, and retraining. The skill also provides a separate invocation for preparing the source pool, which involves pseudo-labeling raw images with Co-DETR, remapping classes, and converting data formats. It operates as a state-managed loop, ensuring consistency across iterations and providing automated reporting.
What it does
- Performs zero-shot baseline inference and KPI analysis on Grounding DINO models.
- Conducts per-class gap analysis to identify model weaknesses.
- Mines unique, high-value training samples from a prepared source pool using SigLIP embeddings.
- Stages mined data into the ODVG format for iterative model retraining.
- Prepares source pools by pseudo-labeling raw images and converting them to the required ODVG format.
- Maintains a persistent state machine to track progress and ensure auditability across training iterations.
When to use it
- When you need to improve the mAP of a Grounding DINO model through iterative data mining.
- When you have a large pool of unlabeled images that need to be pseudo-labeled and mined for training.
- When you want to automate the gap analysis, mining, and retraining cycle.
- When you need to prepare a source pool of images for use in a DEFT-based detection workflow.
Advantages
- Automates complex, multi-step data augmentation and training loops.
- Reduces manual effort in identifying and labeling high-value training data.
- Ensures consistent data processing and state management across iterations.
- Provides clear visibility into model performance trends through automated KPI reporting.
Usage examples
- “run the DEFT OD loop”
- The agent initiates the iterative mining and retraining process, starting with baseline inference and gap analysis.
- “prep the source pool”
- The agent runs the Co-DETR pseudo-labeling and embedding pipeline to prepare your raw images for future mining.
- “mine and retrain my detection model”
- The agent performs gap analysis, mines new samples from the source pool, stages the data, and triggers a retraining iteration.
- “improve OD mAP with gap analysis and mining”
- The agent executes the full DEFT loop to identify performance gaps and iteratively grow the training dataset to boost mAP.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/tao-run-deft-object-detection/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-run-deft-object-detection.zip -d .agents/skills
Documentation by NVIDIA Corporation
Skill: tao-run-deft-object-detection
Standalone install? If this session was not initialized by the TAO skill bank plugin, run the
tao-setupskill first (host preflight, credentials, cross-skill discovery).
Execution Contract
Treat this as a disk-backed state machine, not as a prose recipe.
Preserve every explicit user value.
epoch 1meanstrain.num_epochs=1; a spec value or documented default applies only when the user did not supply that parameter. Show the source of every run parameter (user,spec, ordefault) in the Pre-Flight Summary.After the user approves the Summary, initialize
deft_state.jsononce withscripts/init_deft_state.py. Never hand-author or reinitialize it on resume.Run every bundled or inline host-Python command through
scripts/deft_python.sh. On startup, after context compaction, before every stage, and before any completion claim, run:<skill_root>/scripts/deft_python.sh \ <skill_root>/scripts/audit_deft_run.py --results-dir "${RESULTS_DIR}"If it prints
DEFT_RUN_STATUS=INVALID, stop and repair the listed disk inconsistency; do not launch another stage. Read the path printed asread_before_actionbefore continuing.Invoke the mapped underlying skill after reading the DEFT overlay. Do not replace a missing or unread stage reference, or a failed skill call, with guessed shell commands, inline Python, a different output tree, or fabricated data.
Commit every stage with
scripts/commit_stage.py; it verifies artifacts, updatesdeft_state.json, appends exactly one orderedloop_log.jsonlevent, and rolls back if its audit fails.Claim the loop complete only when this exits zero:
<skill_root>/scripts/deft_python.sh \ <skill_root>/scripts/audit_deft_run.py \ --results-dir "${RESULTS_DIR}" --require-complete
Context Discipline
Load references just in time. Run the audit, read only its
read_before_actionfile and the current stage's named section, then act. Never preload all references.Redirect verbose train, inference, and Docker output to files. Inspect at most the final 40 lines or a one-line artifact check; never print a full spec, state file, or loop log into the conversation.
A Skill-tool call loads stage instructions; it does not start a background orchestrator. Continue the documented stage in the parent immediately after it returns.
When to Use This Skill
Use this skill when the user wants an agent to run the full smart-data-augmentation loop for a TAO Grounding DINO detection model: zero-shot baseline, gap analysis, mining, dataset growth, and retraining across N iterations.
"Run the DEFT OD loop"
"Run smart data augmentation for grounding dino"
"Mine more training data for my detection model and retrain"
"Improve detection mAP with gap analysis and unique-neighbor mining"
Also use it to prepare the source pool, which is a separate run that completes before the
loop launches (see ## Two Invocations: Prep, Then Loop):
"Prep the source pool"
"Pseudo-label my unlabeled images for mining"
"Build the mining pool from these raw images"
Do not use this skill for a single standalone TAO training run, one-off inference, or gap analysis alone. Invoke the relevant leaf skill directly instead.
Scope: Grounding DINO + ODVG
This loop targets Grounding DINO with ODVG training annotations (tmm_odvg.jsonl + labelmap.json), matching the reference pipeline. dataset.train_data_sources is a list; each iteration appends one new ODVG source rather than rewriting a combined CSV. DINO and RT-DETR (COCO) are not supported by this workflow — use the leaf skills directly for those.
The loop does not train at baseline. It evaluates the supplied zero-shot / pretrained checkpoint as iteration 0 and only trains from iteration 1 onward, once mining has produced data to add.
Two Invocations: Prep, Then Loop
The source pool is prepared by its own run, before the loop launches. They are separate because a pool is prepped once and then serves many loop runs — coupling them would re-label and re-embed the same images on every launch.
| Invocation | Does | Produces |
|---|---|---|
| "Prep the source pool" | Co-DETR pseudo-labels raw pool images, folds to the target classes, converts KITTI→COCO→ODVG, verifies, embeds | coco.json, odvg/, source_embeddings.parquet, pool_report.json |
| "Run the DEFT loop" | baseline → iterations | checkpoints, KPI, the mAP trend |
Follow references/prep-source-pool.md for the first. The loop then takes those four paths as
inputs; Pre-Flight validates them and init_deft_state.py pins them, so a run cannot reach
mine with no corpus to search.
Launch Intake
Do not ask which platform to run on. This workflow supports one: every stage launches
with docker run, and its compatibility line requires docker plus the
nvidia-container-toolkit. The bank's rule in AGENTS.md is to treat a single supported
platform as the selection and only ask when an application supports several — asking here
would offer a choice that nothing downstream can act on.
Read tao-run-on-docker's ## Credentials section.
Never ask for or read credential values. Check only whether the required environment variable is set; if unset, tell the user which variable to export.
Agent Behavior
There is exactly one user gate: pre-flight confirmation. Print the Pre-Flight Summary (see
references/preflight.md), then STOP and wait for explicit approval ("go", "yes", "looks good"). Do not launch any side-effecting step before that approval.After the gate, the skill is fully autonomous. Run the entire loop without asking for confirmation. Only stop if a step fails with an unrecoverable error or a hard-stop gate fires. Print a one-line status update at each stage milestone.
Auto-mode required. The post-gate loop fires constant side-effecting calls; without auto-accept mode it stalls on the first prompt. Remind the user at the Pre-Flight Summary to enable auto-mode (shift+tab) before approving.
Non-zero command rule. Never repeat an unchanged failed command. Read the final error block, map it to the loaded stage reference, make one evidence-based correction, and rerun its documented verification. If the reference does not cover the failure, commit
status=errorand halt.Revised plan. If any run parameter changes after the Summary was shown, re-run Pre-Flight and show an updated Summary before proceeding.
Workflow
Full detail in references/pipeline-and-state.md.
Pre-Flight. Run every check in
references/preflight.md. Resolve workspace, specs, annotations, the zero-shot checkpoint, the source-pool embedding parquet, and container images. Hard stop only on missing input you cannot resolve yourself.Prep (once, before baseline). If the source pool is not already labeled and embedded, pseudo-label it with Co-DETR, fold the predictions onto the user's target classes, convert KITTI→COCO→ODVG, and embed the pool. Skip any step whose output already exists — no script does this for you, so check before each step. See
references/prep-source-pool.md.Baseline (iter_0) — no training. Run
inferencewith the supplied zero-shot / pretrained checkpoint, thenkpi_analyze. Seedtrain_grounding_dino.yamlfrom the user's template for later iterations to extend.Iterate. For each iteration 1..
max_iterations, run the seven stages in order:gap_analysis→embed→mine→stage→train→inference→kpi_analyze. Each iteration'sgap_analysisconsumes the previous phase's inference labels. Between stages run the audit and follow its one-line disk-backed next action.Stop when
max_iterationsis reached or a hard-stop gate fires. mAP is reported, not gated — the loop does not early-exit on a metric target.The report renders itself.
results/DEFT_Loop_Report.mdis written byinit_deft_state.pyand re-rendered by every acceptedcommit_stage.pycall. Do not spawn a subagent for it and do not compose it by hand; to refresh it out of band, runscripts/render_report.py --results-dir "${RESULTS_DIR}".
All stages run inline in the parent context. Prefer invoking the underlying tao-skill-bank:* skills via the Skill tool, layering loop conventions on top via the matching references/*.md overlay.
Using Bundled Scripts
Run bundled scripts through <skill_root>/scripts/deft_python.sh. Resolve every path argument to an absolute host path first. Use commit_stage.py for all state and log writes. See references/scripts-and-agents.md.
Stage Reference Modules
Each stage maps to one underlying skill or to bundled glue. Read only the current stage's overlay, then invoke.
The overlays are written against two loop variables that Pre-Flight sets and every stage uses: N, the current iteration number, and PHASE, which is baseline or iter${N}. They are stated here because a stage overlay is read on its own — see references/preflight.md for the full set.
If an overlay is missing, stop and ask the user to reinstall the plugin — the loop cannot run a stage whose settings it does not have. If a mapped skill is unavailable, do not stop and do not improvise: fall back to the overlay's documented docker run as described in references/scripts-and-agents.md, and commit that stage with --execution-path direct-container instead of the documented skill. The overlay carries everything the invocation needs, so the fallback produces the same artifacts.
On a runtime without a Skill tool (Codex, for example), the mapped skills are still on disk under the plugin root: read skills/<layer>/<name>/SKILL.md there for the invocation contract, then run it through the direct-container fallback above, committing the stage with --execution-path direct-container. On such a runtime that fallback is the expected route for every stage, not an exception.
| Stage | Overlay | Underlying skill |
|---|---|---|
prep (once) | references/prep-source-pool.md | tao-skill-bank:tao-train-codetr + tao-generate-image-embeddings (+ bundled glue) |
gap_analysis | references/tao-analyze-gaps-od-map.md | tao-skill-bank:tao-analyze-gaps-od-map |
embed | references/tao-generate-image-embeddings.md | tao-skill-bank:tao-generate-image-embeddings |
mine | references/tao-mine-od-images.md | tao-skill-bank:tao-mine-od-images |
stage | references/stage-mined-data.md | (bundled glue — no leaf skill) |
train, inference | references/grounding-dino.md | tao-skill-bank:tao-train-grounding-dino |
kpi_analyze | references/tao-analyze-detection-kpi.md | tao-skill-bank:tao-analyze-detection-kpi |
Path rule (invariant). Record absolute host paths under ${RESULTS_DIR}. Mount "$WORKSPACE:$WORKSPACE" with identical host and container paths. TAO's update_results_dir appends the task name to results_dir, so passing results_dir=X to train writes X/train/ and to inference writes X/inference/. Never append the subdirectory yourself.
Data, Pre-Flight, Pipeline, and State References
| Topic | Reference |
|---|---|
| Data contract, ODVG layout, source pool, output tree | references/data-layout.md |
| One-time source-pool prep (pseudo-label, remap, convert, embed) | references/prep-source-pool.md |
| Pre-Flight checks, defaults, Summary template | references/preflight.md |
| Pipeline stages, state schema, loop-end sequence | references/pipeline-and-state.md |
| Bundled scripts, glue, the report renderer, stage table | references/scripts-and-agents.md |
max_iterations defaults to 1 — one mine, train and score pass, the smallest run that yields a comparison against the baseline. Confirm it with the user when they have not said how many iterations they want; an unattended run takes the default rather than stopping to ask.
Gating
Run the full Pre-Flight, print the Summary, then STOP at the one user gate. After approval, run the baseline and the seven-stage iteration pipeline.
Hard-stop and never auto-retry on: any stage status=error; a missing or zero-row source-pool embedding parquet; a zero-row mining result when weak images were present; a missing ODVG annotation source; an image/annotation mismatch after staging; or a train exit that emits no new iteration checkpoint. The loop stops when max_iterations is reached or an unrecoverable gate fires. Each terminal path commits loop_stop through commit_stage.py, then follows the loop-end sequence in references/pipeline-and-state.md.
Files
- ATTRIBUTION.mdAdded by AutoGineer957 B
- BENCHMARK.md8.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md13.7 KiB
- agents/reporter.md1.4 KiB
- assets/gap_analysis_object_detection.yaml1.9 KiB
- assets/image_embeddings.yaml790 B
- assets/overlays/coco_to_odvg.yaml334 B
- assets/overlays/codetr_inference.yaml5.0 KiB
- assets/overlays/grounding_dino_inference.yaml1.3 KiB
- assets/overlays/kitti_to_coco.yaml500 B
- assets/overlays/kpi_analyze.yaml2.0 KiB
- assets/tmm_unique_neighbor_matching.yaml1.7 KiB
- assets/train_grounding_dino.yaml2.6 KiB
- config/skillspector-baseline.yaml4.6 KiB
- evals/evals.json5.6 KiB
- references/data-layout.md7.7 KiB
- references/example_classes_its.yaml2.0 KiB
- references/grounding-dino.md16.7 KiB
- references/pipeline-and-state.md15.4 KiB
- references/preflight.md29.4 KiB
- references/prep-source-pool.md27.3 KiB
- references/scripts-and-agents.md15.2 KiB
- references/stage-mined-data.md6.3 KiB
- references/tao-analyze-detection-kpi.md11.4 KiB
- references/tao-analyze-gaps-od-map.md8.6 KiB
- references/tao-generate-image-embeddings.md4.0 KiB
- references/tao-mine-od-images.md8.2 KiB
- scripts/apply_spec_overrides.pyScript16.0 KiB
- scripts/audit_deft_run.pyScript39.2 KiB
- scripts/await_stage.pyScript7.5 KiB
- scripts/commit_stage.pyScript52.8 KiB
- scripts/deft_python.shScript2.5 KiB
- scripts/deft_stages.pyScript8.4 KiB
- scripts/emit_default_spec.pyScript9.1 KiB
- scripts/fetch_codetr_checkpoint.pyScript10.4 KiB
- scripts/fetch_gdino_checkpoint.pyScript7.4 KiB
- scripts/init_deft_state.pyScript44.8 KiB
- scripts/prepare_budget_for_mining.pyScript7.1 KiB
- scripts/prepare_class_mappings_for_mining_data_prep.pyScript8.9 KiB
- scripts/prepare_exclude_for_mining.pyScript4.7 KiB
- scripts/prepare_input_for_image_embeddings.pyScript4.3 KiB
- scripts/prepare_mapping_for_kpi_analyze.pyScript5.1 KiB
- scripts/prepare_spec_for_train.pyScript11.8 KiB
- scripts/prepare_thresholds_for_gap_analysis.pyScript5.9 KiB
- scripts/prepare_val_split_for_train.pyScript5.5 KiB
- scripts/render_report.pyScript33.7 KiB
- scripts/stage_mined_odvg.pyScript10.3 KiB
- scripts/summarize_kpi.pyScript9.1 KiB
- scripts/tests/test_state_machine.shScript178.2 KiB
- scripts/validate_odvg_images.pyScript4.6 KiB
- scripts/validate_pool_coco.pyScript13.0 KiB
- scripts/verify_class_contract.pyScript8.0 KiB
- scripts/verify_embed_encoder.pyScript3.8 KiB
- scripts/verify_pseudo_labels.pyScript7.5 KiB
- skill-card.md5.5 KiB
- skill.oms.sig16.6 KiB
references/scripts-and-agents.md
Bundled Scripts and Agents
Using Bundled Scripts
Run every bundled script through scripts/deft_python.sh. Resolve every path argument to an absolute host path before calling. Commit state and log changes only through commit_stage.py — never write deft_state.json or loop_log.jsonl with inline Python, heredocs, an editor, or jq.
State scripts
| Script | Purpose | Arguments |
|---|---|---|
deft_python.sh | Select an already-provisioned host Python with the required imports and execute it. Never installs packages. | [PYTHON_ARG ...]; env DEFT_PYTHON, WORKSPACE |
init_deft_state.py | Write a fresh deft_state.json. Atomic; refuses to overwrite without --force. Fresh runs only. | --results-dir --workspace --max-iterations ... |
commit_stage.py | The only supported state writer. Validates the ordered transition, updates state, appends one log event, audits, rolls back on failure. | --results-dir --iter-label --stage --summary [artifact flags] [--status ok|error] |
audit_deft_run.py | Read-only cross-check of state, log, and artifacts. Prints the safe next action and read_before_action. | --results-dir [--require-terminal] [--require-complete] |
render_report.py | Render DEFT_Loop_Report.md from disk state. Called automatically by init_deft_state.py and by every accepted commit; run it directly only to refresh out of band. | --results-dir [--out] [--require-terminal] |
Pipeline glue scripts
These replace internal container images from the reference pipeline whose scripts are not published. All are pure host Python.
| Script | Stage | Purpose |
|---|---|---|
fetch_codetr_checkpoint.py | Pre-Flight, prep runs only | Download the Co-DETR pseudo-labeller from HuggingFace over stdlib HTTPS when the user supplied none, verifying size and SHA-256. Idempotent: an existing checkpoint is reused after a size check, and its digest too with --verify. --plan reports without fetching and applies the same checks. |
fetch_gdino_checkpoint.py | Pre-Flight | Resolve the Grounding DINO zero-shot checkpoint, downloading nvidia/tao/grounding_dino:...trainable_v1.1 from NGC when the user supplied none. --plan resolves the path and reports whether a download is needed without performing one, for use before the approval gate. Idempotent; prints the path on stdout. Verified bit-identical to the hand-staged copy it replaces. |
emit_default_spec.py | any stage | Emit a stage's starting spec from TAO: default_specs for annotations/analytics, the Hydra schema dump for grounding_dino/codetr, a shipped asset for gap_analysis/tmm/embedding (TAO emits none). Reports mandatory fields grouped by block. |
apply_spec_overrides.py | any stage | Apply the stage's --apply-workflow-defaults (settings this workflow requires that differ from TAO's defaults, from assets/overlays/) then --set (only what varies per run), by dotted key and YAML-typed. A --set colliding with a workflow-default key is an error unless --allow-workflow-default-override. Refuses unknown keys unless --allow-new; --require-no-mandatory blocks launching against any remaining ???, and --require-no-mandatory-under BLOCK scopes that to the blocks a stage actually reads — a default_specs dump marks fields mandatory for every action it supports, so the unscoped check cannot pass for a single-action run; --report-json records every key and its source. |
Stage overlays
assets/overlays/<stage>.yaml holds the settings a stage needs but that do not
vary per run. A field nobody mentions keeps whatever default_specs or the Hydra
schema emitted, and TAO's default is not always the value the stage wants:
kpi.num_recall_points is 11 by default against the reference pipeline's 101, and
the only symptom of the difference is that every AP is read off a coarser curve. Each
overlay line carries TAO's default in a comment, so the cost of removing it is
visible without diffing against a container.
| overlay | stage | notably pins |
|---|---|---|
kitti_to_coco.yaml | annotations convert KITTI→COCO | kitti.project: coco — names the output file every later step looks for |
coco_to_odvg.yaml | annotations convert COCO→ODVG | formats only |
codetr_inference.yaml | pool pseudo-labelling | num_select: 1000 (TAO 300 crowds rare classes out of the pool), conf_threshold: 0.3, and the ViT-L/16 architecture the checkpoint requires |
grounding_dino_inference.yaml | baseline + per-iteration inference | conf_threshold: 0.0 (keep the full PR curve), log_scale: auto, class_embed_bias: true |
kpi_analyze.yaml | scoring | num_recall_points: 101, ignore_sqwidth: 0 |
grounding_dino train has no overlay: it is built from the full
assets/train_grounding_dino.yaml template rather than emitted-then-overridden,
so its values are already in a file under version control.
Two things deliberately stay out of the overlays. Paths, checkpoints and GPU
counts vary per run. And dataset.infer_data_sources.captions is the label map —
a detection takes the class of the caption token it matched, by position — so it
must be derived from the run's classes, never pinned.
| prepare_mapping_for_kpi_analyze.py | kpi_analyze | Narrow the supplied KPI class mapping to the run's target classes, aliases verbatim. A class the model cannot predict would otherwise score a constant 0 and compress the mAP trend. |
| prepare_input_for_image_embeddings.py | prep | List the pool image directory into the filepath parquet embedding image_embeddings reads. Absolute paths, symlinks resolved, sorted — so the same directory always yields the same parquet. |
| prepare_val_split_for_train.py | prep | Carve a validation COCO from 10% of the prepared pool, rewriting category ids to 0-based. grounding_dino train cannot run without a validation source, and its loader uses category_id verbatim as a dense label index, so a conventional 1-based COCO overflows on the last class. |
| prepare_thresholds_for_gap_analysis.py | before gap_analysis | Write the gate for each of config.target_classes, from config.ap50_thresholds, into the weak_thresholds file the spec build consumes; a gate for an untargeted class is left out. Run it before building the spec: the asset leaves weak_thresholds as ???, so the build fails without it rather than gating on values nobody chose. |
| summarize_kpi.py | after kpi_analyze | Recompute the aggregate mAP from kpi_calc.csv and write kpi_summary.json beside it. The stage prints mAP to stdout and writes it nowhere, so this removes the need to hold a stream open for the length of the stage. |
| await_stage.py | any long stage | Block until a stage finishes by watching its artifacts or status.json. Never wait on a process name. Pass --newer-than <marker touched before launch> so a retry is not satisfied by the previous attempt's leftovers. |
| prepare_class_mappings_for_mining_data_prep.py | prep | Translate one classes.yaml into the two mappings TAO folds with: the category_mapping block for the Co-DETR inference spec (the real fold, applied at detection time with per-category soft-NMS) and the identity kitti.mapping for annotations convert. Emits nothing else — TAO does the folding. |
| verify_embed_encoder.py | before every embed | Refuse an embed spec whose model / model_path differ from the run's encoder in deft_state.json. Mining compares weak-image and pool vectors by distance, which is meaningless across encoders; verify_image_embeddings_spec.py checks a spec only against itself. |
| verify_class_contract.py | Pre-Flight, before every inference | Compare the class list as it appears in captions, the KPI mapping, deft_state.json, the ODVG labelmap and classes.yaml. Grounding DINO labels a detection by caption position, so a reordered or short list relabels every prediction while the run still exits 0. |
| verify_pseudo_labels.py | prep | With --pool-images-dir alone, refuse a pool holding duplicate basenames before labelling: labels are one flat file per basename, so same-named images share one set. With --labels-dir, fail when Co-DETR wrote label files carrying no boxes. codetr inference exits 0 and prints PASS when the spec's architecture does not match the checkpoint, emptying every file; this is the gate that names that cause. Directory walk only, so it runs before the conversion it protects. |
| validate_pool_coco.py | prep | Verify the converted pool: every target class carries annotations, case-only class mismatches are named, unmapped source classes are reported with counts, and image/annotation counts reconcile. Both TAO consumers drop unmatched names silently, so this is where a broken fold surfaces. |
| prepare_budget_for_mining.py | before mine | desired_unique_count = weak-image count × multiplier, with optional floor/ceiling. Point --weak-parquet at iteration 1's parquet on every iteration to hold the budget constant. Writes only the number to stdout. |
| stage_mined_odvg.py | stage | Copy mined images, look up ODVG records by basename, renumber image_id, remap labels, write tmm_odvg.jsonl + labelmap.json. Truncates the JSONL, so re-running is idempotent. |
| validate_odvg_images.py | stage | Hard-fail when an ODVG record references a missing image, when there are no usable records, or when records are duplicated. --prune deletes orphan images. Stdlib only. |
| prepare_exclude_for_mining.py | stage | Merge this iteration's mined set with the previous cumulative and de-duplicate. --parquet-b is optional at iteration 1 only; pass --iteration N so a missing previous cumulative is an error after that, rather than silently re-mining trained images. |
| prepare_spec_for_train.py | train | Copy the previous spec, append one {image_dir, json_file, label_map} entry to dataset.train_data_sources, set train.num_epochs and train.optim.lr. Lowers checkpoint_interval / validation_interval when they exceed the epoch count, and will not double-add a source already present. |
Script invocation
<skill_root>/scripts/deft_python.sh \
<skill_root>/scripts/commit_stage.py \
--results-dir /abs/path/results/run_YYYYMMDD_HHMMSS \
--iter-label iter1 \
--stage mine \
--execution-path skill \
--mining-output /abs/path/iter1/mining/final_unique_files.parquet \
--mining-summary /abs/path/iter1/mining/summary.json \
--summary "mined 500 unique images"If no reliable start time was captured, omit --duration-sec; it records 0. Do not invent a duration.
Reporting
results/DEFT_Loop_Report.md is rendered by scripts/render_report.py, not by an
agent. Do not spawn a subagent for it and do not compose it by hand.
init_deft_state.py writes it before any stage has run, and every accepted
commit_stage.py call re-renders it as a post-commit hook, so it is current after
each stage rather than after each iteration. The hook is deliberately outside the
commit transaction: a rendering failure prints a warning and leaves the commit
standing, because presentation must never roll back a GPU stage or block the state
machine.
Rendering deterministically is also what makes the report reachable from a runtime
with no subagent tool. Every stage of this loop already has a fallback that needs
nothing but Bash — a mapped skill falls back to the overlay's documented
docker run — and reporting is now the same.
The renderer reads the audit verdict, deft_state.json, loop_log.jsonl, each
phase's kpi_summary.json (falling back to kpi_calc.csv plus kpi_analyze.log),
and each iteration's mining summary and staging report. Two of its rules matter
when reading the output:
The only mAP in the report is the KPI mAP, scored against the evaluation set. A
trainsummary that improvised from the training container's stdout can carryval_mAP/val_mAP50, which score agreement with the Co-DETR pseudo-labels on the mined-data validation split rather than accuracy; the timeline drops them. They remain inloop_log.jsonl.A number that is not on disk is left out, never guessed. A phase whose CSV has no
class_namecolumn and no committedkpi_analyze.logreports its mAP alone and says the per-class breakdown was unavailable, because row order is not a class order.
To re-render by hand, or after fixing whatever made the hook warn:
<skill_root>/scripts/deft_python.sh <skill_root>/scripts/render_report.py \
--results-dir "${RESULTS_DIR}"Add --require-terminal for an end-of-loop render: it refuses to render until
loop_stop is committed, so a hard stop that has not been finalized cannot be
presented as a finished run.
agents/reporter.md remains only as a compatibility wrapper for a runtime that
invokes the legacy agent by name; it shells out to the same script.
Stage Reference Modules
| Stage | Overlay | Underlying skill |
|---|---|---|
prep (once) | references/prep-source-pool.md | tao-skill-bank:tao-train-codetr + tao-generate-image-embeddings (+ bundled glue) |
gap_analysis | references/tao-analyze-gaps-od-map.md | tao-skill-bank:tao-analyze-gaps-od-map |
embed | references/tao-generate-image-embeddings.md | tao-skill-bank:tao-generate-image-embeddings |
mine | references/tao-mine-od-images.md | tao-skill-bank:tao-mine-od-images |
stage | references/stage-mined-data.md | (bundled glue) |
train, inference | references/grounding-dino.md | tao-skill-bank:tao-train-grounding-dino |
kpi_analyze | references/tao-analyze-detection-kpi.md | tao-skill-bank:tao-analyze-detection-kpi |
Read only the current stage's overlay. If one is missing, stop and ask the user to reinstall the plugin — do not substitute generic shell commands.
Direct-container fallback
Use only when the mapped Skill tool is unavailable and Docker plus the current overlay are present. Run the overlay's documented docker run with the same arguments and absolute output paths. The fallback changes the invocation mechanism only: it must produce the same artifacts and commit them through commit_stage.py.
Commit a stage that ran this way with --execution-path direct-container in place of the --execution-path skill its documented commit carries. Every ok commit of a skill-mapped stage (gap_analysis, embed, mine, train, inference, kpi_analyze) must say which way it ran — the value is recorded, never assumed, so a forgotten fallback cannot be filed as a skill run. It lands at state.iterations.<phase>.execution_paths.<stage>, and audit_deft_run.py lists every fallback stage as direct_container_stages, so a finished run can be attributed to the code path that produced it.
Invariants
Path rule. Record absolute host paths under ${RESULTS_DIR}. Mount "$WORKSPACE:$WORKSPACE" so host and container paths are identical.
results_dir appends the task name. TAO's update_results_dir turns results_dir=X into X/train/ or X/inference/. Never append the subdirectory yourself.
Format spelling differs by stage. gap_analysis object_detection takes lowercase kitti/coco; analytics kpi_analyze takes uppercase KITTI/COCO. Both are correct for their own stage.
Never put automl_policy or a workflow: key in a TAO spec. TAO's Hydra schema rejects them at config-merge time. Plain docker run … train is already non-AutoML.
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 Python
The author says: Requires docker + nvidia-container-toolkit and one or more CUDA GPUs. Workflows declare additional requirements.
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-run-deft-object-detection · 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-run-deft-object-detection.zip