# dptel05

- **Event:** [Meta Global AI Developer Hackathon](https://cerebralvalley.ai/e/meta-ai-developer-hackathon)
- **When:** Oct 26, 12:00 PM – Nov 4, 9:00 PM (EST)
- **Where:** Online
- **Team:** [Dhruv Patel](https://cerebralvalley.ai/u/dptel05)
- **GitHub:** https://github.com/dptel22/sem-triage-agent
- **Demo video:** https://youtu.be/b1r-EIKPZoM
- **Gallery:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2138

WaferGuard is a closed-loop, verifiable multimodal triage agent for semiconductor scanning electron microscope (SEM) wafer inspection built on the public Carinthia-S dataset (4,591 SEM image-mask pairs across 6 classes, DOI: 10.5281/zenodo.16895427). Standard fab defect detectors fail in three ways: they waste compute on empty scans caused by SEM electron-beam misalignment (Class 6), fail on text-prompted foundation segmentation due to the grayscale microscopy domain gap, and saturate at >99% confidence on rare out-of-distribution defect morphologies (1.5% base rate), silently passing yield-killing excursions.

WaferGuard solves this with a 4-gate verifiable agent architecture:

Gate 1 (Deterministic Empty-Scan Filter): Strips the 3px right-hand SEM border artifact (x >= 477) and filters components <16px, routing empty misaligned scans (Class 6) to NO_DEFECT_REIMAGE with 100% specificity (24/24 across val and test) at $0 API cost.

Gate 2 (SAM 3.1 Wire-Format Segmentation & Closed-Loop Self-Correction): Pairs a local ResNet-18 U-Net proposer (0.887 nominal median IoU) with Meta's sam-3.1 via box and point prompts (0.870 median IoU under ±15% symmetric box jitter). A deterministic verifier monitors U-Net/SAM IoU agreement and box fill ratio: high-agreement masks (>=0.68 IoU) are locked via a hard monotonicity guard, while corrupted or leaky masks trigger autonomous re-prompting (recovering +0.801 ground-truth IoU on perturbed proposals).

Gate 3 (18-Dimensional Leave-One-Out Retrieval Bank): Extracts 18 morphological, histogram, component-count, and discordance features to retrieve the Top-5 nearest neighbors across 3,454 training wafers and assembles a 480x1440 3-panel visual comparison strip (Raw SEM + Box | U-Net vs SAM 3.1 Agreement Overlay | #1 Nominal Exemplar).

Gate 4 (Dual-Model Multimodal Triage Arena): Evaluates muse-spark-1.3 (Meta Model API) head-to-head against open-weights meta-models/muse-spark-open-1026 (on Baseten), achieving 82.4% rare recall at 0.0% nominal false alarms on our 34-sample calibration benchmark (F1 = 0.903, outperforming U-Net confidence, mask discordance, and non-LLM k-NN baselines), passing all pre-registered C1/C2/C3 checks on our frozen 10-image test suite, and demonstrating 100% decision parity between closed and open weights.

## More from Meta Global AI Developer Hackathon

- [Tracklab](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2135)
- [Chawanvit Vuthikornudomkit](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2136)
- [CatPaw Studio](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2137)
- [burger-generator](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2139)
- [AlgoRoutine](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2140)
- [Hanbridge Inspector](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2141)

---

Markdown version of https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/2138. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
