Downloads · 30 days
8
18% of all-time downloads
isaaccorley/hydroloc
hydroloc is a machine learning model from isaaccorley. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as apache-2.0.
A ReSIREN location encoder that maps a geographic coordinate (lat, lon) to a 512-d embedding. It is a MIND-style model (residual SIREN trunk over an Equal-Earth projection of the coordinate) trained by distilling two…
Downloads · 30 days
8
18% of all-time downloads
All-time downloads
44
Public
Parameters
1.1M
4.2 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.2 MB · 100%
From the Hugging Face model README
A ReSIREN location encoder that maps a geographic coordinate (lat, lon) to a 512-d
embedding. It is a MIND-style model (residual SIREN trunk
over an Equal-Earth projection of the coordinate) trained by distilling two frozen image
foundation models evaluated over ~106k global Sentinel-2 water patches from the
Hydro dataset:
vit_large_patch16_dinov3, timm) on the RGB quicklooks → 1024-dThe trunk is supervised with a Matryoshka objective (nested prefixes 64/128/256/512),
so any leading slice embedding[:, :m] is itself a usable, compact location embedding — the
signal is front-loaded into the earliest dimensions.
import torch
from hydroloc import HydroLoc
model = HydroLoc.from_pretrained("isaaccorley/hydroloc").eval()
latlon = torch.tensor([[37.77, -122.42], # (lat, lon) in degrees
[-8.70, 45.00]])
with torch.no_grad():
emb = model(latlon) # [2, 512]
emb64 = emb[:, :64] # compact 64-d Matryoshka prefix
hydroloc.py is self-contained and depends only on torch (plus huggingface_hub and
safetensors for from_pretrained).
Input is (..., 2) with column 0 = latitude, column 1 = longitude, in degrees. Internally
the coordinate is mapped through the Equal-Earth projection before the SIREN trunk.
hydroloc.py — standalone model definition + loadermodel.safetensors — trunk weightsconfig.json — architecture config| Trunk | residual SIREN, embed_dim=512, depth=4, w0_first=30 |
| Input | Equal-Earth-projected (lat, lon) |
| Output | 512-d embedding; Matryoshka prefixes [64, 128, 256, 512] |
| Objective | cosine + MSE distillation of L2-normalized teacher embeddings |
| Teachers | DINOv3 ViT-L/16 (RGB), OlmoEarth v1.2 Base (multispectral) |
The per-teacher distillation heads are training-only and not included; the released artifact is the coordinate → embedding trunk.