Scene text recognition (STR) in the wild frequently encounters challenges when coping with domain variations, font diversity, shape deformations, etc. A straightforward solution is performing model fine-tuning tailored to a specific scenario, but it is computationally intensive and requires multiple model copies for various scenarios. Recent studies indicate that large language models (LLMs) can learn from a few demonstration examples in a training-free manner, termed "In-Context Learning" (ICL). Nevertheless, applying LLMs as a text recognizer is unacceptably resource-consuming. Moreover, our pilot experiments on LLMs show that ICL fails in STR, mainly attributed to the insufficient incorporation of contextual information from diverse samples in the training stage. To this end, we introduce E$^2$STR, a STR model trained with context-rich scene text sequences, where the sequences are generated via our proposed in-context training strategy. E$^2$STR demonstrates that a regular-sized model is sufficient to achieve effective ICL capabilities in STR. Extensive experiments show that E$^2$STR exhibits remarkable training-free adaptation in various scenarios and outperforms even the fine-tuned state-of-the-art approaches on public benchmarks.
翻译:场景文本识别(STR)在实际应用中常面临领域差异、字体多样性、形状变形等挑战。直接解决方案是针对特定场景进行模型微调,但该方法计算开销大,且需要为不同场景维护多个模型副本。最新研究表明,大型语言模型(LLM)可通过少量示例进行无需训练的"上下文学习"(ICL)。然而,将LLM直接用作文本识别器会消耗不可接受的资源。此外,我们对LLM的初步实验表明,ICL在STR任务中表现不佳,主要归因于训练阶段未能充分融合多样样本的上下文信息。为此,我们提出E$^2$STR——一种基于上下文丰富的场景文本序列训练的STR模型,其中序列通过我们提出的上下文训练策略生成。E$^2$STR证明,常规规模的模型即可在STR中实现有效的ICL能力。大量实验表明,E$^2$STR在多种场景下展现出优异的免训练自适应能力,甚至在公共基准测试中超越经过微调的最优方法。