《電子技術(shù)應(yīng)用》
您所在的位置:首頁(yè) > 模拟设计 > 设计应用 > 基于改进CenterNet的发票检测算法
基于改进CenterNet的发票检测算法
电子技术应用
万成凯1,李居朋2
1.北京世纪瑞尔技术股份有限公司;2.北京交通大学 电子信息工程学院
摘要: 为了提高发票检测准确性和效率,提出了一种基于CenterNet的发票检测算法。首先,算法模型采用类似CSPDarkNet作为主干网络,将Triplet Attention引入CSP结构中形成TA-CSP结构,主干网络末端引入ASPP以提高网络的感受野范围,使模型能够更好地理解图像的上下文信息;其次,在网络的Neck部分,采用CBAM来引导高低层特征融合,利用高层特征图中语义信息对低层特征图进行监督,以抑制低层特征图中的背景噪声;再次,在网络的Head部分,算法在CenterNet网络的基础上增加4个通道的特征图输出,在发票检测的同时实现发票朝向的预测;最后,在损失函数中增加朝向损失项,以解决发票朝向的优化。在测试数据集上的实验结果表明,本文算法mAP优于CenterNet和YOLOv5s算法达到84.3%,有效提高了发票检测准确率和鲁棒性。
中圖分類號(hào):TP391.41;U418.6 文獻(xiàn)標(biāo)志碼:A DOI: 10.16157/j.issn.0258-7998.245560
中文引用格式: 萬成凱,李居朋. 基于改進(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ù)的興起,越來越多的研究人員開始研究基于數(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è)過程分為兩個(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è)過程,它可以直接回歸出物體的類別和位置。該類方法過程簡(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ì)算過程中,會(huì)計(jì)算大量無用的候選框。雖然算法后期可以通過非極大值抑制等方法去除多余的候選框,但會(huì)帶來計(jì)算開銷的增加。以CenterNet[10]為代表的無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://ihrv.cn/resource/share/2000006565


作者信息:

萬成凱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)載。