# Scene Text Detection Using Attention with Depthwise Separable Convolutions
## 3 Proposed Methodology
### Text Aware Non-Maximal Suppression  
The **MobileTDNet** network generates the following outputs:  
* Text/non-text segmentation map \(C=\{c_{1},\cdots,c_{n}\}\) with \(c_{i}\) representing the text confidence score at the \(i\)th position with \(n=|\frac{5_{1}}{2}\times\frac{5_{2}}{2}|\). * Quadrilateral predictions \(Q=\{q_{1},\cdots,q_{n}\}\) where \(q_{i}\) represents quadrilateral bounding box prediction at the \(i\)th position. For generating the final quadrilateral text bounding box predictions, the non-maximal suppression (NMS) technique [63] is applied in the following steps:  
1. To identify the dominant predictions corresponding to the text segments, the text/non-text segmentation map \(C\) is filtered at 0.5. The filtering results in a reduced set of  
Figure 2: Design of the Text Attention Block. confidence score predictions \(C_{t}\), and overlapping text bounding box predictions \(Q_{t}\). The NMS technique reduces the set of candidate bounding boxes by analyzing the confidence score associated with bounding box prediction and pairwise overlap between candidates. In contrast, the **MobileTDNet** output layer 2 prediction consists of only the geometric position of text bounding boxes without the measure of text attributes within the bounding box. 2. For calculating the text attribute of a quadrilateral box prediction \(q_{i}\), the text neighborhood correlation within the quadrilateral boundary is exploited. For each quadrilateral prediction \(q_{i}\), the text confidence scores from \(C_{t}\) at all positions within the boundary of \(q_{i}\) is averaged to a single point measure \(c_{i}^{q}\). This returns the set \(C_{Q}=\{c_{i}^{q},\cdots|i=0\text{ to }|Q_{t}|\}\). Here, \(c_{i}^{q}\) is referred to as the text expectation measure for the bounding box \(q_{i}\), as text appearances within the boundary can be in any shape and size, and the constricted boundary around the text segment is expected to have high text expectation. The quadrilateral boxes with low text expectation measures are filtered out, and the boxes within the top 10% of the text expectation measures are preserved. The filtration results in the quadrilateral bounding box prediction set \(Q_{F}\), with the corresponding text expectation values represented in set \(C_{F}\). The \(Q_{F}\) and \(C_{F}\) sets are next processed using the NMS to generate final predictions. 3. The conventional NMS procedure outcomes are sensitive to the selected intersection over union (IoU) threshold; therefore, the soft-NMS procedure by [PERSON] et al. [64] is applied. The soft-NMS uses a fixed IoU threshold for pruning, but the confidence scores of all unfinished quadrilateral boxes are rescaled with a smooth penalty function in each pruning iteration. The idea is to gradually decrease the score of overlapping quadrilateral boxes, which is expected to reduce the contribution in the false positive rate in the detection. At the same time, the function should impose a low penalty in the case of non-overlapping quadrilateral prediction boxes. The complete algorithm steps are listed below (Algorithm 1). ```
Input: Quadralateral prediction set \(Q_{F}=\{q_{1},q_{2},\cdots,q_{n}\}\) with text estimation scores for bounding boxes as \(C_{F}=\{c_{1}^{q},c_{2}^{q},\cdots,c_{n}^{q}\}\); IoU threshold \(iuo_{th}\); Output: Final quadrilateral set \(Q_{nms}=\{q_{1},q_{2}



## 4 Experimental Results

For evaluation of the methodology presented in this paper, the following datasets are used. 1. _ICDAR2013_[65]: The dataset is a collection of natural images having horizontal and near-horizontal text appearances. The collection consists of 229 training and 233 testing images having character and word-level bounding box annotations and corresponding annotations. 2. _ICDAR2015_[66]: The dataset was released as the fourth challenge in the ICDAR 2015 robust reading competition (incidental scene text detection). The dataset consists of 1500 images, of which 1000 were for training purposes, and the remaining images were used for testing.