{"notes":[{"id":"text-recognition/yatr","category":"text-recognition","legacyPath":"text-recognition/2107-yatr","legacySlug":"2107-yatr","legacyPaths":[],"title":"YATR","subtitle":"Fake Can't Replace the Real","author":"Z. Yuan","paperDate":"2021-07-29","publishedOn":"2024-11-09","paperTitle":"Why You Should Try the Real Data for the Scene Text Recognition","paperUrl":"https://arxiv.org/abs/2107.13938","bibliography":{"title":"Why You Should Try the Real Data for the Scene Text Recognition","authors":["Vladimir Loginov"],"url":"https://arxiv.org/abs/2107.13938","pdfUrl":"https://arxiv.org/pdf/2107.13938","codeUrl":null,"preprint":{"id":"2107.13938","submittedOn":"2021-07-29","url":"https://arxiv.org/abs/2107.13938"},"publication":null,"citation":"@misc{textrecognitionyatr2021,\n  title = {{Why You Should Try the Real Data for the Scene Text Recognition}},\n  author = {Vladimir Loginov},\n  year = {2021},\n  eprint = {2107.13938},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2107.13938}\n}\n","citationPath":"/content/papers/citations/text-recognition/yatr.2f29088e021f.bib"},"thumbnail":{"src":"/content/papers/assets/850ab8a9d464e0e857f5a440bce346cc9926a014ea27080b0311deb32947fbbf.jpg","width":1224,"height":552},"locale":"en","path":"/content/papers/en/text-recognition/yatr.011bf64c560c.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"the-importance-of-real-data","text":"The Importance of Real Data","depth":3},{"id":"testing-with-vitstr","text":"Testing with ViTSTR","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"text-recognition/wwwstr","relation":"background","topic":"Training data and generalization in text recognition"},{"id":"text-recognition/union14m","relation":"next","topic":"Training data and generalization in text recognition"}]},{"id":"text-recognition/wwwstr","category":"text-recognition","legacyPath":"text-recognition/1904-wwwstr","legacySlug":"1904-wwwstr","legacyPaths":[],"title":"WWWSTR","subtitle":"Data and Model Analysis","author":"Z. Yuan","paperDate":"2019-04-03","publishedOn":"2024-10-10","paperTitle":"What Is Wrong With Scene Text Recognition Model Comparisons? Dataset and Model Analysis","paperUrl":"https://arxiv.org/abs/1904.01906","bibliography":{"title":"What Is Wrong With Scene Text Recognition Model Comparisons? Dataset and Model Analysis","authors":["Jeonghun Baek","Geewook Kim","Junyeop Lee","Sungrae Park","Dongyoon Han","Sangdoo Yun","Seong Joon Oh","Hwalsuk Lee"],"url":"https://arxiv.org/abs/1904.01906","pdfUrl":"https://arxiv.org/pdf/1904.01906","codeUrl":null,"preprint":{"id":"1904.01906","submittedOn":"2019-04-03","url":"https://arxiv.org/abs/1904.01906"},"publication":{"venue":"ICCV","year":2019,"kind":"conference","url":"https://arxiv.org/abs/1904.01906"},"citation":"@misc{textrecognitionwwwstr2019,\n  title = {{What Is Wrong With Scene Text Recognition Model Comparisons? Dataset and Model Analysis}},\n  author = {Jeonghun Baek and Geewook Kim and Junyeop Lee and Sungrae Park and Dongyoon Han and Sangdoo Yun and Seong Joon Oh and Hwalsuk Lee},\n  year = {2019},\n  eprint = {1904.01906},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1904.01906}\n}\n","citationPath":"/content/papers/citations/text-recognition/wwwstr.4537315eda97.bib"},"thumbnail":{"src":"/content/papers/assets/3c14afb4e2ad3bd5c433008345218e2aa4c6c6157b4ef4c546eb632039e4c6a7.jpg","width":1980,"height":220},"locale":"en","path":"/content/papers/en/text-recognition/wwwstr.028814c0629b.md","headings":[{"id":"dataset-analysis","text":"Dataset Analysis","depth":2},{"id":"training-datasets","text":"Training Datasets","depth":3},{"id":"testing-datasets","text":"Testing Datasets","depth":3},{"id":"version-differences","text":"Version Differences","depth":3},{"id":"architecture-analysis","text":"Architecture Analysis","depth":2},{"id":"transformation-stage","text":"Transformation Stage","depth":3},{"id":"feature-extraction-stage","text":"Feature Extraction Stage","depth":3},{"id":"sequence-modeling-stage","text":"Sequence Modeling Stage","depth":3},{"id":"prediction-stage","text":"Prediction Stage","depth":3},{"id":"experimental-setup","text":"Experimental Setup","depth":2},{"id":"discussion","text":"Discussion","depth":2},{"id":"accuracy-time-trade-off-analysis","text":"Accuracy-Time Trade-off Analysis","depth":3},{"id":"accuracy-memory-trade-off-analysis","text":"Accuracy-Memory Trade-off Analysis","depth":3},{"id":"module-analysis","text":"Module Analysis","depth":3},{"id":"failure-case-analysis","text":"Failure Case Analysis","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"text-recognition/yatr","relation":"next","topic":"Training data and generalization in text recognition"}]},{"id":"text-recognition/union14m","category":"text-recognition","legacyPath":"text-recognition/2307-union14m","legacySlug":"2307-union14m","legacyPaths":[],"title":"Union14M","subtitle":"Chess Pieces Falling Like Stars","author":"Z. Yuan","paperDate":"2023-07-17","publishedOn":"2024-10-22","paperTitle":"Revisiting Scene Text Recognition: A Data Perspective","paperUrl":"https://arxiv.org/abs/2307.08723","bibliography":{"title":"Revisiting Scene Text Recognition: A Data Perspective","authors":["Qing Jiang","Jiapeng Wang","Dezhi Peng","Chongyu Liu","Lianwen Jin"],"url":"https://arxiv.org/abs/2307.08723","pdfUrl":"https://arxiv.org/pdf/2307.08723","codeUrl":null,"preprint":{"id":"2307.08723","submittedOn":"2023-07-17","url":"https://arxiv.org/abs/2307.08723"},"publication":{"venue":"ICCV","year":2023,"kind":"conference","url":"https://arxiv.org/abs/2307.08723"},"citation":"@misc{textrecognitionunion14m2023,\n  title = {{Revisiting Scene Text Recognition: A Data Perspective}},\n  author = {Qing Jiang and Jiapeng Wang and Dezhi Peng and Chongyu Liu and Lianwen Jin},\n  year = {2023},\n  eprint = {2307.08723},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2307.08723}\n}\n","citationPath":"/content/papers/citations/text-recognition/union14m.69b5d5fefc96.bib"},"thumbnail":{"src":"/content/papers/assets/39ca4ac101c26285774d8d0a7a5a9f4ba67f58b1d7e6ba91956378290e12682a.jpg","width":1152,"height":500},"locale":"en","path":"/content/papers/en/text-recognition/union14m.0b024ea32641.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"problem-solution","text":"Problem Solution","depth":2},{"id":"union14m-l","text":"Union14M-L","depth":3},{"id":"union14m-u","text":"Union14M-U","depth":3},{"id":"diverse-text-styles","text":"Diverse Text Styles","depth":3},{"id":"rich-vocabulary","text":"Rich Vocabulary","depth":3},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"pretraining-and-fine-tuning","text":"Pretraining and Fine-Tuning","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"the-harsh-reality","text":"The Harsh Reality","depth":3},{"id":"uncovering-the-challenges","text":"Uncovering the Challenges","depth":3},{"id":"the-benchmark-dataset","text":"The Benchmark Dataset","depth":3},{"id":"experimental-results","text":"Experimental Results","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"text-recognition/yatr","relation":"background","topic":"Training data and generalization in text recognition"},{"id":"text-recognition/ocr-scaling-law","relation":"next","topic":"Training data and generalization in text recognition"}]}],"text":"In the field of Scene Text Recognition (STR), the majority of models rely heavily on synthetic data for training.\n\nThe standard approach is to begin with pre-training on synthetic data, and then either evaluate the model directly on benchmark test sets or fine-tune it using a small amount of real data before proceeding with evaluation.\n\n## Defining the Problem\n\nThere’s no denying the importance of real-world data. Synthetic data must be generated based on specific rules—such as selecting particular fonts, adding noise, or choosing backgrounds.\n\nWhere there are rules, there are exceptions. These exceptions are often things that synthetic data cannot cover, which can impact the model’s ability to generalize. In the real world, synthetic data is the exception; real data is the rule.\n\nWould you trust a model's generalization ability if it’s trained on exceptions instead of the rule?\n\nThe authors believe that combining synthetic and real data makes a better training set, and they test that idea here.\n\n## Solving the Problem\n\n### Model Architecture\n\n\n\n![Text recognizer with TPS, ResNeXt and an attention decoder; original paper Figure 1](/content/papers/assets/850ab8a9d464e0e857f5a440bce346cc9926a014ea27080b0311deb32947fbbf.jpg \"Loginov, Why You Should Try the Real Data for the Scene Text Recognition, Figure 1, arXiv:2107.13938v1\")\n\n\n\nThe authors reference the approach used in WWWSTR:\n\n- [**[19.04] WWWSTR: Data and Model Analysis**](/blog/papers/text-recognition/wwwstr)\n\nHowever, they do not separate the last two stages; in this architecture, the final stage of text recognition incorporates both sequence modeling and the final prediction in a single step.\n\nFor image rectification, the model employs the Thin Plate Spline (TPS) technique from ASTER:\n\n- [**[18.06] ASTER: An Attentional Scene Text Recognizer with Flexible Rectification**](https://ieeexplore.ieee.org/document/8395027)\n\nThe TPS spatial transformation mechanism consists of three components:\n\n1. **Localization Network**: First, it generates the spatial transformation parameters for the input image.\n2. **Grid Generator**: Based on the predicted parameters, it creates a set of sampling grid points marking where the input image should be sampled.\n3. **Sampler**: Using the grid and the input image, it generates the final output image.\n\nThe strength of TPS lies in its design, which doesn’t require character-level annotation, making it adaptable to various text recognition architectures. Its parameters can be learned in an end-to-end manner.\n\nThe backbone uses ImageNet-pretrained ResNeXt-101 without its final stage. The authors chose this configuration for its favorable accuracy and efficiency trade-off in their experiments.\n\nFinally, for the text recognition head, a 2D attention map with a GRU decoder is employed.\n\n\n> [!TIP]\n> \n> Clearly, there is little architectural novelty here. The paper is mainly about the **training data**.\n\n\n## Discussion\n\n### The Importance of Real Data\n\n\n\n![Results on six recognition benchmarks with synthetic and real training-data mixtures; original paper Table 2](/content/papers/assets/42d6aa40db4fc8a9e3b4d99be665d9b79133d39c49f78021d3d60ab0869201ce.jpg \"Loginov, Table 2, arXiv:2107.13938v1; this ablation did not use TPS\")\n\n\n\nThe authors conducted training experiments using both synthetic and real datasets, keeping all conditions consistent: ResNeXt-101 as the backbone network, a case-insensitive training and testing mode, and no use of the TPS module in this experiment.\n\nIn this no-TPS comparison, MJSynth plus OpenImagesV5 scores higher than either synthetic-only setup on all six test sets. OpenImagesV5 alone scores below that mixture but still above MJSynth alone on all six. For example, on IC15 the scores are **64.2%** with MJSynth, **69.3%** with MJSynth plus SynthText, and **75.3%** with MJSynth plus OpenImagesV5. The authors suggest that harder real images might need a longer training schedule, but the table does not test training duration.\n\nMJSynth + OpenImagesV5 gives the best results in this table and is the training-data mixture the authors use in this paper.\n\n### Testing with ViTSTR\n\nTo further validate the importance of real data, the authors experimented with ViTSTR, a Transformer-based text recognition model.\n\nYou can refer to our earlier discussion of ViTSTR:\n\n- [**[21.05] ViTSTR: Encoder-Only Model**](/blog/papers/text-recognition/vitstr)\n\nUsing both synthetic and real datasets for training, they obtained the following results:\n\n\n\n![ViTSTR-Tiny results with synthetic data and with OpenImages V5 added; original paper Table 4](/content/papers/assets/b7e6efa8a34bd4c8e5e71333ff11b05f76bd6f17584da091628412d8696640bf.jpg \"Loginov, Table 4, arXiv:2107.13938v1; both setups used augmentation\")\n\n\n\nTable 4 compares two ViTSTR-Tiny runs under the same test conditions and with data augmentation in both. Replacing 20% of a **0.5 MJSynth + 0.5 SynthText** training batch with OpenImagesV5 raises accuracy on all six test sets. IC03 goes from **93.7% to 95.6%** (**1.9 percentage points**), while IC15 goes from **66.6% to 77.0%** (**10.4 points**); the gain is not roughly five points everywhere. Even with image augmentation, adding real data helps in this comparison.\n\n## Conclusion\n\nCombining synthetic and real images improved text recognition on the models and test sets examined here.\n\nYou might think this is common sense and hardly needs another paper. But without measuring, how would we know **how much** it matters?\n\nThe next time someone asks, “Why use real data? What is the actual difference?”, this paper gives us numbers to answer with.\n","imageSizes":{"/content/papers/assets/850ab8a9d464e0e857f5a440bce346cc9926a014ea27080b0311deb32947fbbf.jpg":{"width":1224,"height":552},"/content/papers/assets/42d6aa40db4fc8a9e3b4d99be665d9b79133d39c49f78021d3d60ab0869201ce.jpg":{"width":1140,"height":248},"/content/papers/assets/b7e6efa8a34bd4c8e5e71333ff11b05f76bd6f17584da091628412d8696640bf.jpg":{"width":1224,"height":180}}}
