EAST: An Efficient and Accurate Scene Text Detector
- Publication
- CVPR 2017Conference
- First submitted to arXiv
- arXiv:1704.03155
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{textdetectioneast2017,
title = {{EAST: An Efficient and Accurate Scene Text Detector}},
author = {Xinyu Zhou and Cong Yao and He Wen and Yuzhi Wang and Shuchang Zhou and Weiran He and Jiajun Liang},
year = {2017},
eprint = {1704.03155},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1704.03155}
}
Fully convolutional networks made dense, pixel-level prediction practical. They did not by themselves solve large text-scale variation; multi-scale feature fusion helps combine local detail with broader context.
U-Net’s combination of features from different depths offered a useful pattern for dense prediction, which EAST adapts for text detection. Once the tools were in place, researchers naturally found somewhere to put them to work. Text detection followed this trend, too.
Defining the Problem
The image above summarizes the various text detection methods explored in previous studies. Most approaches require multiple steps, such as computing text region features, determining text direction, merging regions, or relying on handcrafted features like stroke width or maximally stable extremal regions.
But it is not only you who dislikes all those steps; the authors do, too. They want a simpler, more efficient method.
Solving the Problem
Since the size of text regions varies greatly, detecting large text areas requires high-level features from deeper layers of a neural network, while accurately predicting the geometry of small text areas relies on low-level features from earlier layers. Thus, a model needs to fuse multi-scale features.
Model Architecture
In the above diagram, the yellow block on the far left is the replaceable backbone. The figure shows PVANet; the experiments also use VGG16 and PVANET2x, a PVANet with twice as many channels.
The green block borrows U-Net’s U-shaped, layer-by-layer feature fusion, with fewer channels in its upsampling branch. For the underlying idea, see:
The prediction head uses the highest-resolution fused feature map, at one-quarter of the input image resolution. It has a one-channel SCORE map paired with one of two alternative geometry representations, RBOX or QUAD; the two are not required simultaneously.
- RBOX: Outputs 5 channels: distances from a pixel to the four sides of a rotated rectangle, plus its rotation angle. These are four distances, not four separate bounding boxes.
- QUAD: Outputs 8 channels: the and offsets from the pixel to each of the quadrilateral's four vertices.
- SCORE: Outputs 1 channel indicating whether the location belongs to a text region.
The concept is illustrated in the following image:
Label Generation
-
Generating the Score Map for Quadrilaterals
In the case of quadrilateral-shaped text areas, the score map's positive region is designed as a smaller version of the original quadrilateral, as shown in image (a) above. For a quadrilateral , where are the vertices arranged in clockwise order:
The quadrilateral shrinking process is as follows:
-
Calculate the reference length for each vertex using the formula:
Where is the L2 distance between two vertices.
-
Shrink the longer sides first, then the shorter sides.
-
For each pair of opposite sides, the longer one is determined by comparing their mean lengths.
-
For each side, and are shrunk by moving their endpoints inward by and , respectively.
-
-
Generating the Geometry Maps
The geometry maps can represent either RBOX or QUAD. The process for generating RBOX is shown in images (c-e) above.
For datasets that use quadrilateral annotations (e.g., ICDAR 2015), the authors first generate a minimal area rotated rectangle to cover the region. For each pixel with a positive score, the distance to the four boundaries of the text box is calculated and placed into the 4 channels of the RBOX geometry.
For QUAD, each pixel with a positive score will have values in the 8-channel geometry map, representing the offset from the pixel to the four vertices of the quadrilateral.
Loss Function
The total loss function is given by:
Where represents the score map loss, represents the geometry map loss, and balances the two, with used in experiments.
-
Score Map Loss
Many detection methods use balanced sampling and hard negative mining to address the imbalance in object distribution. While these techniques improve performance, they introduce non-differentiable processes and additional hyperparameters. To simplify training, the authors used a class-balanced cross-entropy loss:
Where is the predicted score map, is the ground truth, and is the balancing factor for positive and negative samples:
This balanced cross-entropy was first used by Yao et al. for text detection and proved effective.
-
RBOX Loss
A major challenge in text detection is the wide variation in text sizes. Using or losses directly can result in larger loss values for larger text areas. To ensure scale-invariant geometric predictions, the authors used an IoU loss for the axis-aligned bounding box (AABB) part of RBOX:
Where is the predicted AABB geometry and is the ground truth.
The loss for the rotation angle is:
The total geometry loss is the weighted sum of the AABB and angle losses:
With set to 10 in experiments.
-
QUAD Loss
For QUAD, the authors normalize Smooth L1 coordinate errors by the shortest side length, reducing their dependence on text scale. This is useful for elongated word quadrilaterals.
The ordered set of quadrilateral coordinates is:
The loss function is:
Where is the length of the shortest side of the quadrilateral:
represents all possible vertex orderings, accounting for inconsistent annotation orders in public datasets.
Training Strategy
The network is trained end-to-end using the ADAM optimizer. To accelerate learning, 512x512 image crops are sampled uniformly, with a batch size of 24. The learning rate starts at and is multiplied by one-tenth every 27,300 minibatches until it reaches .
Training continues until no further performance improvement is observed.
Locally Aware NMS
After thresholding, the remaining geometries need to be merged using Non-Maximum Suppression (NMS).
Traditional NMS has a time complexity of , where is the number of candidate geometries. This is impractical for dense predictions, which can involve tens of thousands of geometries.
Assuming that geometries in nearby pixels are highly correlated, the authors proposed a "row-wise merging" method.
In row-first order, the current geometry is iteratively merged with the previous accumulated geometry when they should merge. Standard NMS then runs on the remaining set. The local merge takes in the best case; the worst case remains like traditional NMS. In practice, locality keeps the remaining set small enough to make the procedure useful.
The detailed process is as follows:
Unlike traditional NMS, this method uses "weighted averaging" to merge geometries, rather than "selecting" one geometry, essentially creating a voting mechanism. However, for simplicity, the authors still use the term "NMS" since the core functionality remains the merging and suppression of redundant geometries.
In the WEIGHTEDMERGE(g, p) function, the vertex coordinates of two polygons and are averaged based on their scores. If the merged polygon is denoted as , the coordinates of each vertex are calculated as the weighted average of the original vertices and , using the formula:
Where:
- and are the scores of polygons and , respectively.
- and are the coordinates of the -th vertex of the polygons.
- is the coordinate of the -th vertex of the merged polygon.
The total score of the merged polygon is the sum of the scores of the two original polygons:
Benchmark Datasets
To evaluate the proposed algorithm, the authors conducted experiments on three public benchmark datasets: ICDAR 2015, COCO-Text, and MSRA-TD500.
-
ICDAR 2015:
- Contains 1,500 images, with 1,000 for training and 500 for testing.
- Text regions are annotated using quadrilaterals, which correspond to the QUAD geometry format used in this paper.
- The images are captured by Google Glass, and the text can appear in any orientation, potentially suffering from motion blur or low resolution.
- Additionally, 229 training images from ICDAR 2013 were used.
-
COCO-Text:
- Described by the paper as the largest text detection dataset at that time, containing 63,686 images, with 43,686 for training and 20,000 for testing.
- Text regions are annotated with axis-aligned bounding boxes (AABB), which is a special case of RBOX.
- For this dataset, the angle is set to 0, and the same data processing and evaluation methods as in ICDAR 2015 are used.
-
MSRA-TD500:
- Contains 300 training images and 200 testing images, with text regions in any orientation and annotated at the sentence level.
- The annotation format is RBOX, and the dataset includes both English and Chinese text.
- Due to the small number of training images, 400 images from the HUST-TR400 dataset were used for supplementary training.
Discussion
ICDAR 2015
With PVANET2x and RBOX, the single-scale F-score is 0.7820 and multi-scale testing raises it to 0.8072, against 0.6477 for the prior best method in the table. Under the VGG16 comparison, QUAD output exceeds that prior method by 0.0924, and RBOX by about 0.116. Those are different rows and should not be treated as one configuration.
COCO-Text
Against Yao et al. [41], all three EAST backbone settings have higher F-scores. The VGG16 setting reaches 0.3945, versus 0.3331 for [41], a gain of 0.0614; its recall is 0.324, versus 0.271, a gain of 0.053. The table’s A/B/C rows are annotation baselines, not detector comparisons, so the claim should not be extended to every row.
MSRA-TD500
Using PVANET2x, the F-score is 0.7608. That is 0.0208 above Zhang et al. [48] at 0.74, with precision 0.0428 higher; it is only 0.0017 above Yao et al. [41] at 0.7591. VGG16 is lower (0.7023 versus 0.7608 for PVANET2x) because MSRA-TD500 evaluates line-level predictions and VGG16’s effective receptive field is smaller.
Visualization Results
Conclusion
This paper presents a simple and efficient text detection framework that can detect text regions and generate accurate geometric predictions using a single neural network. This approach eliminates the need for complex multi-step processing, resulting in a lightweight and easily implemented model.
While the paper does not extensively discuss the impact of different training techniques, it is unclear which component of the architecture contributes most to the final performance. However, the experimental results demonstrate that the proposed method achieves state-of-the-art performance across three benchmark datasets, highlighting its effectiveness in text detection tasks.