TCQI-YOLOv5: A Terminal Crimping Quality Defect Detection Network
Abstract
1. Introduction
2. Data Source
2.1. Terminal Crimping Process and Quality Issues
2.2. Image Acquisition
3. Methodology
3.1. YOLOv5 Model and Its Limitations in Terminal Detection
3.2. Enhanced YOLOv5: TCQI-YOLOv5
3.2.1. Improvement of Feature Extraction Module
3.2.2. Improvement of the Loss Function
3.3. Experimental Setup and Evaluation Metrics
4. Results
4.1. Performance Analysis of Various Defects
4.2. Confusion Matrix
4.3. PR Curve
4.4. Loss Function
5. Discussion
5.1. Ablation Experiment
5.2. Advantages of TCQI-YOLOv5
5.3. Limitations and Future Prospects
6. Conclusions
- Model Architecture Optimization: By replacing the original C3 module with the C2f-fast-EMA module, the network’s feature extraction capability was significantly enhanced, particularly in capturing subtle length differences in insulation areas. Additionally, the introduction of the FasterNet module improved computational efficiency while maintaining high accuracy.
- Loss Function Improvement: The SIOU loss function was adopted to replace the traditional IOU loss. By comprehensively considering the angle, distance, and shape costs between bounding boxes, the localization accuracy of predicted boxes was significantly improved, enabling more precise detection of defect areas.
- Significant Performance Enhancement: Experimental results demonstrate that the improved model achieved an overall mAP of 98.3%. Notably, for the challenging defect of shallow insulation damage, precision increased markedly from 89.4% to 96.3%. The detection speed also fully meets the real-time requirements of industrial production lines.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Lai, M.; Wang, S.; Jiang, H.; Cui, J.; Li, G. Quality prediction for magnetic pulse crimping cable joints based on 3D vision and ensemble learning. Comput. Ind. 2024, 162, 104137. [Google Scholar] [CrossRef]
- Ye, F.; Wang, Y.; Qi, H. Joint formation and bonding mechanism of ultrasonic welded joints between aluminum wire harnesses and copper terminals with the addition of the copper foil interlayer. Mater. Lett. 2025, 385, 138162. [Google Scholar] [CrossRef]
- Wang, S.; Gao, X.; Huang, Z.; Jiang, H.; Li, G.; Cui, J. Fatigue characteristics, failure mechanism and life prediction of copper–aluminum cable joints formed by magnetic pulse crimping. Eng. Fail. Anal. 2025, 174, 109483. [Google Scholar] [CrossRef]
- Rodino, S.; Maletta, C. Multiphysics modeling and optimization of an innovative shape memory alloy-polymer active composite. Polymer 2024, 307, 127316. [Google Scholar] [CrossRef]
- Guan, S. Fabric defect delaminating detection based on visual saliency in HSV color space. J. Text. Inst. 2018, 109, 1560–1573. [Google Scholar] [CrossRef]
- Luo, S.; Xu, Y.; Zhang, C.; Jin, J.; Kong, C.; Xu, Z.; Xu, Z.; Guo, B.; Tang, D.; Cao, Y. LIDD-YOLO: A lightweight industrial defect detection network. Meas. Sci. Technol. 2024, 36, 0161b5. [Google Scholar] [CrossRef]
- Yu, H.; Niu, S.; Li, S.; Yang, G.; Wang, X.; Luo, H.; Fan, X.; Li, C. Deep Learning-Based Intelligent Detection Device for Insulation Pull Rod Defects. Energies 2024, 17, 4344. [Google Scholar] [CrossRef]
- Mao, K.; Wei, P.; Wang, Y.; Liu, M.; Wang, S.; Zheng, N. CSDD: A Benchmark Dataset for Casting Surface Defect Detection and Segmentation. IEEE/CAA J. Autom. Sin. 2025, 12, 947–960. [Google Scholar] [CrossRef]
- He, Y.; Niu, X.; Hao, C.; Li, Y.; Kang, L.; Wang, Y. An adaptive detection approach for multi-scale defects on wind turbine blade surface. Mech. Syst. Signal Process. 2024, 219, 111592. [Google Scholar] [CrossRef]
- Feng, Y.-A.; Song, W.-W. Surface Defect Detection for Aerospace Aluminum Profiles with Attention Mechanism and Multi-Scale Features. Electronics 2024, 13, 2861. [Google Scholar] [CrossRef]
- Tang, W.; Deng, Y.; Luo, X. RST-YOLOv8: An Improved Chip Surface Defect Detection Model Based on YOLOv8. Sensors 2025, 25, 3859. [Google Scholar] [CrossRef] [PubMed]
- Li, W.; Zhang, H.; Wang, G.; Xiong, G.; Zhao, M.; Li, G.; Li, R. Deep learning based online metallic surface defect detection method for wire and arc additive manufacturing. Robot. Comput. Manuf. 2023, 80, 102470. [Google Scholar] [CrossRef]
- Zhang, J.; Jing, J.; Lu, P.; Song, S. Improved MobileNetV2-SSDLite for automatic fabric defect detection system based on cloud-edge computing. Measurement 2022, 201, 111665. [Google Scholar] [CrossRef]
- Lu, W.; Zheng, H.; Xiao, S.; Xue, W.; Yang, S. Application of the Improved YOLOv8 Algorithm for Small Object Detection in X-ray Weld Inspection Images. J. Nondestruct. Eval. 2025, 44, 91. [Google Scholar] [CrossRef]
- Wang, Z.; Xuan, J.; Shi, T. An autonomous recognition framework based on reinforced adversarial open set algorithm for compound fault of mechanical equipment. Mech. Syst. Signal Process. 2024, 219, 111596. [Google Scholar] [CrossRef]
- Wang, Z.; Li, S.; Xuan, J.; Shi, T. Biologically Inspired Compound Defect Detection Using a Spiking Neural Network with Continuous Time–Frequency Gradients. Adv. Eng. Bioinform. 2025, 65, 103132. [Google Scholar] [CrossRef]
- Wang, Z.; Xuan, J.; Shi, T.; Li, Y.F. Multi-label domain adversarial reinforcement learning for unsupervised compound fault recognition. Reliab. Eng. Syst. Saf. 2025, 254, 110638. [Google Scholar] [CrossRef]
- Peng, C.; Peng, J.; Wang, Z.; Wang, Z.; Chen, J.; Xuan, J.; Shi, T. Adaptive fault diagnosis of railway vehicle on-board controller with large language models. Appl. Soft Comput. 2025, 185, 113919. [Google Scholar] [CrossRef]
- Rajak, A.K.; Kore, S.D. Experimental investigation of aluminium–copper wire crimping with electromagnetic process: Its advantages over conventional process. J. Manuf. Process. 2017, 26, 57–66. [Google Scholar] [CrossRef]
- Rajak, A.K.; Kore, S.D. Numerical simulation and experimental study on electromagnetic crimping of aluminium terminal to copper wire strands. Electr. Power Syst. Res. 2018, 163, 744–753. [Google Scholar] [CrossRef]
- Wang, S.; Lu, H.; Ge, C.; Wang, J. FIDC-YOLOv5: A model for personnel fall detection in dense crowds. Measurement 2025, 258, 119095. [Google Scholar] [CrossRef]
- Xu, J.; Pan, F.; Han, X.; Wang, L.; Wang, Y.; Li, W. Edgetrim-YOLO: Improved trim YOLO framework tailored for deployment on edge devices. In Proceedings of the 2024 4th International Conference on Computer Communication and Artificial Intelligence (CCAI), Xi’an, China, 24–26 May 2024; pp. 113–118. [Google Scholar]
- Zou, Z.; Chen, K.; Shi, Z.; Guo, Y.; Ye, J. Object detection in 20 years: A survey. Proc. IEEE 2023, 111, 257–276. [Google Scholar] [CrossRef]
- Yu, J.; Jiang, Y.; Wang, Z.; Cao, Z.; Huang, T. UnitBox: An Advanced Object Detection Network. In Proceedings of the 24th ACM International Conference on Multimedia, Amsterdam, The Netherlands, 15–19 October 2016; pp. 516–520. [Google Scholar]
- Deng, H.; Chen, Y.; Xu, Y. ALD-YOLO: A lightweight attention detection model for apple leaf diseases. Front. Plant Sci. 2025, 16, 1616224. [Google Scholar] [CrossRef] [PubMed]
- Yang, Q.; Meng, H.; Gao, G.D. A real-time object detection method for underwater complex environments based on FasterNet-YOLOv7. J. Real-Time Image Process. 2024, 21, 8. [Google Scholar] [CrossRef]
- Chen, J.; Kao, S.-H.; He, H.; Zhuo, W.; Wen, S.; Lee, C.-H.; Chan, S.-H.G. Run, Don’t walk: Chasing higher FLOPS for faster neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 12021–12031. [Google Scholar]
- Ouyang, D.; He, S.; Zhang, G.; Luo, M.; Guo, H.; Zhan, J.; Huang, Z. Efficient Multi-Scale Attention Module with Cross-Spatial Learning. In Proceedings of the ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Rhodes Island, Greece, 4–10 June 2023; pp. 1–5. [Google Scholar]
- Lin, J.; van Wijngaarden, A.J.d.L.; Wang, K.C.; Smith, M.C. Speech enhancement using multi-stage self-attentive temporal convolutional networks. IEEE/ACM Trans. Audio Speech Lang. Process. 2021, 29, 3440–3450. [Google Scholar] [CrossRef]
- Shen, Y.; Zhang, F.; Liu, D.; Pu, W.; Zhang, Q. Manhattan-distance IOU loss for fast and accurate bounding box regression and object detection. Neurocomputing 2022, 500, 99–114. [Google Scholar] [CrossRef]
- Liu, C.; Wang, K.; Li, Q.; Zhao, F.; Zhao, K.; Ma, H. Powerful-IoU: More straightforward and faster bounding box regression loss with a nonmonotonic focusing mechanism. Neural Netw. 2024, 170, 276–284. [Google Scholar] [CrossRef]
- Tian, J.-H.; Feng, X.-F.; Li, F.; Xian, Q.-L.; Jia, Z.-H.; Liu, J.-L. An improved YOLOv5n algorithm for detecting surface defects in industrial components. Sci. Rep. 2025, 15, 9756. [Google Scholar] [CrossRef]
- Kittichai, V.; Pengsakul, T.; Chumchuen, K.; Samung, Y.; Sriwichai, P.; Phatthamolrat, N.; Tongloy, T.; Jaksukam, K.; Chuwongin, S.; Boonsang, S. Deep learning approaches for challenging species and gender identification of mosquito vectors. Sci. Rep. 2021, 11, 4838. [Google Scholar] [CrossRef]
- Su, J.; Qin, B.; Sun, F.; Lan, P.; Liu, G. Identification of Pine Wilt-Diseased Trees Using UAV Remote Sensing Imagery and Improved PWD-YOLOv8n Algorithm. Drones 2024, 8, 404. [Google Scholar] [CrossRef]
- 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 Computer Vision—ECCV 2016, 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. Adv. Neural Inf. Process. Syst. 2015, 28. [Google Scholar] [CrossRef] [PubMed]
- Jocher, G. YOLOv5: A State-of-the-Art, Real-Time Object Detection Model. GitHub. 2020. Available online: https://github.com/ultralytics/yolov5 (accessed on 1 September 2025).









