《電子技術應用》
您所在的位置:首頁 > 其他 > 设计应用 > 基于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 引言

近幾年深度學習技術在機器視覺方面有很大突破,而利用其進行工業(yè)產品表面缺陷檢測也逐漸成為工業(yè)界研究的熱點。在真實復雜的工業(yè)環(huán)境下,表面缺陷檢測面臨諸多挑戰(zhàn),例如在藥品檢測過程中,存在缺陷成像與背景差異小、對比度低、缺陷尺度變化大且類型多樣等情形。近些年來, 隨著以卷積神經網絡(Convolution Neural Network,CNN)為代表的深度學習模型在諸多計算機視覺(Computer Vision,CV)領域成功應用,國內外學者也展開了基于深度學習技術的表面缺陷檢測的研究。同時,一些公司也開發(fā)出多種基于深度學習的商用工業(yè)表面缺陷檢測軟件。全球傳統(tǒng)工業(yè)視覺及其部件的市場規(guī)模將于2025年達到192億美元且年平均增長率為14%[1-2]。因此, 基于深度學習的表面缺陷檢測方法不僅具有重要的學術研究價值,同時有非常廣闊的市場應用前景。

然而,深度學習技術在實際工業(yè)場景中的應用存在一些難題,針對藥品檢測來說一是生產過程中缺陷樣本過少,不利于神經網絡的特征提??;二是產品的缺陷尺度不同,有上千個像素的缺粒缺陷,也有幾十個像素的黑點異物缺陷等。實際生產過程中用于訓練的缺陷樣本數量少,細微缺陷在沒有突出缺陷區(qū)域的情況下容易被其他區(qū)域的信息所掩蓋。而且,隨著神經網絡的深入以及卷積和池化等操作,一些特征層信息被丟失。YOLOV5是目前最優(yōu)的目標檢測模型之一,其在精確度、檢測速度和所需存儲空間上都表現優(yōu)異,十分適用于工業(yè)產品的缺陷檢測。





本文詳細內容請下載:http://ihrv.cn/resource/share/2000003895.





作者信息:

錢  雪1,李  軍1,唐  球2,錢曉雨1

(1.北京信息科技大學 信息管理學院,北京100192;2.華北計算機系統(tǒng)工程研究所,北京100083)


此內容為AET網站原創(chuàng),未經授權禁止轉載。