Knowledge Mining with Scene Text for Fine-Grained Recognition

Hao Wang, Junchao Liao, Tianheng Cheng, Zewen Gao, Hao Liu, Bo Ren, Xiang Bai, Wenyu Liu

Abstract

Fine-grained image recognition involves distinguishing between visually similar categories, a task where visual cues alone often prove insufficient. While scene text provides additional context, literal interpretations are frequently sparse or ambiguous. This paper introduces a novel framework that mines implicit background knowledge from external sources like Wikipedia to enrich scene text representations. By integrating these "knowledge-enhanced" features with visual data via a specialized attention mechanism, the proposed model achieves state-of-the-art performance on several challenging benchmarks.

Introduction: The Semantic Gap in Fine-Grained Recognition

Distinguishing between specific types of soft drinks or identifying a particular protest movement requires more than just pattern matching; it requires context. Traditional fine-grained classification methods have begun incorporating scene text—text found within the image—to aid recognition. However, literal text is often insufficient. For instance, a bottle labeled "Leninade" does not explicitly state it is a soda, but human background knowledge identifies it as a Soviet-themed beverage. Similarly, the word "party" on a banner could denote a political organization or a social event depending on the context.

Ambiguity in scene text and the role of background knowledge in fine-grained recognition.

The core challenge addressed in this work is bridging the gap between literal scene text and the contextual background knowledge necessary for accurate classification.

Methodology

The authors propose an end-to-end trainable network designed to extract and integrate external knowledge. The architecture consists of three primary branches:

The proposed end-to-end framework featuring Knowledge Extraction, Knowledge-Enhanced Features, and Visual-Knowledge Attention branches.

1. Knowledge Extraction Branch

The system utilizes standard OCR to detect scene text, which then serves as a query for external knowledge bases such as Wikipedia. To resolve entity ambiguity (e.g., "Apple" as a fruit vs. a technology company), a prior-based candidate selector identifies the most probable entity matches.

2. Knowledge-Enhanced Features Branch (KARC)

This branch leverages KnowBert, a language model that integrates entity embeddings into BERT layers. A novel Knowledge Attention and Recontextualization Component (KARC) is introduced to fuse these external entity descriptions into the text features, effectively handling the inherent sparsity of scene text.

3. Visual-Knowledge Attention Component (VKAC)

To ensure the retrieved knowledge is relevant to the visual scene, the VKAC uses global visual features (extracted via ViT or ResNet) as a query to attend to the most pertinent knowledge features. This filtering mechanism prevents the model from being misled by irrelevant background information.

The final classification is performed by concatenating the visual features with the filtered, knowledge-enhanced text features.

Datasets and Evaluation

The model was rigorously evaluated on three key benchmarks:

  • Con-Text: 28 categories of businesses and buildings (24,255 images).
  • Drink Bottle: 20 categories of beverages (18,488 images).
  • Crowd Activity: A new dataset introduced by the authors containing 21 categories of human activities (e.g., "Brexit," "COVID-19") across 8,785 images, specifically designed to test contextual text recognition.

Results and Key Insights

The proposed method established new state-of-the-art (SOTA) results across all tested datasets:

  • Con-Text: Improved previous SOTA by 3.72% mAP.
  • Drink Bottle: Improved previous SOTA by 5.39% mAP.
  • Crowd Activity: Achieved 87.45% mAP, a 7.2% gain over a standard Vision Transformer (ViT) baseline.

Ablation studies confirmed that the inclusion of background knowledge was the primary driver of these performance gains. The model successfully demonstrates that scene text acts as a pointer to a broader web of human knowledge, allowing the system to move beyond literalism toward human-like reasoning.

Conclusion and Future Work

While the framework significantly advances fine-grained recognition, it remains dependent on the accuracy of initial OCR and the coverage of the external knowledge base. Future research may explore extending this knowledge-mining approach to other multi-modal tasks, such as visual grounding and complex text-visual question answering, to further bridge the gap between perception and understanding.

Summary updated

BibTeX
@inproceedings{wang2022knowledge,
  author = {Hao Wang and Junchao Liao and Tianheng Cheng and Zewen Gao and Hao Liu and Bo Ren and Xiang Bai and Wenyu Liu},
  title = {{Knowledge Mining with Scene Text for Fine-Grained Recognition}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure