RepoNVIDIANVIDIApublished May 19, 2026seen 5d

NVIDIA/paidf-simulation

Python

Open original ↗

Captured source

source ↗
published May 19, 2026seen 5dcaptured 9hhttp 200method plain

NVIDIA/paidf-simulation

Description: Synthetic data generation engine using NVIDIA Isaac Sim and Omniverse Replicator to render photorealistic, fully labeled PCB inspection imagery, including golden and defect boards

Language: Python

License: Apache-2.0

Stars: 2

Forks: 0

Open issues: 0

Created: 2026-05-19T00:37:29Z

Pushed: 2026-05-31T17:21:42Z

Default branch: main

Fork: no

Archived: no

README:

Physical AI Data Factory - Simulation

Synthetic data generation for physical-AI use cases. Includes Defect Image Generation (DIG) on printed circuit boards.

Container: ${SDG_IMAGE}

---

Prerequisites

Clone tested repo

cd ~
git clone https://github.com/NVIDIA/paidf-simulation.git
cd paidf-simulation
git checkout main

Download USD assets

Obtain the USD asset bundle from your project channel. Extract anywhere convenient, then point PCB_USD_PATH at the main scene USD:

unzip .zip -d
export PCB_USD_PATH=/spark_lighting.usd

The flow run commands below mount $(dirname $PCB_USD_PATH) read-only into the container; USDs don't need to live inside the repo.

Pull image

IMAGE=${SDG_IMAGE}
docker login nvcr.io
docker pull $IMAGE

---

Run the pipelines

Flow 1: Good Image Pipeline

Prepare the configuration

Config Path: configs/flow1_good_image/good_image.yaml

| Key | Description | |---|---| | scan_grid.x_num, y_num | Number of cells along each axis. Default 10 by 10 produces 100 frames per trigger | | resolution | Render resolution [W, H]. Default [1920, 1080] | | pathtracing.total_spp | Accumulated samples per pixel. Higher values produce cleaner images and longer render times. Default: 32 | | lighting.ring_light | true: per-layer RGB ring light (soldering light). false: white light only | | writer.{rgb, bounding_box_2d_tight, semantic_segmentation, ...} | Per-annotator on/off switches | | rename_to_grid_index | Default false keeps _NNNN.png naming. Do not change for standard SDG flows |

Config Path: configs/pcba_target.yaml

| Key | Description | |---|---| | component_types | Component scope names under pcba_root. Only listed scopes receive semantic labels. The good-image pipeline does not use this file |

Run the pipeline

# Flow 1 — Good Image Pipeline
PCB=~/paidf-simulation
IMAGE=${SDG_IMAGE}
OUTPUT=$PCB/sdg_test_output/flow1_good_image

# Pre-flight
mkdir -p $OUTPUT && chmod 777 $OUTPUT
ls /usr/share/nvidia/nvoptix.bin

# Run (Stage 1: Kit render)
docker run --rm --gpus all --network host \
-v /usr/share/nvidia/nvoptix.bin:/usr/share/nvidia/nvoptix.bin:ro \
-v $(dirname $PCB_USD_PATH):$(dirname $PCB_USD_PATH):ro \
-e PCB_USD_PATH=$PCB_USD_PATH -e PAIDF_SIM_ROOT=$PCB \
-v $PCB:/workspace/paidf-simulation \
$IMAGE \
"scripts/sdg/standalone/sdg_pipeline.py \
--config configs/flow1_good_image/good_image.yaml \
--pcba-config configs/pcba_target.yaml"

Verify the output

$ ls $OUTPUT/trigger_0000/ | sed 's/.*\.//' | sort | uniq -c
301 json # 100 bbox_labels + 100 bbox_prim_paths + 100 semseg_labels + metadata.json
100 npy # bbox_2d_tight arrays
200 png # 100 rgb + 100 semantic_segmentation
1 txt # metadata.txt

$ ls $OUTPUT/trigger_0000/rgb_*.png | head -3
rgb_0000.png rgb_0001.png rgb_0002.png # _NNNN naming, no _x*_y*

