高级检索

改进YOLOv8的玻璃缺陷动态检测模型

An Improved YOLOv8-based Dynamic Detection Model for Glass Defects

  • 摘要: 针对玻璃缺陷检测中背景复杂、小目标特征弱以及检测精度与推理效率难以兼顾的问题,提出一种基于改进YOLOv8的动态检测模型。首先,从检测头、轻量化设计及损失函数三方面对模型进行改进:在检测头中引入融合可变形卷积DCNv3的Dynamic Head,以增强多尺度特征表达能力;采用ADown下采样模块实现轻量化设计,降低计算开销;引入MPDIoU损失函数,提升边界框定位精度。其次,融合公开数据与自采集数据集构建训练集,并采用随机裁剪、灰度变换及亮度扰动等数据增强方法,提高模型对复杂工况的适应能力。通过消融实验与多模型对比实验,从检测精度与推理效率等方面验证模型性能。结果表明:各改进模块协同有效,Dynamic Head-DCNv3显著增强尺度特征表达,MPDIoU改善定位精度,ADown在保持性能稳定的同时降低计算开销。最终模型的平均精度mAP50和mAP50-95分别达到91.7%和51.8%,推理速度为39.8 F/s,实现了检测精度与运行效率的良好平衡。进一步分析表明,该方法在微小缺陷检测任务中具有明显优势,能够适应复杂工业场景,为工业在线玻璃缺陷检测提供了一种兼顾精度与实时性的有效技术路径。

     

    Abstract: To address the challenges of complex backgrounds, weak features of small targets, and the difficulty in balancing detection accuracy with inference efficiency in glass defect detection, a dynamic detection model based on an improved YOLOv8 was proposed. Firstly, the model structure was improved from three aspects: the detection head, lightweight design, and loss function. A Dynamic Head integrated with deformable convolution DCNv3 was introduced into the detection head to enhance multi-scale feature representation capability. The ADown downsampling module was adopted to achieve a lightweight design and reduce computational cost. The MPDIoU loss function was introduced to improve bounding box localization accuracy. Secondly, a training set was constructed by combining public data and a self-collected dataset, and data augmentation methods such as random cropping, grayscale transformation, and brightness perturbation were employed to enhance the model's adaptability to complex working conditions. The model performance was validated through ablation experiments and multi-model comparative experiments in terms of detection accuracy and inference efficiency. The results show that the improved modules are collaboratively effective: the Dynamic Head-DCNv3 significantly enhances scale feature representation, MPDIoU improves localization accuracy, and ADown reduces computational overhead while maintaining stable performance. The final model's mean average precision mAP50 and mAP50-95 are achieved at 91.7% and 51.8%, respectively, with an inference speed of 39.8 F/s, thereby a good balance between detection accuracy and operational efficiency is realized. Further analysis indicates that significant advantages of this method are observed in small defect detection tasks, and complex industrial scenes can be adapted to, thus an effective technical path that balances accuracy and real-time performance is provided for industrial online glass defect detection.

     

/

返回文章
返回