作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (5): 326-339. doi: 10.19678/j.issn.1000-3428.0069259

• 开发研究与工程应用 • 上一篇    下一篇

基于改进YOLOv8n的手机屏幕瑕疵检测算法:PGS-YOLO

周思瑜1, 徐慧英1, 朱信忠1, 黄晓2, 盛轲1, 曹雨淇1, 陈晨1   

  1. 1. 浙江师范大学计算机科学与技术学院, 浙江 金华 321004;
    2. 浙江师范大学教育学院, 浙江 金华 321004
  • 收稿日期:2024-01-19 修回日期:2024-03-09 出版日期:2025-05-15 发布日期:2024-05-21
  • 通讯作者: 徐慧英,E-mail:xhy@zjnu.edu.cn E-mail:xhy@zjnu.edu.cn
  • 基金资助:
    国家自然科学基金(61976196);浙江省自然科学基金重点项目(LZ22F030003);国家级大学生创新创业训练计划项目创新训练重点项目(202310345042)。

Mobile Phone Screen Defect Detection Algorithm Based on Improved YOLOv8n: PGS-YOLO

ZHOU Siyu1, XU Huiying1, ZHU Xinzhong1, HUANG Xiao2, SHENG Ke1, CAO Yuqi1, CHEN Chen1   

  1. 1. College of Computer Science and Technology, Zhejiang Normal University, Jinhua 321004, Zhejiang, China;
    2. College of Education, Zhejiang Normal University, Jinhua 321004, Zhejiang, China
  • Received:2024-01-19 Revised:2024-03-09 Online:2025-05-15 Published:2024-05-21

摘要: 手机屏幕作为人机交互的主窗口,已成为影响用户体验和终端整体性能的重要因素。因此,市场对解决手机屏幕瑕疵的需求日益增长。为满足这一需求,针对在手机屏幕瑕疵检测过程中存在检测精度低、小目标瑕疵漏检率高与检测速度慢的情况,提出一种以YOLOv8n作为基准模型的PGS-YOLO算法。PGS-YOLO通过增加一个专门的微小目标检测头,并结合SeaAttention注意力模块,有效提升对小目标的探测能力;将骨干网络和特征融合网络分别融入PConv与GhostNetV2轻量化模块,在保证精度的同时降低模型的参数量,提高瑕疵检测的速度与效率。实验结果表明,在北京大学手机屏幕表面瑕疵数据集中,相较于YOLOv8n,PGS-YOLO算法的mAP@0.5提升了2.5百分点,mAP@0.5∶0.95提升了2.2百分点,在手机屏幕瑕疵检测过程中不仅能对大片的瑕疵做到精准检测,还能对小瑕疵保持一定的准确度。此外,检测性能优于YOLOv5n、YOLOv8s等大部分YOLO系列算法。同时,参数量仅为2.0×106,小于YOLOv8n,满足工业场景对手机屏幕瑕疵检测的需求。

关键词: YOLOv8n模型, 手机屏幕瑕疵检测, 小目标检测, 部分卷积, GhostNetV2轻量化模块, 挤压增强轴向注意力

Abstract: As the main window of human-computer interaction, the mobile phone screen has become an important factor affecting the user experience and the overall performance of the terminal. As a result, there is a growing demand to address defects in mobile phone screens. To meet this demand, in view of the low detection accuracy, high missed detection rate of small target defects, and slow detection speed in the process of defect detection on mobile phone screens, a PGS-YOLO algorithm is proposed, with YOLOv8n as the benchmark model. PGS-YOLO effectively improves the detection ability of small targets by adding a special small target detection head and combining it with the SeaAttention attention module. The backbone and feature fusion networks are integrated into PConv and GhostNetV2 lightweight modules, respectively, to ensure accuracy, reduce the number of model parameters, and improve the speed and efficiency of defect detection. The experimental results show that, in the dataset of mobile phone screen surface defects from Peking University, compared with the results of YOLOv8n, the mAP@0.5 and mAP@0.5∶0.95 of the PGS-YOLO algorithm are increased by 2.5 and 2.2 percentage points, respectively. The algorithm can accurately detect large defects in the process of mobile phone screen defect detection as well as maintain a certain degree of accuracy for small defects. In addition, the detection performance is better than that of most YOLO series algorithms, such as YOLOv5n and YOLOv8s. Simultaneously, the number of parameters is only 2.0×106, which is smaller than that of YOLOv8n, meeting the needs of industrial scenarios for mobile phone screen defect detection.

Key words: YOLOv8n model, mobile phone screen defect detection, small target detection, partial convolution, GhostNetV2 lightweight module, squeeze enhances axial attention

中图分类号: