基于改进YOLOv5的钛丝表面缺陷检测算法OA
A Titanium Wire Surface Defect Detection Algorithm Based on Improved YOLOv5
钛丝表面缺陷检测在工业生产中具有重要应用价值,与传统工业图像相比,钛丝表面缺陷存在目标微小、形态多变、背景干扰复杂等特点.针对钛丝表面缺陷检测中小目标特征提取困难、检测精度不足以及错检与漏检等问题,提出一种基于改进YOLOv5s的目标检测算法YOLOv5s-SCF.采用StarNet架构作为YOLOv5s的主干网络,在保持检测精度的同时,有效降低模型的复杂度;引入上下文锚点注意力机制(CAA),补充多尺度的局部特征,增强物体中央区域的特征提取能力;使用Focal-EIoU边框损失函数,在回归过程专注于高质量的锚框,提升收敛速度和定位精度.实验结果表明,改进后的模型相比原始的YOLOv5s算法,mAP@0.5提高了2.1%,适合工业钛丝表面缺陷实时检测.
Titanium wire surface defect detection has important application value in industrial production.Compared with tra-ditional industrial images,titanium wire surface defect has the characteristics of small target,changeable shape and complex back-ground interference.Aiming at the difficulties of feature extraction,lack of detection accuracy,error detection and missing detec-tion of small and medium-sized targets in titanium wire surface defect detection,an improved YOLOv5s based target detection algo-rithm YOLOv5s-SCF is proposed.StarNet architecture is adopted as the backbone network of YOLOv5s,which can effectively re-duce the complexity of the model while maintaining the detection accuracy.The context-anchored attention mechanism(CAA)is in-troduced to supplement the multi-scale local features and enhance the feature extraction ability of the central region of the object.Using Focal-EIoU frame loss function,it focuses on high-quality anchor frames during regression,improves convergence speed and positioning accuracy.The experimental results show that compared with the original YOLOv5s algorithm,the improved model has a 2.1%improvement in mAP@0.5,which is suitable for real-time surface defect detection of industrial titanium wires.
杨林浒;王娟平
宝鸡文理学院机械工程学院 宝鸡 721016宝鸡文理学院机械工程学院 宝鸡 721016||陕西信达合瑞科技有限公司 宝鸡 721000
信息技术与安全科学
目标检测YOLOv5s星操作上下文锚点注意力机制损失函数
target detectionYOLOv5sstar operationcontextual anchor attention mechanismloss function
《舰船电子工程》 2026 (2)
35-39,83,6
陕西省秦创原"科学家+工程师"队伍建设项目(编号:2022KXJ-048)西安市重点产业链技术攻关项目"人工智能应用场景示范:钛打磨机器人设备研制"(编号:23ZDCYJSGG0029-2023)陕西省技术创新引导专项"钛原材料打磨机器人"(编号:2024ZC-YYDP-85)秦创原总窗口"四链"融合重点项目"人工智能在钛打磨机器人打磨工艺数字产业化的应用研究"(编号:2024PT-ZCK-24)陕西省教育厅服务地方专项科学研究计划项目-政企联合资助项目"AI智能钛原材料打磨机器人"(编号:24JB029)资助.
评论