Pattern Analysis and Applications Компьютерное зрение и распознавание образов

Sample or pixel: a critical metric issue in industrial defect detection

Dong, Hang-Cheng, Jiao, Yibo, Wei, Fupeng, Liu, Guodong, Ye, Dong, Liu, Bingguo
Springer Nature · 2026-11-12 · DOI 10.1007/s10044-026-01805-w

Аннотация

Industrial surface defect inspection for sample-wise quality control (QC) requires both defect-presence decisions and precise localization. Severe foreground–background imbalance, sparse defects with long-tailed scales, and low contrast can make pixel-centric training and evaluation dominated by large regions. Empirically, segmentation models can achieve relatively high pixel-overlap performance while still exhibiting limited sample-level recall, particularly for sparse and fine defects. The root cause is a mismatch between the optimization objective and the granularity of QC decisions. To address this mismatch, we propose a sample-centric multi-task learning framework with a shared encoder that jointly optimizes pixel-level segmentation and lightweight sample-level classification. Sample-level supervision strengthens defect-sensitive representations, while the segmentation branch preserves spatial and boundary details, reducing misses of small and low-contrast defects. We further introduce three complementary sample-level metrics: Sample mIoU reduces true-negative bias through per-sample macro-averaging, whereas Seg Accuracy and Seg Recall measure overall sample-level decision accuracy and positive-sample recall, respectively. Experiments on three benchmark datasets demonstrate that our approach effectively improves sample-level decision reliability and defect localization completeness. The code is available at https://github.com/Jyb0592/Sample-or-Pixel .

Читать у издателя →