Skills

Cdf Anomalygen

Use when running the CDF AnomalyGen pipeline over a defect dataset, mask placement...

Install

npx skills add NVIDIA/skills --skill cdf-anomalygen -g -a claude-code -y
Repository
NVIDIA/skills3.8k
Category
Data and ML
Updated
5d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

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.

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 phone_screen"
  • "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 dataset_dir in the Step 1 contract layout (clean images + {defect} masks; plus defect_spec.jsonl only when mask_backend=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):

scripts/preflight_env_ckpt.sh

Read which group failed before reacting, the summary separates them, and only one is fixed by downloading:

  • missing checkpoints → scripts/download_checkpoints.sh (run hf auth login first).
  • env / Python / deps → rebuild the environment (bash scripts/env_setup.sh, then activate it).
Read the whole SKILL.md on GitHub

More in Data and ML