MorphText: Deep Morphology Regularized Arbitrary-shape Scene Text Detection

Chengpei Xu, Wenjing Jia, Ruomei Wang, Xiaonan Luo, Xiangjian HearXiv 2024

TL;DR

MorphText is a novel bottom-up scene text detection framework that embeds trainable mathematical morphology operations directly into a deep learning pipeline. By introducing Deep Morphological Opening (DMOP) and Closing (DMCL) modules, it effectively filters out false-positive text noise and seamlessly connects broken or occluded text segments without relying on heavy graph neural networks or complex post-processing.

What Problem Does This Paper Address?

Detecting text in natural scenes is notoriously difficult when the text is curved, exceptionally long, or oriented diagonally. Current deep learning approaches generally fall into two camps: top-down (treating text lines as global object instances) and bottom-up (detecting local text segments and linking them together).

While bottom-up methods are inherently better at handling arbitrary shapes and long text lines, they suffer from two major bottlenecks:

  1. Error Accumulation: They frequently mistake text-like background textures (e.g., fences, bricks) for actual text segments, leading to high false-positive rates.
  2. Fragmented Connections: When text is partially blocked or occluded, bottom-up methods struggle to build reliable links between separated text segments.

Existing solutions often deploy Graph Convolutional Networks (GCNs) to reason about these connections. However, GCNs are computationally expensive, do not inherently filter out false positives, and can propagate errors if the initial segment detection is noisy.

Methods

MorphText solves these issues by reviving classical mathematical morphology—specifically opening and closing operations—and making them fully learnable components of a neural network.

The overall structure of the MorphText network, featuring the DMOP and DMCL modules.

The architecture consists of three core stages:

  • Text Segment Proposal Module: A standard ResNet50 + Feature Pyramid Network (FPN) backbone generates initial text probability, center, height, and angle maps.
  • Deep Morphological Opening (DMOP): Traditional opening operations smooth boundaries and remove small isolated noise. DMOP implements this using a sequence of trainable, non-flat erosion and dilation blocks. Crucially, the authors introduce a residual connection around DMOP. Because morphological min/max operations are only piece-wise differentiable, the residual connection ensures stable gradient flow during backpropagation and prevents the model from over-correcting and erasing true text.
  • Deep Morphological Closing (DMCL): Traditional closing operations bridge gaps and fill holes. The DMCL module applies learnable dilations followed by erosions, allowing valid text segments to naturally "stretch" along their primary orientation to merge into a single, cohesive text instance.

By replacing rule-based grouping and GCNs with these geometric shape operators, the entire pipeline can be trained end-to-end.

Datasets

The authors evaluated MorphText on four standard, highly competitive scene text benchmarks:

  • SynthText: 800,000 synthetic images used exclusively for initial pre-training.
  • CTW1500: 1,500 images containing long, curved English and Chinese text lines.
  • Total-Text: 1,555 images featuring highly multi-oriented and curved text.
  • MSRA-TD500: 500 images focused on multi-oriented, multi-lingual long text lines.
  • ICDAR2017 (MLT): A large-scale multi-lingual, multi-oriented dataset used for both pre-training and evaluation.

Key Insights and Ideas

  • Trainable Structuring Elements (SEs): Classical morphology fell out of favor because manual tuning of the structuring element's shape and size was a tedious process of trial and error. MorphText turns SE values into network parameters that optimize automatically via loss functions.
  • Morphology as a Regularizer, Not a Feature Extractor: Prior works attempted to use deep morphology networks to replace CNNs entirely, yielding mediocre results. MorphText instead uses morphology in a targeted, supplementary role to enforce structural regularity on the output maps of a standard CNN.
  • Stretching vs. Graph Reasoning: Instead of treating text linking as an abstract graph-prediction problem, MorphText treats it as a continuous geometric stretching problem. This allows the model to gracefully handle heavy occlusions where visual features are completely missing.

Key Results

MorphText achieved state-of-the-art (SOTA) performance across multiple benchmarks, outperforming both top-down and bottom-up competitors:

  • CTW1500: Achieved an 86.5% F-measure (90.0% Precision / 83.3% Recall), outperforming the prominent GCN-based bottom-up method DRRG (84.4%) and top-down methods like TextFuseNet (85.4%).
  • Total-Text: Reached an 87.8% F-measure, marking a 2.0% absolute improvement over FCENet.
  • Robustness to Occlusion: Qualitative results show that when a text line is split in half by an foreground obstacle (such as a pedestrian), MorphText successfully bridges the gap to form a single text instance, whereas GCN and top-down methods break down.
Qualitative comparison showing MorphText successfully connecting heavily occluded text segments where other methods fail.

Limitations and Future Work

Despite its robustness, the authors note a few scenarios where MorphText still struggles:

  • Extreme Scales & Low Contrast: Very tiny text or text that blends almost seamlessly into low-contrast backgrounds can escape detection.
  • Highly Overlapping Text: When two distinct text instances overlap significantly in the image space, the morphological closing operation can inadvertently fuse them into a single block. This is primarily because overlapping text is rare in standard training sets, meaning the network fails to learn appropriate boundary features for these edge cases.
  • Inference Speed: While computationally cleaner than GCNs, the model runs between 1.1 to 2.0 FPS. The primary bottleneck is the Non-Maximum Suppression (NMS) step, which consumes over 60% of the total processing time. Optimizing or replacing this step is a clear avenue for future work.

Summary updated

BibTeX
@misc{xu2024morphtext,
  author = {Chengpei Xu and Wenjing Jia and Ruomei Wang and Xiaonan Luo and Xiangjian He},
  title = {{MorphText: Deep Morphology Regularized Arbitrary-shape Scene Text Detection}},
  year = {2024},
  eprint = {2404.17151},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.17151},
}
Figure