作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (1): 118-127. doi: 10.19678/j.issn.1000-3428.0068395

• 人工智能与模式识别 • 上一篇    下一篇

基于孪生网络的分类器输出重复性优化方法

喻勇涛*(), 孙奥, 李昂, 朱琳琳   

  1. 沈阳航空航天大学自动化学院, 辽宁 沈阳 110136
  • 收稿日期:2023-09-17 出版日期:2025-01-15 发布日期:2025-01-18
  • 通讯作者: 喻勇涛
  • 基金资助:
    2022年度辽宁省教育厅基本科研项目(LJKZZ20220034)

Optimization Method for Classifier Output Repeatability Based on Siamese Networks

YU Yongtao*(), SUN Ao, LI Ang, ZHU Linlin   

  1. School of Automation, Shenyang Aerospace University, Shenyang 110136, Liaoning, China
  • Received:2023-09-17 Online:2025-01-15 Published:2025-01-18
  • Contact: YU Yongtao

摘要:

在工业表面质检场景中, 深度分类神经网络常用于对产品图像进行分类, 实现对产品的合格判别或品质分级, 搭载深度分类神经网络的表面质检设备需进行量具的检验重复性与再现性(AR&R)评估。但产品载具受装配公差以及设备振动等因素的影响, 导致设备拍摄的产品图像会出现位置、角度、亮度、模糊度的相关扰动。针对扰动图像, 分类神经网络将无法输出一致的分类结果和分类概率, 使得表面质检设备无法通过AR&R评估, 将此问题总结为网络输出重复性问题。为此, 提出一种基于孪生网络的分类神经网络训练方法。孪生主网络使用原始样本进行监督学习训练, 学习输出正确的分类类别, 孪生次网络通过指数平滑拷贝主网络权重, 输出与原始样本对应的扰动样本的特征嵌入, 用于对主网络进行对比学习训练, 使主网络对原始样本与扰动样本的输入均输出一致的分类概率, 在推理过程中仅保留主网络用于产品缺陷分类。实验结果表明, 该方法的分类准确率和分类概率方差分别为99.346 2%和0.001 016, 可有效缓解使用深度分类神经网络对工业产品图像分类的输出重复性问题, 在显著降低分类概率方差的同时分类准确率也有一定提升。

关键词: 深度学习, 孪生网络, 工业质检, 重复性, 检验重复性与再现性评估, 鲁棒性

Abstract:

In industrial surface Quality Control (QC) scenarios, deep classification neural networks are widely used to classify product images for qualified judgment or quality grading. However, surface QC equipment equipped with deep classification neural networks must meet Attribute Reproducibility and Repeatability (AR&R) assessment requirements. Perturbations in product images, caused by assembly tolerance, equipment vibrations, and other factors, lead to variations in position, angle, brightness, and blurring. These perturbations result in inconsistent classification outputs, causing the surface QC equipment to fail the AR&R assessment, a problem referred to as the network output reproducibility issue. To address this issue, this study proposes a training method for classification neural networks based on Siamese networks. The Siamese primary network is trained using original samples for supervised learning to learn correct classification categories. The Siamese secondary network copies the weights of the primary network via exponential smoothing and generates feature embeddings of perturbed samples corresponding to the original ones. These embeddings are used for comparative learning training of the primary network, enabling it to output consistent classification probabilities for both original and perturbed sample inputs. During inference, only the primary network is retained for product defect classification. The results show that the classification accuracy reaches 99.346 2%, with a classification probability variance of 0.001 016. The described method effectively improves the output reproducibility of deep classification neural networks for industrial product image classification by reducing classification probability variance and enhancing accuracy.

Key words: deep learning, Siamese networks, industrial Quality Control (QC), repeatability, Attribute Reproducibility and Repeatability (AR&R) assessment, robustness