改进YOLOv10n的紧固件检测算法
An Improved YOLOv10n Algorithm for Industrial Fastener Detection
DOI: 10.12677/csa.2025.1511302, PDF,   
作者: 林俊杰, 李 莉:天津职业技术师范大学电子工程学院,天津;邴志刚:天津职业技术师范大学自动化与电气工程学院,天津
关键词: 紧固件检测YOLOv10nWIoULEGMCGA FusionIndustrial Fastener Detection YOLOv10n WIoU LEGM CGA Fusion
摘要: 针对工业紧固件检测中存在的目标形态多样、堆叠遮挡及背景干扰等问题,提出一种改进的YOLOv10n-WGM检测算法。以M6螺母与M8螺丝为检测目标,基于Unity3D构建多场景仿真数据集,通过控制光照强度、方向、地面纹理与颜色等参数增强数据多样性,并模拟物理掉落过程生成堆叠目标图像,共采集600张图像按4:2划分训练集与验证集。在YOLOv10n基础上引入三方面改进:使用WIoU损失函数提升低质量样本处理能力,通过动态调节损失权重缓解锚框质量不平衡问题,优化梯度分配策略;将C2f模块替换为C2fCIB-LEGM结构,在提升局部特征提取能力的同时建模全局依赖;在检测头前融入CGAFusion模块,提升跨层级特征流动效率并保留空间细节特异性。实验结果表明,YOLOv10n-WGM相比原模型在mAP50、mAP50:95、精确度与召回率分别提升3.588%、1.551%、2.342%与4.295%,漏检率显著降低。该算法具有良好的检测精度与鲁棒性,适用于工业环境中的紧固件实时检测需求。
Abstract: To tackle challenges like varied shapes, occlusion, and background clutter in industrial fastener detection, we propose an enhanced YOLOv10n-WGM algorithm. Focusing on M6 nuts and M8 screws, a diverse synthetic dataset was generated using Unity3D by varying lighting, textures, and colors, and simulating physical stacking. A total of 600 images were collected and split into training and validation sets at a 4:2 ratio. The model incorporates three key improvements: 1) WIoU loss, which dynamically adjusts the loss weight to alleviate anchor box quality imbalance and optimize the gradient allocation strategy, for better handling of low-quality samples; 2) The C2f module is replaced by the C2fCIB-LEGM structure to enhance local feature extraction and model global dependencies; and 3) The CGAFusion module is integrated before the detection head to enhance cross-level feature flow efficiency and preserve spatial detail specificity. Experiments show significant gains: +3.588% mAP50, +1.551% mAP50:95, +2.342% precision, and +4.295% recall compared to the original model, with markedly lower missed detections. The method demonstrates high accuracy and robustness for real-time industrial fastener inspection.
文章引用:林俊杰, 李莉, 邴志刚. 改进YOLOv10n的紧固件检测算法[J]. 计算机科学与应用, 2025, 15(11): 257-268. https://doi.org/10.12677/csa.2025.1511302

参考文献

[1] 代金龙, 习吕鹏, 王亮, 等. 商用车螺纹紧固件连接防松技术分析及理论研究[J/OL]. 汽车工艺与材料, 1-7. 2025-09-15.[CrossRef
[2] 常星星, 陈卫林, 黄超, 等. 低合金超高强度钢(30CrMnSiNi2A)螺栓结构件的加工阐述[J]. 内江科技, 2025, 46(8): 75-76.
[3] 张文健. 新型钛合金机械紧固件锻造温度优化方案[J]. 锻压装备与制造技术, 2025, 60(4): 104-107.
[4] 陈卫彪, 贾小军, 朱响斌, 冉二飞, 魏远旺. G-YOLOv7: 面向无人机航拍图像的目标检测算法[J]. 光电子∙激光, 2025, 36(2): 146-157.
[5] Zhu, X., Lyu, S., Wang, X. and Zhao, Q. (2021) TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured Scenarios. 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Montreal, 11-17 October 2021, 2778-2788. [Google Scholar] [CrossRef
[6] 王晓辉, 贾韫硕, 郭丰娟. 基于改进YOLOv8的汽车门板紧固件检测算法[J]. 计算机工程与设计, 2025, 46(1): 298-306.
[7] Shi, W., Caballero, J., Huszar, F., Totz, J., Aitken, A.P., Bishop, R., et al. (2016) Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 1874-1883. [Google Scholar] [CrossRef
[8] Wang, J., Chen, K., Xu, R., Liu, Z., Loy, C.C. and Lin, D. (2019) CARAFE: Content-Aware Reassembly of Features. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, 27 October-2 November 2019, 3007-3016. [Google Scholar] [CrossRef
[9] Ye, C., Zhao, C., Yang, Y., Fermüller, C. and Aloimonos, Y. (2016) LightNet: A Versatile, Standalone Matlab-Based Environment for Deep Learning. Proceedings of the 24th ACM international conference on Multimedia, Amsterdam, 15-19 October 2016, 1156-1159. [Google Scholar] [CrossRef
[10] Yu, J., Mao, J., Wang, Y., He, Z., Yi, J., Tao, Z., et al. (2025) DDH-Net: A Dual Dynamic Head Network for Transmission Line Inspection. IEEE Transactions on Instrumentation and Measurement. [Google Scholar] [CrossRef
[11] Wang, A., et al. (2024) YOLOv10: Real-Time End-to-End Object Detection. arXiv: 2405.14458
[12] Zhang, Y., Zhou, S. and Li, H. (2024) Depth Information Assisted Collaborative Mutual Promotion Network for Single Image Dehazing. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 16-22 June 2024, 2846-2855. [Google Scholar] [CrossRef
[13] Chen, Z., He, Z. and Lu, Z. (2024) DEA-Net: Single Image Dehazing Based on Detail-Enhanced Convolution and Content-Guided Attention. IEEE Transactions on Image Processing, 33, 1002-1015. [Google Scholar] [CrossRef] [PubMed]
[14] Tong, Z., Chen, Y., Xu, Z., et al. (2023) Wise-IoU: Bounding Box Regression Loss with Dynamic Focusing Mechanism. arXiv: 2301.10051