Skip to main content

No project description provided

Project description

🌎 GeoMapCLIP: Worldwide Map Image Geo-localization

GeoMapCLIP is a fine-tuned GeoCLIP.

ALT TEXT

Description

This project aims to develop a vision system capable of interpreting map images and extracting bounding box coordinates to describe map content. By fine-tuning models such as CLIP and applying image retrieval techniques, the system will learn to recognize legends, scales, symbols, and coordinate grids within geospatial maps, enabling automated extraction of structured spatial information. This advancement will significantly enhance the geospatial reasoning capabilities of large language models, supporting researchers in efficiently querying and leveraging legacy geospatial datasets. Initial development will focus on fine-tuning GeoCLIP (Contrastive Language-Image Pretraining) for map-specific tasks. The vision system will produce a list of coordinates corresponding to visual elements in map figures.

ALT TEXT

Method

Similarly to OpenAI's CLIP, GeoMapCLIP is trained contrastively by matching Image-GPS pairs. GeoMapCLIP learns distinctive visual features associated with different locations on earth.

Repo is at https://github.com/junghawoo/geomap-clip/

📎 Getting Started: API

You can install GeoMapCLIP's module using pip:

pip install geomapclip

or directly from source:

git clone https://github.com/junghawoo/geomap-clip
cd geomap-clip
python setup.py install

🗺️📍 Worldwide Map Image Geolocalization

ALT TEXT

Usage: GeoMapCLIP Inference

import torch
from geomapclip import GeoMapCLIP

model = GeoMapCLIP()

image_path = "image.png"

top_pred_gps, top_pred_prob = model.predict(image_path, top_k=5)

print("Top 5 GPS Predictions")
print("=====================")
for i in range(5):
    lat, lon = top_pred_gps[i]
    print(f"Prediction {i+1}: ({lat:.6f}, {lon:.6f})")
    print(f"Probability: {top_pred_prob[i]:.6f}")
    print("")

ALT TEXT

Usage: Pre-Trained Location Encoder

import torch
from geomapclip import LocationEncoder

gps_encoder = LocationEncoder()

gps_data = torch.Tensor([[40.7128, -74.0060], [34.0522, -118.2437]])  # NYC and LA in lat, lon
gps_embeddings = gps_encoder(gps_data)
print(gps_embeddings.shape) # (2, 512)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geomapclip-0.0.3.tar.gz (55.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geomapclip-0.0.3-py3-none-any.whl (47.8 MB view details)

Uploaded Python 3

File details

Details for the file geomapclip-0.0.3.tar.gz.

File metadata

  • Download URL: geomapclip-0.0.3.tar.gz
  • Upload date:
  • Size: 55.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for geomapclip-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1095cfb756bcb498bac74425ec974f07deda864857c08c7c0fbefe47ec68aa8f
MD5 06998a045ab56360be13f0334744ab7a
BLAKE2b-256 edb583d3b7fffea4b210ee94936aee296d7e5bf2f5a4ca987b0b62bb9b9969b9

See more details on using hashes here.

File details

Details for the file geomapclip-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: geomapclip-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 47.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for geomapclip-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d55623896e6b8da3472dd2a8a4b243fe09fe9980acc1663b21c22f5f59af80a
MD5 23872cec99fbf3ef433639fa1888dd0c
BLAKE2b-256 77faefe32c67208863cce592a4fb018b0b34e7dcf1bc385905f8c625f67cafff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page