A Multi-Dimensional Vision-Based System for External Thread Defect Detection with Integrated Security Defense
Abstract
1. Introduction
- (1)
- A multi-dimensional external thread defect detection framework is proposed, integrating 2D detection and 3D reconstruction to achieve both defect localization and geometric quantification.
- (2)
- A point cloud-based defect analysis method is developed, enabling millimeter-level accuracy in defect size estimation for complex thread structures.
- (3)
- A robustness evaluation is conducted to analyze the impact of image perturbations on detection performance, providing insights for reliable industrial deployment.
2. Methodology
2.1. Image Acquisition System Hardware Design
2.2. Image Data Augmentation
2.3. Two-Dimensional Defect Detection
2.4. 3D Point Cloud Generation and Geometric Reconstruction
2.5. Point Cloud Filtering
- Some real points in the main thread geometry may be mistakenly deleted, causing gaps in the thread profile geometry.
- Floating points near the tooth boundary are not effectively removed, leading to the formation of non-physical peak values during the subsequent slice curvature analysis, which are then misjudged as missing teeth.
2.6. Three-Dimensional Defect Detection
2.6.1. Missing Teeth Defect Detection
2.6.2. Scratch Defect Detection
3. Experiment
3.1. Data Augmentation
3.2. Two-Dimensional Defect Detection
3.3. Point Cloud Reconstruction
3.4. Point Cloud Filtering
3.5. Three-Dimensional Defect Detection
4. Discussion
4.1. Performance Evaluation of 3D Detection End Reconstruction Algorithms
4.2. System Security Evaluation
5. Conclusions
- Custom External Thread Image Acquisition System: A dedicated external thread image acquisition system is designed to provide stable multi-view image inputs for both 2D defect detection and 3D reconstruction. The controlled lighting and motion mechanisms improve image consistency and provide reliable data support for subsequent analysis.
- Multi-Dimensional Defect Detection Framework: A multi-dimensional external thread defect detection framework integrating 2D detection and 3D reconstruction is proposed. The YOLOv13-based detection module achieves reliable detection performance for missing teeth, scratches, and corrosion defects under complex industrial backgrounds. Furthermore, the Gaussian Splatting-based reconstruction method successfully recovers detailed geometric structures of external threads from multi-view images, enabling point cloud-based quantitative analysis.
- Point Cloud-Based Defect Quantification Method: To improve the quality of reconstructed point clouds, a dual-constrained statistical outlier removal (DC-SOR) strategy is introduced to suppress noise while preserving thread boundary structures. Based on the optimized point cloud, the proposed Slice Curvature Tooth Defect (SCTD) and Local Point Density Estimation (LPDE) methods achieve effective geometric characterization and millimeter-level defect size estimation for missing teeth and scratch defects.
- Robustness Analysis under Image Perturbations: This paper further analyzes the influence of image perturbations on vision-based industrial inspection systems. Experimental results demonstrate that alpha-channel disturbances may affect both defect detection and 3D reconstruction performance.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| GAN | Generative Adversarial Network |
| StyleGAN | Style Generative Adversarial Network |
| SAN | Style-based Adversarial Network |
| StyleSAN-XL | Style-based Self-Attention Network with Extended Large-scale Generation |
| YOLOv13 | You Only Look Once version 13 |
| DC-SOR | Dual-Constrained Statistical Outlier Removal |
| SCTD | Slice Curvature-based Tooth-Missing Detection |
| LPDE | Local Point Density Estimation |
| GS | Gaussian Splatting |
| FID | Fréchet Inception Distance |
| PCA | Principal Component Analysis |
| DBSCAN | Density-Based Spatial Clustering of Applications with Noise |
| VGGT | Visual Geometry Grounded Transformer |
| DUST3R | Deep Unsupervised Spatial-Temporal Reconstruction |
References
- Yang, Y.; Yuan, B.; Sun, Q.; Mu, X.; Zhao, B. Research on preload and stress distribution of small-size precision threaded connection considering geometric deviation. Machines 2022, 10, 1166. [Google Scholar] [CrossRef]
- Kong, Q.; Wu, Z.; Song, Y. Online detection of external thread surface defects based on an improved template matching algorithm. Measurement 2022, 195, 111087. [Google Scholar] [CrossRef]
- Jin, Q.; Chen, L. A survey of surface defect detection of industrial products based on a small number of labeled data. arXiv 2022, arXiv:2203.05733. [Google Scholar] [CrossRef]
- Shukla, V.; Shukla, A.; SK, S.P.; Shukla, S. A systematic survey: Role of deep learning-based image anomaly detection in industrial inspection contexts. Front. Robot. AI 2025, 12, 1554196. [Google Scholar] [CrossRef]
- Dou, X.; Xue, C.; Zhang, G.; Jiang, Z. Internal thread defect detection system based on multi-vision. PLoS ONE 2024, 19, e0304224. [Google Scholar] [CrossRef]
- Jiang, Z.; Dou, X.; Liu, X.; Xue, C.; Wang, A.; Zhang, G. Internal Thread Defect Generation Algorithm and Detection System Based on Generative Adversarial Networks and You Only Look Once. Sensors 2024, 24, 5636. [Google Scholar] [CrossRef]
- Song, L.; Li, X.; Yang, Y.; Zhu, X.; Guo, Q.; Yang, H. Detection of micro-defects on metal screw surfaces based on deep convolutional neural networks. Sensors 2018, 18, 3709. [Google Scholar] [CrossRef]
- Gupta, C.; Gill, N.S.; Gulia, P.; Alserhani, F.M.; Shukla, P.K.; Shreyas, J. Surface defect detection on bolt surface using a real-time fine-tuned YOLOv6 model. J. Big Data 2025, 12, 184. [Google Scholar] [CrossRef]
- Fu, L.; Li, L.; Zhang, G.; Jiang, Z. An Integrated and Robust Vision System for Internal and External Thread Defect Detection with Adversarial Defense. Sensors 2025, 25, 5664. [Google Scholar] [CrossRef]
- Jadayel, M.; Khameneifar, F. Structured-light 3D Scanning Performance in Offline and In-process Measurement of 3D Printed Parts. Procedia CIRP 2024, 126, 987–992. [Google Scholar] [CrossRef]
- Luo, H.; Zhang, K.; Li, R.; Xia, Y.; Liang, P. A structured-light 3D sensor-based shape measurement method for casting allowance evaluation. Front. Phys. 2022, 10, 979450. [Google Scholar] [CrossRef]
- Zhang, J.; Lu, Y. Proof-of-Concept Evaluation of A 3D Laser Profiling System Prototype for Real-Time Woody Breast Detection in Broiler Breast Fillets. J. Food Eng. 2026, 406, 112820. [Google Scholar] [CrossRef]
- Birla, S.; Alya, S.; Singh, R. An integrated image processing approach for 3D scanning and micro-defect detection. J. Micromanuf. 2023, 6, 172–181. [Google Scholar] [CrossRef]
- Ma, J.; Zhuo, S.; Qiu, L.; Gao, Y.; Wu, Y.; Zhong, M.; Bai, R.; Sun, M.; Chiang, P.Y. A review of ToF-based LiDAR. J. Semicond. 2024, 45, 101201. [Google Scholar] [CrossRef]
- Yang, C.; Kang, J.; Eom, D.S. Enhancing ToF Sensor Precision Using 3D Models and Simulation for Vision Inspection in Industrial Mobile Robots. Appl. Sci. 2024, 14, 4595. [Google Scholar] [CrossRef]
- Kanai, S. A review of structure-from-motion and multi-view-stereo. J. Jpn. Soc. Photogramm. Remote Sens. 2021, 60, 95–99. [Google Scholar] [CrossRef]
- Zhou, L.; Wu, G.; Zuo, Y.; Chen, X.; Hu, H. A comprehensive review of vision-based 3d reconstruction methods. Sensors 2024, 24, 2314. [Google Scholar] [CrossRef]
- Liu, S.; Yang, M.; Xing, T.; Yang, R. A Survey of 3D Reconstruction: The Evolution from Multi-View Geometry to NeRF and 3DGS. Sensors 2025, 25, 5748. [Google Scholar] [CrossRef]
- Mildenhall, B.; Srinivasan, P.P.; Tancik, M.; Barron, J.T.; Ramamoorthi, R.; Ng, R. Nerf: Representing scenes as neural radiance fields for view synthesis. Commun. ACM 2021, 65, 99–106. [Google Scholar] [CrossRef]
- Liu, Y.; Zhang, C.; Dong, X.; Ning, J. Point cloud-based deep learning in industrial production: A survey. ACM Comput. Surv. 2025, 57, 1–36. [Google Scholar] [CrossRef]
- Huo, L.; Liu, Y.; Yang, Y.; Zhuang, Z.; Sun, M. Research on product surface quality inspection technology based on 3D point cloud. Adv. Mech. Eng. 2023, 15, 1–17. [Google Scholar] [CrossRef]
- Li, R.; Jin, M.; Paquit, V.C. Geometrical defect detection for additive manufacturing with machine learning models. Mater. Des. 2021, 206, 109726. [Google Scholar] [CrossRef]
- Huang, D.; Du, S.; Li, G.; Zhao, C.; Deng, Y. Detection and monitoring of defects on three-dimensional curved surfaces based on high-density point cloud data. Precis. Eng. 2018, 53, 79–95. [Google Scholar] [CrossRef]
- Rani, A.; Ortiz-Arroyo, D.; Durdevic, P. Advancements in point cloud-based 3D defect classification and segmentation for industrial systems: A comprehensive survey. Inf. Fusion 2024, 112, 102575. [Google Scholar] [CrossRef]
- García, D.; García, A.; García, D.; Díaz, I. Improving Robustness of Defect Detection models using Adversarial-based Data Augmentation. In Proceedings of the ESANN 2025, Bruges, Belgium, 23–25 April 2025. [Google Scholar]
- Wang, P.; Li, Q.; Li, D.; Meng, S.; Bilal, M.; Mukherjee, A. Security in defect detection: A new one-pixel attack for fooling DNNs. J. King Saud. Univ.-Comput. Inf. Sci. 2023, 35, 101689. [Google Scholar] [CrossRef]
- Nguyen Tiet Nguyen, K.; Zhang, W.; Lu, K.; Wu, Y.; Zheng, X.; Li Tan, H.; Zhen, L. A Survey and Evaluation of Adversarial Attacks for Object Detection. arXiv 2024, arXiv:2408.01934. [Google Scholar] [CrossRef]
- Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial networks. Commun. ACM 2020, 63, 139–144. [Google Scholar] [CrossRef]
- Karras, T.; Laine, S.; Aila, T. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2019; pp. 4401–4410. [Google Scholar]
- Takida, Y.; Imaizumi, M.; Shibuya, T.; Lai, C.H.; Uesaka, T.; Murata, N.; Mitsufuji, Y. SAN: Inducing metrizability of GAN with discriminative normalized linear layer. arXiv 2023, arXiv:2301.12811. [Google Scholar]
- Lei, M.; Li, S.; Wu, Y.; Hu, H.; Zhou, Y.; Zheng, X.; Ding, G.; Du, S.; Wu, Z.; Gao, Y. YOLOv13: Real-Time Object Detection with Hypergraph-Enhanced Adaptive Visual Perception. arXiv 2025, arXiv:2506.17733. [Google Scholar]
- Kerbl, B.; Kopanas, G.; Leimkühler, T.; Drettakis, G. 3D Gaussian splatting for real-time radiance field rendering. ACM Trans. Graph. 2023, 42, 139. [Google Scholar] [CrossRef]
- Wang, S.; Leroy, V.; Cabon, Y.; Chidlovskii, B.; Revaud, J. Dust3r: Geometric 3d vision made easy. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2024; pp. 20697–20709. [Google Scholar]
- Wang, J.; Chen, M.; Karaev, N.; Vedaldi, A.; Rupprecht, C.; Novotny, D. Vggt: Visual geometry grounded transformer. In Proceedings of the Computer Vision and Pattern Recognition Conference; IEEE: New York, NY, USA, 2025; pp. 5294–5306. [Google Scholar]
- Yi, A.; Zhou, C.; Xiao, L.; Yan, Q. Can You Trust What You See? Alpha Channel No-Box Attacks on Video Object Detection. arXiv 2025, arXiv:2510.19574. [Google Scholar] [CrossRef]
































