Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2024, Vol. 58 Issue (3): 459-467    DOI: 10.3785/j.issn.1008-973X.2024.03.003
    
Feature filtering and feature decoupling based domain generalization model
Kun LIU(),Ding WANG,Jingkai WANG,Haiyong CHEN*(),Weipeng LIU
1. School of Artificial Intelligence, Hebei University of Technology, Tianjin 300131, China
Download: HTML     PDF(1385KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

A feature filtering and feature decoupling based domain generalization model (FF-FDDG) was proposed, aiming at the problem of poor generalization performance of the deep defect detection model caused by inconsistent image brightness across scenes. A designed luminance filtering-residual module (LFR) was included in the proposed model. The brightness variation features were filtered out through instance normalization, the features with high defect correlation and low brightness correlation were extracted from the filtered features, and these features were fused to enhance the generalization ability of the model under the condition of cross-scenario image brightness transformation. Furthermore, a contrast whitening loss (CWL) function was proposed, by which the model was guided to learn the defect texture feature by decoupling the brightness transform feature and the defect texture feature, so as to improve the model generalization ability. The experimental results on the cross-scenario surface defect data collected in the photovoltaic cell manufacturing environment showed that, compared with the state-of-the-art domain generalization model, the average mean average precision (mAP) of the proposed FF-FDDG model in cross-scenario situations was improved by 5.01%.



Key wordsdefect detection      domain generalization      cross-scenario      luminance filtering-residual module      contrast whitening loss     
Received: 21 March 2023      Published: 05 March 2024
CLC:  TP 391  
Fund:  国家自然科学基金资助项目(62173124);河北省自然科学基金资助项目(F2022202064).
Corresponding Authors: Haiyong CHEN     E-mail: liukun@hebut.edu.cn;haiyong.chen@hebut.edu.cn
Cite this article:

Kun LIU,Ding WANG,Jingkai WANG,Haiyong CHEN,Weipeng LIU. Feature filtering and feature decoupling based domain generalization model. Journal of ZheJiang University (Engineering Science), 2024, 58(3): 459-467.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2024.03.003     OR     https://www.zjujournals.com/eng/Y2024/V58/I3/459


基于特征过滤与特征解耦的域泛化模型

针对跨场景情况下图像亮度不一致导致的深度缺陷检测模型泛化性能差的问题,提出基于特征过滤与特征解耦的域泛化(FF-FDDG)模型. 模型包含设计的亮度过滤-残差模块(LFR),该模块通过实例归一化过滤亮度变化特征,并从被过滤的特征中提取缺陷高相关性且亮度低关联性的特征,并将这些特征与实例级归一化后的特征进行融合,以增强模型在跨场景图像亮度变换情况下的泛化能力. 提出对比白化损失(CWL)函数,该函数通过解耦特征中亮度变换特征和缺陷纹理特征,引导模型学习缺陷纹理特征,以提升模型泛化能力. 在从光伏电池制造环境中收集的跨场景光伏电池表面缺陷数据上进行实验,结果表明,相较于现阶段最先进的域泛化模型,所提出的FF-FDDG在跨场景情况下的平均检测精度(mAP)均值提升5.01%.


关键词: 缺陷检测,  域泛化,  跨场景,  亮度过滤-残差模块,  对比白化损失 
Fig.1 Feature filtering and feature decoupling based domain generalization model
Fig.2 Luminance filtering-residual module
Fig.3 Feature comparison before and after instance normalization
Fig.4 Calculation process of contrast whitening loss
Fig.5 Acquisition equipment for photovoltaic cell defect detection image
Fig.6 Instances of images with different brightness and corresponding brightness distribution
方法SEL_1$\Rightarrow $SEL_2SEL_1$\Rightarrow $SEL_3
APmAPAPmAP
开焊漏焊碎片隐裂开焊漏焊碎片隐裂
YOLOv7[24]72.6377.6586.3262.1674.6918.0256.5971.0030.9744.14
IN[13]79.2575.8684.1971.2277.6347.0867.8371.4641.2556.91
SNR[16]88.8488.3687.0260.0681.0737.1770.7477.4250.6859.00
CNSN[17]70.6676.3777.2880.2376.1473.1083.4962.6347.6266.71
FF-FDDG91.2089.5487.3478.0386.5378.7290.3271.6956.6974.36
方法SEL_2$\Rightarrow $SEL_1SEL_2$\Rightarrow $SEL_3
APmAPAPmAP
开焊漏焊碎片隐裂开焊漏焊碎片隐裂
YOLOv7[24]86.2276.6681.6274.7479.8184.7081.9087.3366.6380.14
IN[13]95.0482.5585.5069.1883.0793.2379.3290.3172.3883.81
SNR[16]93.5279.9082.5372.8682.2091.5085.7991.7973.8785.74
CNSN[17]80.0772.7362.9456.6168.0977.7974.5085.8465.5675.92
FF-FDDG94.4086.0989.3580.9087.7192.0395.5690.9481.4690.00
方法SEL_3$\Rightarrow $SEL_2SEL_3$\Rightarrow $SEL_1
APmAPAPmAP
开焊漏焊碎片隐裂开焊漏焊碎片隐裂
YOLOv7[24]90.7788.2175.8480.7483.8957.8061.0274.6070.7566.04
IN[13]92.4787.3376.9082.3484.7681.5675.4069.6070.3974.24
SNR[16]92.8587.3285.1181.1486.6184.7374.9471.0771.3775.53
CNSN[17]70.6676.3777.2880.2376.1478.4568.7858.9252.7364.72
FF-FDDG92.6089.7382.3183.2986.9888.0878.8975.1672.1578.57
Tab.1 Statistical performance results for different scenarios and different detectors on YOLOv7 %
方法SEL_1$\Rightarrow $SEL_2SEL_1$\Rightarrow $SEL_3
APmAPAPmAP
开焊漏焊碎片隐裂开焊漏焊碎片隐裂
Faster-RCNN[25]84.9286.2361.3712.2561.1949.9582.7574.9418.7255.59
IN[13]86.0386.3564.1915.1262.9285.1985.4963.9616.4262.77
SNR[16]89.7386.1865.8518.0364.9593.3281.0363.7215.1663.31
CNSN[17]79.6685.4663.6118.6361.8478.9081.2262.7819.2860.55
FF-FDDG89.9387.5469.5618.2266.3191.8880.5369.1120.1565.42
方法SEL_2$\Rightarrow $SEL_1SEL_2$\Rightarrow $SEL_3
APmAPAPmAP
开焊漏焊碎片隐裂开焊漏焊碎片隐裂
Faster-RCNN[25]87.9776.4463.1315.1260.6786.6376.7564.9212.1260.11
IN[13]87.5282.0459.7815.4661.2091.5279.1267.5116.5963.69
SNR[16]90.1084.0461.5614.3962.5291.1972.6466.4213.5960.96
CNSN[17]82.7583.1643.3610.3854.9183.6577.1658.509.7257.26
FF-FDDG91.5286.3960.2523.1465.3392.1290.9668.2817.4767.21
方法SEL_3$\Rightarrow $SEL_2SEL_3$\Rightarrow $SEL_1
APmAPAPmAP
开焊漏焊碎片隐裂开焊漏焊碎片隐裂
Faster-RCNN[25]90.3989.7963.8619.0865.7890.9787.3956.8314.0262.30
IN[13]91.4187.9269.7818.4966.9083.4289.1357.5214.4261.12
SNR[16]90.5589.2446.6315.7260.5489.0083.9749.9511.4158.58
CNSN[17]51.0372.5158.0513.2548.7176.8071.5150.1610.8352.32
FF-FDDG92.7990.5568.4520.9168.1888.5181.3262.5525.7964.54
Tab.2 Statistical performance results for different scenarios and different detectors on Faster-RCNN %
方法SEL1$\Rightarrow $ SEL2SEL1$\Rightarrow $ SEL3SEL2$\Rightarrow $ SEL1SEL2$\Rightarrow $ SEL3SEL3$\Rightarrow $ SEL1SEL3$\Rightarrow $SEL2
基线174.6944.1479.8180.1466.0083.89
基线1+ LFR77.8469.2186.0488.3376.6085.03
基线+LFR+ CWL86.5374.3687.7190.0078.6086.98
Tab.3 Ablation experiment results with YOLOv7 as baseline %
方法SEL1$\Rightarrow $SEL2SEL1$\Rightarrow $SEL3SEL2$\Rightarrow $SEL1SEL2$\Rightarrow $SEL3SEL3$\Rightarrow $SEL1SEL3$\Rightarrow $SEL2
基线261.1955.5960.6760.1162.3065.78
基线2+ LFR62.5959.6361.7763.5262.9367.51
基线2+LFR+ CWL66.3165.4265.5367.2164.5468.18
Tab.4 Ablation experiment results with Faster-RCNN as baseline %
Fig.7 Visualization results of features in different scenarios
方法v/(帧·s?1)平均mAP方法v/(帧·s?1)平均mAP
基线1(YOLOv7)35.9871.45基线2(Faster-RCNN)27.5360.94
IN34.7576.74IN26.9363.10
SNR30.9578.36SNR26.3761.81
CNSN34.2371.29CNSN26.2355.93
FF-FDDG31.2684.02FF-FDDG25.1666.17
Tab.5 Detection efficiency of different domain generalization methods
[1]   CHEN H, PANG Y, HU Q, et al Solar cell surface defect inspection based on multispectral convolutional neural network[J]. Journal of Intelligent Manufacturing, 2020, 31 (2): 453- 468
doi: 10.1007/s10845-018-1458-z
[2]   SU B, CHEN H, LIU K, et al RCAG-Net: residual channel-wise attention gate network for hot spot defect detection of photovoltaic farms[J]. IEEE Transactions on Instrumentation and Measurement, 2021, 70: 1- 14
[3]   YU J, ZHENG X, LIU J Stacked convolutional sparse denoising auto-encoder for identification of defect patterns in semiconductor wafer map[J]. Computers in Industry, 2019, 109: 121- 133
doi: 10.1016/j.compind.2019.04.015
[4]   MIAO R, GAO Y, GE L, et al Online defect recognition of narrow overlap weld based on two-stage recognition model combining continuous wavelet transform and convolutional neural network[J]. Computers in Industry, 2019, 112: 103115- 103125
doi: 10.1016/j.compind.2019.07.005
[5]   LI D, XIE Q, GONG X, et al Automatic defect detection of metro tunnel surfaces using a vision-based inspection system[J]. Advanced Engineering Informatics, 2021, 47: 101206- 101217
doi: 10.1016/j.aei.2020.101206
[6]   LI L, GAO K, CAO J, et al. Progressive domain expansion network for single domain generalization [C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition . [s. l.]: IEEE, 2021: 224−233.
[7]   RAHMAN M M, FOOKES C, BAKTASHMOTLAGH M, et al. Multi-component image translation for deep domain generalization [C]// 2019 IEEE Winter Conference on Applications of Computer Vision . Waikoloa: IEEE, 2019: 579−588.
[8]   WANG Z, LUO Y, QIU R, et al. Learning to diversify for single domain generalization [C]// IEEE/CVF International Conference on Computer Vision . [s. l.]: IEEE, 2021: 834-843.
[9]   ZHOU K, YANG Y, HOSPEDALES T, et al. Learning to generate novel domains for domain generalization [C]// European conference on computer vision . Glasgow: Springer, 2020: 561−578.
[10]   FAN X, WANG Q, KE J, et al. Adversarially adaptive normalization for single domain generalization [C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition . [s. l.]: IEEE, 2021: 8208−8217.
[11]   WANG H, LI Z, WANG H Few-shot steel surface defect detection[J]. IEEE Transactions on Instrumentation and Measurement, 2021, 71: 1- 12
[12]   DUAN G, SONG Y, LIU Z, et al Cross-domain few-shot defect recognition for metal surfaces[J]. Measurement Science and Technology, 2022, 34 (1): 015202
[13]   CHEN C, LI J, HAN X, et al. Compound domain generalization via meta-knowledge encoding [C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition . New Orleans: IEEE, 2022: 7119−7129.
[14]   SHIAU Z Y, LIN W W, LIN C S, et al. Meta-learned feature critics for domain generalized semantic segmentation [C]// IEEE International Conference on Image Processing . Anchorage: IEEE, 2021: 2244-2248.
[15]   PAN X, LUO P, SHI J, et al. Two at once: enhancing learning and generalization capacities via ibn-net [C]// European Conference on Computer Vision . Munich: Springer, 2018: 464−479.
[16]   ZHOU K, YANG Y, CAVALLARO A, et al. Omni-scale feature learning for person re-identification [C]// IEEE/CVF International Conference on Computer Vision . Seoul: IEEE, 2019: 3702−3712.
[17]   XIE T, HUANG X, CHOI S K Metric-based meta-learning for cross-domain few-shot identification of welding defect[J]. Journal of Computing and Information Science in Engineering, 2023, 23 (3): 030902
doi: 10.1115/1.4056219
[18]   ZHOW Z, LAN C, GAO Z. Cross-domain defect detection network [C]// 2022 Asia Conference on Algorithms, Computing and Machine Learning . Hangzhou: IEEE, 2022: 272−279.
[19]   MA S, SONG K, NIU M, et al Cross-scale fusion and domain adversarial network for generalizable rail surface defect segmentation on unseen datasets[J]. Journal of Intelligent Manufacturing, 2022, 27: 1- 20
[20]   NAM H, KIM H E. Batch-instance normalization for adaptively style-invariant neural networks [C]// Proceedings of the 32nd International Conference on Neural Information Processing Systems . Montréal: IEEE, 2018: 2563−2572.
[21]   JIN X, LAN C, ZENG W, et al Style normalization and restitution for domain generalization and adaptation[J]. IEEE Transactions on Multimedia, 2021, 24: 3636- 3651
[22]   TANG Z, GAO Y, ZHU Y, et al. CrossNorm and SelfNorm for generalization under distribution shifts [C]// IEEE/CVF International Conference on Computer Vision . [s. l.]: IEEE, 2021: 52−61.
[23]   HUANG X, BELONGIE S. Arbitrary style transfer in real-time with adaptive instance normalization [C]// IEEE International Conference on Computer Vision . Venice: IEEE, 2017: 1501−1510.
[24]   WANG C Y, BOCHKOVSKIY A, LIAO H Y M. YOLOv7: trainable bag-of-freebies sets new state-of-the-art for real-time object detectors [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Vancouver: IEEE, 2023: 7464−7475.
[1] Anjing WANG,Julong YUAN,Yongjian ZHU,Cong CHEN,Jinjin WU. Drum roller surface defect detection algorithm based on improved YOLOv8s[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(2): 370-380.
[2] Qing-lin AI,Jing-rui CUI,Bing-hai LV,Tong TONG. Surface defect detection method for bearing drum-shaped rollers based on fusion transformation of defective area[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(5): 1009-1020.
[3] Bai-cheng BIAN,Tian CHEN,Ru-jun WU,Jun LIU. Improved YOLOv3-based defect detection algorithm for printed circuit board[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(4): 735-743.
[4] Huan LAN,Jian-bo YU. Steel surface defect detection based on deep learning 3D reconstruction[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 466-476.
[5] Tian-le YUAN,Ju-long YUAN,Yong-jian ZHU,Han-chen ZHENG. Surface defect detection algorithm of thrust ball bearing based on improved YOLOv5[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(12): 2349-2357.
[6] Shuang ZHAO,Jun-tao WU,Xin-chen QIU,Kui-hua WANG,Yuan TU. Study on defect detection of extended pile shaft under lateral low-strain integrity test[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(10): 1867-1876.
[7] Yang-bo CHEN,Guo-dong YI,Shu-you ZHANG. Surface warpage detection method based on point cloud feature comparison[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(1): 81-88.
[8] Zhong-wei QIN,Jie CHEN,Rong-jing HONG,Wei-wei WU. Visual salience detection algorithm for surface defects of friction sheets[J]. Journal of ZheJiang University (Engineering Science), 2019, 53(10): 1883-1891.