Hi-SAM: Marrying Segment Anything Model for Hierarchical Text Segmentation
作者: Maoyuan Ye, Jing Zhang, Juhua Liu, Chenyu Liu, Baocai Yin, Cong Liu, Bo Du, Dacheng Tao
分类: cs.CV
发布日期: 2024-01-31 (更新: 2024-11-08)
备注: Accepted by IEEE TPAMI. GitHub repository: https://github.com/ymy-k/Hi-SAM
🔗 代码/项目: GITHUB
💡 一句话要点
提出Hi-SAM以解决层次文本分割问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 层次文本分割 图像分割 深度学习 布局分析 自动化处理
📋 核心要点
- 现有的文本分割方法在处理层次文本时存在精度不足和效率低下的问题,尤其是在复杂布局下的表现不佳。
- Hi-SAM通过将SAM与层次文本分割相结合,采用参数高效的微调方法,提升了文本分割的精度和效率。
- 实验结果表明,Hi-SAM在多个数据集上均取得了领先的性能,相较于之前的方法在文本行和段落级别上有显著提升,且训练效率提高了20倍。
📝 摘要(中文)
本文介绍了Hi-SAM,一个基于Segment Anything Model(SAM)的统一模型,专注于层次文本分割。Hi-SAM在像素级文本、单词、文本行和段落四个层次上表现出色,同时实现了布局分析。通过参数高效的微调方法,将SAM转化为高质量的像素级文本分割模型,并在HierText数据集上统一标签。Hi-SAM提供自动掩膜生成和可提示分割两种推理模式,实验结果显示其在Total-Text和TextSeg数据集上分别达到了84.86%和88.96%的fgIOU,显著提升了层次检测和布局分析的性能。
🔬 方法详解
问题定义:本文旨在解决层次文本分割中的精度和效率问题,现有方法在复杂布局下的表现不足,导致分割效果不理想。
核心思路:Hi-SAM通过利用SAM的强大能力,结合层次文本分割的需求,采用参数高效的微调策略,提升了模型的分割能力和适用性。
技术框架:Hi-SAM的整体架构包括一个高质量的像素级文本分割模型和一个定制的层次掩膜解码器,分为标签生成和模型训练两个主要阶段。
关键创新:Hi-SAM的创新在于将SAM转化为像素级文本分割模型,并实现了四个层次的文本分割和布局分析,显著提高了分割精度和训练效率。
关键设计:在模型设计中,采用了参数高效的微调方法,优化了损失函数和网络结构,以适应层次文本分割的需求,同时实现了自动掩膜生成和可提示分割的功能。
🖼️ 关键图片
📊 实验亮点
实验结果显示,Hi-SAM在Total-Text数据集上达到了84.86%的fgIOU,在TextSeg数据集上达到了88.96%的fgIOU,较之前的专用方法在文本行和段落级别上分别提升了4.73%和5.49%的PQ,训练效率提高了20倍。
🎯 应用场景
Hi-SAM在文档分析、信息提取和自动化排版等领域具有广泛的应用潜力。其高效的层次文本分割能力能够帮助提高文档处理的自动化程度,降低人工干预的需求,推动相关技术的发展和应用。
📄 摘要(原文)
The Segment Anything Model (SAM), a profound vision foundation model pretrained on a large-scale dataset, breaks the boundaries of general segmentation and sparks various downstream applications. This paper introduces Hi-SAM, a unified model leveraging SAM for hierarchical text segmentation. Hi-SAM excels in segmentation across four hierarchies, including pixel-level text, word, text-line, and paragraph, while realizing layout analysis as well. Specifically, we first turn SAM into a high-quality pixel-level text segmentation (TS) model through a parameter-efficient fine-tuning approach. We use this TS model to iteratively generate the pixel-level text labels in a semi-automatical manner, unifying labels across the four text hierarchies in the HierText dataset. Subsequently, with these complete labels, we launch the end-to-end trainable Hi-SAM based on the TS architecture with a customized hierarchical mask decoder. During inference, Hi-SAM offers both automatic mask generation (AMG) mode and promptable segmentation (PS) mode. In the AMG mode, Hi-SAM segments pixel-level text foreground masks initially, then samples foreground points for hierarchical text mask generation and achieves layout analysis in passing. As for the PS mode, Hi-SAM provides word, text-line, and paragraph masks with a single point click. Experimental results show the state-of-the-art performance of our TS model: 84.86% fgIOU on Total-Text and 88.96% fgIOU on TextSeg for pixel-level text segmentation. Moreover, compared to the previous specialist for joint hierarchical detection and layout analysis on HierText, Hi-SAM achieves significant improvements: 4.73% PQ and 5.39% F1 on the text-line level, 5.49% PQ and 7.39% F1 on the paragraph level layout analysis, requiring $20\times$ fewer training epochs. The code is available at https://github.com/ymy-k/Hi-SAM.