Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Open compass VLMEvalKit MEGABench Geo Proximity

From Leeroopedia
Revision as of 13:30, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Open_compass_VLMEvalKit_MEGABench_Geo_Proximity.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Field Value
source VLMEvalKit
domain Vision, Evaluation, Geolocation, Proximity Scoring

Overview

Implements geographic proximity scoring for location-based tasks in the MEGA-Bench evaluation framework using geopy distance calculation.

Description

This module provides `calculate_proximity_score` which computes an exponentially decaying score based on the geodesic distance between predicted and actual coordinates, with a configurable threshold `k` (default 100 km) at which the score reaches 0.5. It includes `try_geolocate` for cached geocoding lookups via Nominatim and `location_to_coords` for converting country/state/city strings to latitude/longitude coordinates. Rate limiting is applied to geocoding requests.

Usage

Called internally by the corresponding dataset class during evaluation.

Code Reference

  • Source: vlmeval/dataset/utils/megabench/scoring/geo_proximity.py, Lines: L1-100
  • Import: from vlmeval.dataset.utils.megabench.scoring.geo_proximity import calculate_proximity_score

Key Functions:

def calculate_proximity_score(guess_coords, actual_coords, k=100): ...
def try_geolocate(query): ...
def location_to_coords(country, province_or_state, municipality): ...

I/O Contract

Direction Description
Inputs Predicted and actual coordinate tuples (latitude, longitude); or location strings (country, state, city)
Outputs Float proximity score between 0 and 1, exponentially decaying with distance

Usage Examples

from vlmeval.dataset.utils.megabench.scoring.geo_proximity import calculate_proximity_score

score = calculate_proximity_score((40.7128, -74.0060), (40.7580, -73.9855))

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment