Generated banner for Tao Run Deft Object Detection
Generated logo for Tao Run Deft Object Detection

Tao Run Deft Object Detection

NVIDIAOfficialCreated by NVIDIA Corporation

  • Skill
  • Workflow
  • Software development
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Run the full DEFT smart-data-augmentation loop for NVIDIA TAO Grounding DINO object detection: zero-shot baseline inference, KPI analysis, per-class gap analysis, SigLIP embedding of weak images, unique-neighbor mining against a source pool, ODVG dataset staging, and retraining — repeated for a fixed number of iterations. Also prepares the source pool the loop mines from, as a separate run: Co-DETR pseudo-labeling, folding to the target classes, KITTI→COCO→ODVG conversion, and embedding. Use for prompts like "run the DEFT OD loop", "run smart data augmentation for grounding dino", "mine and retrain my detection model", "improve OD mAP with gap analysis and mining", "prep the source pool", or "pseudo-label my unlabeled images for mining"; do not use for standalone TAO training, one-off inference, or gap analysis alone.
— the description by NVIDIA Corporation

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/tao-run-deft-object-detection/download
  2. Unzip 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-setup skill first (host preflight, credentials, cross-skill discovery).

Execution Contract

Treat this as a disk-backed state machine, not as a prose recipe.

  1. Preserve every explicit user value. epoch 1 means train.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, or default) in the Pre-Flight Summary.

  2. After the user approves the Summary, initialize deft_state.json once with scripts/init_deft_state.py. Never hand-author or reinitialize it on resume.

  3. 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 as read_before_action before continuing.

  4. 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.

  5. Commit every stage with scripts/commit_stage.py; it verifies artifacts, updates deft_state.json, appends exactly one ordered loop_log.jsonl event, and rolls back if its audit fails.

  6. 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_action file 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.

InvocationDoesProduces
"Prep the source pool"Co-DETR pseudo-labels raw pool images, folds to the target classes, converts KITTI→COCO→ODVG, verifies, embedscoco.json, odvg/, source_embeddings.parquet, pool_report.json
"Run the DEFT loop"baseline → iterationscheckpoints, 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=error and 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.

  1. 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.

  2. 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.

  3. Baseline (iter_0) — no training. Run inference with the supplied zero-shot / pretrained checkpoint, then kpi_analyze. Seed train_grounding_dino.yaml from the user's template for later iterations to extend.

  4. Iterate. For each iteration 1..max_iterations, run the seven stages in order: gap_analysis → embed → mine → stage → train → inference → kpi_analyze. Each iteration's gap_analysis consumes the previous phase's inference labels. Between stages run the audit and follow its one-line disk-backed next action.

  5. Stop when max_iterations is reached or a hard-stop gate fires. mAP is reported, not gated — the loop does not early-exit on a metric target.

  6. The report renders itself. results/DEFT_Loop_Report.md is written by init_deft_state.py and re-rendered by every accepted commit_stage.py call. Do not spawn a subagent for it and do not compose it by hand; to refresh it out of band, run scripts/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.

StageOverlayUnderlying skill
prep (once)references/prep-source-pool.mdtao-skill-bank:tao-train-codetr + tao-generate-image-embeddings (+ bundled glue)
gap_analysisreferences/tao-analyze-gaps-od-map.mdtao-skill-bank:tao-analyze-gaps-od-map
embedreferences/tao-generate-image-embeddings.mdtao-skill-bank:tao-generate-image-embeddings
minereferences/tao-mine-od-images.mdtao-skill-bank:tao-mine-od-images
stagereferences/stage-mined-data.md(bundled glue — no leaf skill)
train, inferencereferences/grounding-dino.mdtao-skill-bank:tao-train-grounding-dino
kpi_analyzereferences/tao-analyze-detection-kpi.mdtao-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

TopicReference
Data contract, ODVG layout, source pool, output treereferences/data-layout.md
One-time source-pool prep (pseudo-label, remap, convert, embed)references/prep-source-pool.md
Pre-Flight checks, defaults, Summary templatereferences/preflight.md
Pipeline stages, state schema, loop-end sequencereferences/pipeline-and-state.md
Bundled scripts, glue, the report renderer, stage tablereferences/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

references/pipeline-and-state.md

Pipeline, State, and Runtime Behavior

Containers run as the calling user

Every TAO invocation in this skill passes --user "$(id -u):$(id -g)".

Without it the containers write root-owned output, and the next host-side script cannot read its own input — the loop stops between stages with a permission error that names a file the previous stage just created successfully. Verified on both images: annotations convert and grounding_dino inference both report Execution status: PASS under --user and leave their output owned by the caller.

Do not substitute a chown fixup after each stage. It works, but it is a step every caller has to remember and it leaves a window where the artifacts on disk are unreadable.

