SAFL: A Self-Attention Scene Text Recognizer with Focal Loss

Bao Hieu Tran, Thanh Le-Cong, Huu Manh Nguyen, Duc Anh Le, Thanh Hung Nguyen +1 more
1/1/2022
cs.CVcs.LG
transformer-attention

Official code: ICMLA-SAFL/SAFL_pytorch (7 stars, Python, last commit 2020-08-09).

Abstract

In the last decades, scene text recognition has gained worldwide attention from both the academic community and actual users due to its importance in a wide range of applications. Despite achievements in optical character recognition, scene text recognition remains challenging due to inherent problems such as distortions or irregular layout.

Show full abstract

Most of the existing approaches mainly leverage recurrence or convolution-based neural networks. However, while recurrent neural networks (RNNs) usually suffer from slow training speed due to sequential computation and encounter problems as vanishing gradient or bottleneck, CNN endures a trade-off between complexity and performance. In this paper, we introduce SAFL, a self-attention-based neural network model with the focal loss for scene text recognition, to overcome the limitation of the existing approaches. The use of focal loss instead of negative log-likelihood helps the model focus more on low-frequency samples training. Moreover, to deal with the distortions and irregular texts, we exploit Spatial TransformerNetwork (STN) to rectify text before passing to the recognition network. We perform experiments to compare the performance of the proposed model with seven benchmarks. The numerical results show that our model achieves the best performance.

View on arXivView PDF

Code Implementations(1)

72Python, ShellAug 1, 20206 years ago

Similar Papers

Cite this paper

@article{tran2022safl,
  title  = {SAFL: A Self-Attention Scene Text Recognizer with Focal Loss},
  author = {Bao Hieu Tran and Thanh Le-Cong and Huu Manh Nguyen and Duc Anh Le and Thanh Hung Nguyen and Phi Le Nguyen},
  year   = {2022},
  eprint = {2201.00132},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.00132}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.00132.svg)](https://codeofpaper.com/paper/2201.00132)

Discussion