| Defect Type | Cause of Defect | Morphology of Defect |
|---|---|---|
| Deep Insulation Crimping, Shallow/Normal Wire Tip | Insufficient Wire Stripping | Connection Between Insulation Sleeve and Crimp Barrel, Wire Tip Exposed Too Short or Normal |
| Deep Insulation Crimping, Deep Wire Tip Crimping | Conductor Misalignment | Connection Between Insulation Sleeve and Crimp Barrel, Wire Tip Overexposed |
| Normal Insulation Crimping, Deep Wire Tip Crimping | Excessive Stripping or Conductor Cut | Wire Tip Overexposed |
| Normal Insulation Crimping, Shallow Wire Tip Crimping | Insufficient Stripping | Wire Tip Underexposed |
| Shallow Insulation Crimping, Deep/Normal Wire Tip Crimping | Excessive Stripping | Insulation Not Exposed, Wire Tip Overexposed or Normal |
| Shallow Insulation Crimping, Shallow Wire Tip Crimping | Conductor Misalignment | Insulation Not Exposed, Wire Tip Underexposed |
| Copper Exposure at Crimp Barrel | Loose Crimping | Conductor Exposed at Crimp Barrel |
| Parameter Name | Parameter Value |
|---|---|
| Resolution | 3072 × 2048 |
| Frame Rate | 19.1 fps |
| Pixel Size | 2.4 μm × 2.4 μm |
| Data Interface | GigE (1000 Mbit/s) |
| Dimensions | 29 mm × 29 mm × 42 mm |
| TCQI Categories | Class Labels |
|---|---|
| Shallow Insulation Crimping | jypqd |
| Normal Insulation Crimping | jypzc |
| Deep Insulation Crimping | jypsd |
| Normal Crimp Barrel | yjbzc |
| Copper Exposure at Crimp Barrel | yjblt |
| Shallow Wire Tip Crimping | ctbqd |
| Deep Wire Tip Crimping | ctbsd |
| Normal Wire Tip Crimping | ctbzc |
| Class Labels | Accuracy | Recall Rate | F1 Score |
|---|---|---|---|
| jypqd | 0.963 | 0.920 | 0.941 |
| jypzc | 0.991 | 0.985 | 0.988 |
| jypsd | 0.992 | 0.990 | 0.991 |
| yjbzc | 0.994 | 0.998 | 0.996 |
| yjblt | 0.978 | 0.965 | 0.971 |
| ctbqd | 0.985 | 0.980 | 0.982 |
| ctbsd | 0.990 | 0.975 | 0.982 |
| ctbzc | 0.993 | 0.995 | 0.994 |
| Macro average | 0.985 | 0.976 | 0.98 |
| Weighted average | 0.987 | 0.983 | 0.985 |
| Loss Function | Average IoU | Average SIoU | Center Point Average Error |
|---|---|---|---|
| CIoU | 0.891 | 127 | 3.42 |
| SIoU | 0.923 | 32 | 2.15 |
| Experiment Number | Model | mAP@0.5 (%) | FPS | mAP Improvement |
|---|---|---|---|---|
| 1 | YOLOv5 | 96.6 | 87 | - |
| 2 | YOLOv5 + C2f | 97.2 | 85 | +0.6 |
| 3 | YOLOv5 + C2f + FasterNet | 97.5 | 79 | +0.9 |
| 4 | YOLOv5 + C2f + FasterNet + EMA | 97.9 | 61 | +1.3 |
| 5 | YOLOv5 + C2f + FasterNet + EMA + SIoU | 98.3 | 53 | +1.7 |
| 6 | YOLOv5 + SIoU | 97.1 | 86 | +0.5 |
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
Yu, Y.; Ren, D.; Meng, L. TCQI-YOLOv5: A Terminal Crimping Quality Defect Detection Network. Sensors 2025, 25, 7498. https://doi.org/10.3390/s25247498
Yu Y, Ren D, Meng L. TCQI-YOLOv5: A Terminal Crimping Quality Defect Detection Network. Sensors. 2025; 25(24):7498. https://doi.org/10.3390/s25247498
Chicago/Turabian StyleYu, Yingjuan, Dawei Ren, and Lingwei Meng. 2025. "TCQI-YOLOv5: A Terminal Crimping Quality Defect Detection Network" Sensors 25, no. 24: 7498. https://doi.org/10.3390/s25247498
APA StyleYu, Y., Ren, D., & Meng, L. (2025). TCQI-YOLOv5: A Terminal Crimping Quality Defect Detection Network. Sensors, 25(24), 7498. https://doi.org/10.3390/s25247498
