Morphology-Aware Sample Assignment: Overcoming IoU Insensitivity for Surface Defect Detection

Morphology-Aware Sample Assignment: Overcoming IoU Insensitivity for Surface Defect Detection

形态感知样本分配:克服表面缺陷检测中的 IoU 不敏感性

Intersection-over-Union (IoU), as a pivotal metric for evaluating the spatial alignment between candidate proposals and ground-truth annotations, directly determines the quality of positive sample sets and the training efficacy of visual detection models. 交并比(IoU)作为评估候选框与真实标注之间空间对齐的关键指标,直接决定了正样本集的质量以及视觉检测模型的训练效果。

Through theoretical modeling and analysis, we uncover a non-sensitive region on the IoU response curve, within which samples yield nearly identical IoU scores despite distinct geometric overlaps. 通过理论建模与分析,我们发现 IoU 响应曲线中存在一个“不敏感区域”,在该区域内,尽管样本的几何重叠度存在显著差异,但其 IoU 得分却几乎相同。

To overcome this limitation, we introduce a set of morphological similarity metrics covering area, shape, and aspect ratio, to refine the positive sample assignment process, thereby ensuring more discriminative and reliable matching. 为了克服这一局限性,我们引入了一套涵盖面积、形状和长宽比的形态相似度指标,用以优化正样本分配过程,从而确保匹配过程更具判别力且更加可靠。

A supplementary matching score is derived via mean-based aggregation of these multidimensional similarities, compensating for the intrinsic limitation of IoU in representing structural correspondence. 通过对这些多维相似度进行基于均值的聚合,我们得出了一个补充匹配分数,弥补了 IoU 在表征结构对应关系方面的固有缺陷。

Theoretically, incorporating morphological similarity reshapes the response distribution of the matching function, yielding both effective directional gradients and polygon-like iso-response contours, which tightly confine high-response regions around each ground-truth instance and substantially enhance the precision of positive sample selection. 从理论上讲,引入形态相似度重塑了匹配函数的响应分布,产生了有效的方向梯度和多边形状的等响应轮廓,这些轮廓将高响应区域紧密限制在每个真实实例周围,从而显著提高了正样本选择的精度。

Experiments based on the YOLOv9 framework demonstrate consistent performance gains on both NEUDET and GC10-DET datasets. Notably, the proposed approach is fully plug-and-play and incurs zero additional inference overhead, thereby ensuring deployment efficiency for industrial visual inspection. 基于 YOLOv9 框架的实验表明,该方法在 NEUDET 和 GC10-DET 数据集上均实现了性能的持续提升。值得注意的是,所提方法完全即插即用,且不会产生额外的推理开销,从而确保了工业视觉检测的部署效率。