《電子技術(shù)應(yīng)用》
您所在的位置:首頁(yè) > 模擬設(shè)計(jì) > 設(shè)計(jì)應(yīng)用 > 基于改進(jìn)CenterNet的發(fā)票檢測(cè)算法
基于改進(jìn)CenterNet的發(fā)票檢測(cè)算法
電子技術(shù)應(yīng)用
萬(wàn)成凱1,李居朋2
1.北京世紀(jì)瑞爾技術(shù)股份有限公司;2.北京交通大學(xué) 電子信息工程學(xué)院
摘要: 為了提高發(fā)票檢測(cè)準(zhǔn)確性和效率,提出了一種基于CenterNet的發(fā)票檢測(cè)算法。首先,算法模型采用類似CSPDarkNet作為主干網(wǎng)絡(luò),將Triplet Attention引入CSP結(jié)構(gòu)中形成TA-CSP結(jié)構(gòu),主干網(wǎng)絡(luò)末端引入ASPP以提高網(wǎng)絡(luò)的感受野范圍,使模型能夠更好地理解圖像的上下文信息;其次,在網(wǎng)絡(luò)的Neck部分,采用CBAM來(lái)引導(dǎo)高低層特征融合,利用高層特征圖中語(yǔ)義信息對(duì)低層特征圖進(jìn)行監(jiān)督,以抑制低層特征圖中的背景噪聲;再次,在網(wǎng)絡(luò)的Head部分,算法在CenterNet網(wǎng)絡(luò)的基礎(chǔ)上增加4個(gè)通道的特征圖輸出,在發(fā)票檢測(cè)的同時(shí)實(shí)現(xiàn)發(fā)票朝向的預(yù)測(cè);最后,在損失函數(shù)中增加朝向損失項(xiàng),以解決發(fā)票朝向的優(yōu)化。在測(cè)試數(shù)據(jù)集上的實(shí)驗(yàn)結(jié)果表明,本文算法mAP優(yōu)于CenterNet和YOLOv5s算法達(dá)到84.3%,有效提高了發(fā)票檢測(cè)準(zhǔn)確率和魯棒性。
中圖分類號(hào):TP391.41;U418.6 文獻(xiàn)標(biāo)志碼:A DOI: 10.16157/j.issn.0258-7998.245560
中文引用格式: 萬(wàn)成凱,李居朋. 基于改進(jìn)CenterNet的發(fā)票檢測(cè)算法[J]. 電子技術(shù)應(yīng)用,2025,51(6):71-78.
英文引用格式: Wan Chengkai,Li Jupeng. Detection algorithm for invoice based on improved CenterNet[J]. Application of Electronic Technique,2025,51(6):71-78.
Detection algorithm for invoice based on improved CenterNet
Wan Chengkai1,Li Jupeng2
1.Beijing Century Real Technology Co., Ltd.; 2.School of Electronic and Information Engineering, Beijing Jiaotong University
Abstract: In order to improve the accuracy and efficiency of invoice detection, a CenterNet based invoice detection algorithm is proposed. Firstly, the algorithm model adopts a backbone network similar to CSPDarkNet, introducing Triplet Attention into the CSP structure to form a TA-CSP structure, and introducing ASPP at the end of the backbone network to improve the receptive field range of the network, enabling the model to better understand the contextual information of the image; Secondly, in the Neck part of the network, CBAM is used to guide the fusion of high-level and low-level features, and the semantic information in high-level feature maps is used to supervise low-level feature maps to suppress background noise in low-level feature maps; Thirdly, in the Head section of the network, the algorithm adds four channels of feature map outputs based on the CenterNet network, achieving invoice orientation prediction while detecting invoices; Finally, an orientation loss term is added to the loss function to optimize the orientation of invoices. The experimental results on the test dataset show that the mAP of the proposed algorithm in this paper is superior to CenterNet and YOLOv5s algorithms reaching 84.3%, effectively improving the accuracy and robustness of invoice detection.
Key words : CenterNet;YOLO;object detection;CBAM;ASPP;Triplet Attention

引言

