Local-AI Defect Inspection Series

Testing small, local vision-language models against real industrial defect imagery — semiconductor, casting, wafer — and being honest about where they break.
series
computer-vision
VLM
semiconductor
edge-ai
Author

Hasan Goni

Published

October 26, 2026

Modified

October 26, 2026

0.1 Series Overview

I run local-AI experiments on real industrial defect-inspection imagery — semiconductor, casting X-ray, wafer maps — and post them in public, LinkedIn-first, with the full technical detail (code, numbers, failure cases) landing here. The goal isn’t a highlight reel: every post ends with an honest limitation, not just a win.

The recurring question behind the series: how far does a model that’s never seen this kind of imagery actually get, and what does it take to close the gap for real use?

0.1.1 Posts in this series

  1. Part 1 — MODUS (EPFL’s any-to-any multimodal model) on real casting crack/void images. LinkedIn post — general multimodal models read a defect X-ray as a generic “bearing/mechanical component”; no domain fine-tuning.
  2. Part 2 — Zero-shot benchmark: Opus, Sonnet, and three small local VLMs (LFM2-VL-450M, Qwen2.5-VL-3B, Cosmos-Reason2-2B) classifying WM-811K wafer maps blind. LinkedIn post — frontier models scored 7-8/9; local VLMs scored 1-2/9, mostly by riding one default answer regardless of the image.
  3. Part 3 — Fine-Tuning LFM2-VL-450M for X-ray Defect Detection and Localization LoRA fine-tuning on real GDXray casting X-ray images, targeting both is there a defect and where is it, with Outlines-constrained structured generation. Detection improved; localization never did — and I show exactly why.
  4. Part 4 — Fine-Tuning LFM2.5-VL-3B — Does the Grounding Upgrade Actually Help? Same task, dataset, and eval split as Part 3, testing Liquid AI’s newer, grounding-improved 3B model. Detection improved again; localization still didn’t work, but failed in a more specific way — plausible box size, near-random box position.
  5. Part 5 — Can a Small Local VLM Catch Its Own Auto-Labeling Mistakes? — this post. Same model and eval split, different question: verification instead of generation. Few-shot examples nearly doubled the judge’s recall on synthetically corrupted labels — while going to a flat 0% on the one error type (a real defect mislabeled clean) that matters most, traced back to a gap in the demo set itself.

0.3 Tools used throughout

  • Local inference on a DGX Spark (GB10, unified memory) — no cloud GPU rental
  • HuggingFace transformers + peft for models and LoRA
  • Outlines for schema-constrained generation
  • Real, licensed datasets with ground truth (GDXray, WM-811K) — underlying ground truth is always real; Part 5’s label-QA task deliberately corrupts proposed labels to simulate auto-labeling errors, clearly marked as synthetic where it’s used

Code for every post is public. Links inline.

Reuse

Citation

BibTeX citation:
@online{goni2026,
  author = {Goni, Hasan},
  title = {Local-AI {Defect} {Inspection} {Series}},
  date = {2026-10-26},
  langid = {en}
}
For attribution, please cite this work as:
Goni, Hasan. 2026. “Local-AI Defect Inspection Series.” October 26.
Free email course · 7 days

Industrial Vision Foundations

AI can write the code, but someone still has to know which method fits a real inspection line. One short lesson a day for 7 days on the classical computer vision techniques that still run production systems.

Runnable code in every lesson. No spam, unsubscribe any time.

Questions, corrections or feedback?

Found a mistake, or want a topic covered next? Leave a comment below (sign in with GitHub), or write to hasanme1412@gmail.com. I read everything.