《電子技術(shù)應(yīng)用》
您所在的位置:首頁 > 其他 > 設(shè)計(jì)應(yīng)用 > 復(fù)雜環(huán)境下輕量化口罩佩戴檢測算法研究
復(fù)雜環(huán)境下輕量化口罩佩戴檢測算法研究
2023年電子技術(shù)應(yīng)用第8期
段高峰,單劍鋒,劉哲
(南京郵電大學(xué) 電子與光學(xué)工程學(xué)院、柔性電子(未來技術(shù))學(xué)院, 江蘇 南京 210023)
摘要: 針對目前YOLOv4算法巨大的運(yùn)算量難以滿足實(shí)時(shí)性要求高的口罩佩戴檢測系統(tǒng),提出了一種輕量化檢測算法(Light-YOLOv4)。將融合ECA注意力機(jī)制的GhostNet網(wǎng)絡(luò)替換YOLOv4的主干網(wǎng)絡(luò)減少參數(shù)量;借鑒空洞卷積和SPPF提出了ASPPFCSPC結(jié)構(gòu)有效增大感受野;針對目標(biāo)過于密集而產(chǎn)生重疊問題,增加了RepBox損失函數(shù),使不同目標(biāo)的預(yù)測框相互遠(yuǎn)離從而減少漏檢。實(shí)驗(yàn)表明,Light-YOLOv4算法mAP為94.2%,F(xiàn)PS為46.3幀,模型大小為95 MB,相較于YOLOv4的mAP值僅降低了1.1%,檢測速率提高了51.8%,參數(shù)量減少了70.0%,模型大小減少了61.1%,對低性能檢測設(shè)備很友好。
中圖分類號:TP391 文獻(xiàn)標(biāo)志碼:A DOI: 10.16157/j.issn.0258-7998.223582
中文引用格式: 段高峰,單劍鋒,劉哲. 復(fù)雜環(huán)境下輕量化口罩佩戴檢測算法研究[J]. 電子技術(shù)應(yīng)用,2023,49(8):108-113.
英文引用格式: Duan Gaofeng,Shan Jianfeng,Liu Zhe. Research on lightweight detection algorithm of wearing mask in complex environment[J]. Application of Electronic Technique,2023,49(8):108-113.
Research on lightweight detection algorithm of wearing mask in complex environment
Duan Gaofeng,Shan Jianfeng,Liu Zhe
(College of Electronic and Optical Engineering & College of Flexible Electronics (Future Technology), Nanjing University of Posts and Telecommunications, Nanjing 210023,China)
Abstract: In view of the huge computational load of the current YOLOv4 algorithm, it is difficult to meet the real-time requirements of the mask wearing detection system, a lightweight detection algorithm (Light-YOLOv4) was proposed. The GhostNet network structure integrating ECA attention mechanism was replaced by the backbone network of YOLOv4 to reduce the number of parameters. Using dilated convolution and SPPF for reference, ASPPFCSPC structure is proposed to replace SPP effectively to increase the receptive field. In order to solve the overlapping problem caused by too dense targets, the RepBox loss function is added on the basis of the original, so that the prediction boxes of different targets are far away from each other to reduce the missed detection. The experiment shows that the mAP value of the Light-YOLOv4 algorithm is 94.2%, FPS is 46.3 frames, and the model size is 95 MB. Compared with the mAP value of YOLOv4 algorithm, the detection rate is only reduced by 1.1%, the detection rate is increased by 51.8%, the number of parameters is reduced by 70.0%, and the model size is reduced by 61.1%, friendly to low performance detection equipment.
Key words : YOLOv4;GhostNet;efficient channel attention;RepBox loss

0 引言

自2020年初新冠疫情爆發(fā)以來,人們的健康、工作、生活、出行等受到很大程度影響。佩戴口罩是避免新冠病毒傳播的有效措施,有助于疫情防控,因此在公共場合佩戴口罩至關(guān)重要[1]。車站、學(xué)校、醫(yī)院、商場等人員密集的地方人員流量大,僅僅靠人工檢查督促佩戴口罩會加大人工成本,并且會增加新冠病毒傳播的幾率。研究能夠?qū)崟r(shí)檢測是否佩戴口罩的系統(tǒng)來防范疫情的傳播,降低感染新冠病毒的風(fēng)險(xiǎn)具有重大的現(xiàn)實(shí)意義。

檢測口罩佩戴的任務(wù)使用的方法是目標(biāo)檢測,根據(jù)檢測流程可以進(jìn)一步分為兩類:Two-stage和One-stage。Two-stage算法是將檢測步驟分為兩部分:先生成候選框,再根據(jù)候選框進(jìn)行特征提取和分類,比較典型的算法有RCNN、Fast-RCNN等。YOLO[2-5]系列和SSD[6]算法是經(jīng)典的One-stage算法,對圖片直接進(jìn)行特征提取、回歸和預(yù)測。YOLOv4[5]經(jīng)過四代的發(fā)展克服了很多缺陷,檢測速度也有很大的提高,應(yīng)用范圍也十分廣泛,例如醫(yī)學(xué)病變檢測[7]、船舶檢測[8]和缺陷檢測[9]等方面。檢測口罩佩戴系統(tǒng)大多數(shù)是性能比較低的嵌入式設(shè)備,復(fù)雜的網(wǎng)絡(luò)結(jié)構(gòu)很難滿足實(shí)時(shí)性要求,使用輕量級的GhostNet[10]網(wǎng)絡(luò)結(jié)構(gòu)替換YOLOv4的主干網(wǎng)絡(luò),大量減少參數(shù)量和運(yùn)算量,對低性能的圖形處理器比較友好,但是準(zhǔn)確性也下降很多。本文提出的輕量化結(jié)構(gòu)(Light-YOLOv4),在GhostNet中的BottleNeck結(jié)構(gòu)中融入了ECA(Efficient Channel Attention)注意力機(jī)制[11]來改進(jìn)GhostNet結(jié)構(gòu)、在SPPCSPC[12]結(jié)構(gòu)的基礎(chǔ)上借鑒了SPPF(Spatial Pyramid Pooling Faster)和空洞卷積提出了ASPPFCSPC替換SPP(Spatial Pyramid Pooling)結(jié)構(gòu)進(jìn)一步優(yōu)化網(wǎng)絡(luò)。

口罩佩戴檢測算法方面的研究已經(jīng)很多[13-15],但在公共場所等復(fù)雜環(huán)境下,人員密集導(dǎo)致檢測的目標(biāo)發(fā)生重疊對準(zhǔn)確率有一定影響的問題很少有研究。為了解決目標(biāo)遮擋而加大識別難度的問題,參考行人密集檢測的文獻(xiàn),對損失函數(shù)進(jìn)行優(yōu)化改進(jìn),在原有損失函數(shù)上增加了RepBox損失函數(shù)改善目標(biāo)重疊的問題。



本文詳細(xì)內(nèi)容請下載:http://theprogrammingfactory.com/resource/share/2000005483




作者信息:

段高峰,單劍鋒,劉哲

(南京郵電大學(xué) 電子與光學(xué)工程學(xué)院、柔性電子(未來技術(shù))學(xué)院, 江蘇 南京 210023)

微信圖片_20210517164139.jpg

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