Fabric Defect Detection Method Using SA-Pix2pix Network and Transfer Learning
Abstract
:1. Introduction
2. Materials and Methods
2.1. The SA-Pix2pix Model
2.1.1. Network Structure
2.1.2. Loss Function
2.2. Channel Domain Transfer Learning
2.2.1. Channel Weight Estimation
2.2.2. Construction of Metric Criteria
2.3. Defect Detection
2.3.1. Image Dissimilarity Calculation
2.3.2. Denoising and Defect Localization
2.4. Experimental Environment and Dataset
3. Results
3.1. Impact of Self-Attention Mechanism on Defect Detection Accuracy
3.2. Impact of Loss Function on Defect Detection Accuracy
3.3. Comparison of Experimental Results for Different Defect Detection Methods
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Kumar, A. Computer-vision-based fabric defect detection: A survey. IEEE Trans. Ind. Electron. 2008, 55, 348–363. [Google Scholar] [CrossRef]
- Chen, J.; Jain, A.K. A structural approach to identify defects in textured images. In Proceedings of the 1988 IEEE International Conference on Systems, Man, and Cybernetics, Beijing, China, 8–12 August 1988; pp. 29–32. [Google Scholar]
- Ngan, H.Y.T.; Pang, G.K.H.; Yung, S.P.; Ng, M.K. Wavelet based methods on patterned fabric defect detection. Pattern Recognit. 2005, 38, 559–576. [Google Scholar] [CrossRef]
- Li, P.; Zhang, H.; Jing, J.; Li, R.; Zhao, J. Fabric defect detection based on multi-scale wavelet transform and Gaussian mixture model method. J. Text. Inst. 2015, 106, 587–592. [Google Scholar] [CrossRef]
- Yang, C.; Liu, P.; Yin, G.; Jiang, H.; Li, X. Defect detection in magnetic tile images based on stationary wavelet transform. Ndt E Int. 2016, 83, 78–87. [Google Scholar] [CrossRef]
- Kumar, A.; Pang, G.K.H. Defect detection in textured materials using Gabor filters. IEEE Trans. Ind. Appl. 2002, 38, 425–440. [Google Scholar] [CrossRef]
- Raheja, J.L.; Kumar, S.; Chaudhary, A. Fabric defect detection based on GLCM and Gabor filter: A comparison. Opt. Int. J. Light Electron Opt. 2013, 124, 6469–6474. [Google Scholar] [CrossRef]
- Chan, C.; Pang, G.K.H. Fabric defect detection by Fourier analysis. IEEE Trans. Ind. Appl. 2000, 36, 1267–1276. [Google Scholar] [CrossRef]
- Li, M.; Cui, S.; Xie, Z. Application of Gaussian mixture model on defect detection of print fabric. J. Text. Res. 2015, 36, 94–98. [Google Scholar]
- Zong, B.; Song, Q.; Min, M.R.; Cheng, W.; Lumezanu, C.; Cho, D.; Chen, H. Deep autoencoding gaussian mixture model for unsupervised anomaly detection. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Latif-Amet, A. An efficient method for texture defect detection: Sub-band domain co-occurrence matrices. Image Vis. Comput. 2000, 18, 543–553. [Google Scholar] [CrossRef]
- Li, F.; Yuan, L.; Zhang, K.; Li, W. A defect detection method for unpatterned fabric based on multidirectional binary patterns and the gray-level co-occurrence matrix. Text. Res. J. 2020, 90, 776–796. [Google Scholar] [CrossRef]
- Girshick, R. Fast R-CNN. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [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. 2017, 39, 1137–1149. [Google Scholar] [CrossRef]
- Chen, M.; Yu, L.; Zhi, C.; Sun, R.; Zhu, S.; Gao, Z.; Ke, Z.; Zhu, M.; Zhang, Y. Improved faster R-CNN for fabric defect detection based on Gabor filter with Genetic Algorithm optimization. Comput. Ind. 2022, 134, 103551. [Google Scholar] [CrossRef]
- Jin, R.; Niu, Q. Automatic Fabric Defect Detection Based on an Improved YOLOv5. Math. Probl. Eng. 2021, 2021, 7321394. [Google Scholar] [CrossRef]
- Hinton, G.E.; Salakhutdinov, R.R. Reducing the Dimensionality of Data with Neural Networks. Science 2006, 313, 504–507. [Google Scholar] [CrossRef]
- Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative Adversarial Nets. Adv. Neural. Inf. Process. Sys. 2014, 27, 10. [Google Scholar]
- Liu, R.Q.; Li, M.H.; Shi, J.C.; Liang, Y.B. Fabric Defect Detection Method Based on Improved U-Net. In Proceedings of the 2021 2nd International Conference on Internet of Things, Hangzhou, China, 14–16 May 2021; p. 12160. [Google Scholar]
- Yu, W.Y.; Zhang, Y.; Yao, H.M.; Shi, H. Visual Inspection of Surface Defects Based on Lightweight Reconstruction Network. Zidonghua Xuebao 2022, 48, 2175–2186. [Google Scholar]
- Zhang, Y.; Han, J.; Jing, L.; Wang, C.; Zhao, L. Intelligent Fault Diagnosis of Broken Wires for Steel Wire Ropes Based on Generative Adversarial Nets. Appl. Sci. 2022, 12, 11552. [Google Scholar] [CrossRef]
- Lu, F.; Niu, R.; Zhang, Z.; Guo, L.; Chen, J. A Generative Adversarial Network-Based Fault Detection Approach for Photovoltaic Panel. Appl. Sci. 2022, 12, 1789. [Google Scholar] [CrossRef]
- Vaccari, I.; Orani, V.; Paglialonga, A.; Cambiaso, E.; Mongelli, M. A Generative Adversarial Network (GAN) Technique for Internet of Medical Things Data. Sensors. 2021, 21, 3726. [Google Scholar] [CrossRef]
- Liu, J.; Wang, C.; Su, H.; Du, B.; Tao, D. Multistage GAN for Fabric Defect Detection. IEEE Trans. Image. Process. 2020, 29, 3388–3400. [Google Scholar] [CrossRef]
- Zhang, H.; Qiao, G.; Lu, S.; Yao, L.; Chen, X. Attention-based Feature Fusion Generative Adversarial Network for yarn-dyed fabric defect detection. Text. Res. J. 2023, 93, 1178–1195. [Google Scholar] [CrossRef]
- Rui, J.; Qiang, N. Research on textile defects detection based on improved generative adversarial network. J. Eng. Fibers Fabr. 2022, 17, 15589250221101382. [Google Scholar] [CrossRef]
- Zhang, G.; Pan, Y.; Zhang, L. Semi-supervised learning with GAN for automatic defect detection from images. Autom. Constr. 2021, 128, 103764. [Google Scholar] [CrossRef]
- Zhuang, F.; Qi, Z.; Duan, K.; Xi, D.; Zhu, Y.; Zhu, H.; Xiong, H.; He, Q. A comprehensive survey on transfer learning. Proc. IEEE Inst. Electr. Electron. Eng. 2020, 109, 43–76. [Google Scholar] [CrossRef]
- Pan, S.; Yang, Q. A Survey on Transfer Learning. IEEE Trans. Knowl. Data. Eng. 2009, 22, 1345–1359. [Google Scholar] [CrossRef]
- Li, H.; Fu, X.; Huang, T. Research on surface defect detection of solar pv panels based on pre-training network and feature fusion. In Proceedings of the 3rd International Conference on Green Energy and Sustainable Development, Shenyang, China, 14–15 November 2020; p. 22071. [Google Scholar]
- Şeker, A. Evaluation of fabric defect detection based on transfer learning with pre-trained AlexNet. In Proceedings of the 2018 International Conference on Artificial Intelligence and Data Processing (IDAP), Malatya, Turkey, 28–30 September 2018; pp. 1–4. [Google Scholar]
- Wang, Q.; Michau, G.; Fink, O. Domain adaptive transfer learning for fault diagnosis. In Proceedings of the 2019 Prognostics and System Health Management Conference (PHM-Paris), Paris, France, 2–5 May 2019; pp. 279–285. [Google Scholar]
- Hearst, M.A.; Dumais, S.T.; Osuna, E.; Platt, J.; Scholkopf, B. Support vector machines. IEEE Intell. Syst. 1998, 13, 18–28. [Google Scholar] [CrossRef]
- Wang, W.; Li, H.; Ding, Z.; Nie, F.; Chen, J.; Dong, X.; Wang, Z. Rethinking Maximum Mean Discrepancy for Visual Domain Adaptation. IEEE Trans. Neural Netw. Learn. Syst. 2023, 34, 264–277. [Google Scholar] [CrossRef]
- Kumar, V.; Minz, S. Feature selection: A literature review. Smart Comput. Rev. 2014, 4, 211–229. [Google Scholar] [CrossRef]
- Abdi, H.; Williams, L.J. Principal component analysis. Wiley. Interdiscip. Rev. Comput. Stat. 2010, 2, 433–459. [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]
- Zhao, J.; Zhou, S.; Zheng, Q.; Mei, S. Fabric defect detection based on transfer learning and improved Faster R-CNN. J. Eng. Fiber. Fabr. 2022, 17, 15589250221086647. [Google Scholar]
- Isola, P.; Zhu, J.Y.; Zhou, T.; Efros, A.A. Image-to-Image Translation with Conditional Adversarial Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, Hawaii, 21–26 July 2017; pp. 1125–1134. [Google Scholar]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Proceedings of the Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, 5–9 October 2015; pp. 234–241. [Google Scholar]
- Liu, W.; Cao, J.; You, J.; Wang, H. Vector Decomposition of Elastic Seismic Wavefields Using Self-Attention Deep Convolutional Generative Adversarial Networks. Appl. Sci. 2023, 13, 9440. [Google Scholar] [CrossRef]
- Zhao, H.; Gallo, O.; Frosio, I.; Kautz, J. Loss Functions for Image Restoration With Neural Networks. IEEE Trans. Comput. Imaging. 2017, 3, 47–57. [Google Scholar] [CrossRef]
- Liu, X.; Qiao, Y.; Xiong, Y.; Cai, Z.; Liu, P. Cascade conditional generative adversarial nets for spatial-spectral hyperspectral sample generation. Sci. Chi. Inf. Sci. 2020, 63, 77–92. [Google Scholar] [CrossRef]
- Zhou, W.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image. Process. 2004, 13, 600–612. [Google Scholar]
- Xu, Q.; Hu, F.; Wang, C.; Wu, Y. Segmentation of fabric defect images based on improved frequency-tuned salient algorithm. J. Text. Res. 2018, 39, 125–131. [Google Scholar]
- Makhzani, A.; Shlens, J.; Jaitly, N.; Goodfellow, I. Adversarial Autoencoders. arXiv 2015, arXiv:1511.05644. [Google Scholar]
- Zhao, Z.; Li, B.; Dong, R.; Zhao, P. A surface defect detection method based on positive samples. In Proceedings of the PRICAI 2018: Trends in Artificial Intelligence: 15th Pacific Rim International Conference on Artificial Intelligence, Nanjing, China, 28–31 August 2018; pp. 473–481. [Google Scholar]
System | Memory | GPU | CPU | Deep Learning Framework |
---|---|---|---|---|
Windows 10 | 64 G | NVIDIA GTX-1080Ti | Intel Core i7-8700K @ 3.70 GHz | Pytorch, CUDA10.1, CUDNN7.6 |
Methods | ReNet-D | SDDM-PS | SA-Pix2pix |
---|---|---|---|
Time (ms) | 38.25 | 43.82 | 46.15 |
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. |
© 2023 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
Hu, F.; Gong, J.; Fu, H.; Liu, W. Fabric Defect Detection Method Using SA-Pix2pix Network and Transfer Learning. Appl. Sci. 2024, 14, 41. https://doi.org/10.3390/app14010041
Hu F, Gong J, Fu H, Liu W. Fabric Defect Detection Method Using SA-Pix2pix Network and Transfer Learning. Applied Sciences. 2024; 14(1):41. https://doi.org/10.3390/app14010041
Chicago/Turabian StyleHu, Feng, Jie Gong, Han Fu, and Wenliang Liu. 2024. "Fabric Defect Detection Method Using SA-Pix2pix Network and Transfer Learning" Applied Sciences 14, no. 1: 41. https://doi.org/10.3390/app14010041
APA StyleHu, F., Gong, J., Fu, H., & Liu, W. (2024). Fabric Defect Detection Method Using SA-Pix2pix Network and Transfer Learning. Applied Sciences, 14(1), 41. https://doi.org/10.3390/app14010041