统一处理文档图像分割,提升多任务适应性与效率
DocSAM: Unified Document Image Segmentation via Query Decomposition and Heterogeneous Mixed Learning
- 用语义查询匹配实例查询,融合多种分割任务
- 跨数据集联合训练,准确率优于现有方法
- 适合需要多类型文档分析的场景
文档图像分割对文档分析与识别至关重要,但因文档格式多样、任务复杂而具挑战性。现有方法常分头处理,泛化能力差且资源浪费。本文提出DocSAM,一种基于Transformer的统一框架,可同时处理文档布局分析、多粒度文本分割和表格结构识别等任务,将这些任务建模为实例与语义分割的组合。DocSAM利用Sentence-BERT将各数据集的类别名映射为语义查询,与实例查询在相同维度下通过注意力机制交互,并与图像特征交叉注意力,生成分割掩码。实例类别通过计算实例与语义查询的点积并经Softmax归一化得到。该设计使模型可在异构数据集上联合训练,显著提升鲁棒性与泛化能力,同时降低计算与存储开销。全面评估表明,DocSAM在准确性、效率与适应性方面均优于现有方法,展现出在各类文档理解场景中的应用潜力。代码已开源:https://github.com/xhli-git/DocSAM。
原文摘要 · Abstract (English)
Document image segmentation is crucial for document analysis and recognition but remains challenging due to the diversity of document formats and segmentation tasks. Existing methods often address these tasks separately, resulting in limited generalization and resource wastage. This paper introduces DocSAM, a transformer-based unified framework designed for various document image segmentation tasks, such as document layout analysis, multi-granularity text segmentation, and table structure recognition, by modelling these tasks as a combination of instance and semantic segmentation. Specifically, DocSAM employs Sentence-BERT to map category names from each dataset into semantic queries that match the dimensionality of instance queries. These two sets of queries interact through an attention mechanism and are cross-attended with image features to predict instance and semantic segmentation masks. Instance categories are predicted by computing the dot product between instance and semantic queries, followed by softmax normalization of scores. Consequently, DocSAM can be jointly trained on heterogeneous datasets, enhancing robustness and generalization while reducing computational and storage resources. Comprehensive evaluations show that DocSAM surpasses existing methods in accuracy, efficiency, and adaptability, highlighting its potential for advancing document image understanding and segmentation across various applications. Codes are available at https://github.com/xhli-git/DocSAM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。