Install any skill in seconds. Free to start, no credit card required.
Get Started Free →nvidia/physical-ai-defect-image-generation
Use when the user wants to orchestrate defect image generation with NVIDIA Cosmos AnomalyGen (Cosmos-Predict2-derived) on OSMO for PCBA, metal surface, and glass inspection. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect imag
Passed 15 of 18 test cases with the skill, and 3 of 18 without it.
and 25 more in the full report
14 fixed4 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 11 test cases the skill fixed. Same model, same prompt, with and without the skill.
In Day 1 real-photo alignment for circuit boards, what is the default setting for default_spatial_dependency, and under what condition should it be changed to free?
| Checked | Without skill | With skill |
|---|---|---|
| Identifies cad as the default spatial dependency setting. | Missed | Passed |
| States that switching to free occurs when CAD masks are unavailable. | Missed | Passed |
The instructions your model reads when the skill loads.
references/disambiguation.md)references/preconditions.md)references/flows/)End-to-end orchestration of defect image generation, augmentation, and labeling pipelines for AOI (Automated Optical Inspection) datasets. AnomalyGen = Cosmos-Predict2-2B finetuned per use case (Cosmos-AnomalyGen-PCB-2B, -Metal-2B, -Glass-2B). Every flow has a canonical OSMO workflow YAML in assets/configs/ that chains all steps non-interactively. Use-case cookbooks in assets/cookbooks/ provide PCBA usd2roi/image-edit configs and AnomalyGen training configs for PCBA, metal surface, and glass inspection. This skill governs flow selection, data handoffs, and submit commands; component internals live in each component's SKILL.md.
| Flow | Entry point | OSMO YAML | Steps | Use cases |
|---|---|---|---|---|
| Day 0 — Texture Defects | CAD scene USD (pcba_target.yaml ships in the cookbook) | texture_defect_generation_day0.yaml | usd2roi (scan_grid + per-cell ROI crops) → image-edit augmentation (nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL) → finetune-or-passthrough → infer (anomalygen labels inline, including missing-component) | PCBA |
| Day 0 — Good Image (usd2roi + Image-Edit) | CAD scene USD + per-board pcba_target.yaml / day0_image.yaml / day0_crop.yaml | good_image_generation.yaml | usd2roi-render (scan_grid + per-cell ROI crop) → Qwen Image-Edit (OVSL2SL appearance transfer) | PCBA clean-image set (ChangeNet golden halves, finetune positives, real-photo pairing) |
| Day 0 — Structural Defects | CAD scene USD + per-board pcba_target.yaml | structural_defect_generation.yaml | isaac-render (pose defects: shift / tombstone / sideflip) + per-component crop (single pod) → Qwen Image-Edit (OVSL2SL lighting transfer; pose geometry preserved) | PCBA pose-defect set; ChangeNet defect halves |
| Day 1 — Infer + Label (real-photo alignment, DEFAULT) | CAD-derived USD + real PCBA photo (both ship in datasets/pcb/assets) | texture_defect_generation_day1_real_alignment.yaml | usd2roi day-1 render → MI register → per-ROI crop → yq-render config → finetune-or-passthrough → infer (anomalygen labels inline) | Default PCBA Day 1. Raw AOI screenshot of any usd2roi-supported board |
| Day 1 — Infer + Label (manual ROI) | Pre-captured clean images + ROI masks (NGC artifact or user upload) | texture_defect_generation_day1_manual_roi.yaml | yq-render config → finetune-or-passthrough → infer (anomalygen labels inline) | Metal surface, glass (no USD/real-photo flow); PCBA only when user explicitly asks for pre-captured ROI experimentation |
| Finetune Only | Labeled anomaly URL artifact | finetune.yaml | yq-render config → finetune (validate_dataset → prep_testcase → torchrun) | Any use case; produces checkpoint for Day 0 or Day 1. Requires raw training data under <dig_url_root>/datasets/<usecase>/raw (see assets/configs/setup/setup_<usecase>.yaml). |
All flows run on OSMO. Day 0 flows require image_edit_endpoint (Qwen Image-Edit OVSL2SL — existing URL or local deploy from references/nim/); Finetune Only has no external endpoints.
| Defect class | Workflow | Mechanism |
|---|---|---|
Clean / good / scan-grid / normal_img + cad_mask pairs | good_image_generation.yaml | usd2roi-render + Qwen Image-Edit |
| Texture defects (solder bridge, scratch, discoloration) AND missing-component (handled natively by AnomalyGen, NOT structural) | texture_defect_generation_day0.yaml | Qwen Image-Edit + AnomalyGen AMP/SDG |
| Structural / pose defects (tombstone, shift, sideflip) | structural_defect_generation.yaml | IsaacSim pose perturbation |
| Day 1 inference + labeling on a real image | texture_defect_generation_day1_real_alignment.yaml (PCBA default) or texture_defect_generation_day1_manual_roi.yaml (metal/glass; PCBA only when user explicitly asks for pre-captured ROI / skip-alignment) | usd2roi day-1 registration (real-alignment) or direct inference (manual-ROI) |
ChangeNet golden/defect pairs: submit good_image_generation.yaml + structural_defect_generation.yaml with the same --set name= (two-submission pairing convention).
Day 0 and Day 1 share the same downstream shape: a Jinja-gated
finetune-job(omitted whenuse_pretrained_checkpoint=true) feedinganomaly-infer. Day 0 prependsusd2roi-render+augment-image-edit; Day 1 starts from<dig_url_root>/datasets/<usecase>/raw. Per-stage detail: each flow's walkthrough.
test cases passed, vs 3 / 18 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.