TorchGeo

Model Weights extracted below:

import os
import hashlib

import torch
from model import EarthLoc

# Download the model checkpoint using the following command:
# rsync -rhz rsync://vandaldata.polito.it/sf_xl/EarthLoc/data/best_trained_model.pt .
path = "best_trained_model.pt"
model = EarthLoc(image_size=320, desc_dim=4096)
state_dict = torch.load(path, weights_only=True, map_location="cpu")
state_dict = {k.replace("backbone.model.", "backbone."): v for k, v in state_dict.items()}
model.load_state_dict(state_dict, strict=True)

filename = "earthloc.pth"
torch.save(model.state_dict(), filename)
md5 = hashlib.md5(open(filename, "rb").read()).hexdigest()[:8]
os.rename(filename, filename.replace(".pth", f"-{md5}.pth"))
Downloads last month
16
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support