Real-Time Polarimetric Imaging and Enhanced Deep Learning Model for Automated Defect Detection of Specular Additive Manufacturing Surfaces
Abstract
:1. Introduction
- By integrating the CBAM attention mechanism with the bottleneck structure and incorporating it into the C3 module of YOLOv5, the model can effectively fuse spatial and channel-wise information. This integration enhances the network’s ability to capture positional and detailed features of target regions while improving multi-scale target adaptation capabilities, ensuring high practical efficiency and helping to extract better features to identify defects more effectively and comprehensively.
- The detection head of the YOLOv5 model is decoupled. By allocating the classification, localization, and confidence losses to distinct channels within the same feature map, the classification branch can focus on object category information, while the regression branch specializes in bounding box localization, effectively reducing conflicts between the two tasks.
- To meet the precision and production efficiency requirements for defect detection in additive manufacturing workpieces, a novel defect detection network architecture named YOLOv5-CAD is proposed. Building upon the original YOLOv5 framework, this method incorporates the CBAM attention mechanism, decouples the detection head, and replaces the original CIoU loss with the more flexible Alpha IoU loss, significantly enhancing the network’s detection accuracy
2. Polarimetric Imaging and Defect Detection Method of Specular AM Surfaces
2.1. Image Acquisition System
2.2. Detection Process
3. Principle of the YOLOV5-CAD Defect Detection Model
3.1. YOLOV5 Model
3.2. YOLOV5 Model Improvements
3.3. CBAM Attention Mechanism
3.4. Improved Loss Function
3.5. Decoupled Head
4. Experiments
4.1. Datasets
4.2. Experiment Settings
4.3. Performance Metrics
4.3.1. Precision
4.3.2. Recall
4.3.3. AP
4.3.4. mAP
4.4. Evaluation
4.4.1. Quantitative Analysis
4.4.2. Ablation Experiment
4.4.3. Qualitative Analysis
5. Conclusions and Discussion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Ye, J.F. Research on Direct Writing 3D Printing Technology Based on Ultrasonic Vibration Assistance. Master’s Thesis, Nanjing University of Aeronautics and Astronautics, Nanjing, China, 2021. [Google Scholar]
- Qing, L.; Yang, L.I.; Jianwei, F.U. Development of additive manufacturing machine for repairing waste parts of machine tools. Manuf. Technol. Mach. Tool 2019, 8, 22–25. [Google Scholar]
- Qijie, Y.; Bin, H.; Shengyuan, L. Effect of Interlayer Waiting Time on Forming Quality of 4043 Aluminum Alloy Arc Additive Manufacturing. Hot Work. Technol. 2022, 51, 140–144. [Google Scholar]
- Lian, Y.; Wang, P.; Gao, J.; Liu, J.; Li, Q.; Liu, C.; He, X.; Gao, L.; Li, H.; Lei, L.; et al. Fundamental mechanics problems in metal additive manufacturing: A state-of-art review. Adv. Mech. 2021, 51, 648–701. [Google Scholar]
- Sun, S.; Peng, X.; Cao, H. Accurate Inspection and Super-Resolution Reconstruction for Additive Manufactured Defects Based on Stokes Vector Method and Deep Learning. Photonics 2024, 11, 874. [Google Scholar] [CrossRef]
- Pan, X.Y. Research on Crack Detection Technology of Brake Disk Bolts for High-Speed Trains. Master’s Thesis, Beijing Jiaotong University (BJTU), Beijing, China, 2016. [Google Scholar]
- Yang, G.J. Research on rapid detection and treatment method of soil heavy metal element pollution based on LIBS technology. Environ. Sci. Manag. 2023, 48, 108–113. [Google Scholar]
- Xia, Q.; Wang, G.X. Research on laser spot position detection based on digital image processing technology. Laser Mag. 2024, 45, 208–212. [Google Scholar]
- Zhang, Y.; Hong, G.S.; Ye, D.; Zhu, K.; Fuh, J.Y.H. Extraction and evaluation of melt pool, plume and spatter information for powder-bed fusion AM process monitoring. Mater. Des. 2018, 458–469. [Google Scholar] [CrossRef]
- Zhang, Y.; Fuh, J.Y.H.; Ye, D.; Hong, G.S. In-situ monitoring of laser-based PBF via off-axis vision and image processing approaches. Addit. Manuf. 2019, 263–274. [Google Scholar] [CrossRef]
- Meng, R.F.; Liang, Z.; Jia, C.; Qiao, Z.; Zhao, C. Research and Optimisation of Mask R-CNN Algorithm for Rail Surface Defect Detection. Urban Rapid Rail Transit 2024, 37, 68–77. [Google Scholar]
- Chen, P.; Xie, F. A Machine Learning Approach for Automated Detection of Critical PCB Flaws in Optical Sensing Systems. Photonics 2023, 10, 984. [Google Scholar] [CrossRef]
- Qu, L.; Chen, G.; Liu, K.; Zhang, X. A Study on the Improvement of YOLOv5 and the Quality Detection Method for Cork Discs. Photonics 2024, 11, 825. [Google Scholar] [CrossRef]
- Du, Y.; Xu, X.; Zhao, L.; Yuan, D.; Wang, J. Study on the Transient Extraction Transform Algorithm for Defect Detection in Welded Plates Based on Laser Vibrometer. Photonics 2024, 11, 1193. [Google Scholar] [CrossRef]
- Tang, H.; Liang, S.; Yao, D.; Qiao, Y. A visual defect detection for optics lens based on the YOLOv5-C3CA-SPPF network model. Opt. Express 2023, 31, 2628–2643. [Google Scholar] [CrossRef]
- Zhang, X.; Peng, J.; Zhang, Q.; Tian, K.; Tang, S.; Liang, X.; Wang, T.; Gao, X. Non-destructive analysis of rolling contact fatigue cracks using induced scanning thermography. Opt. Express 2022, 30, 42982–42994. [Google Scholar] [CrossRef]
- Wang, J.; Tian, F.; Xin, X.; Zhou, J.; Zhang, Q.; Tian, Q.; Wang, F.; Luo, B. Multi-scale self at-tention based method for automatic defect detection in electroluminescent images of semiconductor laser chips. Opt. Express 2024, 32, 46467–46488. [Google Scholar] [CrossRef]
- Li, W.H. Deep Learning-Based Surface Defect Detection for Arc Metal Additive Manufacturing. Master’s Thesis, Huazhong University of Science and Technology, Wuhan, China, 2021. [Google Scholar]
- Chen, P.; Chen, M.; Wang, S.; Song, Y.; Cui, Y.; Chen, Z.; Zhang, Y.; Chen, S.; Mo, X. Real-time defect detection of TFT-LCD displays using a lightweight network architecture. J. Intell. Manuf. 2023, 35, 1337–1352. [Google Scholar] [CrossRef]
- Bichong, D.; Mingtao, M.A. Research on Improved Mask Detection Method Based on YOLOv5 Algorithm. Comput. Eng. Appl. 2023, 59, 223–231. [Google Scholar]
- Ailing, Z.; Guangxing, T. Traffic signal detection algorithm based on YOLOv5s. J. Guangxi Univ. Sci. Technol. 2023, 34, 69–76. [Google Scholar]
- Hao, L.; Jiaoxiong, X. Metal surface defect detection method based on improved YOLOv7. Comput. Era 2023, 9, 48–53. [Google Scholar]
- Guo, X.S. Research on PCB Bare Board Defect Detection Algorithm Based on Deep Learning. Master’s Thesis, Nanchang University, Nanchang, China, 2021. [Google Scholar]
- Zhang, Y.; Yang, Y.; Sun, J.; Ji, R.; Zhang, P.; Shan, H. Surface Defect Detection of Wind Turbine Based on Lightweight YOLOv5s Model. Measurement 2023, 220, 113222. [Google Scholar] [CrossRef]
- Zixuan, Y.; Yikui, L. Research on Infrared Road Condition Detection and Recognition in Complex Environment. Mod. Comput. 2022, 28, 1–9. [Google Scholar]
- Miao, C.; Sun, D. Research on fault detection of belt conveyor drum based on improved YOLOv5s. Ind. Mine Autom. 2023, 49, 41–48. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018. [Google Scholar]
- Qiang, F.; Zhiwei, L.; Lei, P. CC-YOLOv5: Improved YOLOv5 used for object detection in UAV aerial images. Mod. Comput. 2023, 29, 16–22. [Google Scholar]
- Wang, Z.; Zhongsheng, C.; Chaolin, L.I.; Haopeng, L. A Positive Sample-Based Visual Inspection Method of Product Surface Defects. J. Hunan Univ. Technol. 2023, 37, 69–74. [Google Scholar]
- Shui, Y.; Zhang, H.; Chen, B.; Xiong, J.; Fu, M. Method for Lightweight Crack Segmentation Based on Convolutional Neural Network. J. Hydroelectr. Eng. 2023, 42, 110–120. [Google Scholar] [CrossRef]
- Yewei, S.; Guanghai, B. Bamboo End Face Segmentation and Branch Position Detection Method Fused with Improved ASPP and CBAM. J. For. Eng. 2023, 8, 138–145. [Google Scholar]
- Wang, W. Design and Implementation of YOLOv5s-Based Platform for Detecting Sick Chickens and Monitoring Chicken House Environment. Master’s Thesis, Anhui Agricultural University, Hefei, China, 2022. [Google Scholar]
- Yang, L.I.; Caihong, Y.; Guanqun, G.; Jianchun, W. A Target Detection Method based on YOLOv5 in Multi-stage of Strawberry Growing Period. Tianjin Agric. Sci. 2022, 28, 81–90. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Wu, H. Deep Learning-Based Text Detection and Recognition for Natural Scenes. Master’s Thesis, Nanchang University, Nanchang, China, 2022. [Google Scholar]
- Lu, K.W. Research on Laser Welding Inspection System for Power Battery Module. Master’s Thesis, China Academy of Machinery Science and Technology, Beijing, China, 2022. [Google Scholar]
- Shuai, H.; Chenlu, Y.; Qiulin, Z.; Xu, M.A.; Xizi, S.; Haiying, W.; Haobo, S.; Yingqi, W.U. Pedestrian detection method in disaster environment based on double branch Decoupled Head and Attention Mechanism. J. Xi’an Univ. Sci. Technol. 2023, 43, 797–806. [Google Scholar]
- Wang, L. Research on Improved Target Detection Algorithm Based on YOLO. Master’s Thesis, Jiangnan University, Wuxi, China, 2020. [Google Scholar]
- Luo-geng, X.; Shang, Z.; Hai-tao, Z.; Hua-long, Y.U.; Shang, G. Software Self-admitted Technical Debt Identification with Bidirectional Gate Recurrent Unit and Attention Mechanism. Comput. Sci. 2022, 49, 212–219. [Google Scholar]
- Guo, Y.Y. Research on Fire Flame and Smoke Recognition Algorithm Based on Deep Learning. Master’s Thesis, Ningxia University, Yinchuan, China, 2021. [Google Scholar]
- Wang, J.; Bi, L.; Ma, X.; Sun, P. An Efficient YOLOX-Based Method for Photovoltaic Cell Defect Detection. Instrumentation 2024, 11, 83–95. [Google Scholar]
- Wang, J.; Guo, X.; Xun, Y.; Liu, J.; Guo, X.; Li, Y. Longitudinal Wave Defect Detection Technology Based on Ablation Mechanism. Photonics 2024, 11, 805. [Google Scholar] [CrossRef]
- Lin, B.; Chen, W.; Fan, X.; Peng, P.; Guo, Z. Transformer-Based Improved U-Net for High-Performance Underwater Polarization Imaging. Opt. Laser Technol. 2025, 181, 111664. [Google Scholar] [CrossRef]
- Li, D.; Montes, I.; Canabal-Carbia, M.; Estévez, I.; Lopez-Coronado, O.; Guo, Z.; Campos, J.; Lizana, Á. Enhanced Characterization of Depolarizing Samples Using Indices of Polarization Purity and Polarizance–Reflection–Transformation Spaces. Adv. Photon. Nexus 2025, 4, 016009. [Google Scholar] [CrossRef]
- Fan, X.; Chen, W.; Lin, B.; Peng, P.; Guo, Z. Improved Polarization Scattering Imaging Using Local-Global Context Polarization Feature Learning Framework. Opt. Lasers Eng. 2024, 178, 108194. [Google Scholar] [CrossRef]
- Fan, X.; Lin, B.; Guo, Z. Infrared Polarization-Empowered Full-Time Road Detection via Lightweight Multi-Pathway Collaborative 2D/3D Convolutional Networks. IEEE Trans. Intell. Transp. Syst. 2024, 25, 12762–12775. [Google Scholar] [CrossRef]
Category | Images | Defect Feature |
---|---|---|
porosity | Round or oval white spots with a white center in a regular shape. | |
crack | Light gray with well-defined wavy, linear, and branching fine lines. |
Model | Precision | Recall | mAP50 |
---|---|---|---|
CenterNet | 92.1% | 37.4% | 64.6% |
Faster-RCNN | 45.6% | 57.9% | 43.9% |
RetinaNet | 82.1% | 29.4% | 50.9% |
YOLOV4 | 23.8% | 59.6% | 42.8% |
YOLOX | 82.1% | 64.7% | 73.5% |
YOLOV5 | 80.1% | 72.5% | 77.5% |
Our model | 82.6% | 74.7% | 80.6% |
Model | Precision | Recall | mAP50 | mAP50-95 |
---|---|---|---|---|
YOLOV5 | 80.1% | 72.5% | 77.5% | 43.4% |
+CBAM | 80.6% | 73.5% | 78.5% | 44.3% |
+Decoupled | 79.0% | 75.9% | 78.3% | 45.6% |
+AlphaIOU | 80.0% | 73.5% | 78.2% | 43.3% |
+CBAM+Decoupled | 80.9% | 74.8% | 79.5% | 46.0% |
+CBAM+AlphaIOU | 81.2% | 74.4% | 79.2% | 46.2% |
+Decoupled+AlphaIOU | 74.4% | 78.0% | 78.2% | 45.6% |
+CBAM+Decoupled+AlphaIOU | 82.6% | 74.7% | 80.6% | 46.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. |
© 2025 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
Li, D.; Peng, X.; Cao, H.; Xie, Y.; Li, S.; Sun, X.; Zhao, X. Real-Time Polarimetric Imaging and Enhanced Deep Learning Model for Automated Defect Detection of Specular Additive Manufacturing Surfaces. Photonics 2025, 12, 243. https://doi.org/10.3390/photonics12030243
Li D, Peng X, Cao H, Xie Y, Li S, Sun X, Zhao X. Real-Time Polarimetric Imaging and Enhanced Deep Learning Model for Automated Defect Detection of Specular Additive Manufacturing Surfaces. Photonics. 2025; 12(3):243. https://doi.org/10.3390/photonics12030243
Chicago/Turabian StyleLi, Dingkang, Xing Peng, Hongbing Cao, Yuanpeng Xie, Shiqing Li, Xiang Sun, and Xinjie Zhao. 2025. "Real-Time Polarimetric Imaging and Enhanced Deep Learning Model for Automated Defect Detection of Specular Additive Manufacturing Surfaces" Photonics 12, no. 3: 243. https://doi.org/10.3390/photonics12030243
APA StyleLi, D., Peng, X., Cao, H., Xie, Y., Li, S., Sun, X., & Zhao, X. (2025). Real-Time Polarimetric Imaging and Enhanced Deep Learning Model for Automated Defect Detection of Specular Additive Manufacturing Surfaces. Photonics, 12(3), 243. https://doi.org/10.3390/photonics12030243