LLMGeo: Benchmarking Large Language Models on Image Geolocation In-the-wild

Zhiqiang Wang, Dejia Xu, Rana Muhammad Shahroz Khan, Yanbin Lin, Zhiwen Fan, Xingquan ZhuarXiv 2024 · DOI · arXiv

Abstract

Image geolocation—the task of determining the geographic origin of an image—remains a significant challenge in computer vision, particularly for "in-the-wild" scenes lacking iconic landmarks. This paper introduces LLMGeo, the first systematic benchmark designed to evaluate the geolocation capabilities of Large Multimodal Models (LMMs). By testing state-of-the-art models like GPT-4V and Gemini on a novel dataset of Google Street View images, we demonstrate that while closed-source models currently lead in zero-shot performance, targeted fine-tuning can significantly elevate open-source models to competitive levels.

Introduction

Identifying the location of a photo is often straightforward when landmarks like the Eiffel Tower are present. However, geolocating a generic dirt road in South America or a dense forest in Eastern Europe is a "white whale" for automated systems. Traditional specialized models often rely on memorizing specific visual patterns, which limits their generalizability. Large Multimodal Models (LMMs) offer a potential solution due to their vast internal world knowledge. LLMGeo establishes a rigorous framework to measure whether this knowledge translates into accurate geographic reasoning across diverse, non-urban landscapes.

The LLMGeo Dataset

To facilitate this benchmark, a novel dataset was curated exclusively from Google Street View, focusing on natural and rural scenes rather than urban landmarks.

  • Global Coverage: Includes images from 115 countries.
  • Multi-Perspective: Each location provides four images corresponding to the cardinal directions (North, East, South, West) to simulate a human-like perspective.
  • Scale: The dataset is split into a Test set (1,000 images), a Train set (2,418 images), and a Comprehensive Train set (6,408 images).
Figure 1: Representative image samples from the LLMGeo test set, showcasing the diversity of rural and natural landscapes across different countries and coordinates.

Methodology

The evaluation framework consists of two primary tracks:

1. Training-free Evaluation

Models were tested "out of the box" using several prompting strategies:

  • Basic Prompting: A direct request for the country of origin.
  • Must-Guess: Forcing the model to provide a guess to eliminate "uncertain" responses.
  • Expert Tips: Providing heuristics (e.g., sun position, vegetation types, license plate formats) to nudge the model toward geographic reasoning.
  • Dynamic Few-shot (RAG): A Retrieval-Augmented Generation approach using CLIP embeddings to find the five most visually similar training images, providing them as context with known locations.

2. Training-based Evaluation

Open-source models, including LLaVA and InternLM-VL, were fine-tuned on the LLMGeo dataset to determine if specialized training could bridge the performance gap with larger closed-source models.

Key Results and Insights

The benchmarking process revealed several critical findings:

  • Gemini's Dominance: Google’s Gemini model emerged as the top performer in training-free scenarios, achieving 74.6% accuracy with the "Dynamic 5-shot" strategy. This likely stems from its extensive exposure to geographic data during pre-training.
  • The Impact of Heuristics: The "Tips" prompt significantly improved accuracy, confirming that LMMs possess latent geographic knowledge that requires specific activation.
  • Fine-tuning Efficacy: Fine-tuning transformed open-source models. LLaVA-13B improved from a baseline of 16.5% to 56.7% accuracy, surpassing the zero-shot performance of GPT-4V (51.3%).
  • LMMs vs. Specialized Models: General-purpose LMMs, when properly prompted or tuned, outperformed specialized models like GeoCLIP (25.8%), highlighting the advantage of broad world knowledge in complex reasoning tasks.

Conclusion and Future Directions

LLMGeo demonstrates that LMMs are powerful tools for image geolocation, particularly when augmented with retrieval strategies or fine-tuning. Current limitations include a focus on country-level granularity and a bias toward rural scenes. Future research will aim to evaluate finer-grained localization (city or GPS level), expand dataset diversity to complex urban environments, and investigate the interpretability of the models' geographic "Chain of Thought."

Summary updated

Abstract

Image geolocation is a critical task in various image-understanding applications. However, existing methods often fail when analyzing challenging, in-the-wild images. Inspired by the exceptional background knowledge of multimodal language models, we systematically evaluate their geolocation capabilities using a novel image dataset and a comprehensive evaluation framework. We first collect images from various countries via Google Street View. Then, we conduct training-free and training-based evaluations on closed-source and open-source multi-modal language models. we conduct both training-free and training-based evaluations on closed-source and open-source multimodal language models. Our findings indicate that closed-source models demonstrate superior geolocation abilities, while open-source models can achieve comparable performance through fine-tuning.
BibTeX
@misc{wang2024llmgeo,
  author = {Zhiqiang Wang and Dejia Xu and Rana Muhammad Shahroz Khan and Yanbin Lin and Zhiwen Fan and Xingquan Zhu},
  title = {{LLMGeo: Benchmarking Large Language Models on Image Geolocation In-the-wild}},
  year = {2024},
  eprint = {2405.20363},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.20363},
}
Figure