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

计算机工程 ›› 2026, Vol. 52 ›› Issue (8): 412-421. doi: 10.19678/j.issn.1000-3428.0070667

• 交叉融合与工程应用 • 上一篇    下一篇

基于变分特征解纠缠的锐度感知工业缺陷分类算法

钟依慧1, 马瑛1, 江少进2, 杨丰玉1,*()   

  1. 1. 南昌航空大学软件学院, 江西 南昌 330000
    2. 江西昌河飞机工业集团有限公司, 江西 景德镇 333000
  • 收稿日期:2024-11-29 修回日期:2025-02-25 出版日期:2026-08-15 发布日期:2026-07-30
  • 通讯作者: 杨丰玉
  • 作者简介:

    钟依慧, 女, 硕士, 主研方向为缺陷检测

    马瑛, 博士

    江少进, 硕士

    杨丰玉(通信作者), 硕士

  • 基金资助:
    江西省重点研发项目(20202BBEL53002)

Sharpness-Awareness Industrial Defect Classification Algorithm Based on Variational Feature Disentanglement

ZHONG Yihui1, MA Ying1, JIANG Shaojin2, YANG Fengyu1,*()   

  1. 1. School of Software, Nanchang Hangkong University, Nanchang 330000, Jiangxi, China
    2. Jiangxi Changhe Aircraft Industry Group Co., Ltd., Jingdezhen 333000, Jiangxi, China
  • Received:2024-11-29 Revised:2025-02-25 Online:2026-08-15 Published:2026-07-30
  • Contact: YANG Fengyu

摘要:

在工业生产领域, 缺陷分类对于保障产品质量和安全性起着至关重要的作用。但是, 工业缺陷数据集存在类内差异大、类间差异小的特性, 加上缺陷样本数量有限, 致使现有缺陷分类模型在实际工业环境中的表现欠佳。针对这一问题, 提出一种基于变分特征解纠缠(VFD)和锐度感知(SA)的工业缺陷分类算法VFD-SA。首先, 引入变分自编码器(VAE)将缺陷特征解纠缠为类别判别特征和类内方差特征; 然后, 通过重采样策略增强类内方差特征, 与原始特征相结合以提升特征表示的区分度, VFD使模型更加专注于缺陷的类别判别特征, 同时对与缺陷类别无关的细节和背景具有一定的容忍度, 进而提高模型的缺陷分类性能; 最后, 通过引入SA训练策略, 优化损失函数的几何形状, 进一步提升模型的泛化能力。在轧钢缺陷数据集NEU-CLS、金属缺陷数据集GC10-DET和自制紧固件缺陷数据集上进行实验, 结果表明, VFD-SA的准确率分别达到100%、93.52%和99.48%, 显著优于现有缺陷分类算法, 能够满足各类工业场景下的缺陷分类需求。

关键词: 缺陷图像分类, 变分自编码器, 锐度感知, 小样本, 工业缺陷

Abstract:

In industrial production, defect classification plays a crucial role in ensuring product quality and safety. However, industrial defect datasets are characterized by significant intra-class variations and minimal inter-class differences. Coupled with a limited number of defect samples, this results in subpar performance of existing defect classification models in real-world industrial settings. To address this issue, an industrial defect classification algorithm called VFD-SA is proposed, which is based on Variational Feature Disentanglement (VFD) and Sharpness-Aware (SA) training. First, a Variational Auto-Encoder (VAE) is introduced to disentangle the defect features into category-discriminative and intra-class variance features. Subsequently, a resampling strategy is employed to enhance the intra-class variance features, which are then combined with the original features to improve the discriminative power of the feature representations. The VFD enables the model to focus more on category-discriminative features of defects while exhibiting tolerance to details and backgrounds unrelated to defect categories, thereby enhancing the model's defect classification performance. Finally, by incorporating the SA training strategy, the geometric shape of the loss function is optimized to further improve the generalization capability of the model. Experimental results on the NEU-CLS dataset for steel rolling defects, GC10-DET dataset for metal defects, and a self-made dataset for fastener defects demonstrate that the VFD-SA achieves accuracy rates of 100%, 93.52%, and 99.48%, respectively, significantly outperforming existing defect classification algorithms and meeting defect classification requirements across various industrial scenarios.

Key words: defect image classification, Variational Auto-Encoder (VAE), Sharpness-Awareness (SA), few-shot, industrial defect