{'fraction_non_alphanumeric': 0.03904419149648477, 'fraction_numerical': 0.019626715768329427, 'mean_word_length': 4.731262741335891, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Arbitrary Shape Text Detection via Segmentation with Probability Maps

Arbitrary shape text detection is a challenging task due to the significantly varied sizes and aspect ratios, arbitrary orientations or shapes, inaccurate annotations, etc. Due to the scalability of pixel-level prediction, segmentation-based methods can adapt to various shape texts and hence attracted considerable attention recently. However, accurate pixel-level annotations of texts are formidable, and the existing datasets for scene text detection only provide coarse-grained boundary annotations. Consequently, numerous misclassified text pixels or background pixels inside annotations always exist, degrading the performance of segmentation-based text detection methods. Generally speaking, whether a pixel belongs to text or not is highly related to the distance with the adjacent annotation boundary. With this observation, in this paper, we propose an innovative and robust segmentation-based detection method via probability maps for accurately detecting text instances. To be concrete, we adopt a Sigmoid Alpha Function (SAF) to transfer the distances between boundaries and their inside pixels to a probability map. However, one probability map can not cover complex probability distributions well because of the uncertainty of coarse-grained text boundary annotations. Therefore, we adopt a group of probability maps computed by a series of Sigmoid Alpha Functions to describe the possible probability distributions. In addition, we propose an iterative model to learn to predict and assimilate probability maps for providing enough information to reconstruct text instances. Finally, simple region growth algorithms are adopted to aggregate probability maps to complete text instances. Experimental results demonstrate that our method achieves state-of-the-art performance in terms of detection accuracy on several benchmarks.

Recently, Ch'ng et al. [12] and Liu et al. [13] published two curved-text focused datasets, named Total-Text and CTW1500, respectively. Curved texts are actually more prevalent in natural scenes and are more challenging for detection. Therefore, arbitrary shape text detection has attracted ever-increasing interest in research and industrial  communities recently. Due to the robustness to shape variances, the Connected Component-based (CC-based) methods [7], [11], [14] and segmentation-based methods [8], [9], [15] gradually become the mainstream methods for arbitrary shape text detection. CC-based methods [7], [11], [14], [16] need complex processing for separating text instances into individual text patches during training and rely on complicated post-processing steps to aggregate candidate text patches into final text instances during testing. Due to the scalability of pixel-level prediction, segmentation-based methods can well adapt to texts with various shapes without complicated processing and post-processing steps. So far, a series of promising segmentation-based arbitrary shape text detectors have been proposed, to name a few [8], [9], [10], [15], [17], [18].
Different from generic object instance segmentation datasets, the existing text detection datasets only provide coarse-grained boundary annotations, as shown in Fig. 1. In annotations of text detection, there are a lot of background pixels, especially in the areas adjacent to boundaries, as shown in Fig. 1 (c) and Fig. 2. These ambiguous pixels may significantly degrade the performances of detection methods based on pixel-level prediction. Some segmentationbased techniques try to reduce or avoid the dependence on pixel prediction through distance field [19] or direction field [15]. However, the performances of these methods are still not satisfactory in curved text detection due to the unpredictable range of distances and directions. Although PSENet [18] adopts a series of binary masks with different scales, its performance is still limited for the heavy dependence on the pixel classification results. In a text instance, the probability of whether a pixel belongs to text or not is highly related to the distance with its adjacent annotation boundary. The probability map can well describe text pixels' probability distribution, perfectly express the shape of text, and has a closed range of values. Therefore, it is more reasonable to use a probability map to describe a text than a binary mask or distance map. However, one probability map can not cover complex probability distributions well because of the uncertainty of coarse-grained text boundary annotations.
Recently, some methods have adopted iterative modules to refine pixel predictions, such as the semantic segmentation method CANet [20] and the text detection method LOMO [21]. In [20], an iterative optimization module is adopted to refine predicted results for semantic segmentation. In LOMO [21], an iterative refinement module is adopted to refine the quadrangle proposals by regressing the coordinate offsets once or more times. These iterative models produce a prediction for the same target in every iteration step. However, in our method, we need to predict different probability maps in each iteration step and optimize the predictions of probability maps by implicitly learning the mapping relationship between successive probability distributions.
In this paper, we propose an innovative segmentationbased method via probability maps for accurately detecting text instances. Specifically, we adopt the Sigmoid Alpha Function (SAF) to transfer the distances between pixels and boundaries to different probability distribution maps by controlling a hyper-parameter in SAF. To further optimize the predictions of probability maps, we propose an iterative module (IM) equipped with asymmetric convolution kernels to optimize the predictions of probability maps by implicitly learning the mapping relationships between successive probability distributions. In this way, the high precise predictions of probability maps can be generated. Finally, some simple region growth algorithms (e.g., Watershed Algorithm or Progressive Scale Expansion Algorithm [18]) can be used to aggregate probability maps to complete text instances. In addition, we design a votingbased filtering algorithm according to the properties of probability maps, which can reduce the hyper-parameters and improve the robustness of all datasets. Experiments on several challenging datasets demonstrate the excellent performance of our method.
In summary, our main contributions are three-fold: • We propose a novel and robust segmentation-based text detection method for arbitrary shape text detection, which employs probability maps to segment text instances accurately.

•
We propose a flexible sigmoid alpha function (SAF) to establish the mapping between the pixel probability and the distance to boundary, which can generate different probability distribution maps by simply controlling a hyper-parameter.

•
The proposed method obtains state-of-the-art performance in terms of detection accuracy both on polygonal and quadrilateral datasets. Specifically, our method with Watershed Algorithm achieves the best F-measure on Total-Text (88.79%), CTW1500 (85.75%), and MSRA-TD500 (88.93%).
The rest of this paper is organized as follows. We briefly review related works on scene text detection in Section 2. The proposed method is elaborated in Section 3, followed by extensive experiments in Section 4. Finally, we conclude and give some perspectives in Section 5.

RELATED WORKS
Before deep learning flourished, scene text detector pipelines usually consisted of text component extraction and filtering, component grouping, and candidate filtering. The key step is extracting text components based on some engineered features. During this period, Maximally Stable Extremal Regions (MSER) [22], [23], [24] and Stroke Width Transform (SWT) [25], [26] are two types of mainstream methods for text component extraction. With the prosperity of deep learning, convolutional neural network (CNN) based scene text detection methods have made great progress and substantially outperformed traditional MSER or SWT based text detection methods in terms of both accuracy and capability. In general, deep learningbased text detection methods can be subdivided into four categories: regression-based methods, CC-based methods, segmentation-based methods, and other methods.

Regression-based Methods
This type of method relies on a box-regression based object detection frameworks with word-level and line-level prior knowledge [27], [28], [29], [30], [31], [32]. Different from generic objects, texts are often presented in irregular shapes with various aspect ratios. To deal with this problem, RRPN [28] and Textboxes++ [30] localize text boxes by predicting the offsets from anchors. Different from these methods localizing text regions by implementing refinement on pre-defined anchors, EAST [31] and DDR [29] propose a new approach for accurate and efficient text detection, which directly regress the offsets from boundaries or vertexes to the current point. Based on these direct regression methods, LOMO [21] proposes an iterative refinement module to iteratively refine bounding box proposals for extremely long texts and then predicts center line, text region, and border offsets to rebuild text instance. Although regression-based methods have achieved good performance in quadrilateral text detection, they often can't adapt well to arbitrary shape text detection.

CC-based Methods
The Connected Component (CC) based methods [7], [11], [33], [34] generally link or group the detected individual text parts or characters into final text instances by postprocessing procedure. CTPN [33] modifies the Faster R-CNN [35] to extract horizontal text components with a fixedsize width for easily connecting dense text components and generating horizontal text lines. SegLink [34] decomposes each text into two detectable elements, namely segment and link, where the link connects a pair of adjacent segments that belong to the same word. CRAFT [7] detects text regions by exploring affinities between characters. Zhang et al. [11] use a graph convolution neural network (GCN) to learn and infer the linkage relationships of text components to group text components. CC-based methods have a more flexible representation and can adapt well to irregular shape text. Therefore, the CC-based methods are popular in arbitraryshaped text detection, even if the clustering of components is unsatisfactory.

Segmentation-based Methods
Methods [15], [17], [18], [36], [37], [38] in this type mainly draw inspiration from semantic segmentation methods and detect texts by estimating word bounding areas. Segmentation-based methods generally use different representations to describe text regions and then rebuild text instances through specific post-procession. In PixelLink [36], linkage relationships between a pixel and its neighboring pixels are predicted for grouping pixels belonging to the same instance. In [17], embedding features are used to provide instance information and to generate a prediction for text instances of arbitrary shape. To effectively distinguish adjacent text instances, PSENet [18] adopts a progressive scale expansion algorithm to expand the pre-defined kernels gradually. However, the performances of these methods are strongly affected by the quality of segmentation accuracy.

Other Methods
In addition to the above methods, here are some other methods. The end-to-end methods [10], [16], [39], [40] unify text detection and recognition into an end-to-end network. In general, these end-to-end approaches can achieve higher detection performance with the help of text recognition information, such as [10]. Besides, Yao et al. [41] detect texts by predicting the corner of the texts, and Lyu et al. [42] adopt a similar architecture as SSD [43] and rebuild text instances with predicted corner points. Fig. 3 illustrates the framework of our method. We adopt ResNet-50 [44] to extract features. To preserve spatial resolution and take full advantage of multi-level information, we exploit a widely used multi-level feature fusion strategy (similar to U-Net [45]). Fig. 4 illustrates the architecture of our backbone. An iterative module (IM) is used to produce the predictions of corresponding probability maps based on feature maps extracted by the backbone to optimize the results. The IM also refines predictions of probability maps by implicitly learning the mapping relationships between successive probability distributions. These predicted probability maps can describe the possible probability distributions of text pixels within a boundary and provide enough information for reconstructing text instances. We adopt different region growing algorithms to aggregate the computed probability distribution maps into candidate text instances. Finally, we adopt an adaptive voting filtering algorithm to filter out false-positive text instances.

Probability Maps
Because of the extremely high cost of pixel-level annotating, scene text detection datasets only provide coarsegrained boundary annotations. Most segmentation-based methods [8], [9], [17], [18] directly convert these coarsegrained annotations into pixel-level binary supervision masks for text instance segmentation. However, the quality of generated pixel-level labels is always unsatisfactory. As shown in Fig. 1 (c), there exist a lot of background pixels, mainly those pixels adjacent to boundaries. Many background pixels not belonging to text regions may be incorrectly categorized into text pixels in these pseudo-binary masks. If trained on noisy data, segmentation-based text detectors tend to get false-positive text instances. Although some segmentation-based methods try to reduce or avoid the dependence on binary masks through distance field [19] or direction field [15], the inaccurate annotations around text boundaries may significantly degrade the detection performance.
In our work, we propose probability maps to solve the uncertainty in text annotations explicitly. Generally speaking, the probability of whether a pixel is a text pixel is related to the distance to the boundary. As shown in Fig. 5 (a), the green contour is an annotated boundary, the red point (C) is near the boundary, and the yellow point (A) is away from the text boundary. For text detectors, the probability of predicting A as a text pixel is much greater than that of C, because A is farther away from the boundary than C. Although the blue point (B) is more like a background pixel only considering color and texture features, the probability that B is predicted as a part of a text instance is still very high in the existing text detection methods. The CNNbased text detection methods, e.g. [8], [36], [46], use not only simple features such as color and texture but also use the information of other pixels in the receptive field. Point B is far away from the text boundary and surrounded by text pixels, so the probability of B predicted as a text pixel is very high in text detectors.
As our ultimate goal is to get the text boundaries, it is more reasonable to consider the probability of the whole boundary instead of a single pixel. So in our work, we think that pixels on the same contour have the same probability, and the contours closer to the annotation boundary have the smaller probability value. As shown in Fig. 5 (c), the green contour is an annotation boundary, which is basically in the background region. And there are also a lot of background noises inside the boundary, especially near the boundary, such as point C in Fig. 5 (a). The pixels on the red contour have the same distance to the text boundary (green contour), and the pixels on the yellow contour also have the same distance to the text boundary. Compared with the green contour, the pixels on the red contour are more likely to be a text instance because the proportion of text pixels on the red contour is higher than that of the green contour. Similarly, pixels on the yellow contour are more likely to be text than pixels on the red and green contours. By calculating the distance to annotation boundary, we can get a series of contours on which pixels have the same distance to annotation boundary, as shown in Fig. 5 (b). In general, the contour is closer to the boundary, the proportion of text pixels is lower. Suppose we use the proportion of text pixels on the contour as pixel probability. In that case, the pixels on the same contour will have the same probabilities, which is convenient for us to establish the relationship between the probability of a pixel and its distance to the boundary. For the text detection task, our goal turns to explore a contour on which the probability of pixels has a minimum value (approximating to zero).
In this work, we build a probability map based on the distance between pixels and annotation boundary to describe the probability distributions where pixels inside a boundary belong to a text. To establish the mapping between the pixel probability and the distance to boundary, we propose a Sigmoid Alpha Function (SAF ) based on the Sigmoid Function [47]. Because the Sigmoid Alpha Function can map a distance value into range [0, 1], which can be regarded as a pixel probability. Hence we can adopt SAF to map a distance map (D) into a probability map. The Sigmoid Alpha Function (SAF ) is defined as: where α is a transforming factor for generating different probability distribution maps; C is a constant for keeping the value range of the Sigmoid Alpha Function in [0, 1] and ensuring the probability of the farthest pixel to boundary is 1; (i, j) indicates the coordinate point in the map; D (i,j) is the shortest distance from pixel (i, j) to boundary; distance map (D) is the set of D (i,j) ; L represents the scale of text instance, and is defined as: where T represents a text instance. L in SAF encodes the size information of text instances into probability maps, improving the model adaptability in detecting text with varied sizes. The visual illustrations of different probability distribution curves generated by SAF are shown in Fig. 6. The proposed SAF has two special cases, LF and BF : where LF is a linear normalization function, BF is a binarization function and th is a pre-defined threshold. As shown in Fig. 6, if α = 1, the curve of SAF is very close to the curve of LF . Along with α increases, the curve of SAF tends to the curve of BF . The mathematical formulations are elaborated as: where BF 0 (i,j) is a special case of Eq. 5 if its threshold (th) is set to zero. From Eq. 6 and Eq. 7, we can conclude that both the linear normalization function LF and the binarization function BF are two special cases of SAF . Therefore, the binary mask and the linear normalized distance map can be regarded as two special probability distribution maps. The binary mask is widely used in segmentation-based text detection methods, in which all pixels within the annotation boundary are regarded as text pixels, ignoring background noises. It is usually difficult to achieve superior performance only with binary masks as training supervision [18], [36]. Some other methods [8], [9], [37] adopt additional information to supervise network learning. The normalized distance map with LF is usually used as auxiliary information for text instance segmentation [8], [48], [49]. And the normalized distance map with LF can be regarded as a probability map of the linear distribution of text-pixel probabilities inside the boundary. Because of the uncertain and inaccurate annotation of boundaries, it is impossible to accurately describe the probability distributions of text pixels inside a boundary only with one probability map. To segment text instances accurately, the works in [8], [15], [37] adopt a variety of prediction information to detect text instances. In our work, we employ a series of probability distribution maps as supervision to segment text instances. According to our observation and experiments, a group of probability maps can describe possible probability distributions for covering annotation error and providing abundant information for reconstructing text instances. In addition, with multiple probability maps, our model can be more robust for final detections. Specifically, even if a local prediction of one probability map is not accurate, there are still several other probability maps that can provide supplementary context predictions. According to Eq. 1, we can easily get a group of probability distribution maps by controlling the hyper-parameter α in SAF , including linear and binary probability distributions.
Label Generation: The label generation procedure of the probability maps relies on the distance map (D) and SAF . Given a text image, each text instance region is described by a polygon boundary. Different datasets are usually labeled with polygons with different vertex numbers, four for quadrilateral text datasets and 14 for CTW1500 or any vertexes for Total-text. For each text instance, we first compute the shortest distance D (i,j) from pixel (i, j) to boundary. So, the distance map of each text instance is described by a set of D (i,j) as After getting the distance map (D), we use the sigmoid alpha function with a set of α values (α 1 , α 2 , ..., α n ) to map the distance into probability, as shown in Fig. 7. The probability maps can be described by a set of probability distribution, i.e., where n is the number of α values and probability maps. These generated probability maps (G) will be used as the final ground-truths. When generating probability maps (G), the maximum value in the possible overlapping region of probability maps will be selected. The p i(p) is the probability of pixel p with α i in SAF . Alpha (α) Selection: For facilitating our experiments, the set of {α 1 , α 2 , ..., α n } are only selected from positive integers. The first term α 1 is equal to 1 (α 1 = 1), and the step is k (α i = α i−1 + k). In details, the value of α i in i-th iteration can be calculated by where n is the number of probability maps; k is the step of α value; i indicates the i-th probability map. For example, when k = 2, n = 4, four probability maps will be generated, and four corresponding alpha values are {α 1 = 1, α 2 = 3, α 3 = 5, α 4 = 7}. In our experiments, the value of α always starts from 1, because the probability distribution is close to the linear distribution when α = 1, facilitating distinguishing different text instances. The number of probability maps is at least two. The interval of α is at least two because one probability map can not provide enough information for reconstructing text instances.

Iterative Module
The iterative structure is prevalent in segmentation methods, which can significantly improve detection accuracy. In CANet [20], Zhang et al. adopted an iterative module to optimize the predicted results for semantic segmentation.
In LOMO [21], an iterative refinement module is also used to refine quadrangle proposals by regressing the coordinate offsets.
In this work, we propose an innovative iterative module (IM) with large-scale asymmetric convolution kernels determined by text attributes. The detailed structure of our IM is shown in Fig. 8. Different from the existing iterative modules [20], [21], the predictions of our IM are targeted for a series of ground-truth probability maps. In this way, our IM can further optimize the predictions of probability maps by exploring the mapping relationship among probability distributions. With the help of our IM, our network can fully utilize the information of predictions from low-level iterations to improve the accuracy of predictions at highlevel iterations. And the parameters in high-level iteration layers can be optimized by a back-propagation gradient from the layers at high-level iterations.
Different from generic object instances, scene text instances have significantly varied sizes and aspect ratios and are usually distributed in strips, especially for long text instances and line-level text instances. To solve this problem, Pixel-Anchor [50] and IncepText [51] adopt the large-scale asymmetric convolution kernels, and experiments show that this strategy is effective. In our work, we solve the problem of significantly varied sizes and aspect ratios in scene text detection from two aspects. On the one aspect, we use SAF to encode text size information into probability maps. On the other aspect, inspired by [50] and [51], we use a group of asymmetric convolutions in our iterative model to improve the robustness for long text and line-level text. Equipped with the above-mentioned two strategies, our method can be commendably adapted to detect long text instances. Mathematically, ou IM can be formulated as: where "⊕" refers to the concatenation operation; σ(·) refer to the Sigmoid activation function; ConvBlock consists of a group of asymmetric convolutions (e.g., Conv 1×5 , Conv 5×1 and Conv 1×1 ); n denotes the number of iteration steps. After getting fusion feature maps (f 0 ) of 16 channels from the backbone, we feed f 0 into the first iterative layer of our IM to produce feature map f 1 . Then, f 1 will be used to generate a probability map through the Sigmoid function and will be fed into the next iteration layer to provide prior information for producing the second probability map. In this way, we can get a group of probability map predictions. From our experiments, we observed that the accuracy of text instance segmentation will be gradually improved with the increase of iterations.

Loss Function
As shown in Fig. 4, we leverage backbone to extract shared features, and then adopt our IM proposed in Section. 3.3 to generate the predictions of corresponding probability maps. Each probability map has its own independent individual loss computed by Mean Squared Error (MSE) of each pixel on image domain Ω, and computed as: where G i is the i-th ground-truth of the probability map, and P i is the i-th predicted probability map; p denotes pixel in the image domain Ω.
The total loss L s in our method is the weighted sum of individual losses (loss i ), i.e., where loss i is the loss of the i-th probability map; n is the number of probability maps; λ i is the weight of each individual loss, and all weight (λ) are set to 1 in our experiments.

Online Hard Negative Mining
In scene images, text instances usually occupy a small area. Thus, the number of text pixels and non-text pixels is rather imbalanced. To make the network training focus more on pixels that are hard to distinguish, we adopt the online hard negative mining (OHEM) strategy proposed in [52] for all regression losses {loss 1 , loss 2 , ..., loss n }. More specifically, non-text pixels with zero probability are sorted in decreasing order by their per-pixel losses. Then, only the highranked non-text pixels are reserved for γ * ( p∈Ω {p|p i(p) > 0}) back-propagation, where γ is a given hyper-parameter that denotes the ratio of non-text pixels with respect to the total number of text pixels. In our experiments, γ is empirically set to 3.

Inference and Post-processing
After we get the probability distribution maps {P 1 , P 2 , ..., P n } from the trained network, some simple region growth algorithms (e.g., Watershed Algorithm or Progressive Scale Expansion Algorithm [18]) will be used to aggregate these probability maps to complete text instance.
As a prerequisite, we should binarize all probability maps with the same small constant binary threshold (th b ). By reconstructing for text region, we will get a series of candidate text instances {S 1 , S 2 , ..., S m }, and each text instance (S i ) is represented by a connected binary mask. Text instance filtering: After extracting candidate text instances {S 1 , S 2 , ..., S m }, we apply two filtering strategies (threshold filtering and voting filtering) to get rid of non-text instances according to probability and size. Generally speaking, the predicted value of the text probability map should be close to the actual value, and the predicted value of the non-text probability map is usually tiny overall. So, we can filter out non-text instances according to their probability mean values to improve detection performance. Besides, we also discard some noisy candidate instances whose areas are smaller than β a . Finally, the remaining candidate text instances are the final predictions.

Threshold Filtering
Although the generic threshold filtering algorithm is simple and fast, it is sensitive to the pre-defined threshold and hence not robust across different datasets. Therefore, it is necessary to adjust the threshold appropriately for different datasets. Specifically, our threshold filtering algorithm is detailed in Algorithm 1. We calculate an average probability and an area for each candidate text instance. Then, we eliminate the candidate text instance with low average probability and too small area (smaller than 300 pixels) through the pre-defined threshold. There are two thresholds (th b and th e ) that need to be empirically adjusted on different datasets for the threshold filtering algorithm.

Voting Filtering
The threshold filtering algorithm is sensitive to threshold parameters in testing because it uses fixed thresholds. Besides, it is not convincing to use only the last probability map as a decision basis. Hence, we propose a voting filtering algorithm, which can effectively improve the adaptability and robustness of our model to different datasets in testing. Specifically, the voting filtering algorithm is detailed in Algorithm 2. After extracting binary masks {S 1 , S 2 , ..., S m } of candidate text instances, we firstly filter out the text with a small area (smaller than 300 pixels). Then we calculate the expectation of each probability map (E old ) in the region corresponding to S i . At the same time, we use SAF to map S i into a group of probability maps with the same alpha (α) set as in training and calculate the expectation (E new ) of each newly generated probability map again. Theoretically, E old should be greater than E new , but there are errors in the probability map of network prediction. Therefore, we set an error offset related to the threshold (th b ). As shown in line 20 in Algorithm 2, if this condition is met, the corresponding vote will be 1; otherwise, the vote will be 0. Each probability map will generate a unique voting result (0 or 1) with a foreach P j ∈ {P 1 , P 2 , ..., P n } do 15 E old ← reduce mean(P j , mask ← S i ); voting weight. If the final weighted voting result is less than 50%, the corresponding text instance S i will be filtered out.
Extract text boundaries: Finally, we need to get text boundaries from the results of text instance segmentation. For curved text detection datasets, we use the alpha shape algorithm in OpenCV to extract the polygonal boundary of text instances. In contrast, we utilize the minimum enclosing rectangle of a text instance as its boundary for quadrilateral text detection datasets.

EXPERIMENTS
We evaluate the proposed method on five public benchmark datasets: SCUT-CTW1500 [13] and Total-Text [12] which contain curved texts; ICDAR2015 Incidental Scene Text (ICDAR2015) [53], ICDAR2017-MLT [54] and MSRA-TD500 [55] which mainly consist of multi-oriented texts. As a common technique, SynthText in the Wild [56] is also adopted to pre-train the network. Some implementation details are depicted in Section 4.2, followed by ablation study experiments in Section 4.3. The experimental results compared with state-of-the-art methods on public datasets are given in Section 4.4.

Datasets
SynthText [56]: It contains 800k synthetic images generated by blending natural images with artificial text. Annotations are given in types of characters, words, and lines. This dataset with word-level annotation is used to pre-train the proposed model. Total-Text [12]: It contains 1,555 scene images, divided into 1,255 training images and 300 testing images. This dataset is originally tailored for the arbitrary-shaped text detection, containing many curved and multi-oriented texts. Annotations are given in word level with polygon-shaped bounding boxes instead of conventional rectangular bounding boxes. CTW-1500 [13]: It consists of 1,000 training images and 500 testing images. Different from classical multi-oriented text datasets, this dataset is quite challenging due to many curved texts. Each text instance is labeled by a polygon with 14 points. The annotation is given in line or curve level. MSRA-TD500 [55]: It consists of 500 training images and 200 testing images, with English and Chinese scripts. This dataset is dedicated to detecting multi-lingual long texts of arbitrary orientations, annotated at the level of text lines. ICDAR2015 [53]: It consists of 1,000 training images and 500 testing images. This dataset was released for the Challenge 4 of ICDAR2015 Robust Reading Competition, which is widely used as a benchmark dataset for multi-oriented text detection. Different from previous datasets with texts captured in relatively high resolution, scene images in this dataset are randomly acquired by Google Glasses. Therefore, texts in these images are of various scales, orientations, contrast, blurring, and viewpoints, making it challenging for detection. Annotations are provided with word-level bounding quadrilaterals. ICDAR2017-MLT [54]: It consists of 7,200 training images, 1,800 validation images, and 9,000 test images in nine languages. Similar to ICDAR2015, the text regions in ICDAR2017-MLT are also annotated by the four vertices of quadrilaterals. We use both the training set and the validation set in training.

Implementation Details
In our experiments, we first pre-train our network on the SynthText dataset by two epochs, in which images are randomly cropped and resized to 512 × 512. In pre-training, the Adam [57] optimizer is applied to train our model with a fixed learning rate of 0.001, and the batch size is 10. In fine-tuning, the training process is divided into two stages: In the first stage, we randomly crop the text region, resize them to 640 × 640 and train the model with batch size 6; In the second stage, we randomly crop the text region, resize them to 800 × 800 and train our model with batch size 4. For both two stages, the SGD [58] optimizer is adopted in which the initial learning rate is 0.01 and multiplied by 0.9 after every 100 epochs. The data augmentation for the training data includes random rotation with an angle (sampled by Gaussian in (−60 • , 60 • )), random cropping, and random flipping. In inference, we keep the aspect ratio of test images and resize them to the appropriate size for testing. Experiments are all performed on a single GPU (GeForce RTX-2080), Intel Xeon Silver 4108 CPU @ 1.80GHz, and PyTorch 1.2.0.
(Note: the "our-1s" means that the output feature map is 1/1 of the input image, and the feature map P 0 shown in Fig. 3 as the input of the iterative module. The "our-2s" means that the output feature map is 1/2 of the input image, and the feature map P 1 shown in Fig. 3 as the input of the iterative model. There are some abbreviations in the table for typesetting, and "R", "P", and "F" represent Recall, Precision, and F-measure, respectively. Unless otherwise illustrated, Scale Expansion Algorithm [18] ("pse") is used as the region growth algorithm by default.)

Ablation Study
Influence of α values and the iterative number (n). We investigate the effect of different α values in iteration and explore the relationship between detection performance and iterative number (n). The details of α selection are described in Section 3.2 and Eq. 11. We perform experiments on Totaltext with no extra pre-training. In training, we randomly crop text regions, resize them to 640 × 640, and train the model with batch size 6 for 400 epochs. The Adam optimizer is adopted with an initial learning rate 10 −4 and multiplied by 0.9 after every 100 epochs. Fig. 9 shows some typical experimental results, and we can find that the F-measure keeps rising along with the number of iterations (n) increases and begins to tend to level off when n ≥ 4. Besides, we notice that our model needs more iterative steps to achieve good performance if the value interval (k) of α is small (k <= 2). In addition, when all curves tend to level off, the maximum value of alpha (α n ) is about greater than 10. To balance efficiency and performance, we set the iterative number of IM to 4 and set the values of corresponding α to (1,4,7,10) in all the following experiments.

TABLE 1 Ablation study for probability maps (PMS) and iterative module (IM) on
Total-Text and MSRA-TD500. Influence of probability maps (PMS) and iterative module (IM). We conduct ablation studies on Total-Text and MSRA-TD500 datasets with pre-training on SynText to verify the effectiveness of the proposed probability maps (PMS) and iterative module (IM). A part of the train details is described in Section 4.2. For Total-Text, we use 640 × 640 images to train our model with 300 epochs and 800 × 800 images with 300 epochs. For MSRA-TD500, we only use 640 × 640 images to train our model with 1,200 epochs. To verify the effectiveness of probability maps (PMS), We replace the probability maps with a group shrieked binary masks similar to [18]. In this way, we can use the Progressive Scale Expansion Algorithm in [18] to reconstruct text instances with probability maps or binary masks. For a fair comparison, we adjust the parameters appropriately to get optimum performance.

Datasets PMS IM Recall Precision F-measure FPS
As listed in Tab. 1, we can conclude that the proposed PMS and IM significantly improve the performance on Total-Text (word-level curve texts) and TD500 (line-level long texts). PMS achieves 2.54% (on Total-Text) and 3.8% (on TD500) performance improvements in terms of F-measure. IM achieves 1.13% (on Total-Text) and 3.03% (on TD500) performance improvement in terms of F-measure. In conclusion, our PMS and IM can enhance performance by 3.4% (on Total-Text) and 4.44% (on TD500) in terms of F-measure.
Case study of probability maps. To further verify the effectiveness of our SAF strategy, we select some real examples in our case study, which are shown in Fig. 10. In this case study, we respectively train our network with the supervision of binary maps and probability maps for comparison. As shown in Fig. 10 (b), the segmentation results under the supervision of binary maps contain a lot of noises, which may lead to text adhesion or miss detection. As shown in the 1st row of Fig. 10 (c), different text instances are adhesion together. If we filter the noises, some text with low confidence is inevitably eliminated, as shown in the 3rd and 4th row of Fig. 10 (c). With the supervision of our probability maps, the segmentation results are very clean. As shown in Fig. 10 (d), our method can well separate different text instances and reduce the occurrences of missed detection. In addition, because probability maps contain the size information of the text, which can improve the capability of our network for detecting large text, as shown in the 3rd row of Fig. 10 (e). Apparently, the network trained by the supervision of binary maps fails in detecting large text, as shown in the 3rd row of Fig. 10 (c). In addition, with probability maps, our final detected contours are smooth, as shown in the 2nd row  2 Experimental results on Total-Text, CTW-1500, and MSRA-TD500. The symbol * means a multi-scale test is performed. "S" means that we use the SynText to pretrain our model, and "M" means that we use the ICDAR2017-MLT to pretrain our model. "pse" means we use the Progressive Scale Expansion Algorithm as our post-processing, and "watershed" means we use the Watershed Algorithm as our post-processing. † means voting filtering algorithm is used; otherwise a threshold filtering algorithm is used by default. The best score is highlighted in bold. of Fig. 10 (e). However, with binary maps, the final detected contours contain a lot of defects and burrs, as shown in the 1st row of Fig. 10 (c).

Comparisons with State-of-the-Art Methods
Obviously, the predictions accuracy of probability maps will be improved along with iterating. Therefore, when using the voting filtering algorithm, we set different voting weights for each probability map and then selectively filter text instances according to the weighted voting. In the following experiments, the voting weights are fixed at (0.1, 0.2, 0.3, 0.4), and the details of voting filtering are referred to Algorithm 2. Curved text detection: We restrict the long side of input images not greater than 1,024 and scale the short side of input images to 256 and 512 for Total-Text and CTW-1500 datasets, respectively. In training, we firstly crop 640 × 640 image regions to train for 300 epochs and then use 800×800 image regions to train for 300 epochs. During inference, we use the threshold filtering algorithm and the voting filtering algorithm to test, respectively. Some visual results are shown in Fig. 11, and detailed experimental results are listed in Tab. 2.
When threshold filtering is performed, th b is set to 0.3, and th e is set to 0.65 on both curve datasets. As listed in Tab. 2, our method achieves surprising performance on Total-Text and CTW-1500. Specifically, our method outperforms PAN by 3.58%, DB by 3.88%, and CRAFT by 4.98% in terms of F-measure on Total-Text. And our method also outperforms PAN by 1.71%, DB by 2.01%, and CRAFT by 1.91% in terms of F-measure on CTW-1500.
When voting filtering is performed, th b is set to 0.325 for Total-Text and 0.365 for CTW-1500. The results listed in Tab. 2 show that the voting filtering algorithm not only reduces the threshold parameters meanwhile increases the adaptability of our model but also slightly improves the detection performance of our model (0.14% on Total-Text, 0.68% on CTW-1500). Notably, our method achieves the best performance in curve text detection (88.72% on Total-Text, 86.09% on CTW-1500 in terms of F-measure).
Multi-language text detection: To verify the effectiveness of our method, we conduct experiments on two multilanguage datasets. For MSRA-TD500, we restrict the long side of input images to 832, but there is no restricted size of the short side. In training MSRA-TD500, we use 640 × 640 image regions to train for 1,200 epochs. For threshold filtering, th b and th e are set to 0.305 and 0.8, respectively. For voting filtering th b is also set 0.305. As listed in Tab. 2, our method achieves state-of-the-art performance on MSRA-TD500. Although the voting filtering algorithm will cause a bit of performance loss, the detection performance of our method is still amazing. On MSRA-TD500, our method outperforms PAN by 4.47%, DB by 3.67%, and CRAFT by 5.67% in terms of F-measure with threshold filtering.
For the ICDAR2017-MLT dataset, we restrict the long side of input images no greater than 1920 and scale the short edge of the input image to 256. In training, we firstly   Fig. 12 (a) and (b) for MSRA-TD500, and Fig. 12 (c) for ICDAR2017-MLT. Our proposed method successfully detects long text lines of arbitrary orientations and sizes, and also successfully detects complex multi-language texts.
Multi-oriented text detection: The ICDAR2015 is a typical multi-oriented text dataset that contains lots of small and low-resolution text instances. Due to the images in the ICDAR2015 testing dataset having an identical size, we scale the short side of input images to 960. In training, we use 640 × 640 image regions to train for 400 epochs, and then use 800 × 800 image regions to train for 600 epochs. When pre-training on ICDAR2017-MLT, the training images in ICDAR2015, the training and testing images in ICDAR2013 are used to fine-tune our network. In testing, th b and th e are set to 0.405 and 0.84 for threshold filtering, respectively. For voting filtering, th b is set to 0.335. As listed in Tab. 4, our method achieves competitive performance against other methods in detecting small multi-oriented texts. Our method outperforms PSENet by 1.56% and LSE by 0.65% in terms of F-measure with threshold filtering. Although the voting filtering results have a minor performance degradation of 0.42% in F-measure, our performance is still promising. In addition, the voting filtering algorithm reduces the dependence on empirically  pre-defined threshold parameters and thus improves the adaptability and robustness of our method. Representative qualitative illustrations are shown in Fig. 12 (d).

Speed Analysis
As shown in Table 6, our method can efficiently detect curve text instances. We especially analyze the time consumption of our method in different stages on two curve text datasets. When the output feature map is 1/1 of the input image, the proposed method obtains the best performance, while the time consumption of post-processing is more than half of the total inference time because of the large feature map. If the size of the output feature map is 1/2 of the input images, the FPS of our method boosts from 6.8 to 13.8, while the performance slightly decreases from 88.58% to 87.37% on Total-Text, which is shown in Tab. 5   the performance is still competitive on CTW-1500 when the long edges of input images are restricted to 640. As listed in Tab. 5, the post-processing and data transfer is time-consuming because the region growth algorithms in post-processing is a serial algorithm that executes pixel by pixel processing on the CPU. Therefore, an efficient and parallel region growth algorithm will significantly improve the detection speed of our method.

Weakness
As demonstrated in the experiments, our method achieves superior performance in detecting texts of arbitrary shapes. However, there are still some failing cases, especially on challenging images, such as images with object occlusion, large character spacing, or text-like areas. Some representative failure examples are given in Fig. 13. As shown in Fig. 13 (a-b), our method fails in covering the whole text instance because of the large character spacing. This is caused by the not wholly covered boundary proposal for the text due to the limited receptive field. Fig. 13 (cd) shows that some object occlusions and text-like areas lead to poor detections. As shown in Fig. 13 (e), limited by the receptive field and imbalance training samples, some extremely large text is still challenging for our method. But, all these difficulties are common challenges for the other methods [8], [9], [15], [18]. Moreover, there are some "false detections" caused by unreasonable or missing annotations, as shown in Fig. 13 (c) and (f).

CONCLUSION
This paper presents a novel and robust segmentation-based text detector for arbitrary shape text detection, employing multiple probability maps to segment the text instance. We adopt a group of probability maps with a series of Sigmoid Alpha Functions (SAF ) to describe the possible probability distributions as much as possible. To predict high-precision probability maps, we propose an iterative model to optimize the predictions of probability maps by implicitly learning the mapping relationships between successive probability distributions. A variety of experiments have verified that our method consistently outperforms state-of-the-art methods in terms of detection accuracy on a variety of typical scene text benchmarks. In the future, we would explore a more efficient text reconstruction algorithm to improve our method's detection speed further and design an efficient end-to-end text reading system.