--user is not sufficient on its own. A uid with no /etc/passwd entry in the image has no name, and the container then crashes at torch import with KeyError: 'getpwuid(): uid not found: <uid>' before the action starts. Every launch therefore carries $DOCKER_IDENTITY as well; references/preflight.md defines it. Removing --user is not the way out of that — it reintroduces the root-owned output above.

Pipeline

All stages run inline in the parent context. For SKILL stages, read the matching references/*.md overlay first, then invoke the underlying tao-skill-bank:* skill. GLUE stages run a bundled script; there is no leaf skill.

Prep (prep) — once, before baseline

Runs only when the source pool is not already labeled and embedded. Produces source_pool/odvg/ and source_pool/source_embeddings.parquet — the two artifacts every iteration reads. Skip any step whose output already exists on disk; the skip is the caller's to make, not automatic.

Chain: Co-DETR pseudo-label the pool → fold predictions onto the user's target classes → KITTI→COCO → COCO→ODVG → embed the pool. Full detail, including the class-consistency contract and the hard-stop gates, is in references/prep-source-pool.md.

Cost is proportional to pool size, not to what mining later selects, and it must finish before the baseline starts. Report the pool image count in the Pre-Flight Summary.

Baseline (iter_0) — no training

The loop never trains at baseline. It scores the checkpoint the user supplied:

  1. [SKILL — tao-train-grounding-dino] inference. Run grounding_dino inference with inference.checkpoint=<zero_shot_checkpoint> and results_dir=${RESULTS_DIR}/baseline. TAO appends the task name, so labels land in ${RESULTS_DIR}/baseline/inference/labels/. See references/grounding-dino.md.

  2. [SKILL — tao-analyze-detection-kpi] kpi_analyze. Score those labels against the KPI ground truth. See references/tao-analyze-detection-kpi.md.

Also seed ${RESULTS_DIR}/train_grounding_dino.yaml by copying the user's train-spec template. Iteration 1 extends that copy; it is never trained from at baseline.

Iteration N — seven stages, in order

Each iteration's gap_analysis consumes the previous phase's inference labels: iteration 1 reads baseline, iteration N reads iter{N-1}.

  1. [SKILL — tao-analyze-gaps-od-map] gap_analysis. Input: state["iterations"][<prev_phase>]["inference_labels_dir"] plus the KPI ground-truth label directory. Output: weak_images.parquet (with a filepath column), box_gaps.parquet, image_metrics.parquet, gap_report.json. Set default_ap50_threshold: 0.0 and list every target class explicitly in weak_thresholds, which scripts/prepare_thresholds_for_gap_analysis.py writes from config.ap50_thresholds. See references/tao-analyze-gaps-od-map.md.

    Every ok gap_analysis commit must carry --weak-image-count <rows in weak_images.parquet>; it is rejected without one.

    If weak_images.parquet has zero rows, no data can be mined this iteration. Commit gap_analysis/status=ok --weak-image-count 0 and advance directly to loop_stop — there is nothing for the remaining six stages to consume. That zero is the only proof of the early stop the audit can read: without it, --require-complete reports a fully successful run as INCOMPLETE.

  2. [SKILL — tao-generate-image-embeddings] embed. Embeds the weak images so they can be matched against the source pool. input_parquet is the weak_images.parquet from stage 1 (it already carries filepath, so no projection step is needed); output_parquet is weak_images_embeddings.parquet. The encoder must match the one used to build the source-pool parquet. See references/tao-generate-image-embeddings.md.

  3. [SKILL — tao-mine-od-images] mine. tmm unique_neighbor_matching with source_path=<source pool embeddings>, target_path=<weak_images_embeddings.parquet>, and desired_unique_count from the mining budget. exclude_path must be null on iteration 1. TAO DS raises FileNotFoundError when exclude_path is set but is not a file; the cumulative parquet does not exist yet. From iteration 2 on, pass the previous iteration's mined_cumulative.parquet. Output: final_unique_files.parquet, summary.json. See references/tao-mine-od-images.md.

  4. [GLUE] stage. Turn the mined filepath list into a trainable ODVG source, then extend the exclude set. Runs three bundled scripts in order:

    <skill_root>/scripts/deft_python.sh <skill_root>/scripts/stage_mined_odvg.py \
      --mined-parquet "${RESULTS_DIR}/iter${N}/mining/final_unique_files.parquet" \
      --annotations-base-dir "<source pool ODVG dir>" \
      --output-images-dir "${RESULTS_DIR}/iter${N}/tmm/images" \
      --output-annotations-dir "${RESULTS_DIR}/iter${N}/tmm/annotations" \
      --report-json "${RESULTS_DIR}/iter${N}/tmm/staging_report.json"
    
    <skill_root>/scripts/deft_python.sh <skill_root>/scripts/validate_odvg_images.py \
      --image-dir "${RESULTS_DIR}/iter${N}/tmm/images" \
      --odvg "${RESULTS_DIR}/iter${N}/tmm/annotations/tmm_odvg.jsonl" \
      --key-field file_name
    
    <skill_root>/scripts/deft_python.sh <skill_root>/scripts/prepare_exclude_for_mining.py \
      --parquet-a "${RESULTS_DIR}/iter${N}/mining/final_unique_files.parquet" \
      --parquet-b "<previous mined_cumulative.parquet; omit on iter 1>" \
      --iteration "${N}" \
      --output "${RESULTS_DIR}/iter${N}/mined_cumulative.parquet"

    Staging writes tmm_odvg.jsonl (one line per mined image, image_id renumbered sequentially, instances[].label remapped through the labelmap) and labelmap.json. stage_mined_odvg.py truncates tmm_odvg.jsonl before writing — the reference implementation opened it in append mode, so re-running an iteration silently duplicated every entry. See references/stage-mined-data.md.

  5. [SKILL — tao-train-grounding-dino] train. First append the new ODVG source to the train spec:

    <skill_root>/scripts/deft_python.sh <skill_root>/scripts/prepare_spec_for_train.py \
      --previous-spec "<prev phase train spec>" \
      --output-spec "${RESULTS_DIR}/iter${N}/train_grounding_dino.yaml" \
      --num-epochs "<epochs>" --learning-rate "<lr>" \
      --tmm-image-dir "${RESULTS_DIR}/iter${N}/tmm/images" \
      --tmm-odvg-file "${RESULTS_DIR}/iter${N}/tmm/annotations/tmm_odvg.jsonl" \
      --tmm-label-map-file "${RESULTS_DIR}/iter${N}/tmm/annotations/labelmap.json" \
      --val-image-dir "<pool images>" \
      --val-json-file "${RESULTS_DIR}/val_coco.json" \
      --pretrained-model-path "<config.zero_shot_checkpoint>"

    --pretrained-model-path and the --val-* pair are not optional: without the checkpoint, training starts from no pretrained weights, reports success, and emits a model that detects nothing — visible only at KPI, a full training run later. The validation COCO comes from prepare_val_split_for_train.py and must be 0-based. See references/grounding-dino.md.

    This copies the previous spec and appends one {image_dir, json_file, label_map} entry to the dataset.train_data_sources list, then sets train.num_epochs and train.optim.lr. Growth is by list-append; earlier sources are never removed.

    train.pretrained_model_path is deliberately left untouched, so every iteration fine-tunes the base checkpoint on the accumulated dataset rather than continuing from iter{N-1}'s weights. See references/grounding-dino.md. Then run grounding_dino train -e <spec> results_dir=${RESULTS_DIR}/iter${N} train.num_gpus=<N>.

    Iteration N's committed checkpoint must be a newly emitted file under ${RESULTS_DIR}/iter${N}/train/. A non-zero exit, or a run emitting no new checkpoint, is a hard stop — never evaluate a checkpoint written before the failure.

  6. [SKILL — tao-train-grounding-dino] inference. Run grounding_dino inference with inference.checkpoint=${RESULTS_DIR}/iter${N}/train/gdino_model_latest.pth and results_dir=${RESULTS_DIR}/iter${N}. Labels land in ${RESULTS_DIR}/iter${N}/inference/labels/ and become the next iteration's gap_analysis input.

  7. [SKILL — tao-analyze-detection-kpi] kpi_analyze. Score the new labels. Record kpi_calc.csv and the mAP parsed from stdout. mAP is reported, not gated — a regression does not stop the loop.

State & Logging

Two artifacts persist loop state:

  • results/deft_state.json — resume snapshot. Initialize once with init_deft_state.py, then mutate only through commit_stage.py.

  • results/loop_log.jsonl — append-only event stream, one JSON line per stage:

{
  "seq":            <int, monotonically increasing from 1>,
  "ts":             "<ISO-8601 UTC; stage end time>",
  "iter":           "baseline|iter1|iter2|...",
  "stage":          "prep|inference|kpi_analyze|gap_analysis|embed|mine|stage|train|loop_stop",
  "status":         "ok|error",
  "summary":        "<one-line outcome>",
  "duration_sec":   <int>,
  "context_tokens": <always 0; reserved, nothing populates it>,
  "tokens":         <object added at loop end>
}

Disk is the source of truth. Before every stage run the audit and use its last_committed, next_action, and read_before_action output. Do not print the full state or log into context.

On startup / resume: print the last 5 entries of loop_log.jsonl, then proceed from disk-loaded state.

Ordered transitions the audit enforces
prep:      prep                                   (once; skipped when artifacts exist)
baseline:  inference -> kpi_analyze
iterN:     gap_analysis -> embed -> mine -> stage -> train -> inference -> kpi_analyze

commit_stage.py rejects an out-of-order commit. Do not repair a rejected commit by editing JSON.

Stage Execution

Two stage types:

  • SKILL — read the overlay, then invoke the matching tao-skill-bank:* skill.

  • GLUE — parent runs a bundled script directly.

There is no AGENT stage. Reporting was the only one, and it is now a post-commit hook in commit_stage.py, so every stage of this loop is reachable from a runtime that has nothing but Bash.

Post-stage check

After every stage, before advancing:

  1. Verify the documented required artifacts exist.

  2. Invoke commit_stage.py once with the documented artifact flags, and pass --duration-sec with the stage's measured wall clock. Take a timestamp before the stage and subtract:

    started=$SECONDS
    # ... run the stage ...
    commit_stage.py ... --duration-sec "$(( SECONDS - started ))"

    The field is in the log schema and the report renders a duration column from it, but nothing populates it unless the flag is passed — every stage then reads 0 and the timeline is empty. If no reliable start time was captured, omit the flag rather than inventing a number.

  3. Run audit_deft_run.py --results-dir ${RESULTS_DIR}. If INVALID, halt and repair.

  4. If the committed status is error — halt, surface the disk evidence, do not auto-retry.

  5. If ok — print one status line: [iter <N>/<max> · <stage>] <detail> · <duration> · next: <stage>. Then advance.

Reports

  • results/iter${N}_summary.md — ≤300 words, readable after context compaction.

  • results/DEFT_Loop_Report.md — written by init_deft_state.py and re-rendered by every accepted commit_stage.py call, so it is current after each stage rather than after each iteration. Nothing needs to ask for it.

Runtime Behavior

Run without pausing. Between stages, run the audit and print only its one-line next action.

Loop-end sequence (in order):

  1. Append the final event via commit_stage.py --stage loop_stop.

  2. That commit re-renders the report with the run's final status. Confirm it is on disk; if the commit warned that rendering failed, fix the cause and run scripts/render_report.py --results-dir "${RESULTS_DIR}" --require-terminal.

Before telling the user the loop is complete:

<skill_root>/scripts/deft_python.sh <skill_root>/scripts/audit_deft_run.py \
  --results-dir ${RESULTS_DIR} --require-complete

Stop conditions:

  • max_iterations reached → run the loop-end sequence and report the mAP trend across iterations.

  • Zero weak images at any gap_analysis → commit loop_stop, report that the model met every configured per-class AP50 threshold.

  • Unrecoverable gate failure → halt, report the exact missing artifact. Steps 1–3 of the loop-end sequence still apply.

Output Layout

results/run_<YYYYMMDD_HHMMSS>/
├── deft_state.json
├── loop_log.jsonl
├── .deft_commit.lock                  # commit_stage.py: one writer at a time
├── .deft_commit.journal               # only while a commit is in flight; the
│                                      # next commit_stage.py run undoes an
│                                      # interrupted one from it
├── DEFT_Loop_Report.md
├── train_grounding_dino.yaml          # seeded at baseline from the user's template
├── prep/                              # only when prep ran
│   ├── inference/labels/              # Co-DETR pseudo-labels, already folded
│   ├── codetr_category_mapping.yaml   # the fold, applied at detection time
│   ├── kitti_mapping.yaml             # identity — Co-DETR already folded
│   ├── classmap_target.txt
│   └── pool_report.json               # validate_pool_coco.py's verdict
│                                      # NOTE: the KITTI->COCO output is NOT under prep/.
│                                      # It is retained at <workspace>/source_pool/coco.json
│                                      # as class_stratified mining's source_detection_file.
│                                      # See references/prep-source-pool.md step 3.
├── iter${N}_summary.md
├── baseline/
│   ├── inference/labels/*.txt         # zero-shot predictions (KITTI, 15 fields + score)
│   └── kpi/kpi_calc.csv
└── iter${N}/
    ├── gaps/                          # weak_images.parquet, box_gaps.parquet,
    │                                  # image_metrics.parquet, gap_report.json
    ├── embeddings/weak_images_embeddings.parquet
    ├── mining/                        # final_unique_files.parquet, summary.json
    ├── tmm/
    │   ├── images/                    # staged mined images
    │   └── annotations/               # tmm_odvg.jsonl, labelmap.json
    ├── mined_cumulative.parquet       # exclude set for the next iteration
    ├── train_grounding_dino.yaml      # prev spec + one appended ODVG source
    ├── train/                         # gdino_model_latest.pth, status.json
    ├── inference/labels/*.txt
    └── kpi/kpi_calc.csv

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