Agent skill · nvidia

cdf-anomalygen

Use when running the CDF AnomalyGen pipeline over a defect dataset — mask placement, fine-tuning, synthetic defect-image generation (SDG), evaluation, quality refinement, and pseudo-labeling — even when the user names only one stage.

What it needs

About 11k tokens when loaded.

What this skill does

Skill: cdf-anomalygen Purpose AnomalyGen fine-tunes the frozen Cosmos base into an anomaly-generation model: given a clean image + defect mask, it paints a realistic defect into that region (synthetic data for detectors). Pick a mode, collect its params, run the steps — all commands from the repo root. When to Use This Skill Use for the CDF AnomalyGen pipeline over a defect dataset — any single stage (mask placement, fine-tuning, generation, evaluation, refinement, or pseudo-labeling) or the full run. "Run the AnomalyGen pipeline on phonescreen" "Fine-tune an anomaly-generation model for PCB defects" "Generate 25 synthetic PCB anomaly images" "Place defect masks", "evaluate quality", or "pseudo-label the generated defects" Do not use this skill for generic image generation, or for synthetic data that isn't defect images built from the {texture}/{defect} clean-image + defect-mask contract. Prerequisites A CUDA GPU and the project's built env (native .venv or the Docker image). Hugging Face auth — run hf auth login — plus network access; the downloader fetches the model checkpoints. A datasetdir in the Step 1 contract layout (clean images + {defect} masks; plus defectspec.jsonl only when maskbackend=amp — the default amg never reads it, and nothing after Step 2 does either). Preflight the env + checkpoints (GPU, Python, CUDA/torch, deps, HF auth, model checkpoints): Read which group failed before reacting — the summary separates them, and only one is fixed by downloading: missing checkpoints → scripts/downloadcheckpoints.sh (run hf auth login first). env / Python / deps → rebuild the environment (bash scripts/envsetup.sh, then activate it). Third group — model access for mask placement (checked HERE, never mid-flow). The default maskbackend=amg needs a vision model, and a run that discovers this at Step 2 has already spent the user's time. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills nvidia/cdf-anomalygen

View the source on GitHub

Browse the @skills marketplace