# Scene Text Detection Using Attention with Depthwise Separable Convolutions
## 3 Proposed Methodology
### Text Aware Non-Maximal Suppression
The dataset images are real-life scenes captured in Google Glass in an incidental manner, with the annotations available as quadrangle text bounding boxes with corresponding unicode transcription. 3. _COCOText_[67]: This is a large dataset that consists of 63,000 images sampled from the MSCOCO image collection [68] exhibiting scene texts in all appearances. The dataset provides rich annotations, including the text bounding boxes, handwritten/printed labeling, script labeling, and transcripted text. The bounding boxes are horizontal axis aligned. The dataset comes with a standard distribution of 43,000 training images, 10,000 for validation and the remaining 10,000 for testing tasks. 4. _MSRA-TD500_[69]: The dataset consists of 500 examples distributed as 300/200 for training and testing tasks. The images are indoor and outdoor natural scenes with English and Chinese texts in all orientations and complex backgrounds. The image resolution varies between \(1294\times 864\) and \(1920\times 1280\). The annotations in the dataset are available at the text line level with the orientation value of corresponding text lines. In all experiments, the train/test distribution, the evaluation protocol, and measures are applied as suggested in the original source. The experiments in this work focused on verification of the following attributes of the **MobileTDNet** design: (i) the networks' ability to model the text/non-text image attributes across all style variations and backgrounds, (ii) the role of skip connections in capturing the text properties at all scales; and (iii) the impact of text attention blocks in the current architecture. ### Network Training and Hyperparameters

The proposed network is trained from scratch using the Adam optimizer [70,71]. Adam is an extension to the stochastic gradient descent algorithm that applies the first-order and second-order gradient moments for adapting the learning rate to network weight parameters. Table 1 shows the hyperparameters used for training **MobileTDNet** on different datasets, which were set experimentally following the protocols suggested in [71]. The **MobileTDNet** loss function intrinsically addresses the positive and negative sample unbalance; therefore, the training procedure does not include a hard negative sampling step. **Pre-training:** Before evaluation on different datasets, the **MobileTDNet** architecture is pre-trained on the combined training set collection of _ICDAR2013_ and _ICDAR2015_ datasets. The pre-training is performed for 10 epochs with a slow learning rate of 0.0001, and the batch \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Initial _lr_** & **\# of Epochs** & **Batch Size** &
\begin{tabular}{c} **\# of Epochs for** \\ _lr Decay_ \\ \end{tabular} \\ \hline _ICDAR2013_ & 0.001 & 50 & 16 & 20 \\ \hline _ICDAR2015_ & 0.001 & 50 & 16 & 20 \\ \hline _MSRA-TD500_ & 0.0005 & 60 & 24 & 30 \\ \hline _COCO-Text_ & 0.0001 & 100 & 8 & 50 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: **MobileTDNet** hyperparameters: _lr_ represents the learning rate. size is fixed at 16. The pre-training step is required as some experimental datasets are small in size, and training the network on such datasets from scratch with randomly initialized weights would not be effective. Therefore, **MobileTDNet** is pre-trained on a large and diverse collection to initialize the network weights with a high-level understanding of the task domain. Subsequently, the detector is trained on different datasets with the parameters given in Table 1. The learned \(lr\) is gradually reduced by half at every 10 epochs after crossing the initial stage of training (number of epochs mentioned in the last column of the Table 1). **Data augmentation:** For training the **MobileTDNet** model on _ICDAR2013_, _ICDAR2015_ and _MSRA-TD500_ datasets, data augmentation is also applied in the following steps:

* The input images are randomly resized within the scale of [0.5, 3] by preserving the aspect ratio.