Beyond CLIP: Calibrated (Few-Shot) Defect Detection With System One Decision Models
Abstract
Cameras and vision sensors are widely used for product and process inspection in manufacturing environments. Traditionally, this process required thousands of images of both nominal and defective products to train such models. Recent research shows that vision transformer (ViT) models, such as CLIP, can reduce this requirement to 50-100 images per nominal and defective class. However, collecting even 50 defective images can be difficult in high-yield or low-volume manufacturing processes. In this paper, we examine the utility of two recently proposed structured decision models (Jev and Clef-Flash) in applications using as few as k=2 reference images per class at inference. In the process, we provide three main contributions: (a) a framework for k-shot learning of these models for image classification/inspection applications; (b) an agentic approach for automatically refining the text descriptions that guide image classification in these decision models; and (c) an approach to calibrate the resulting defect probabilities to improve their reliability for inspection decisions. We test these contributions in five manufacturing case studies. Using two reference images per class, both Jev and Clef-Flash outperform CLIP's test accuracies with the same references (0.75-1.00 [Jev] and 0.71-0.99 [Clef-Flash] vs 0.67-0.84 [CLIP]). Furthermore, we show that our agentic refinement of text descriptions significantly improves accuracy across 6 of 8 model-application combinations, and our calibration approach reduces the Brier score in 13 of the 15 model-application configurations. To support the reproducibility of our work, we provide our replication code and have created the R "decisions" package for evaluating additional models. We also provide a publicly available web app that allows practitioners to inspect their own images with no code.
Create a lesson
Metadata
- Categories
- cs.CV, cs.AI
- Comments
- 10 pages, 5 figures
Related papers
Zero-shot evaluation of open vision-language models as System 1 decision models on radiology tasks
Shared title terminologycs.CVBradley J Erickson, Sara Salehi
Beyond Naming Accuracy: Template Composition and Species-Name Decisions
Shared title terminologycs.CVJunle li, Bochang zhang
Beyond Ground Truth: A Heuristic Unsupervised Quality Assurance Engine for Diagnosing Calibrational Blindness in Dental Segmentation
Shared title terminologycs.CVFatematuj Johura Mim
RADIOlogy: A Single-Pass Approach to Training-Free Zero-Shot Anomaly Detection
Shared title terminologycs.CVJoaquín Figueira, Giacomo D'Amicantonio, Egor Bondarau
Beyond CCT: Multi-channel SPD recovery for per-shot camera color correction
Shared title terminologycs.CVShuwei Yue, Hongke Wei, Qiao Chen
Adapt, Label, Distill: Foundation-Model Supervision for Efficient Object Detection
Shared title terminologycs.CVZhengye Yang, Anthony Wang, Yuyang Li et al.