| 时间: 2026-11-20 | 次数: |
代峰燕,王维浩,冯梓航,等.改进YOLOv8与SURF结合的目标缺陷检测方法[J].河南理工大学学报(自然科学版),2027,46(1):136-146.
Dai F Y, Wang W H, Feng Z H,et al.Target defect detection method combining improved YOLOv8 and SURF[J].Journal of Henan Polytechnic University(Natural Science) ,2027,46(1):136-146.
改进YOLOv8与SURF结合的目标缺陷检测方法
代峰燕1, 王维浩1, 冯梓航1, 王玲2, 王自强1
1.北京石油化工学院 工程师学院 北京 102617;2.中国农业大学 工学院,北京 100083
摘要: 目的 针对高铁配电柜线路装配缺陷长期依赖人工目视检查、检测效率低且易漏检的问题,提出一种改进YOLOv8与SURF结合的目标缺陷检测方法,并以动车配电柜线路检测为例进行验证。 方法 设计一种高度和角度可调节的非接触式高铁配电柜可见光图像数据集收集装置,通过改进YOLOv8模型快速识别定位配电柜线路缺陷区域,结合SURF强大的模板匹配能力精准检测出线路缺陷位置。首先,基于YOLOv8原始模型采用分模块修改结构建立改进YOLOv8模型,Backbone模块引入FasterNet网络结构,以微小精度损失为代价换取推理速度提升,结合SE注意力与MSD-ECIOU损失函数,弥补精度损失,实现速度-精度综合收益,并与ResNet和ResNeXt模型进行实验对比;其次,在Neck模块中添加SE注意力机制,结合Grad-CAM技术可视化特征提取效果;最后,提出一种新的增强损失函数MSD-ECIOU替换原来的CIOU损失函数,并进行损失函数的训练,使配电柜线路缺陷更加接近真实框,以提升模型检测的准确率。 结果 通过某公司的配电柜线路数据集对模型进行实验对比,YOLOv8改进模型的平均精度均值 mAP 由87.6%提高到90.0%,提升了2.4%。 结论 改进模型能够在保证较快识别速度前提下提升识别精度。同时,结合SURF配准的差分方法,可精准匹配缺陷区域,迅速且准确地完成线路缺陷检测,促进线路缺陷检测自动化,大幅提高配电柜缺陷检测效率。
关键词:配电柜;缺陷检测;YOLOv8;SURF模型;目标检测;图像收集装置
doi:10.16186/j.cnki.1673-9787.2024120005
基金项目:国家自然科学基金资助项目(32372592);北京市大学生科研训练项目(2024J00260,2023J00229)
收稿日期:2024/12/02
修回日期:2025/03/13
出版日期:2026/11/20
Target defect detection method combining improved YOLOv8 and SURF
Dai Fengyan1, Wang Weihao1, Feng Zihang1, Wang Ling2, Wang Ziqiang1
1.College of Engineering, Beijing Institute of Petrochemical Technology, Beijing 102617, China;2.College of Engineering, China Agricultural University, Beijing 100083, China
Abstract: Objectives Aiming at the problem that the inspection of wiring assembly defects in high-speed rail power distribution cabinets has long relied on manual visual inspection, which suffers from low detection efficiency and a high miss rate, a target defect detection method combining improved YOLOv8 and SURF is proposed. The method enables real-time monitoring of products on production lines and timely removal of defective items, and its effectiveness is validated through a case study on the circuit inspection of a high-speed railway power distribution cabinet.Methods A non-contact infrared image acquisition device with adjustable height and angle is designed for collecting images of the power distribution cabinet. The improved YOLOv8 model is used to rapidly identify and locate defect regions in the cabinet circuits, while the SURF algorithm provides robust template matching capability for precise defect localization. First, based on the original YOLOv8 architecture, the model is improved by incorporating a FasterNet structure in the Backbone module to enhance detection speed without compromising accuracy, and comparisons are made with ResNet and ResNeXt models. Second, a Squeeze-and-Excitation (SE) attention mechanism is added to the Neck module, and Grad-CAM is used to visualize the feature extraction performance. Finally, an enhanced loss function, MSD-ECIOU, is proposed to replace the original CIOU loss function. Training with this new loss function brings the predicted defect regions closer to the ground-truth boxes, further improving detection accuracy. Results Experimental comparisons on a power distribution cabinet circuit dataset show that the improved YOLOv8 model achieves a mean average precision ( mAP ) of 90.0%,which is 2.4% higher than that of the original YOLOv8.Conclusions The improved model achieves higher recognition accuracy while maintaining fast detection speed. In addition, the SURF-based registration and difference method enables precise matching of defect regions, allowing rapid and accurate circuit defect detection. This approach promotes automation in circuit defect inspection and significantly improves the inspection efficiency of power distribution cabinets.
Key words:power distribution cabinet;defect detection;YOLOv8;SURF model;target detection;image acquisition device