| Model | Core Concept | Innovation and Optimization | Evolutionary Relationship |
|---|---|---|---|
| GAN | Generator and discriminator compete to generate data. | Learns adversarially to generate data. | Foundation of generative models. |
| StyleGAN | GAN with a style module to enhance images. | Controls image generation via style-based learning. | Enhances GAN for better image quality. |
| SAN | Optimizes GAN’s discriminator. | Uses optimal transport for training stability. | Improves GAN’s training stability. |
| StyleSAN-XL | Combines StyleGAN and SAN for large-scale generation. | Merges style control with SAN’s optimization for better quality. | Combines StyleGAN and SAN to improve quality and stability. |
| Module | Function | Contribution |
|---|---|---|
| Depthwise Separable Convolution | Reduces computation, boosts inference speed | Fast extraction of small defect features, ensuring real-time precision |
| Hypergraph Convolution | Models context relationships between targets, reduces background noise | Accurate defect localization reduces interference from complex backgrounds |
| Adaptive Multi-Scale Feature Fusion | Combines features from different scales, enhances defect perception | Stable detection of defects from small scratches to large missing teeth, balancing precision and recall |
| Class | Precision | Recall | F1-Score | AP@0.5 |
|---|---|---|---|---|
| Missing Tooth | 0.91 | 0.96 | 0.93 | 0.953 |
| Scratch | 0.92 | 0.98 | 0.95 | 0.967 |
| Corrosion | 0.84 | 0.91 | 0.87 | 0.797 |
| Overall | 0.89 | 0.97 | 0.88 | 0.906 |
| Model | mAP | Latency (ms) | Model Size (MB) | GFLOPs | Params (M) |
|---|---|---|---|---|---|
| YOLOv5n | 86.4 | 3.1 | 10.0 | 7.1 | 2.5 |
| YOLOv6n | 88.1 | 3.8 | 16.8 | 11.8 | 4.2 |
| YOLOv8n | 89.3 | 3.3 | 12.0 | 8.2 | 3.0 |
| YOLOv9t | 90.1 | 3.0 | 8.4 | 8.5 | 2.1 |
| YOLOv11n | 90.2 | 2.7 | 10.0 | 6.3 | 2.5 |
| YOLOv12n | 90.4 | 2.8 | 10.5 | 6.5 | 2.6 |
| YOLOv13n | 90.6 | 2.6 | 9.8 | 6.2 | 2.4 |
| Setting | Real Images | Synthetic Images | Total Images | Precision | Recall | mAP@0.5 |
|---|---|---|---|---|---|---|
| S0 | 600 | 0 | 600 | 0.842 | 0.801 | 0.817 |
| S1 | 600 | 600 | 1200 | 0.865 | 0.830 | 0.840 |
| S2 | 600 | 3000 | 3600 | 0.876 | 0.855 | 0.855 |
| S3 | 600 | 6000 | 6600 | 0.884 | 0.910 | 0.875 |
| S4 | 600 | 15,000 | 15,600 | 0.89 | 0.97 | 0.906 |
| Defect Type | Defect Position | Actual Length (mm) | Measured Length (mm) | Actual Depth (mm) | Measured Depth (mm) |
|---|---|---|---|---|---|
| Missing teeth | A | 1.51 | 1.43 | 1.23 | 1.19 |
| B | 1.83 | 1.75 | 1.37 | 1.44 | |
| C | 1.58 | 1.46 | 1.05 | 0.97 | |
| D | 1.19 | 1.14 | 0.87 | 0.85 | |
| Scratch | A | 1.87 | 1.82 | --- | --- |
| B | 2.52 | 2.41 | --- | --- | |
| C | 3.06 | 3.11 | --- | --- | |
| D | 1.76 | 1.81 | --- | --- |
| Defect Type | MAE (mm) | Std Dev (mm) | % Error (Relative to Pitch) |
|---|---|---|---|
| Missing Teeth | 0.083 | 0.028 | 5.4% |
| Scratch | 0.065 | 0.026 | 2.8% |
| Overall | 0.074 | 0.027 | 4.1% |
| Model | Point Count | Point Cloud Density | Normal Consistency | Curvature Response |
|---|---|---|---|---|
| DUST3R 224 × 224 | 117,851 | 65.5891 | 1.3351 | 0.2116 |
| DUST3R 224 × 224 +DC-SOR | 45,362 | 61.1345 | 1.3550 | 0.2530 |
| DUST3R 512 × 384 | 152,550 | 93.5301 | 1.3741 | 0.1873 |
| DUST3R 512 × 384 +DC-SOR | 51,330 | 89.2154 | 1.3945 | 0.2390 |
| VGGT | 993,876 | 193.8614 | 0.6973 | 0.1994 |
| VGGT +DC-SOR | 192,454 | 172.2973 | 1.3090 | 0.3378 |
| GS | 1,521,202 | 105.1556 | 0.3397 | −0.6726 |
| GS +DC-SOR | 246,469 | 301.6895 | 1.2795 | 0.2986 |
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. |
© 2026 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.
Share and Cite
Li, L.; Zhang, G. A Multi-Dimensional Vision-Based System for External Thread Defect Detection with Integrated Security Defense. Sensors 2026, 26, 3229. https://doi.org/10.3390/s26103229
Li L, Zhang G. A Multi-Dimensional Vision-Based System for External Thread Defect Detection with Integrated Security Defense. Sensors. 2026; 26(10):3229. https://doi.org/10.3390/s26103229
Chicago/Turabian StyleLi, Leqi, and Gengpei Zhang. 2026. "A Multi-Dimensional Vision-Based System for External Thread Defect Detection with Integrated Security Defense" Sensors 26, no. 10: 3229. https://doi.org/10.3390/s26103229
APA StyleLi, L., & Zhang, G. (2026). A Multi-Dimensional Vision-Based System for External Thread Defect Detection with Integrated Security Defense. Sensors, 26(10), 3229. https://doi.org/10.3390/s26103229
