No project description provided
Project description
🌎 GeoMapCLIP: Worldwide Map Image Geo-localization
GeoMapCLIP is a fine-tuned GeoCLIP.
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.
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
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("")
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1095cfb756bcb498bac74425ec974f07deda864857c08c7c0fbefe47ec68aa8f
|
|
| MD5 |
06998a045ab56360be13f0334744ab7a
|
|
| BLAKE2b-256 |
edb583d3b7fffea4b210ee94936aee296d7e5bf2f5a4ca987b0b62bb9b9969b9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d55623896e6b8da3472dd2a8a4b243fe09fe9980acc1663b21c22f5f59af80a
|
|
| MD5 |
23872cec99fbf3ef433639fa1888dd0c
|
|
| BLAKE2b-256 |
77faefe32c67208863cce592a4fb018b0b34e7dcf1bc385905f8c625f67cafff
|