Along with the progress of deep learning, the performance of scene text detectors have remarkably advanced over the past few years[13, 15, 12]. However, providing a fair comparison among such methods is still an ongoing problem, for common metrics fail to reflect the intrinsic nature of text instances [2, 9]. One example is the IoU (Intersection over Union) metric . Adopted from the object detection Pascal VOC, it is designed to detect bounding boxes containing a single object and thus is not suitable to detect text instances consisting of multiple characters. Another approach is DetEval, a metric specifically designed to evaluate text bounding boxes . However, its unreasonably lenient criteria accepts incomplete detections that are prone to fail in the recognition stage. Recently, Liu et al has proposed a new metric named TIoU (Tightness-aware IoU), which adds the tightness penalty to the IoU metric . This approach can be problematic in that it relies on the quality of the Ground Truth (GT), which is often inconsistent.
To solve these issues, a fair evaluation metric for text detectors must account for:
Granularity Annotation tendencies of public datasets vary greatly due to the lack of gold standard on bounding box units. Merging and splitting detection results to match GT should be allowed to a reasonable extent.
Completeness An instance-level match may accept incomplete detections that have missing or overlapping characters. A penalty must be given so that scores reflect whether the detection contains all required characters.
In the proposed metric called TedEval (Text detection Evaluation), we evaluate text detections via an instance-level matching policy and a character-level scoring policy. Granularity is addressed by non-exclusively gathering all possible matches of one-to-one, one-to-many, and many-to-one. Afterwards, instance-level matches are scored while penalty is given to missing and overlapping characters. To this end, we use pseudo character centers made from word bounding boxes and their word lengths.
The main contributions of TedEval can be summarized as follows. 1) TedEval is simple, intuitive, and thus easy to use in a wide-range of tasks. 2) TedEval rewards behaviors that are favorable to recognition. 3) TedEval is relatively less affected by the quality of GT annotation. In this regard, we believe that TedEval can play a key role in developing state-of-the-art scene text detectors.
Our evaluation metric performs the matching and the scoring of detectors through a separate policy. The matching process follows previous metrics, pairing bounding boxes of detections and GTs in an instance-level. On the other hand, the scoring process calculates recall and precision at the character-level without character annotations.
2.1 Matching process
Adopted from DetEval, our evaluation protocol measures area recall and area precision to pair GTs and detections in the manner of not only one-to-one but also one-to-many and many-to-one. To prevent side effects of addressing granularity, TedEval implements three major changes including (1) non-exclusive matching, (2) change in the area recall threshold, and (3) multiline prevention.
The first change directly relates to granularity. Accounting for granularity opens the possibility that a single instance (from either GT or detection) may satisfy multiple matches. DetEval assumes that the first match is the best match, discarding subsequent matches. This causes mismatch among one-to-one and many matches. A simple solution is to neither prioritize nor discard redundant matches. We accept all viable matches, setting of the binary matrix from Table 1 as 1 whenever a match between an instance of GT and detection occurs. When redundant matches occur, is overwritten not accumulated.
Note that the threshold for area recall changed from 0.8 to 0.4. This reflects the interaction between the matching process and the scoring process introduced in the next section. Since the latter penalizes the incompleteness of detection to the given GT, namely recall, a lenient threshold in the matching process is fair.
Although our instance matching policy works in a fairly generous way, there is a case when the match itself should be prevented. Multiline is a special case of many match involving multiple lines of texts and must be rejected by identifying it in the matching stage. It involves not only many-to-one match where one detection contains multiple lines but also one-to-many match where multiple detections of different lines are matched to one GT.
As shown in Fig. 2, we use angles to identify multiline. Firstly, define as a set of bounding boxes in the many side of a many match. Then we compute two pivotal points for all bounding boxes in by:
where means the th vertex of . Note that GT must assume the form of four vertices in a clockwise order starting from the top left point in regard to the orientation of the word.
The angle between and is then computed by turning from to around . While computing every possible angle among , we reject the match when any one of it is:
The threshold is obtained experimentally.
In addition, instead of selecting pivotal points as points on the edges, is the point on the left edge and is the center point of . This is to make our algorithm robust against the width difference and distance between bounding boxes, which can confuse the magnitude of the angle.
2.2 Scoring process
Based on instance-level matches from Section 2.1, we calculate the recall score of and the precision score of in a character-level. To overcome the lack of character-level annotation in most public datasets, we compute Pseudo Character Centers (PCC) from word-level bounding boxes and their word lengths. As shown in Fig. 3, a set of PCC of is computed by:
where and are the x, y coordinates of from Eq. 1, and are and between and the other edge, and is the word length. From the matching table in Table 1, is a binary matrix whose element is set to 1 when contains .
For recall calculation, we perform a row-wise summation of character matching scores :
Since it is critical that each of the characters is detected only once, the condition of a correct character match is . Contrastingly, mismatch cases include indicating missing characters and for overlap characters. The recall is the number of correct character matches over the text length :
On the other hand, the precision is the number of correct character matches over the sum of text lengths of GTs matched with :
where is . Finally, and can be obtained by
Examples of our scoring process are in the Appendix.
Since scoring occurs column- and row-wise by instance, our scoring policy does not score the same instance multiple times even if it is involved in multiple matches. It can also differentiate a complete match from a partial match by penalizing missing or overlapping characters. This differs from instance-based scoring, which gives a binary score that does not reflect the completeness of detections.
In addition, TedEval automatically penalizes one-to-many cases, which may abuse the scoring policy by splitting a single word with multiple detections. For example, if a group of detections detect characters of GT once and completely, the precision score of each detection is the number of characters each detected over the length of the GT transcription. Then, the overall precision is 1 over the number of splits. Yet, penalty is not given to many-to-one cases. Examples of scoring many matches are in the Appendix.
We compared TedEval with DetEval and IoU on two public datasets: ICDAR 2013 Focused Scene Text (IC13) and ICDAR 2015 Incidental Scene Text (IC15). We requested from authors the result file of scene text detectors that frequently appear and are referenced in the literature. Results are shown in Table 2.
Fig. 4 shows the frequency of factors that TedEval tackles as proportions to the number of successful detections. Detectors are sorted right to left from the highest score on TedEval. Granularity counts in average 14% and 14% and completeness counts in average 10% and 16% in IC13 and IC15, respectively. These proportions considerably influence the change of H-mean scores in Table 2 and are the main causes of qualitative discords in previous metrics.
Delving into some of the peaks in Fig. 4, notice that CTPN has the highest granularity frequency in both datasets. As shown in Fig. 5, CTPN has a tendency to detect a single box for an entire line, namely many-to-one. Since such behaviors are not penalized by TedEval, CTPN gains a 6.8 increase in the H-mean score in IC15 from IoU, which does not account for granularity.
Another peak is from FOTS. As shown in Fig. 5, FOTS often detects a word by splitting it into several parts while causing overlap between such detections. This causes peaks for both granularity and completeness and lowers the recall score. Note that EAST, which proposed the detector architecture of FOTS, shows similar behaviors.
On the contrary, PixelLink and CRAFT have noticeably low completeness counts. They are both segmentation-based detections, which perform well in finding text regions. However, since they connect text regions using link information, they often detect multiline in a single box. In fact, the multiline proportion of PixelLink and CRAFT are one of the highest, 7% and 3%, respectively.
More examples can be seen in the Appendix.
We have proposed a novel evaluation metric for scene text detectors called TedEval, which evaluates text detections by an instance-level matching policy and a character-level scoring policy. It accounts for granularity by adopting DetEval but implements a few changes to prevent subsequent side effects of many matches. A scoring policy uses pseudo character centers to reflect the penalty given to missing and overlapping characters to the final recall and precision score.
Experiments on two public datasets demonstrated that issues TedEval tackles frequently occur in results from state-of-the-art detectors and that they caused qualitative disagreements in previous metrics. By reflecting such factors, TedEval can provide a fair and reliable evaluation on the state-of-the-art methods in the upper percentile of H-mean scores.
Our future work involves evaluating polygon annotations, where TedEval’s logics would be more effective, and making our logic insensitive to the vertex order. This will make TedEval easier to apply in various tasks and lessen the burden of annotators.
Acknowledgements. We would like to thank Yuliang Liu, the author of TIoU, and authors of scene text detectors who kindly provided result files used in our experiments.
-  Y. Baek, B. Lee, D. Han, S. Yun, and H. Lee. Character region awareness for text detection. In CVPR, pages 4321–4330. IEEE, 2019.
-  A. Dangla, E. Puybareau, G. Tochon, and J. Fabrizio. A first step toward a fair comparison of evaluation protocols for text detection algorithms. In 2018 13th IAPR International Workshop on Document Analysis Systems (DAS), pages 345–350. IEEE, 2018.
-  D. Deng, H. Liu, X. Li, and D. Cai. Pixellink: Detecting scene text via instance segmentation. In AAAI, 2018.
M. Everingham, S. M. Eslami, L. Gool, C. K. Williams, J. Winn, and
The pascal visual object classes challenge: A retrospective.
International Journal of Computer Vision, 111(1):98–136, 2015.
-  H. Hu, C. Zhang, Y. Luo, Y. Wang, J. Han, and E. Ding. Wordsup: Exploiting word annotations for character based text detection. In ICCV, 2017.
-  M. Liao, B. Shi, and X. Bai. Textboxes++: A single-shot oriented scene text detector. Image Processing, 27(8):3676–3690, 2018.
-  J. Liu, X. Liu, J. Sheng, D. Liang, X. Li, and Q. Liu. Pyramid mask text detector. arXiv preprint arXiv:1903.11800, 2019.
-  X. Liu, D. Liang, S. Yan, D. Chen, Y. Qiao, and J. Yan. Fots: Fast oriented text spotting with a unified network. In CVPR, pages 5676–5685, 2018.
-  Y. Liu, L. Jin, Z. Xie, C. Luo, S. Zhang, and L. Xie. Tightness-aware evaluation protocol for scene text detection. In CVPR, pages 4321–4330. IEEE, 2019.
-  P. Lyu, M. Liao, C. Yao, W. Wu, and X. Bai. Mask textspotter: An end-to-end trainable neural network for spotting text with arbitrary shapes. arXiv preprint arXiv:1807.02242, 2018.
-  J. Ma, W. Shao, H. Ye, L. Wang, H. Wang, Y. Zheng, and X. Xue. Arbitrary-oriented scene text detection via rotation proposals. IEEE Transactions on Multimedia, 20(11):3111–3122, 2018.
-  B. Shi, X. Bai, and S. Belongie. Detecting oriented text in natural images by linking segments. In CVPR, pages 3482–3490. IEEE, 2017.
-  Z. Tian, W. Huang, T. He, P. He, and Y. Qiao. Detecting text in natural image with connectionist text proposal network. In ECCV, pages 56–72. Springer, 2016.
-  C. Wolf and J.-M. Jolion. Object count/area graphs for the evaluation of object detection and segmentation algorithms. In ICDAR, pages 1115–1124. IEEE, 2013.
-  X. Zhou, C. Yao, H. Wen, Y. Wang, S. Zhou, W. He, and J. Liang. East: an efficient and accurate scene text detector. In CVPR, pages 2642–2651, 2017.