Build a conversational AI that combines image geolocalization with contextual geographical knowledge. GAEA enables users to query precise GPS locations from images while receiving conversational responses about places, their attributes, and regional context—outperforming GPT-4o by 7.2% on geography-aware visual QA tasks.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add ADu2021/skillXiv --skill gaea-geolocation-aware-conversational-model --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Gaea Geolocation Aware Conversational Model?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/adu2021-gaea-geolocation-aware-conversational-model)More formats (shields.io, HTML) on the badges page.
---
name: gaea-geolocation-aware-conversational-model
title: "GAEA: A Geolocation Aware Conversational Assistant"
version: 0.0.2
engine: skillxiv-v0.0.2-claude-opus-4.6
license: MIT
url: "https://arxiv.org/abs/2503.16423"
keywords: [geolocation, conversational-ai, multimodal-models, image-geolocalization, visual-question-answering]
description: "Build a conversational AI that combines image geolocalization with contextual geographical knowledge. GAEA enables users to query precise GPS locations from images while receiving conversational responses about places, their attributes, and regional context—outperforming GPT-4o by 7.2% on geography-aware visual QA tasks."
---
## Core Concept
GAEA addresses a critical gap in large multimodal models: while LMMs can answer questions about images, they fail at specialized geolocation reasoning. GAEA fuses three capabilities: image-to-location prediction, geographical understanding, and conversational interaction. Unlike prior geo-localization models that only return coordinates, GAEA provides rich contextual knowledge about predicted locations—ideal for forensics, navigation, social media analysis, and creative applications requiring location-aware reasoning.
## Architecture Overview
The framework integrates three core components:
- **Vision-Language Backbone**: Qwen2.5-VL as the base LMM, which combines joint image-text embeddings with separate image and text encoders for multimodal understanding
- **Dataset Foundation**: GAEA-1.4M—a 800k-image dataset with 1.4M question-answer pairs curated from OpenStreetMap attributes and geographical context clues
- **Evaluation Benchmark**: GAEA-Bench with 3.5k diverse image-text pairs testing multiple question types (MCQs, true/false, long-form VQA, short-form VQA)
- **Training Strategy**: Single-stage fine-tuning using LoRA-style adaptation to inject geolocation-specific knowledge without full retraining
## Implementation Steps
### 1. Dataset Preparation with OpenStreetMap Integration
The dataset leverages OSM attributes to extract geographical context clues. This example shows how to structure queries from location metadata:
```python
import json
from typing import Dict, List
def create_geo_qa_pairs(osm_attributes: Dict, image_path: str) -> List[Dict]:
"""
Generate diverse question-answer pairs from OpenStreetMap attributes.
Combines location metadata with image features for geolocation reasoning.
"""
qa_pairs = []
# Multiple-choice questions about location types
mcq = {
"type": "mcq",
"question": f"What type of location is shown in {image_path}?",
"options": [osm_attributes['type'], "marketplace", "residential", "forest"],
"answer": osm_attributes['type']
}
qa_pairs.append(mcq)
# True/False questions about geographical features
tf = {
"type": "true_false",
"question": f"Is this location in {osm_attributes['country']}?",
"answer": True
}
qa_pairs.append(tf)
# Short-form VQA about context clues
svqa = {
"type": "short_vqa",
"question": "What geographical clues help identify this location?",
"answer": osm_attributes.get('context_clues', [])
}
qa_pairs.append(svqa)
return qa_pairs
```
### 2. Fine-tuning with LoRA Adaptation
LoRA allows efficient adaptation of Qwen2.5-VL for geolocation without full retraining. The following code configures the training setup:
```python
from peft import LoraConfig, get_peft_model
from transformers import AutoModelForCausalLM, TrainingArguments, Trainer
def setup_lora_training(model_name: str = "Qwen/Qwen2.5-VL"):
"""
Configure LoRA adapter for geolocation-aware fine-tuning.
Uses r=16 rank and alpha=32 scaling for efficient adaptation.
"""
base_model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
lora_config = LoraConfig(
r=16, # LoRA rank
lora_alpha=32, # Scaling factor
target_modules=["q_proj", "v_proj"], # Adapt query and value projections
lora_dropout=0.05,
bias="none",
task_type="CAUSAL_LM"
)
model = get_peft_model(base_model, lora_config)
training_args = TrainingArguments(
output_dir="./gaea_checkpoint",
learning_rate=1e-4,
per_device_train_batch_size=8,
num_train_epochs=3,
save_strategy="epoch",
eval_strategy="epoch"
)
return model, training_args
```
### 3. Multi-Question Type Inference Pipeline
GAEA processes diverse question formats. This pipeline handles MCQs, true/false, and open-ended queries:
```python
def inference_with_question_routing(model, image_tensor, question: str):
"""
Route questions to appropriate inference mode based on type.
Handles multiple-choice (MCQs), true/false, and free-form VQA.
"""
question_type = detect_question_type(question)
if question_type == "mcq":
# For MCQs, compute logits over choice tokens
prompt = f"Image: [image]\nChoose from options: {question}"
output = model.generate(image_tensor, prompt, max_length=10)
return parse_multiple_choice(output)
elif question_type == "true_false":
# For T/F, classify as binary decision
prompt = f"Image: [image]\nTrue or False: {question}"
output = model.generate(image_tensor, prompt, max_length=5)
return output.strip().lower() in ["true", "yes"]
else: # Free-form VQA
# Generate conversational response with geographical reasoning
prompt = f"Image: [image]\n{question}"
output = model.generate(image_tensor, prompt, max_length=256)
return output
def detect_question_type(question: str) -> str:
"""Classify question type by linguistic patterns."""
if "true" in question.lower() or "false" in question.lower():
return "true_false"
elif any(opt in question.upper() for opt in ["A)", "B)", "C)", "D)"]):
return "mcq"
else:
return "free_form"
```
### 4. Image Preprocessing for Geolocation Tasks
Geolocation requires handling diverse image resolutions and geographical contexts:
```python
from PIL import Image
import torchvision.transforms as transforms
def preprocess_geolocation_image(image_path: str, target_size: tuple = (448, 448)):
"""
Prepare image for geolocation inference with optimal resolution.
Supports both standard and high-resolution variants (up to 1000x1000).
"""
image = Image.open(image_path).convert('RGB')
# Standard resolution for efficient processing
if image.size[0] > 800:
# High-resolution variant for detailed geographical features
transforms_standard = transforms.Compose([
transforms.Resize((1000, 1000), interpolation=transforms.InterpolationMode.BILINEAR),
transforms.ToTensor(),
transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073],
std=[0.26862954, 0.26130258, 0.27577711])
])
else:
# Standard resolution for efficiency
transforms_standard = transforms.Compose([
transforms.Resize(target_size, interpolation=transforms.InterpolationMode.BILINEAR),
transforms.ToTensor(),
transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073],
std=[0.26862954, 0.26130258, 0.27577711])
])
return transforms_standard(image).unsqueeze(0)
```
## Practical Guidance
### When to Use GAEA
- **Forensic Analysis**: Determine photo origin from visual cues when metadata is stripped
- **Social Media Verification**: Fact-check location claims in user-generated content
- **Navigation & Tourism**: Provide conversational guidance about places shown in images
- **Environmental Monitoring**: Query geographical attributes from satellite or drone imagery
- **Creative Applications**: Generate contextual narratives about image locations
### When NOT to Use GAEA
- **Real-time GPS Tracking**: GAEA predicts location from visual cues, not sensor data—not suitable for continuous tracking
- **Military/Surveillance**: Privacy-sensitive applications requiring authentication controls
- **Datasets Without Diverse Geography**: GAEA performance degrades on underpopulated regions with sparse OSM coverage
- **Extremely Low-Resolution Images**: Geolocation requires sufficient visual detail for context clues
### Hyperparameter Tuning
- **LoRA Rank (r)**: Default 16 balances adaptation vs. efficiency. Increase to 32 for larger datasets
- **Learning Rate**: 1e-4 works well; reduce to 5e-5 if overfitting on small datasets
- **Batch Size**: 8 per device; increase to 16 if GPU memory allows for faster convergence
- **Image Resolution**: Use 448×448 for speed, 1000×1000 for fine-grained geographical features
- **Question Types Mix**: Balance MCQs (40%), T/F (30%), and free-form VQA (30%) in training
### Common Pitfalls
1. **Imbalanced Question Distribution**: Skewing toward one question type (e.g., only MCQs) degrades conversational ability
2. **Limited Geographical Diversity**: Training only on US images makes the model fail on international locations
3. **Noisy OSM Attributes**: Validate extracted attributes before QA generation—incorrect metadata corrupts training
4. **Overfitting on Popular Landmarks**: Collect diverse examples from lesser-known regions to avoid memorization
5. **Ignoring Image Quality**: Low-resolution or heavily filtered images provide insufficient cues for reliable geolocation
## References
- Qwen2.5-VL architecture: Vision-Language integration for open-source multimodal reasoning
- OpenStreetMap API: Global source of geographical metadata and context attributes
- LoRA (Low-Rank Adaptation): Parameter-efficient fine-tuning for large models
- GeoCLIP: Prior work using contrastive learning for image-to-GPS retrieval
- GAEA Dataset: 1.4M QA pairs curated across MP-16, GLD-v2, and diverse geographical sources
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!