刘小磊, 刘丰慧. 基于改进YOLOv5s的曲面光学镜片缺陷检测[J]. 应用光学, 2024, 45(4): 781-789. DOI: 10.5768/JAO202445.0403003
引用本文: 刘小磊, 刘丰慧. 基于改进YOLOv5s的曲面光学镜片缺陷检测[J]. 应用光学, 2024, 45(4): 781-789. DOI: 10.5768/JAO202445.0403003
LIU Xiaolei, LIU Fenghui. Defect detection of curved optical lenses based on improved YOLOv5s[J]. Journal of Applied Optics, 2024, 45(4): 781-789. DOI: 10.5768/JAO202445.0403003
Citation: LIU Xiaolei, LIU Fenghui. Defect detection of curved optical lenses based on improved YOLOv5s[J]. Journal of Applied Optics, 2024, 45(4): 781-789. DOI: 10.5768/JAO202445.0403003

基于改进YOLOv5s的曲面光学镜片缺陷检测

Defect detection of curved optical lenses based on improved YOLOv5s

  • 摘要: 针对曲面光学镜片表面缺陷检测精度不高的问题,提出一种基于改进YOLOv5s的曲面光学镜片缺陷检测方法。首先,设计镜片表面缺陷采集装置,并对采集到的缺陷图片进行数据增强以制作镜片缺陷数据集。其次,为了增强YOLOv5s网络对通道信息的利用,在特征提取网络引入SE注意力机制,使网络能够更加准确地提取信息;并在主干网络最后一个C3模块融入Transformer,帮助网络更好地提取全局信息,提高检测效率。最后,考虑到小目标特征信息容易丢失的问题,将主干网络160×160像素的特征层加入颈部的特征融合中,增加网络对浅层信息的利用。改进的YOLOv5s目标检测算法的均值平均精度(mean average precision, mAP)和召回率(recall, R)分别为93.9%和91.6%,比原网络算法分别提高了3.2%和3.4%,表明改进YOLOv5s算法可以有效检测出镜片表面缺陷。

     

    Abstract: A surface defect detection method for curved optical lenses based on improved YOLOv5s was proposed to address the issue of low accuracy in surface defect detection. Firstly, a device for collecting surface defects on lenses was designed, and the collected defect images were enhanced to create a dataset of lens defects. Secondly, in order to enhance the utilization of channel information in YOLOv5s network, the SE attention mechanism was introduced into the feature extraction network to enable the network to extract information more accurately, and Transformer was integrated into the last C3 module of the backbone network to help the network better extract global information and improve detection efficiency. Finally, considering the issue of easy loss of feature information for small targets, the feature layer of the backbone network 160×160 was added to the feature fusion of the neck to increase the utilization of shallow information by the network. The mean average precision (mAP) and recall (R) of the improved YOLOv5s object detection algorithm are 93.9% and 91.6%, respectively, which are 3.2% and 3.4% higher than that of the original network algorithm, indicating that the improved YOLOv5s algorithm can effectively detect surface defects on lenses.

     

/

返回文章
返回