《电子技术应用》
您所在的位置:首页 > 其他 > 设计应用 > 基于YOLOV5的药品表面缺陷实时检测方法
基于YOLOV5的药品表面缺陷实时检测方法
信息技术与网络安全 12期
钱 雪1,李 军1,唐 球2,钱晓雨1
(1.北京信息科技大学 信息管理学院,北京100192;2.华北计算机系统工程研究所,北京100083)
摘要: 药品在实际生产过程中总会伴随着异物、缺粒、药体破损等表面缺陷,这些缺陷轻则影响产品使用效果,重则会在使用过程中产生巨大事故造成生命财产损失。针对深度学习模型在实际工业产品表面缺陷检测中缺陷样本少以及细小缺陷检测精度低的应用问题,将目前主流的目标检测算法之一——YOLOV5应用于药品检测场景,提出了一种精度高、所需标注样本少、检测速度快的one-stage实时缺陷检测系统——RDD_YOLOV5(Real-time Defects Detection_YOLOV5)。利用原始图像初级特征进行数据增强,结合注意力机制与多尺度特征融合,增加骨干网络提取跨通道语义信息能力,充分融合高层语义信息与底层细粒度信息以提升模型在小缺陷检测方面的识别效果,在有限的样本条件下达到较高的准确率。该方法检测效果达到了96.6%mAP,32 FPS。
中图分类号: TP393
文献标识码: A
DOI: 10.19358/j.issn.2096-5133.2021.12.008
引用格式: 钱雪,李军,唐球,等. 基于YOLOV5的药品表面缺陷实时检测方法[J].信息技术与网络安全,2021,40(12):45-50.
Real-time detection method of pill surface defects based on YOLOV5
Qian Xue1,Li Jun1,Tang Qiu2,Qian Xiaoyu1
(1.School of Information Management,Beijing Information Science and Technology University,Beijing 100192,China; 2.National Computer System Engineering Research Institute of China,Beijing 100083,China)
Abstract: In the actual production process of drugs, there are always surface defects such as foreign matter, particle shortage and drug body damage. These defects may affect the use effect of products, or cause huge accidents in the use process, resulting in loss of life and property. Aiming at the application problems of deep learning model in the surface defect detection of practical industrial products with few defect samples and low detection accuracy of small defects, YOLOV5, one of the current mainstream target detection algorithms, is applied to the drug detection scene, and a kind of one stage real-time defect detection system(RDD_YOLOV5) with high accuracy, less required standard samples and fast detection speed is proposed. The primary features of the original image are used for data enhancement, combined with attention mechanism and multi-scale feature fusion, the ability of the backbone network to extract cross-channel semantic information is increased, and the high-level semantic information and low-level fine-grained information are fully integrated to improve the recognition effect of the detection efficiency of this model in small defect detection. Under the condition of limited samples, the method achieves high accuracy, and the detection efficiency of this method reaches 96.6% mAP, 32 FPS.
Key words : defect detection;deep learning;object detection;YOLOV5

0 引言

近几年深度学习技术在机器视觉方面有很大突破,而利用其进行工业产品表面缺陷检测也逐渐成为工业界研究的热点。在真实复杂的工业环境下,表面缺陷检测面临诸多挑战,例如在药品检测过程中,存在缺陷成像与背景差异小、对比度低、缺陷尺度变化大且类型多样等情形。近些年来, 随着以卷积神经网络(Convolution Neural Network,CNN)为代表的深度学习模型在诸多计算机视觉(Computer Vision,CV)领域成功应用,国内外学者也展开了基于深度学习技术的表面缺陷检测的研究。同时,一些公司也开发出多种基于深度学习的商用工业表面缺陷检测软件。全球传统工业视觉及其部件的市场规模将于2025年达到192亿美元且年平均增长率为14%[1-2]。因此, 基于深度学习的表面缺陷检测方法不仅具有重要的学术研究价值,同时有非常广阔的市场应用前景。

然而,深度学习技术在实际工业场景中的应用存在一些难题,针对药品检测来说一是生产过程中缺陷样本过少,不利于神经网络的特征提取;二是产品的缺陷尺度不同,有上千个像素的缺粒缺陷,也有几十个像素的黑点异物缺陷等。实际生产过程中用于训练的缺陷样本数量少,细微缺陷在没有突出缺陷区域的情况下容易被其他区域的信息所掩盖。而且,随着神经网络的深入以及卷积和池化等操作,一些特征层信息被丢失。YOLOV5是目前最优的目标检测模型之一,其在精确度、检测速度和所需存储空间上都表现优异,十分适用于工业产品的缺陷检测。





本文详细内容请下载:http://www.chinaaet.com/resource/share/2000003895.





作者信息:

钱  雪1,李  军1,唐  球2,钱晓雨1

(1.北京信息科技大学 信息管理学院,北京100192;2.华北计算机系统工程研究所,北京100083)


此内容为AET网站原创,未经授权禁止转载。