王成军, 薛玉珂, 杨超宇. 基于多尺度特征的YOLOv5铸件自动检测算法研究[J]. 制造技术与机床, 2023, (10): 130-136. DOI: 10.19287/j.mtmt.1005-2402.2023.10.020
引用本文: 王成军, 薛玉珂, 杨超宇. 基于多尺度特征的YOLOv5铸件自动检测算法研究[J]. 制造技术与机床, 2023, (10): 130-136. DOI: 10.19287/j.mtmt.1005-2402.2023.10.020
WANG Chengjun, XUE Yuke, YANG Chaoyu. Research on YOLOv5 casting automatic detection algorithm based on multi-scale feature[J]. Manufacturing Technology & Machine Tool, 2023, (10): 130-136. DOI: 10.19287/j.mtmt.1005-2402.2023.10.020
Citation: WANG Chengjun, XUE Yuke, YANG Chaoyu. Research on YOLOv5 casting automatic detection algorithm based on multi-scale feature[J]. Manufacturing Technology & Machine Tool, 2023, (10): 130-136. DOI: 10.19287/j.mtmt.1005-2402.2023.10.020

基于多尺度特征的YOLOv5铸件自动检测算法研究

Research on YOLOv5 casting automatic detection algorithm based on multi-scale feature

  • 摘要: 针对铸件检测存在精度不够高和易漏检、误检等问题,提出一种基于多尺度特征的YOLOv5铸件自动检测算法。该算法使用双目相机采集铸件图像,并构建铸件图像数据集;为提取更全面的铸件特征,采用多尺度特征融合模块,增加一个检测层检测不同尺度的铸件;为获取更多细节特征,在特征金字塔网络中嵌入卷积注意力机制(CBAM),以提高铸件图像关键特征的提取能力;同时用Hardswish替换卷积层中的SiLU激活函数来减少模型参数量。实验结果表明,该算法检测mAP值达到了96.5%,较原YOLOv5算法提升了2.6%,能实现铸件自动检测对检测精度及实时性的要求。

     

    Abstract: Aiming at the problem of the insufficient precision and frequent oversights or misidentifications in casting detection, a YOLOv5 casting automatic detection algorithm based on multi-scale feature is proposed. This algorithm uses a binocular camera to capture images of castings and builds a dataset of casting images. To extract more comprehensive features of the castings, a multi-scale feature fusion module is employed, and adding an extra detection layer to identify castings of different scales. To capture more detailed features, a Convolutional Block Attention Module (CBAM) is embedded in the Feature Pyramid Network to enhance the ability to extract key features of casting images. At the same time, the Swish activation function in the convolutional layer is replaced with Hardswish to reduce the amount of model parameters. Experimental results demonstrate that this algorithm achieves a mean average precision (mAP) of 96.5%, representing a 2.6% improvement compared to the original YOLOv5 algorithm, effectively meeting the precision and real-time requirements for casting automatic detection.

     

/

返回文章
返回