SpotAgent: Grounding Visual Geo-localization in Large Vision-Language Models through Agentic Reasoning
Research code release for agentic geo-localization: tools + reasoning + verification.
bash scripts/setup_deps.shbash scripts/verify.shbash install_spotagent.sh
conda activate spotagentcp .env.example .env
set -a
source .env
set +aCommon variables:
TAVILY_API_KEYYOU_API_KEYMCP_SERVER_URLGOOGLE_MAPS_API_KEYVLLM_HOSTVLLM_PORTMODEL_NAME
export MODEL_NAME=/path/to/your/model
bash inference/vllm_deploy_qwen25vl.shNote:
--limit-mm-per-promptformat depends on vLLM version.
- vLLM 0.13+ expects
image=8(KEY=VALUE)- vLLM 0.8.x expects JSON:
{"image":8}You can override via:
export LIMIT_MM_PER_PROMPT='{"image":8}' # for vLLM 0.8.x # or export LIMIT_MM_PER_PROMPT="image=8" # for vLLM 0.13+
export VLLM_HOST=localhost
export VLLM_PORT=12005
export MCP_SERVER_URL=http://localhost:3000/mcp
python inference/inference_im2gps3k.py \
--image_dir /path/to/images \
--output /path/to/output.jsonl \
--temp_dir /path/to/artifacts \
--num_workers 4python inference/evaluate.py \
--pred /path/to/output.jsonl \
--gt_csv /path/to/gt.csvInference artifacts and JSONL outputs are organized under .temp/outputs/.
- Example bundle path:
.temp/outputs/agent_check_bundle/ - Example prediction file:
.temp/outputs/agent_check_bundle/agent_check.jsonl - Typical structure:
<bundle>/<run_name>.jsonl<bundle>/<run_name>_artifacts/
bash train/sft/run_sft.sh
bash train/cold_start/cold_start_mp16_reason_latlon.sh
bash train/rl/run_mp16_1_5_rw_linear_hard.shTraining entry points and details are documented in
train/README.md.
spotagent/
inference/
vllm_deploy_qwen25vl.sh
inference_im2gps3k.py
evaluate.py
utils_vllm.py
utils_agent_tool.py
utils.py
spotagent_tools/
googlemcp/
assets/
scripts/
setup_deps.sh
train/
- This repo keeps the minimal inference + evaluation stack and excludes large weights and datasets.
LLaMA-Factoryandverlare external dependencies pulled viascripts/setup_deps.sh.- If you need Google Maps geocoding, launch GoogleMCP and set
GOOGLE_MAPS_API_KEY.
Some scripts contain default absolute paths. Please replace them with your local paths when running.
Examples can be found in training scripts under train/.