  This study tackles the challenge of image matching in difficult scenarios,
such as scenes with significant variations or limited texture, with a strong
emphasis on computational efficiency. Previous studies have attempted to
address this challenge by encoding global scene contexts using Transformers.
However, these approaches suffer from high computational costs and may not
capture sufficient high-level contextual information, such as structural shapes
or semantic instances. Consequently, the encoded features may lack
discriminative power in challenging scenes. To overcome these limitations, we
propose a novel image-matching method that leverages a topic-modeling strategy
to capture high-level contexts in images. Our method represents each image as a
multinomial distribution over topics, where each topic represents a latent
semantic instance. By incorporating these topics, we can effectively capture
comprehensive context information and obtain discriminative and high-quality
features. Additionally, our method effectively matches features within
corresponding semantic regions by estimating the covisible topics. To enhance
the efficiency of feature matching, we have designed a network with a
pooling-and-merging attention module. This module reduces computation by
employing attention only on fixed-sized topics and small-sized features.
Through extensive experiments, we have demonstrated the superiority of our
method in challenging scenarios. Specifically, our method significantly reduces
computational costs while maintaining higher image-matching accuracy compared
to state-of-the-art methods. The code will be updated soon at
https://github.com/TruongKhang/TopicFM
