《電子技術(shù)應(yīng)用》
您所在的位置:首頁(yè) > 其他 > 设计应用 > 基于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。
中圖分類號(hào): TP393
文獻(xiàn)標(biāo)識(shí)碼: A
DOI: 10.19358/j.issn.2096-5133.2021.12.008
引用格式: 錢雪,李軍,唐球,等. 基于YOLOV5的藥品表面缺陷實(shí)時(shí)檢測(cè)方法[J].信息技術(shù)與網(wǎng)絡(luò)安全,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 引言

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

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





本文詳細(xì)內(nèi)容請(qǐng)下載:http://www.ihrv.cn/resource/share/2000003895.





作者信息:

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

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


此內(nèi)容為AET網(wǎng)站原創(chuàng),未經(jīng)授權(quán)禁止轉(zhuǎn)載。

相關(guān)內(nèi)容