摘要
针对摄像头模组缺陷检测中缺陷尺寸变化大、轮廓不明晰和小目标缺陷漏检率高等问题,提出一种改进的YOLOv8s算法。首先,增加小目标检测层,提高小目标检测性能;其次,引入BiFormer对主干网络中C2f模块进行改进,提出C2f-Bif模块来增强网络的提取图像特征能力;再次,提出混合快速空间金字塔池化模块,增强网络捕获局部和全局信息的能力;最后,加入无参型SimAM注意力机制,抑制非目标背景干扰信息,提高对目标的关注度。实验结果表明:在减少模型参数量的情况下,改进后的YOLOv8s算法对摄像头模组缺陷检测的平均精度均值达到了87.2%,比YOLOv8s算法提升了3.2个百分点。检测速度达到55 FPS,满足工厂对摄像头模组缺陷实时检测的要求。
Aiming at the problems of the great change of defect size,unclear contour and high missed detection rate of small tar‐get defects in camera module defect detection,an improved YOLOv8s algorithm is proposed.Firstly,the small target detection layer is added to improve the detection performance of small targets.Secondly,BiFormer is introduced to improve the C2f module in the backbone network,and the C2f-Bif module is proposed to enhance the ability of the network to extract image features.Then,the H-SPPF(Hybrid Fast Space Pyramid Pooling)module is proposed to enhance the ability of the network to capture lo‐cal and global information.Finally,the parameter-free SimAM attention mechanism is added to suppress the non-target back‐ground interference information and improve the attention of the target.The experimental results show that the average accuracy of the improved YOLOv8s algorithm for camera module defect detection reaches 87.2%under the condition of reducing the num‐ber of model parameters,which is 3.2 percentage points higher than that of the YOLOv8s algorithm.The detection speed reaches 55 FPS,which meets the factory’s real-time detection requirements for camera module defects.
作者
张泽
张建权
周国鹏
ZHANG Ze;ZHANG Jianquan;ZHOU Guopeng(College of Electronics and Electrical Engineering,Wuhan Textile University,Wuhan 430000,China;College of Automation,Hubei University of Science and Technology,Xianning 437000,China;Hubei Xiangcheng Intelligent Electromechanical Technology Research Institute Co.,Ltd.,Xianning 437000,China)
出处
《计算机与现代化》
2024年第9期107-113,共7页
Computer and Modernization
基金
湖北省科技计划项目(2020BGC028)
湖北省重点研发计划项目(2021BGD022,2022BBA026)。