$ cat $OUTPUT/trigger_0000/semantic_segmentation_labels_0000.json
{"(0, 0, 0, 0)": {"class": "BACKGROUND"},
"(0, 0, 0, 255)": {"class": "UNLABELLED"},
"(33, 243, 3, 255)": {"class": "capacitor"}}
# RGBA values may change; assignment is randomized per run.

---

Flow 2: Defect Image Pipeline (Missing, Shift, Sideflip, Tombstone)

Prepare the configuration

Config Path: configs/flow2_defect_image/defect_image.yaml

| Key | Description | |---|---| | defects.shift.{enabled, ratio, translate_range, rotate_z_range} | XY translation and Z-axis rotation defects | | defects.tombstone.{enabled, ratio, angle_min, angle_max} | Tilt around Y axis (tombstone) | | defects.sideflip.{enabled, ratio, angle_min, angle_max} | Flip around X axis | | writer.semantic_types | Must include defect for defect labels to appear in semantic segmentation output | | scan_grid.x_num/y_num, resolution, lighting, pathtracing | Same as Flow 1 |

Config Path: configs/flow2_defect_image/missing_image.yaml

| Key | Description | |---|---| | missing.ratio | Fraction of component pool to hide per trigger (0–1) | | writer.reference.{rgb, semantic_segmentation, ...} | Pass 1: all components visible. Segmentation labels mark hidden components with defect=missing | | writer.defective.rgb | Pass 2: selected components hidden; RGB output only |

Run the pipeline

# Flow 2 — Defect Image Pipeline
PCB=~/paidf-simulation
IMAGE=${SDG_IMAGE}

# Pre-flight
mkdir -p $PCB/sdg_test_output/flow2_defect_image \
$PCB/sdg_test_output/flow2_missing_image
chmod 777 $PCB/sdg_test_output/flow2_defect_image \
$PCB/sdg_test_output/flow2_missing_image

# Run (a) pose defects: shift / tombstone / sideflip
docker run --rm --gpus all --network host \
-v /usr/share/nvidia/nvoptix.bin:/usr/share/nvidia/nvoptix.bin:ro \
-v $(dirname $PCB_USD_PATH):$(dirname $PCB_USD_PATH):ro \
-e PCB_USD_PATH=$PCB_USD_PATH -e PAIDF_SIM_ROOT=$PCB \
-v $PCB:/workspace/paidf-simulation \
$IMAGE \
"scripts/sdg/standalone/sdg_pipeline.py \
--config configs/flow2_defect_image/defect_image.yaml \
--pcba-config configs/pcba_target.yaml"

# Run (b) missing components
docker run --rm --gpus all --network host \
-v /usr/share/nvidia/nvoptix.bin:/usr/share/nvidia/nvoptix.bin:ro \
-v $(dirname $PCB_USD_PATH):$(dirname $PCB_USD_PATH):ro \
-e PCB_USD_PATH=$PCB_USD_PATH -e PAIDF_SIM_ROOT=$PCB \
-v $PCB:/workspace/paidf-simulation \
$IMAGE \
"scripts/sdg/standalone/sdg_pipeline.py \
--config configs/flow2_defect_image/missing_image.yaml \
--pcba-config configs/pcba_target.yaml"

Verify the output

(a) Pose defects: output under flow2_defect_image/trigger_0000/

$ ls $OUTPUT/flow2_defect_image/trigger_0000/ | sed 's/.*\.//' | sort | uniq -c
301 json
100 npy
200 png
1 txt
# 100 of each: rgb / semseg / semseg_labels / bbox_npy / bbox_labels / bbox_prim_paths

$ cat $OUTPUT/flow2_defect_image/trigger_0000/semantic_segmentation_labels_0000.json
# defect classes appear (cells without that defect won't show all three keys):
{"(0, 0, 0, 0)": {"class": "BACKGROUND"},
"(0, 0, 0, 255)": {"class": "UNLABELLED"},
"(33, 243, 3, 255)": {"defect":…

Excerpt shown — open the source for the full document.

Notability

notability 2.0/10

Low traction, new repo