首页|期刊导航|计算机工程|基于改进YOLOv8的车辆漆面缺陷检测

基于改进YOLOv8的车辆漆面缺陷检测OA

Vehicle Paint Defect Detection Based on Improved YOLOv8

中文摘要英文摘要

针对车辆漆面缺陷检测精度低、检测算法参数量大、难易样本不均匀等问题,提出一种基于改进YOLOv8的车辆漆面检测算法.首先,为了提升划痕状缺陷检测能力并降低模型规模,将DAT(Deformable Attention Transformer)注意力机制引入主干网络来增强长距离特征依赖关系,同时使用幻影卷积(GhostConv)替换网络中的卷积(Conv)模块.然后,为了提升特征提取能力并进一步降低模型规模,结合FasterBlock模块与高效多尺度注意力(EMA)机制提出C2f-E(C2f Based on EMA)模块.接着,为了提高小目标检测性能,基于双向特征金字塔网络(BiFPN)进行设计,并增加小目标检测头与多尺度特征融合支路,提出BiFPN-D(BiFPN with Small Object Detection Head)颈部金字塔结构.最后,为了解决难易样本的平衡问题并提高针对小目标缺陷的检测性能,使用WIoUv3(Wise-Intersection over Union version 3)作为训练网络的损失函数.在自建的车辆漆面缺陷数据集上进行训练并开展对比实验.实验结果表明,相较于YOLOv8n,改进模型的均值平均精度(mAP@0.5)提高了5.5百分点、规模减小了1.4×106.

To address the issues of low accuracy in vehicle paint defect detection,excessive parameters in detection algorithms,and the uneven distribution of easy and hard samples,a vehicle paint detection method based on an improved YOLOv8 is proposed.To enhance scratch defect detection capabilities and reduce model size,a Deformable Attention Transformer(DAT)mechanism is introduced into the backbone network,and Ghost Convolution(GhostConv)replaces the standard Convolution(Conv)modules.Subsequently,to improve feature extraction capabilities and further reduce model size,a C2f Based on Efficient Multiscale Attention(EMA)(C2f-E)module is proposed by combining the FasterBlock module and the EMA attention mechanism.Moreover,to enhance the detection performance for small objects,a network based on the Bidirectional Feature Pyramid Network(BiFPN)is designed.Additionally,by adding a small-object detection head and a multiscale feature fusion branch,a neck pyramid structure named BiFPN with Small Object Detection Head(BiFPN-D)is proposed.Finally,to address the balance issue between difficult and easy samples and improve the detection performance for small object defects,Wise-Intersection over Union version 3(WIoUv3)is employed as the loss function for training the network.The improved network is trained on a self-built dataset of vehicle paint defect images and subjected to comparative experiments.The results show that,the improved model achieves an increase of 5.5 percentage points in terms of mean Average Precision(mAP@0.5)and a reduction of 1.4× 106 in terms of parameter count,compared to YOLOv8n.

郝友胜;文贞慧;冯小溪;邓泽华;黄清宝

广西大学电气工程学院,广西南宁 530000广西大学电气工程学院,广西南宁 530000广西大学电气工程学院,广西南宁 530000广西大学电气工程学院,广西南宁 530000广西大学电气工程学院,广西南宁 530000

信息技术与安全科学

YOLOv算法车辆漆面缺陷目标检测双向特征金字塔网络损失函数

YOLOv8 algorithmvehicle paint defectobject detectionBidirectional Feature Pyramid Network(BiFPN)loss function

《计算机工程》 2026 (4)

252-263,12

国家自然科学基金(62276072)广西研究生教育创新计划项目(JGY2023016)广西大学研究生教育教学改革计划.

10.19678/j.issn.1000-3428.0070032

评论