节点文献
基于深度学习的文档版面分析语义分割算法研究
Research on Semantic Segmentation Algorithm for Document Layout Analysis Based on Deep Learning
【作者】 吴超;
【作者基本信息】 西安电子科技大学 , 电子信息硕士(专业学位), 2024, 硕士
【摘要】 随着计算机技术的不断发展,目前的电子存储设备相较于纸质存储有着体积小、容量高、不易损坏、便于传输等一系列优点。然而,如何高效、自动化地来处理这些海量的电子文档是急需解决的一个问题,这一需求也进一步推动了文档分析与识别技术的发展。文档版面分析作为文档分析与识别技术的重要环节,目的是将文档版面根据文档组件划分为不同区域来提取文档版面信息。目前一般采用深度学习方法来进行文档版面分析,深度学习方法又能细分为基于目标检测和基于语义分割两种路线。目标检测是通过对文档图像生成预测框的方式来进行文档版面分析,而语义分割是在文档图像的像素级别上进行分类,能够处理版面布局更复杂的文档图像。因此本文选择语义分割的方法来进行文档版面分析。文档版面结构多样、组件间相似度高并且尺寸相差较大。基于上述文档版面的特点,本文主要工作如下:(1)为了选取适合版面分析的语义分割网络,对比了四种经典语义分割模型,选择了性能最好的Deep Lab V3+作为基线网络。在Deep Lab V3+的基础上针对文档版面的特点进行改进,提出了一种基于卷积神经网络结构的语义分割模型Conv Ne Xt V2-Deep Lab V3++。首先将主干网络替换为Conv Ne Xt V2来增强主干网络的特征提取能力;其次提出了CDSP-ASPP模块来改进Deep Lab V3+中的ASPP模块,CDSP-ASPP模块采用了级联瓶颈架构重组ASPP模块,并引入了深度可分离膨胀卷积来降低模型计算量,针对文档中小尺度目标分割困难的问题,改进了深度可分离膨胀卷积的膨胀率组合,并将全局平均池化替换为条带池化来更好的捕捉特征图的细节信息;接着在解码器部分将主干网络的前三层浅层特征进行融合进一步加强对小尺度以及细节信息的提取能力;最后引入了多维协作注意力机制MCA来增强模型的特征表达能力。通过相关实验进行测试,验证了Conv Ne Xt V2-Deep Lab V3++模型的有效性。(2)虽然Conv Ne Xt V2-Deep Lab V3++模型对文档小尺度目标以及相似目标分割的效果已经比较理想,但是还是会出现错分、漏分的情况。考虑到可能因为卷积神经网络架构难以捕捉距离较远像素的语义关系,进而对全局上下文信息获取不足,导致对小目标和相似目标分割不准确的问题。本文提出了一个基于Transformer架构的语义分割模型Doc Seg Former,来加强网络的全局信息感知能力。Doc Seg Former以Seg Former语义分割模型作为基础来进行设计,首先将特征金字塔网络融入到Seg Former编码器中,来增强模型的多尺度特征提取能力;接着将Seg Former的多头Efficient Self-Attention替换为多头外部注意力,来降低模型的计算量;最后引入了在Conv Ne Xt V2-Deep Lab V3++中表现很好的多维协作注意力机制MCA来加强网络性能。通过相关实验,验证了Doc Seg Former在文档小尺度目标和相似目标上有着不错的分割性能,以及本文提出的两种模型良好的泛化能力。(3)基于PyQt5框架开发了一个文档图像自动版面分析可视化系统,系统中搭载了本文提出的Conv Ne Xt V2-Deep Lab V3++模型和Doc Seg Former模型来对输入的文档图像进行可视化的版面分析。该系统由文件读取模块、界面展示模块、版面分析算法模块、预测时间模块、提示弹窗模块,六个模块构成。并通过相关系统测试,验证了该系统的完整性和鲁棒性。
【Abstract】 With the continuous advancement of computer technology,contemporary electronic storage devices exhibit numerous advantages over paper-based storage,including smaller size,higher capacity,resistance to damage,and ease of transfer.However,efficiently and automatically processing these vast amounts of electronic documents remains a pressing issue,driving the development of document analysis and recognition technologies.Document layout analysis,a critical component of document analysis and recognition,aims to partition a document layout into different regions based on its components to extract layout information.Currently,deep learning methods are predominantly employed for document layout analysis,which can be categorized into object detection-based and semantic segmentation-based approaches.Object detection approaches analyze document layouts by generating bounding boxes around components in document images,whereas semantic segmentation classifies the document image at the pixel level,thereby enabling the handling of more complex document layouts.Therefore,this thesis adopts the semantic segmentation approach for document layout analysis.Document layouts exhibit diverse structures,high similarity between components,and significant variations in sizes.Based on these characteristics of document layouts,the main contributions of this thesis are outlined as follows:(1)In order to select a semantic segmentation network suitable for layout analysis,four classic semantic segmentation models are compared,and Deep Lab V3+is chosen as the baseline network due to its superior performance.Building upon Deep Lab V3+,this thesis introduces a semantic segmentation model Conv Ne Xt V2-Deep Lab V3++,which is tailored to the characteristics of document layouts,based on convolutional neural network structures.Firstly,the backbone network is replaced with Conv Ne Xt V2 to enhance feature extraction capabilities.Secondly,a CDSP-ASPP module is introduced to improve the ASPP module in Deep Lab V3+.The CDSP-ASPP module utilizes a cascaded bottleneck architecture to reorganize the ASPP module and incorporates depthwise separable dilated convolutions to reduce computational complexity.To address the challenge of segmenting small-scale targets in documents,the dilation rate combinations of depthwise separable dilated convolutions are improved.Additionally,global average pooling is replaced with stripe pooling to better capture detailed information in feature maps.Subsequently,in the decoder section,the fusion of the first three shallow features from the backbone network is introduced to further enhance the extraction capabilities for small-scale and detailed information.Finally,a Multidimensional Collaborative Attention(MCA)mechanism is introduced to enhance the feature representation capabilities of the model.Experimental tests are conducted to validate the effectiveness of the Conv Ne Xt V2-Deep Lab V3++model.(2)Although the Conv Ne Xt V2-Deep Lab V3++model has shown promising results in segmenting small-scale and similar objects in documents,there are still cases of misclassification and omission.Considering the possibility that convolutional neural network architectures may struggle to capture semantic relationships between pixels at distant distances,resulting in insufficient global contextual information for accurate segmentation of small and similar targets.This thesis proposes a semantic segmentation model based on the Transformer structure,which calls Doc Seg Former to enhance the network’s global information perception capabilities.Built upon the Seg Former semantic segmentation model,Doc Seg Former incorporates a feature pyramid network into the Seg Former encoder to enhance the model’s multi-scale feature extraction capabilities;Then,replaces Seg Former’s multi-head Efficient Self-Attention with multi-head external attention to reduce computational complexity;Finally,the introduction of the Multidimensional Collaborative Attention mechanism(MCA),which has shown strong performance in Conv Ne Xt V2-Deep Lab V3++,is incorporated to enhance the network performance.Through relevant experiments,the segmentation performance of Doc Seg Former on small-scale and similar document objects is validated to be satisfactory,along with the good generalization ability of the two models proposed in this thesis.(3)A document image automatic layout analysis visualization system was developed based on the Py Qt5 framework.The system integrates the Conv Ne Xt V2-Deep Lab V3++and Doc Seg Former models proposed in this thesis for visual layout analysis of input document images.The system consists of six modules:file reading module,interface display module,layout analysis algorithm module,time prediction module,and prompt dialog module.Through relevant system tests,the completeness and robustness of the system are validated.
【Key words】 Document Layout Analysis; Deep Learning; Semantic Segmentation; Convolutional Neural Network; Transformer;
- 【网络出版投稿人】 西安电子科技大学 【网络出版年期】2025年 09期
- 【分类号】TP391.41;TP391.1;TP18