Research on the Detection of Steel Plate Defects Based on SimAM and Twin-NMF Transfer
Abstract
:1. Introduction
- (1)
- This study introduces the idea of Siamese networks into non-negative matrix factorization (NMF) and designs a Twin-NMF model. Twin-NMF simultaneously processes samples from the source and target domains, and uses the shared base matrix W to help the model capture and utilize common features across domains, thereby achieving feature space reconstruction between samples across domains.
- (2)
- After the source and target domain samples are reconstructed in the feature space by Twin-NMF, a source domain sample screening algorithm based on the cosine similarity is designed to further obtain the source domain samples that are most relevant to the target domain task. The knowledge transfer from the source domains NEU-DET and GC10-DET to the target domain ECTI is achieved by fine-tuning with pre-trained weights.
- (3)
- This study introduces SimAM, a parameter-free attention mechanism, into the Neck-end improvement of YOLOv8. The enhanced multi-scale fusion ability alleviates the recognition accuracy collapse phenomenon of the basic model in the ECTI dataset.
- (4)
- The method proposed in this study provides a reference for solving the domain adaptation problem of samples in the source domain and the target domain and for achieving the organic combination of eddy current thermal imaging detection and deep learning.
2. Proposed SimAM Attention and Twin-NMF Transfer Methods
2.1. Overall Network Structure and TNMF Transfer Methodology
2.1.1. The Design of Twin-NMF
Algorithm 1: Twin non-negative matrix factorization (TNMF) for W, , matrix updates. |
Inputs: Source domain data matrix , Destination domain data matrix , Dimension , Maximum round M, Twinning strength α, Decomposition threshold ξ. |
Initialize W, , to positive Gaussian random values. |
for to M do |
← |
Update : ←; ← |
Update ,: ←; ← |
If max< then |
continue |
else |
break |
end if |
end for |
Output: W, , . |
2.1.2. Cosine Similarity Filtering on Source Domains
Algorithm 2: Selecting and moving source images based cosine similarity. |
Inputs: Dataset images , , similarity threshold . |
Output: Images moved to the target folder based on similarity. |
Use the TNMF to process datasets , obtaining ,,. |
Create a target folder for storing selected images. |
Reconstruct using W, , : , |
for each column vector in do |
Calculate the cosine similarity using |
Select images exceeding the threshold . |
Sort by similarity and select the images with top 30 similarity. |
for each selected image do |
Move the image file to the target folder. |
Update the list of images in dataset to prevent duplicates. |
end for |
end for |
Print: The process of selecting and moving images has been completed. |
2.2. SimAM-YOLOv8 Model
2.2.1. SimAM Attention Module
2.2.2. Improved SimAM-YOLOv8
3. Experiments and Experimental Results
3.1. Introduction of the Dataset
3.2. Experimental Settings
3.3. Ablation Experiments
3.3.1. Analysis of Twin-NMF Transfer Effectiveness
3.3.2. Analysis of SimAM Effectiveness
3.4. Comparison Experiment
4. Conclusions
- (1)
- The Twin-NMF algorithm enhances the similarity between the two domains through twin constraints, effectively overcoming the limitations of traditional NMF in processing multi-domain data. This enhancement facilitates more accurate knowledge transfer from the source domain to the target domain.
- (2)
- The strategy of filtering source domain samples based on cosine similarity enhances the model’s adaptability to the target domain. Utilizing source domain data that exhibits a strong correlation with the target domain helps mitigate the impact of negatively correlated information, thereby boosting the model’s ability to adapt to the target domain task.
- (3)
- The introduction of the parameter-free SimAM module at the neck of YOLOv8 does not substantially increase the cost of model training, yet it effectively alleviates the phenomenon of accuracy collapse during recognition tasks. This enhancement significantly improves the accuracy and robustness of the target domain task.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Li, H. Research on Fatigue Crack Growth Prediction Method of Metal Components Based on Eddy Current Nondestructive Testing. Ph.D. Thesis, University of Electronic Science and Technology of China, Chengdu, China, 2021. [Google Scholar]
- Wu, F.; Yao, W. A New Model of the Fatigue Life Curve of Materials. CJME 2008, 19, 1634–1637. [Google Scholar]
- Tian, G.; Gao, B.; Gao, Y.; Wang, P.; Wang, H.; Shi, Y. Review of Railway Rail Defect Non-destructive Testing and Monitoring. Chin. J. Sci. Instrum. 2016, 37, 1763–1780. [Google Scholar]
- Zhao, B.T.; Chen, Y.R.; Jia, X.F.; Ma, T.B. Steel Surface Defect Detection Algorithm in Complex Background Scenarios. Measurement 2024, 237, 115189. [Google Scholar] [CrossRef]
- Chen, B.; Wei, M.; Liu, J.; Li, H.; Dai, C.; Liu, J.; Ji, Z. EFS-YOLO: A Lightweight Network Based on Steel Strip Surface Defect Detection. Meas. Sci. Technol. 2024, 35, 116003. [Google Scholar] [CrossRef]
- Xie, J.; Xu, C.; Chen, G.; Huang, W. Improving Visibility of Rear Surface Cracks during Inductive Thermography of Metal Plates Using Autoencoder. Infrared Phys. Technol. 2018, 91, 233–242. [Google Scholar] [CrossRef]
- Yang, J.; Wang, W.; Lin, G.; Li, Q.; Sun, Y.; Sun, Y. Infrared Thermal Imaging-Based Crack Detection Using Deep Learning. IEEE Access 2019, 7, 182060–182077. [Google Scholar] [CrossRef]
- Hu, J.; Xu, W.; Gao, B.; Tian, G.Y.; Wang, Y.; Wu, Y.; Yin, Y.; Chen, J. Pattern Deep Region Learning for Crack Detection in Thermography Diagnosis System. Metals 2018, 8, 612. [Google Scholar] [CrossRef]
- He, Y.; Deng, B.; Wang, H.; Cheng, L.; Zhou, K.; Cai, S.; Ciampa, F. Infrared Machine Vision and Infrared Thermography with Deep Learning: A Review. Infrared Phys. Technol. 2021, 116, 103754. [Google Scholar] [CrossRef]
- Li, C.; Yan, H.; Qian, X.; Zhu, S.; Zhu, P.; Liao, C.; Tian, H.; Li, X.; Wang, X.; Li, X. A Domain Adaptation YOLOv5 Model for Industrial Defect Inspection. Measurement 2023, 213, 112725. [Google Scholar] [CrossRef]
- Yan, J.; Yue, Y.; Yu, K.; Zhou, X.; Liu, Y.; Wei, J.; Yang, Y. Multi-Representation Joint Dynamic Domain Adaptation Network for Cross-Database Facial Expression Recognition. Electronics 2024, 13, 1470. [Google Scholar] [CrossRef]
- Ge, P.; Sun, Y. Gaussian Process-Based Transfer Kernel Learning for Unsupervised Domain Adaptation. Mathematics 2023, 11, 4695. [Google Scholar] [CrossRef]
- Li, J.; Li, Y.; Li, C. Dual-Graph-Regularization Constrained Nonnegative Matrix Factorization with Label Discrimination for Data Clustering. Mathematics 2023, 12, 96. [Google Scholar] [CrossRef]
- Hao, B.; Fan, Y.; Song, Z. Deep Transfer Learning-Based Pulsed Eddy Current Thermography for Crack Defect Detection. Acta Opt. Sin. 2023, 43, 0415002. [Google Scholar]
- Jia, X.; Sun, F. Vehicle Face Re-identification Algorithm Based on Siamese Nonnegative Matrix Factorization. Chin. J. Sci. Instrum. 2020, 41, 132–139. [Google Scholar]
- Lee, D.D.; Seung, H.S. Learning the Parts of Objects by Non-negative Matrix Factorization. Nature 1999, 401, 788–791. [Google Scholar] [CrossRef]
- Kaya, M.; Bilge, H.Ş. Deep Metric Learning: A Survey. Symmetry 2019, 11, 1066. [Google Scholar] [CrossRef]
- Kirişci, M. New Cosine Similarity and Distance Measures for Fermatean Fuzzy Sets and TOPSIS Approach. Knowl. Inf. Syst. 2023, 65, 855–868. [Google Scholar] [CrossRef]
- Varghese, R.; Sambath, M. YOLOv8: A Novel Object Detection Algorithm with Enhanced Performance and Robustness. In Proceedings of the 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS), Chennai, India, 18–19 April 2024; pp. 1–6. [Google Scholar]
- Jiang, P.; Ergu, D.; Liu, F.; Cai, Y.; Ma, B. A Review of YOLO Algorithm Developments. Procedia Comput. Sci. 2022, 199, 1066–1073. [Google Scholar] [CrossRef]
- Yang, L.; Zhang, R.-Y.; Li, L.; Xie, X. Simam: A Simple, Parameter-Free Attention Module for Convolutional Neural Networks. In Proceedings of the 38th International Conference on Machine Learning PMLR, Virtual, 18–24 July 2021; pp. 11863–11874. [Google Scholar]
- Webb, B.S.; Dhruv, N.T.; Solomon, S.G.; Tailby, C.; Lennie, P. Early and Late Mechanisms of Surround Suppression in Striate Cortex of Macaque. J. Neurosci. 2005, 25, 11666–11675. [Google Scholar] [CrossRef]
- He, Y.; Song, K.; Meng, Q.; Yan, Y. An End-to-End Steel Surface Defect Detection Approach Via Fusing Multiple Hierarchical features. IEEE Trans. Instrum. Meas. 2019, 69, 1493–1504. [Google Scholar] [CrossRef]
- Lv, X.; Duan, F.; Jiang, J.-J.; Fu, X.; Gan, L. Deep Metallic Surface Defect Detection: The New Benchmark and Detection Network. Sensors 2020, 20, 1562. [Google Scholar] [CrossRef] [PubMed]
- Van der Maaten, L.; Hinton, G. Visualizing Data Using t-SNE. J. Mach. Learn. Res. 2008, 9, 2579–2605. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
- Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 11534–11542. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single Shot Multibox Detector. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 11–14 October 2016; pp. 21–37. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
- Wang, C.Y.; Yeh, I.H.; Liao, H.Y.M. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. arXiv 2024, arXiv:2402.13616. [Google Scholar]
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-Time End-to-End Object Detection. arXiv 2024, arXiv:2405.14458. [Google Scholar]
Model | P% | R% | [email protected]% | [email protected]% | F1 | |
---|---|---|---|---|---|---|
Experiment 1 | No-transfer | 97.1 | 96.9 | 98.1 | 77.5 | 0.97 |
Experiment 2 | YOLOv8n | 97 | 95.8 | 97.6 | 77.6 | 0.96 |
Experiment 3 | No-TNMF(NEU) | 97.1 | 95.3 | 98.3 | 77.6 | 0.96 |
Experiment 4 | TNMF(NEU) | 97.9 | 96.9 | 99 | 77.6 | 0.97 |
Experiment 5 | No-TNMF(GC10) | 96.3 | 98.4 | 99 | 76.8 | 0.97 |
Experiment 6 | TNMF(GC10) | 97.5 | 96.9 | 98.9 | 78 | 0.97 |
Model | P% | R% | [email protected]% | [email protected]% | F1 |
---|---|---|---|---|---|
No-transfer + SimAM | 97 | 97.2 | 98.8 | 77.1 | 0.97 |
YOLOv8n + SimAM | 97.3 | 96.8 | 98.8 | 77.6 | 0.97 |
No-TNMF(NEU) + SimAM | 97.6 | 97.4 | 98.9 | 77.6 | 0.98 |
TNMF(NEU) + SimAM | 98 | 97.1 | 99.3 | 78.1 | 0.98 |
No-TNMF(GC10) + SimAM | 98 | 96.7 | 98.6 | 77.3 | 0.97 |
TNMF(GC10) + SimAM | 98.5 | 96.9 | 99.2 | 76.6 | 0.97 |
Method | Defect Types | P% | R% | [email protected]% | [email protected]% | ||||
---|---|---|---|---|---|---|---|---|---|
Original | Simam | Original | Simam | Original | Simam | Original | Simam | ||
No-transfer | Small | 99.1 | 99 | 1 | 1 | 99.5 | 99.5 | 74.1 | 73.4 |
Medium | 92.1 | 93.7 | 98.3 | 98.3 | 97.1 | 98.2 | 77.8 | 76.5 | |
Large | 1 | 98.4 | 92.3 | 93.4 | 97.7 | 98.7 | 80.5 | 81.7 | |
YOLOv8n | Small | 99.5 | 99.2 | 1 | 1 | 99.5 | 99.5 | 75.6 | 73.4 |
Medium | 91.4 | 92.9 | 95 | 95 | 95.2 | 98.2 | 75.9 | 76.5 | |
Large | 1 | 99.8 | 92.3 | 95.4 | 98.1 | 98.7 | 81.5 | 81.3 | |
No-TNMF(NEU) | Small | 99.7 | 99.5 | 1 | 1 | 99.5 | 99.5 | 75.3 | 73.3 |
Medium | 91.7 | 93.4 | 96.7 | 98.3 | 98 | 98.1 | 77.2 | 77.6 | |
Large | 99.8 | 99.9 | 89.2 | 93.8 | 97.5 | 99 | 80.3 | 81.9 | |
TNMF(NEU) | Small | 99.5 | 99.5 | 1 | 1 | 99.5 | 99.5 | 74 | 76 |
Medium | 94.1 | 94.6 | 98.3 | 98.3 | 98.5 | 98.8 | 78.1 | 78.5 | |
Large | 99.9 | 1 | 92.3 | 92.8 | 99.2 | 99.4 | 80.7 | 79.9 | |
No-TNMF(GC10) | Small | 96.5 | 99.5 | 1 | 1 | 99.5 | 99.5 | 71.4 | 75.6 |
Medium | 92.3 | 94.5 | 99.7 | 98.3 | 98.5 | 97.9 | 77.7 | 76.1 | |
Large | 1 | 1 | 95.6 | 91.7 | 98.9 | 98.3 | 81.4 | 80.1 | |
TNMF(GC10) | Small | 99.8 | 99.2 | 1 | 1 | 99.5 | 99.5 | 74.3 | 70 |
Medium | 92.7 | 96.4 | 98.3 | 96.7 | 98.5 | 98.7 | 77.6 | 78.1 | |
Large | 1 | 1 | 92.5 | 94 | 98.8 | 99.4 | 82 | 81.8 |
Model | P% | R% | [email protected]% | [email protected]% | Increased Parameters | Parameters Formula |
---|---|---|---|---|---|---|
TNMF(NEU) + CBAM [26] | 97.2 | 96.6 | 98.2 | 77.1 | 1250 + 4706 + 18530 | 2C2/r + 2k2 |
TNMF(GC10) + CBAM | 97.9 | 96.9 | 98.7 | 77.3 | ||
TNMF(NEU) + SE [27] | 96.9 | 96.4 | 98 | 76.7 | 512 + 2048 + 8192 | 2C2/r |
TNMF(GC10) + SE | 97.6 | 96.9 | 98.6 | 78 | ||
TNMF(NEU) + ECA [28] | 97.7 | 97.4 | 99.1 | 77.9 | 3 + 3 + 3 | k |
TNMF(GC10) + ECA | 97.3 | 96.8 | 98.6 | 77.4 | ||
TNMF(NEU) + SimAM [21] | 98 | 97.1 | 99.3 | 78.1 | 0 | 0 |
TNMF(GC10) + SimAM | 98.5 | 96.9 | 99.2 | 76.6 |
Model | Pre-Training Weights | P% | R% | [email protected]% | [email protected]% |
---|---|---|---|---|---|
SSD [29] | Efficient Net | 72.1 | 57.3 | 72.1 | 44.8 |
Faster-RCNN [30] | Resnet50 | 80.4 | 64.6 | 80.4 | 52.6 |
YOLOv5 | v5n | 97.1 | 96.4 | 98 | 77.7 |
YOLOv8 [19] | v8n | 97 | 95.8 | 97.6 | 77.6 |
YOLOv9 [31] | v9t | 97.2 | 96.7 | 98.8 | 76.7 |
YOLOv10 [32] | v10n | 96.3 | 95.1 | 98.5 | 76.3 |
Our Method | TNMF(NEU) | 98 | 97.1 | 99.3 | 78.1 |
TNMF(GC10) | 98.5 | 96.9 | 99.2 | 76.6 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zou, Y.; Zhang, G.; Fan, Y. Research on the Detection of Steel Plate Defects Based on SimAM and Twin-NMF Transfer. Mathematics 2024, 12, 2782. https://doi.org/10.3390/math12172782
Zou Y, Zhang G, Fan Y. Research on the Detection of Steel Plate Defects Based on SimAM and Twin-NMF Transfer. Mathematics. 2024; 12(17):2782. https://doi.org/10.3390/math12172782
Chicago/Turabian StyleZou, Yongqiang, Guanghui Zhang, and Yugang Fan. 2024. "Research on the Detection of Steel Plate Defects Based on SimAM and Twin-NMF Transfer" Mathematics 12, no. 17: 2782. https://doi.org/10.3390/math12172782
APA StyleZou, Y., Zhang, G., & Fan, Y. (2024). Research on the Detection of Steel Plate Defects Based on SimAM and Twin-NMF Transfer. Mathematics, 12(17), 2782. https://doi.org/10.3390/math12172782