隨著社會(huì)的不斷發(fā)展,大量發(fā)票的錄入和歸檔,對(duì)于財(cái)務(wù)人員是相當(dāng)繁重的工作。在以往的工作中,財(cái)務(wù)人員往往采用手工錄入的方式,這種錄入方式不但效率低下,而且常常因?yàn)楣ぷ魅藛T的疲勞產(chǎn)生錯(cuò)誤而造成損失。隨著圖像處理與深度學(xué)習(xí)技術(shù)的興起,越來(lái)越多的研究人員開(kāi)始研究基于數(shù)字圖像技術(shù)的發(fā)票自動(dòng)識(shí)別算法[1-2]。

基于數(shù)字圖像技術(shù)的發(fā)票自動(dòng)識(shí)別通常包括發(fā)票檢測(cè)、發(fā)票信息區(qū)定位、字符定位、字符識(shí)別等步驟。其中首要的步驟就是發(fā)票檢測(cè)。發(fā)票檢測(cè)是檢測(cè)出一張圖像中是否存在發(fā)票,并對(duì)每張存在的發(fā)票進(jìn)行精確定位。由于在實(shí)際的財(cái)務(wù)歸檔工作中發(fā)票的朝向往往上下左右各不相同,因此發(fā)票檢測(cè)不但要檢測(cè)出發(fā)票的類型、位置,還要同時(shí)檢測(cè)出發(fā)票的朝向。

目前基于深度學(xué)習(xí)的目標(biāo)檢測(cè)方法可以分為one-stage和two-stage方法兩類。two-stage的方法如Faster R-CNN[3]。這類檢測(cè)方法整個(gè)檢測(cè)過(guò)程分為兩個(gè)階段。在第一個(gè)階段,算法需要找到一些可能的目標(biāo)存在區(qū)域;在第二個(gè)階段,算法在這可能的區(qū)域上進(jìn)行分類和位置回歸。這類方法檢測(cè)精度高,但運(yùn)行速度通常會(huì)比較慢,難以滿足實(shí)時(shí)檢測(cè)的需求。

one-stage的方法如YOLO系列[4-8]、SSD[9]等。這類檢測(cè)方法是一個(gè)端到端的檢測(cè)過(guò)程,它可以直接回歸出物體的類別和位置。該類方法過(guò)程簡(jiǎn)潔、檢測(cè)速度快,目前已被廣泛應(yīng)用于各種目標(biāo)檢測(cè)任務(wù)當(dāng)中,但其準(zhǔn)確性仍有待提高。

YOLO系列、SSD等檢測(cè)方法均屬于基于錨點(diǎn)(anchor)的方法,需要事先統(tǒng)計(jì)anchor尺寸和比例等先驗(yàn)知識(shí),而且在計(jì)算過(guò)程中,會(huì)計(jì)算大量無(wú)用的候選框。雖然算法后期可以通過(guò)非極大值抑制等方法去除多余的候選框,但會(huì)帶來(lái)計(jì)算開(kāi)銷的增加。以CenterNet[10]為代表的無(wú)anchor檢測(cè)方法克服了基于anchor方法的缺點(diǎn),可以直接對(duì)目標(biāo)中心點(diǎn)和尺寸進(jìn)行預(yù)測(cè)。

本文結(jié)合YOLOv5的主干網(wǎng)絡(luò)和CenterNet各自的優(yōu)點(diǎn),提出了一種改進(jìn)的CenterNet發(fā)票檢測(cè)算法。算法模型采用參考了CSPDarkNet的主干網(wǎng)絡(luò),引入了注意力機(jī)制,并且采用新的輸出結(jié)構(gòu)和損失函數(shù),可以端到端地檢測(cè)出發(fā)票的分類、位置和朝向。


本文詳細(xì)內(nèi)容請(qǐng)下載:

http://theprogrammingfactory.com/resource/share/2000006565


作者信息:

萬(wàn)成凱1,李居朋2

(1.北京世紀(jì)瑞爾技術(shù)股份有限公司 北京 100085;

2.北京交通大學(xué) 電子信息工程學(xué)院,北京 100044)


Magazine.Subscription.jpg

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