Official agent skill

Tao Generate Anomalies

by NVIDIA in NVIDIA/skills

Full PAIDF AnomalyGen pipeline — fine-tune on a new anomaly dataset, generate synthetic anomaly images (SDG), evaluate quality (nnscore), and search per-sample (guidance, cropratio) parameters.

OfficialApache-2.0Auto-check: notesAI & LLM Engineering

Install Tao Generate Anomalies

skills CLI
$ npx skills add NVIDIA/skills --skill tao-generate-anomalies -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NVIDIA/skills tao-generate-anomalies --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NVIDIA/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tao-generate-anomalies .claude/skills/tao-generate-anomalies && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tao-generate-anomalies
GitHub stars
3.6k
Token cost
~4.9k tokens
SKILL.md length
1,815 words
Files
22 (incl. references, assets)
Skills in repo
390
Repo updated
First seen
Licence
Apache-2.0

At a glance

Full PAIDF AnomalyGen pipeline — fine-tune on a new anomaly dataset, generate synthetic anomaly images (SDG), evaluate quality (nnscore), and search per-sample (guidance, cropratio) parameters.

  • Works in 8 steps: checkpoints → fine-tune (skip when MODE=inference_only) → prep-testcase (skip when… → …
  • The user asks to fine-tune AnomalyGen
  • SKILL.md covers Quick Start, Running in Docker — container…, Reference files — read before… and Required parameters, plus 15 more sections
  • Calls python3, git and docker; needs HF_TOKEN

What it does

Tao Generate Anomalies is an agent skill from NVIDIA/skills, published by the product's own GitHub organization. Full PAIDF AnomalyGen pipeline — fine-tune on a new anomaly dataset, generate synthetic anomaly images (SDG), evaluate quality (nnscore), and search per-sample (guidance, cropratio) parameters. Three modes: full (Phase 0→7: finetune then generate), finetuneonly (Phase 0→1: train only), inferenceonly (Phase 0, 2→7: generate from an existing checkpoint). Use when the user asks to "fine-tune AnomalyGen", "generate anomaly images", "run PAIDF SDG", "evaluate SDG output quality", "run per-sample search", or run any…

Its SKILL.md is about 4.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 25 other files, including reference files and assets (for example `BENCHMARK.md`, `assets/ag_config.yaml` and `config/skillspector-baseline.yaml`). Compatibility notes: Requires docker + nvidia-container-toolkit and a CUDA GPU. Pulls the metropolissdg.paidfanomalygen image declared in versions.yaml at the skill bank root.

It sits in AI & LLM Engineering, covering Fine-tuning. The repository describes itself as: Agent Skills for NVIDIA products — install into Claude Code, Codex, and other coding agents to run Physical AI, robotics, simulation, CUDA, and RAG workflows end to end. The licence is Apache-2.0.

When your agent uses it

  • The user asks to fine-tune AnomalyGen
  • Generate anomaly images
  • Evaluate SDG output quality
  • Run per-sample search

Example prompts

  • “fine-tune AnomalyGen”
  • “generate anomaly images”
  • “run PAIDF SDG”
  • “/tao-generate-anomalies”

Requirements

  • Python 3
  • Docker
  • Compatibility (from SKILL.md): Requires docker + nvidia-container-toolkit and a CUDA GPU. Pulls the `metropolis_sdg.paidf_anomalygen` image declared in `versions.yaml` at the skill bank root.
  • Pre-approved tools (allowed-tools): Read, Bash

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. checkpoints
  2. fine-tune (skip when MODE=inference_only)
  3. prep-testcase (skip when MODE=finetune_only)
  4. SDG → original/
  5. eval original/
  6. per-sample search rounds
  7. assemble searched/ (stitch only)
  8. filter + regen + eval (default nn_threshold=0.4)

What it can do on your machine

Read from SKILL.md and the folder at commit 14a98ae. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • git
    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HF_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires docker + nvidia-container-toolkit and a CUDA GPU. Pulls the `metropolis_sdg.paidf_anomalygen` image declared in `versions.yaml` at the skill bank root.

    From compatibility in the SKILL.md frontmatter.

Context cost

Tao Generate Anomalies loads about 4.9k tokens when it runs, and up to ~23k if it reads all its reference files. Until then it costs about 153 tokens; SKILL.md has 1,815 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~153
When it runs · the whole SKILL.md, loaded when a task matches
~4.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~23k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NVIDIA/skills at commit 14a98ae, republished under its Apache-2.0 licence (© NVIDIA). 1,815 words, ~4,867 tokens.

Download SKILL.mdSave it as .claude/skills/tao-generate-anomalies/SKILL.md (or your agent's skills folder). This skill also uses 21 other files; get the full folder from GitHub.
name
tao-generate-anomalies
description
Full PAIDF AnomalyGen pipeline — fine-tune on a new anomaly dataset, generate synthetic anomaly images (SDG), evaluate quality (nn_score), and search per-sample (guidance, crop_ratio) parameters. Three modes: full (Phase 0→7: finetune then generate), finetune_only (Phase 0→1: train only), inference_only (Phase 0, 2→7: generate from an existing checkpoint). Use when the user asks to "fine-tune AnomalyGen", "generate anomaly images", "run PAIDF SDG", "evaluate SDG output quality", "run per-sample search", or run any part of the AnomalyGen pipeline, even if they only mention one phase.
allowed-tools
Read, Bash
compatibility
Requires docker + nvidia-container-toolkit and a CUDA GPU. Pulls the `metropolis_sdg.paidf_anomalygen` image declared in `versions.yaml` at the skill bank root.
license
Apache-2.0
metadata.tags
tao, data
metadata.author
NVIDIA Corporation
metadata.version
1.0.1

TAO Generate Anomalies

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

Multi-phase pipeline (0–7); the mode flag selects which phases run.

PhaseWhat runsMode(s)
0Verify / download pretrained checkpointsall
1Fine-tune on dataset_dirfull, finetune_only
2Prepare inference JSONL (AMP routing)full, inference_only
3SDG — generate synthetic anomaly images → original/full, inference_only
4Eval original/ — emit per_sample.csv + eval.log, merge nn_score into SDG_result.csvfull, inference_only
5Per-sample (guidance, crop_ratio) search rounds → rounds/round_NN/ (each round runs SDG + eval)full, inference_only
6Assemble best-of-rounds into searched/ (stitch only), plus rounds/search_summary.csvfull, inference_only
7Filter searched/ by nn_threshold (default 0.4), regen dropped samples, then canonical bucket eval → searched/{per_sample.csv, eval.log}full, inference_only

Run every phase through to completion without mid-run pauses. Collect all required parameters up front, and run every command from the repo root.

Shell setup. All ${ANOMALYGEN_SCRIPTS} references resolve to the packaged helper-script directory. Inside the container this is preset (ENV ANOMALYGEN_SCRIPTS=<dir>/scripts/utilities); on the host, export it once per shell:

bash
export ANOMALYGEN_SCRIPTS="$(git rev-parse --show-toplevel)/scripts/utilities"

python3 -m scripts.utilities.<name> invocations work from any CWD inside the container (PYTHONPATH is preset) and from the repo root on the host. When inside a product container (ANOMALYGEN_PRODUCT_MODE=1), invoke anomalygen-guard before any GPU work; if it reports BLOCKED, fix the listed issues before continuing.

Quick Start

The pipeline runs inside the metropolis_sdg.paidf_anomalygen container (declared in versions.yaml) or any host with the cosmos-predict2 conda env active. All phase commands assume that environment, at the repo root, with ANOMALYGEN_SCRIPTS exported.

Minimal end-to-end run (mode=full):

bash
# 1. Set the shared variables (see "Shared variables" for the full set).
export ANOMALYGEN_SCRIPTS="$(git rev-parse --show-toplevel)/scripts/utilities"
MODE=full
NAME=my_exp
DATASET_DIR=/data/uc1
DEFECT_DESC=assets/defect_spec_template.jsonl
NUM_SDG=20
MODEL_SIZE=2b

# 2. Phase 0 — verify / download checkpoints (~40 GB for the 2B default; needs HF_TOKEN).
${ANOMALYGEN_SCRIPTS}/check.sh --model-sizes ${MODEL_SIZE^^} \
    || ${ANOMALYGEN_SCRIPTS}/download_checkpoints.sh --model-sizes ${MODEL_SIZE^^}

# 3. Walk Phases 1→7 in order (see each Phase section).

For mode=inference_only (reuse a checkpoint) also set CKPT/STEP and skip Phase 1. For mode=finetune_only run only Phases 0–1.

Running in Docker — container launch, mounts & permissions

The paidf-anomalygen image runs as a non-root baked-in user (USER anomalygen, uid=10000), independent of your host uid. Docker does not remap uids on bind mounts, so a host directory owned by your uid is not writable by uid 10000 and the container fails the instant it tries to create a file there. Run with the full host identity: --user "$(id -u):$(id -g)", matching USER/LOGNAME, HOME=/tmp, and read-only /etc/passwd+/etc/group mounts, plus the cache redirects. Run the fail-fast write preflight before Phase 0. See references/docker.md for the full docker run command, the load-bearing-flag table, the preflight snippet, and the uid-10000 chown/chmod fallback.

Reference files — read before executing phases

Read references/finetune.md before Phase 0/1 and references/inference.md before any of Phases 2–7; for mode=full read both before starting. The remaining references below are on-demand — read when troubleshooting or needing full detail for a specific phase.

FileRead when
references/finetune.mdBefore Phase 0/1: env check, checkpoint download, dataset validation, config generation, training commands, best-checkpoint selection
references/finetune-commands.mdExact Phase 1 Step 1–4 commands and CKPT/STEP derivation
references/inference-commands.mdExact Phase 5 run_round.sh and Phase 7 filter_with_regen commands
references/inference.mdBefore Phases 2–7: AMP routing, JSONL validation, SDG flags, eval interpretation, search loop, filtering
references/setup.mdCheckpoint download fails; first-time setup; HF_TOKEN / disk issues
references/datasets.mdUser needs to prepare or obtain a UC1 / UC2 / UC3 dataset; dataset_dir doesn't exist yet
references/prep-testcase.mdAMP fails; need full param table, helper script descriptions, allocation invariant
references/sdg-inference.mdNCCL hang; checkpoint validation error; multi-GPU VRAM question; full step list
references/eval.mdUnexpected scores; FID column order confusion; eval output format reference
references/sdg-refine.mddraws.json alignment; re-AMP heuristics; search output layout
references/guard-and-custom-counts.mdFull guard preflight command; --per-defect-counts example
references/docker.mdContainer launch command, mount-permission flags, write preflight, uid-10000 fallback
references/output-layout.mdFull results/<name>/ directory tree with per-file annotations; post-run Verification checklist
references/error-handling.mdPipeline-level failure modes: missing mask dirs, short/empty AMP, mid-round resume, off-boundary step

Required parameters

num_SDG allocation depends on prep_testcase.sh --mode: inference (default, Phase 2) is uniform across defect types, override per-defect via --per-defect-counts; validation (Phase 1's validation JSONL) is proportional to training mask counts (largest-remainder rounding) and enforces ≥1 per defect. See references/prep-testcase.md for the full mode table.

ParameterDescription
modefull (Phase 0→7), inference_only (skip Phase 1), or finetune_only (Phase 0→1 only).
nameExperiment label.
dataset_dirTraining/reference dataset root. Drives mask-count allocation, AMP submask templates, and holds semantic_segmentation_labels.json for cad defects.
defect_specJSONL tagging each defect spatial_dependency as free/text/cad. text entries need roi_prompt_defect_location. Template: assets/defect_spec_template.jsonl.
num_SDGTotal output samples per bucket. (Ignored when mode=finetune_only.)

Conditionally required

ParameterRequired whenDescription
checkpoint_dir / stepmode=inference_onlyPre-existing fine-tuned model. In mode=full these are auto-derived after Phase 1; passing them is an error. In mode=finetune_only silently ignored — Phase 1 always trains from scratch (no resume-from-checkpoint support). Both must be present together — supplying only one is an error.

Optional parameters

ParameterDefaultDescription
clean_dirdataset_dirClean images. Set only when they live outside the training dataset. Forwarded as --clean-dir to prep-testcase and --clean-image-path to finetune.
validation_jsonlauto-generatedPre-built validation JSONL for Phase 1. When supplied, preflight verifies every defect_spec type appears and paths exist.
num_search_run3Per-sample search budget for Phase 5. 0 skips search (only original/). (Ignored when mode=finetune_only.)
nn_threshold0.4nn_score cutoff for Phase 7 (DINOv2 correspondence to real defects — key KPI). Samples below are regenerated; final searched/ always has num_SDG. 0 disables filtering.
max_iter75000Phase 1 only. Total fine-tune iterations.
save_iter5000Phase 1 only. Checkpoint save interval.
validation_iter5000Phase 1 only. Validation (nn_score) logging interval.
num_gpus1Forwarded to Phase 1 (finetune) and Phase 3 (SDG). Eval and search rounds stay single-GPU.
model_size2b2b or 14b. Used by finetune and SDG. On-disk checkpoint path encodes in upper-case (2b→2B, 14b→14B).
lr0.02Phase 1 only. Learning rate.
batch_size2Phase 1 only. Per-GPU batch size.
image_size512Phase 1 only. Training resolution (square).
guidance_range1.5 10.0Phase 5 search draw range for guidance.
crop_ratio_range1.5 10.0Phase 5 search draw range for crop_ratio.

Mode validation (fail fast before any phase)

  • mode unset → halt: "mode is required (full | inference_only | finetune_only)."
  • mode=inference_only missing either checkpoint_dir or step → halt: "inference_only requires both checkpoint_dir and step."
  • mode=full with checkpoint_dir or step supplied → halt: "full mode runs finetune; use mode=inference_only to reuse an existing checkpoint."

Shared variables

Set once before Phase 0:

bash
MODE=<full|inference_only|finetune_only>
NAME=<exp>
DATASET_DIR=<dataset_dir>
CLEAN_DIR=${clean_dir:-${DATASET_DIR}}
CKPT=<checkpoint_dir>      # required iff MODE=inference_only; auto-derived after Phase 1 when MODE=full
STEP=<iter>                # required iff MODE=inference_only; auto-derived after Phase 1 when MODE=full
NUM_SDG=<N>
DEFECT_DESC=<defect_spec.jsonl>
DEFECTS=(T+A T+B)          # TEXTURE+TYPE names. For mode=inference_only, derive from ${CKPT}/ag_config.yaml → dataloader_train.dataset.anomaly_types (also printed by validate_checkpoint.py in Phase 0). For mode=full, take from DEFECT_DESC entries. See references/inference.md §Phase 0.
NUM_SEARCH_RUN=${num_search_run:-3}
NN_THRESHOLD=${nn_threshold:-0.4}
MODEL_SIZE=<2b|14b>
NUM_GPUS=${num_gpus:-1}
MAX_ITER=${max_iter:-75000}
SAVE_ITER=${save_iter:-5000}
VALIDATION_ITER=${validation_iter:-5000}
LR=${lr:-0.02}
BATCH_SIZE=${batch_size:-2}
IMAGE_SIZE=${image_size:-512}
VALIDATION_JSONL=${validation_jsonl:-}  # optional; set by Phase 1 Step 2 if not user-supplied

BASE=results/${NAME}
JSONL=ag_inference/${NAME}/testcase.jsonl
ORIGINAL=${BASE}/original
SEARCHED=${BASE}/searched
ROUNDS=${BASE}/rounds
REGENS=${BASE}/regens

Guard preflight (product mode only)

When ANOMALYGEN_PRODUCT_MODE=1, run .agents/skills/anomalygen-guard/scripts/preflight.py before any GPU work and fix any BLOCKED issues. --validation-jsonl is forwarded only when the user supplied one; for MODE=finetune_only omit --num-sdg if not supplied. See references/guard-and-custom-counts.md for the full preflight command with all forwarded flags and the validation-JSONL / allocate_samples.py 0-entry checks.


Phase 0 — checkpoints

Read references/finetune.md §Phase 0 for HF_TOKEN requirements and what gets downloaded. Both scripts default to the 2B base + t5-large (~40 GB); pass --model-sizes ${MODEL_SIZE^^} so the chain checks and fetches the base size this run actually uses (2b→2B, 14b→14B) — otherwise a 14b run silently passes the 2B-only check and never downloads its checkpoint. Verify first; download only what is missing.

bash
${ANOMALYGEN_SCRIPTS}/check.sh --model-sizes ${MODEL_SIZE^^} \
    || ${ANOMALYGEN_SCRIPTS}/download_checkpoints.sh --model-sizes ${MODEL_SIZE^^}

Show full SKILL.md (718 more words)Show less

Phase 1 — fine-tune (skip when MODE=inference_only)

Read references/finetune.md §Phase 1 for dataset structure, config template details, and best-checkpoint selection. Four steps: (1) validate dataset / derive anomaly types, (2) generate the validation JSONL (skip if user supplied VALIDATION_JSONL), (3) generate the training config — show it to the user and confirm before writing — (4) launch training in the background. Then derive CKPT (path encodes upper-case MODEL_SIZE) and STEP (highest nn_score step from validation logs). If MODE=finetune_only, stop after training. See references/finetune-commands.md for the exact Step 1–4 commands and the CKPT/STEP derivation snippet.


Phase 2 — prep-testcase (skip when MODE=finetune_only)

Read references/inference.md §Phase 2 for AMP routing detail and n_seeds sizing. Do NOT pass --seeds — it is auto-computed and is not a recognized flag. prep_testcase.sh defaults to --mode inference (uniform allocation across defect types, no KPI floor), which Phase 2 always uses.

bash
${ANOMALYGEN_SCRIPTS}/prep_testcase.sh \
    --name ${NAME} --num-sdg ${NUM_SDG} \
    --dataset-dir ${DATASET_DIR} \
    --clean-dir ${CLEAN_DIR} \
    --defect-spec ${DEFECT_DESC} \
    --amp-output-dir ag_inference/${NAME}/amp \
    --output-jsonl ${JSONL}

Custom per-defect counts: when the user specifies counts per defect type, translate to --num-sdg plus a --per-defect-counts JSON dict (types absent from the dict get 0; sum should equal --num-sdg, else the script warns on stderr and uses the override sum). Confirm the allocation when intent is ambiguous. See references/guard-and-custom-counts.md for the full --per-defect-counts command example and the ambiguity-handling detail.


Phase 3 — SDG → original/

Read references/inference.md §Phase 3 for JSONL validation against the checkpoint, multi-GPU caveats, and output verification.

bash
python3 -m scripts.utilities.validate_checkpoint ${CKPT} --step ${STEP}
python3 -m scripts.utilities.validate_jsonl ${CKPT} ${JSONL}

${ANOMALYGEN_SCRIPTS}/run_sdg.sh \
    --checkpoint_dir ${CKPT} --step ${STEP} \
    --input_jsonl ${JSONL} --output_dir ${ORIGINAL} \
    --model_size ${MODEL_SIZE} --num_gpus ${NUM_GPUS}

${ANOMALYGEN_SCRIPTS}/verify_output.sh ${JSONL} ${ORIGINAL}

Phase 4 — eval original/

Read references/inference.md §Eval for score interpretation and feature-count explanation. run_eval.sh writes per_sample.csv and eval.log inside original/ and merges nn_score into SDG_result.csv.

bash
${ANOMALYGEN_SCRIPTS}/run_eval.sh \
    --real-path ${DATASET_DIR} --generated-path ${ORIGINAL} \
    --anomaly-types ${DEFECTS[@]}

Phase 5 — per-sample search rounds

Read references/inference.md §Phase 5 for draw strategy, ranges, and re-AMP guidance. For r in 1..NUM_SEARCH_RUN:

  1. Read prior round's per_sample.csv (or ${ORIGINAL}/per_sample.csv for r=1).
  2. Write ${ROUNDS}/round_${r}/draws.json with selected (guidance, crop_ratio) per sample.
  3. Run round via ${ANOMALYGEN_SCRIPTS}/run_round.sh (SDG + eval; the round dir gets its own sdg/{SDG_result.csv, per_sample.csv, eval.log}). See references/inference-commands.md §Phase 5 for the full command and flags.

NUM_SEARCH_RUN=0 is valid — skip this phase entirely and let Phase 6 clone original/ into searched/.


Phase 6 — assemble searched/ (stitch only)

Always run assemble (works with 0 rounds — searched/ clones original/, so downstream always reads searched/ regardless of num_search_run). Stitch-only: copies winning images per sample-index into searched/ and carries over per-sample nn_score / mnn_score from each pick's source-round per_sample.csv. No eval — Phase 7 emits the canonical searched/eval.log.

bash
mkdir -p ${ROUNDS}
python3 -m scripts.utilities.assemble_searched \
    --original-dir ${ORIGINAL} --original-csv ${ORIGINAL}/per_sample.csv \
    --rounds-dir ${ROUNDS} --searched-dir ${SEARCHED}

Phase 7 — filter + regen + eval (default nn_threshold=0.4)

Phase 7 runs by default (nn_threshold=0.4) on every mode=full and mode=inference_only invocation; pass nn_threshold=0 to skip it. It filters searched/ by nn_threshold, regenerates dropped samples via re-AMP (fresh (clean, submask) pairing in the same defect type) for up to 5 attempts, then falls back to best-scoring non-passing regens and finally to dropped originals, so the final bucket always equals num_SDG.

Run python3 -m scripts.utilities.filter_with_regen. Pass --allocation ag_inference/${NAME}/allocation.json so regen targets the intended per-defect counts — without it a bucket left short (e.g. by an interrupted SDG) cannot be topped back up to num_SDG. It runs the final run_eval.sh internally — the only eval against searched/. Read references/inference.md §Phase 7 for regen mechanics, source-column tracing, and the regens/regen_summary.csv schema; see references/inference-commands.md §Phase 7 for the full command and flags.


Output layout

Every bucket that gets eval'd carries the same triad of files: SDG_result.csv (generation params + nn_score + guardrail_pass), per_sample.csv (per-sample nn + mnn), and eval.log (aggregate FID / per-defect avg). Buckets live under results/<name>/ as original/ (Phase 3+4), searched/ (Phase 6 stitch + Phase 7 filter+regen+eval), rounds/round_NN/ (Phase 5, plus search_summary.csv), and regens/regen_NN/ (Phase 7, plus regen_summary.csv).

Image content guardrail. A SigLIP content-safety check runs on every generated image and records its verdict in SDG_result.csv.guardrail_pass (1 safe / 0 blocked). A blocked image is replaced with an all-black image that still occupies its slot on disk, so counting files cannot detect it — never hand a guardrail_pass=0 sample downstream. Blacked-out samples score near-zero nn_score, so Phase 7 regenerates them like any other sub-threshold sample. Disable with ANOMALYGEN_IMAGE_GUARDRAIL=0.

See references/output-layout.md for the full directory tree with per-file annotations, the guardrail semantics, and the post-run Verification checklist (image counts per bucket, search_summary.csv / regen_summary.csv row checks, the per-type nn_score / mnn_score / fid fields in each eval.log, and the guardrail_pass sweep).

Error handling

Common pipeline failure modes (missing mask dirs, short/empty AMP output and the 0 entries written halt, mid-round SDG failure resume, off-boundary step, validate_dataset.py's non-zero exit on any pairing issue, the 2B-only check.sh default, and guardrail-blocked black images) are covered in references/error-handling.md; see also references/finetune.md and references/inference.md for phase-specific error handling.

© NVIDIA, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 21 other files (references, assets) in skills/tao-generate-anomalies of NVIDIA/skills.

  • SKILL.md
  • BENCHMARK.md
  • assets/ag_config.yaml
  • assets/defect_spec_template.jsonl
  • config/skillspector-baseline.yaml
  • evals/evals.json
  • references/datasets.md
  • references/docker.md
  • references/error-handling.md
  • references/eval.md
  • references/finetune-commands.md
  • references/finetune.md
  • references/guard-and-custom-counts.md
  • references/inference-commands.md
  • references/inference.md
  • references/output-layout.md
  • references/prep-testcase.md
  • … and 5 more

Open the folder on GitHubat commit 14a98ae

Compare with similar skills

Tao Generate Anomalies next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tao Generate Anomalies compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tao Generate Anomalies this skillNVIDIA/skills3.6k—~4.9kAutomated safety check: NotesApache-2.0
Sentence-Transformers Training Routerhuggingface/skills11k1 repos~2.6kAutomated safety check: PassApache-2.0
Train RlOpenPipe/ART11k—~2.4kAutomated safety check: PassApache-2.0
Qwopus27b Rl TrainingR6410418/Jackrong-llm-finetuning-guide1.7k—~830Automated safety check: PassApache-2.0
Dataset Evaluationawslabs/agent-plugins9161 repos~1.3kAutomated safety check: PassApache-2.0
Train SftOpenPipe/ART11k—~2.9kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.

    11k GitHub starsUsed in 1 repo~2.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Train Rl

    OpenPipe/ART

    RL training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Qwopus27b Rl Training

    R6410418/Jackrong-llm-finetuning-guide

    Prepare, validate, launch-plan, monitor, resume, and stop configurable Qwopus 27B reinforcement-learning workflows for GRPO or GSPO.

    1.7k GitHub stars~830 tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Dataset Evaluation

    awslabs/agent-plugins

    Official

    Validates dataset formatting and quality for SageMaker model fine-tuning (SFT, DPO, or RLVR).

    916 GitHub starsUsed in 1 repo~1.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Train Sft

    OpenPipe/ART

    SFT training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.9k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Fine Tuning With Trl

    Orchestra-Research/AI-Research-SKILLs

    Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training.

    13k GitHub starsUsed in 6 repos~2.9k tokens
    AI & LLM EngineeringAuto-check passed

More from NVIDIA/skills

All 390 skills in this repo
  • Official

    A skill your agent uses when the user wants to deploy, run, debug, tear down, or call the REST API of the RTVI-CV 2D detection / tracking microservice.

    3.6k GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Official

    Generates, validates, compares and explains HOLOLINK_def.svh macro files for the HSB IP, using bundled Python scripts and asking before it writes anything.

    3.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    Runs and validates an end-to-end Mission Control demo in a locally installed Isaac Sim, with a Nova Carter robot driven through a Python server.

    3.6k GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Orchestrates defect image generation for PCBA, metal surface and glass inspection with NVIDIA Cosmos AnomalyGen on OSMO, from cold-start Day 0 to real-photo Day 1 labeling.

    3.6k GitHub stars~5k tokensUpdated yesterday
    Auto-check: notes
  • Orchestrates video data augmentation and auto-labeling workflows on OSMO, from flow selection and preflight checks to submission, monitoring and output download.

    3.6k GitHub stars~4.7k tokensUpdated yesterday
    Auto-check: notes
  • Official

    Runs NVIDIA TAO Data Services KPI analysis on object detection results, comparing predictions to ground truth and writing per-class precision, recall and AP to a CSV.

    3.6k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check: notes

Questions about Tao Generate Anomalies

What does Tao Generate Anomalies do?

Full PAIDF AnomalyGen pipeline — fine-tune on a new anomaly dataset, generate synthetic anomaly images (SDG), evaluate quality (nnscore), and search per-sample (guidance, cropratio) parameters. Tao Generate Anomalies is an agent skill from NVIDIA/skills, published by the product's own GitHub organization. Full PAIDF AnomalyGen pipeline — fine-tune on a new anomaly dataset, generate synthetic anomaly images (SDG), evaluate quality (nnscore), and search per-sample (guidance, cropratio) parameters.

When should I use Tao Generate Anomalies?

Tao Generate Anomalies fits situations like: the user asks to fine-tune AnomalyGen; generate anomaly images; evaluate SDG output quality; run per-sample search.

How do I install Tao Generate Anomalies in Claude Code?

Run `npx skills add NVIDIA/skills --skill tao-generate-anomalies -a claude-code`. Or copy the skill folder (skills/tao-generate-anomalies in NVIDIA/skills) into .claude/skills/tao-generate-anomalies in your project. Claude Code loads it when a task matches its description.

How do I install Tao Generate Anomalies in Codex?

Run `npx skills add NVIDIA/skills --skill tao-generate-anomalies -a codex`. Or copy the skill folder (skills/tao-generate-anomalies in NVIDIA/skills) into .agents/skills/tao-generate-anomalies in your project. Codex loads it when a task matches its description.

Can I use Tao Generate Anomalies in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NVIDIA/skills --skill tao-generate-anomalies -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tao-generate-anomalies, .gemini/skills/tao-generate-anomalies, .github/skills/tao-generate-anomalies and .opencode/skills/tao-generate-anomalies in your project.

What does Tao Generate Anomalies need to run?

Going by SKILL.md and its folder, Tao Generate Anomalies needs the command-line tools its instructions call (python3, git and docker) and credentials named HF_TOKEN. Our summary lists: Python 3; Docker. Its frontmatter pre-approves these tools: Read, Bash. Compatibility (from SKILL.md): Requires docker + nvidia-container-toolkit and a CUDA GPU. Pulls the `metropolis_sdg.paidf_anomalygen` image declared in `versions.yaml` at the skill bank root..

Does Tao Generate Anomalies access the network?

SKILL.md contains no URLs. Its commands use git and docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Tao Generate Anomalies safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Tao Generate Anomalies use?

Tao Generate Anomalies is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tao Generate Anomalies use?

About 4.9k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to Tao Generate Anomalies?

Skills that share tags, products or a category with Tao Generate Anomalies: Sentence-Transformers Training Router (huggingface/skills, 11k stars), Train Rl (OpenPipe/ART, 11k stars), Qwopus27b Rl Training (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars) and Dataset Evaluation (awslabs/agent-plugins, 916 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tao Generate Anomalies?

NVIDIA (a GitHub organization, an official publisher) maintains it in NVIDIA/skills, which has 3,555 GitHub stars. The repository holds 390 skills in this directory. The repository was last updated on October 9, 2026.

Source: NVIDIA/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.