Adaptive Boundary Proposal Network for Arbitrary Shape Text Detection
- Publication
- ICCV 2021Conference
- First submitted to arXiv
- arXiv:2107.12664
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{textdetectiontextbpn2021,
title = {{Adaptive Boundary Proposal Network for Arbitrary Shape Text Detection}},
author = {Shi-Xue Zhang and Xiaobin Zhu and Chun Yang and Hongfa Wang and Xu-Cheng Yin},
year = {2021},
eprint = {2107.12664},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2107.12664}
}
This paper introduces several concepts to address the problem of text detection, primarily focusing on two key techniques: LSTM, which is used to capture sequential information about text boundaries, and GCN (Graph Convolutional Networks), used to refine boundary features. While these topics could be discussed in great depth, the assumption is that readers are already familiar with these concepts.
Let's dive directly into the details.
Problem Definition
We have reviewed several text detection methods, and most of them deal with overlapping text regions by first identifying the "text core" and then expanding outwards to find the text boundaries. These approaches are often slow, or as the paper describes: "complex and inefficient."
The authors propose adaptive boundary proposals followed by learned contour deformation. This reduces reliance on elaborate expansion or clustering, but proposal thresholding, confidence filtering, and boundary-point sampling still remain.
Problem Solution
Model Architecture
The architecture may seem complex at first glance, so let’s break it down into parts.
Backbone + Neck
The feature extraction uses a ResNet-50 backbone, and the feature fusion in the neck is done using a U-Net-like architecture through concatenation. The final output from the neck consists of feature maps with 32 channels, retaining the same size as the input image.
Boundary Proposal Generation
The boundary proposal generation consists of multiple dilated convolutions, including two 3x3 convolution layers (with different dilation rates) and one 1x1 convolution layer. These layers use shared features extracted from the backbone to generate three outputs: classification map, distance field map, and direction field map.
-
Classification Map: A binary map where each pixel represents the confidence of belonging to text (binary classification: text/non-text).
-
Direction Field Map: For each text pixel , find its nearest boundary pixel . The direction field gives the unit vector from to . The arrow in the paper's Eq. (1) points the other way, contrary to its prose and Fig. 5(a); the formula here follows the latter two:
where is the distance between pixel and the boundary pixel .
-
Distance Field Map: The distance field map normalizes the distance between each text pixel and its nearest boundary pixel . The formula is:
where is the maximum unnormalized distance within instance , rather than the maximum of the already normalized map:
The paper's Eq. (3) instead takes the maximum of the already normalized , which would define circularly; the unnormalized distance is used here to make the normalization meaningful.
Based on the distance field map , candidate boundary proposals are generated using a fixed threshold , but these proposals may include false positives. Therefore, the average confidence of each candidate proposal is computed from the classification map, and proposals with low confidence (below threshold ) are discarded.
These steps and formulas constitute the boundary proposal generation process, allowing effective text region detection while handling boundary issues between adjacent text instances.
Adaptive Boundary Deformation
The concept of adaptive boundary deformation builds on past research, including:
- [18.03] Efficient Interactive Annotation of Segmentation Datasets with Polygon-RNN++
- [19.03] Fast Interactive Object Annotation with Curve-GCN
- [20.01] Deep Snake for Real-Time Instance Segmentation
Using these methods, the model refines boundary proposals by predicting control points for each instance. Based on CNN features, the model performs per-vertex offset prediction. Each boundary proposal samples control points, which form a closed polygon considering both topological and sequential contexts.
For each control point , a feature vector is generated using the 32-dimensional shared features from the CNN backbone and 4-dimensional prior features (such as pixel classification, distance field, and direction field):
Once control point predictions are obtained, boundary refinement takes place. This is done using GCN and RNN, as illustrated below:
The encoder combines GCN and RNN to fully utilize both topological and sequential contexts of the boundary. The formula is:
The RNN uses a bidirectional LSTM (B-LSTM) with a hidden size of 128. The input, for example, could be: [batch size, control point sequence, control point features].
The GCN consists of four graph convolution layers with ReLU activation. The formula for the graph convolution layer is:
Where , , with representing the adjacency matrix and being the identity matrix. is the degree matrix, and each control point is connected to four neighboring control points to handle contextual information.
In addition to the RNN and GCN branches, a 1x1 convolution layer forms a residual connection. The features from all branches are concatenated and passed to the decoder, which predicts the offset for each control point.
Multiple iterations of boundary deformation are performed to refine the initial boundary proposals, progressively improving text detection precision.
Training Datasets
- SynthText: A large synthetic dataset with approximately 800,000 images, containing natural scenes mixed with text in random fonts, sizes, colors, and orientations.
- CTW1500: A challenging dataset focusing on long curved text, featuring 1,000 training and 500 test images annotated with 14-point polygons to describe arbitrary curve shapes.
- Total-Text: A dataset for curved text detection, with 1,255 training and 300 test images, including horizontal, multi-directional, and curved text.
- MSRA-TD500: A multilingual dataset with long text lines in arbitrary orientations, featuring 300 training and 200 test images. The HUST-TR400 dataset is used for additional training due to its small size.
- ICDAR 2017 MLT: A large-scale multilingual dataset containing 7,200 training, 1,800 validation, and 9,000 test images, covering nine languages.
Discussion
Ablation Studies
To verify the effectiveness of the adaptive deformation model, the authors conducted ablation studies on Total-Text and CTW-1500. These runs trained for 660 epochs on each real dataset without SynthText pretraining, so their scores should be kept separate from the pretrained benchmark rows below.
-
Effectiveness of Adaptive Deformation Model:
The compared encoder variants include FC with Conv1x1, RNN, circular convolution, and GCN, alongside the combined adaptive model.
The adaptive deformation model achieved the best F-measure on both datasets: 0.94 percentage points above RNN on Total-Text and 0.85 points above GCN on CTW-1500. It ran at 10.56 and 12.08 FPS on the two datasets, respectively, close to the listed RNN and GCN speeds.
-
Impact of Control Point Number (N):
The authors tested 12 to 32 control points in steps of four. The F-measure decreased when the number was too large or too small; too few points could not cover the whole text boundary well. Around 20 points gave the best performance on both datasets, so this number was fixed for the experiments.
-
Impact of Iteration Count:
On CTW-1500, moving from one to three iterations raised the F-measure from 82.24% to 83.97%, while speed fell from 13.68 to 12.08 FPS. The third iteration still added 0.64 percentage points over the second. Considering this speed and accuracy tradeoff, three iterations were chosen.
-
Impact of Prior Information:
The authors evaluated the classification map, distance field, and direction field on Total-Text. Using the classification map alone gave a 79.87% F-measure. Adding the distance field raised it by 5.45 percentage points, and then adding the direction field raised it by another 1.55 points.
Results on Curved Text
Total-Text results
CTW1500 results
The short side of images was scaled to 640, with the long side capped at 1024 pixels. The distance field threshold was fixed at 0.3.
On Total-Text, the classification threshold was set at 0.825. TextBPN achieved an F-measure of 87.37% with SynthText pretraining and 87.85% with MLT17 pretraining. The latter is 0.85 percentage points above the listed Boundary result of 87.0%; the extra training data and FPS conditions differ across methods.
On CTW-1500, with , the MLT17-pretrained model reached 86.45% precision and 85.0% F-measure. The 87.81% precision belongs to the SynthText-pretrained row, whose F-measure was 84.51%. The MLT17 model's F-measure is 9.4 percentage points above TextSnake's 75.6% and 1.6 points above DB's 83.4% in the table.
Results on MSRA-TD500
On MSRA-TD500, with , the MLT17-pretrained model reached an F-measure of 85.57%, above DB's 84.9% and DRRG's 85.08% in the table. The SynthText-pretrained version reached 82.97%. These results support detection of long text lines at varied orientations and sizes, while the pretraining conditions should remain visible in comparisons.
Visualization Results
The blue contours are the initial boundary proposals, and the green contours are the final boundaries after iterative deformation. Panels (a) and (b) show Total-Text examples; (c) and (d) show CTW-1500 examples.
Conclusion
The introduction of GCN and RNN for text detection is indeed a novel strategy. Experimental results demonstrate that this method achieves significant performance improvements on challenging datasets like Total-Text and CTW-1500, particularly in handling irregular and curved text.
Future research could aim to further improve inference speed and flexibility while maintaining detection accuracy, making this method more practical for a wider range of applications.