SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.20470 · 2024

STHN: Deep Homography Estimation for UAV Thermal Geo-localization with Satellite Imagery

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.20470.json · badge: /api/ran/2405.20470.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
arplaboratory/STHN canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_overlap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
arplaboratory/STHN/global_pipeline/h5_transformer.py
code served (permissive licence) · get_code("44bf5ced04fc8132")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects two region arguments, each representing a bounding box
# with format [x_min, y_min, x_max, y_max]
# The function checks if valid_region[2] > valid_region[0] and valid_region[3] > valid_region[1]
# so we need overlapping regions to avoid the ValueError

database_region = [10, 20, 50, 60]
query_region = [30, 40, 70, 80]

ARGS = {
    "database_region": database_region,
    "query_region": query_region,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
collate_fn Ran
ran; our contract draft was wrong, not the code
arplaboratory/STHN/global_pipeline/datasets_ws.py
code served (permissive licence) · get_code("247429ce34fc3671")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Build a batch with 2 samples
# Each sample is a tuple of (images, triplets_local_indexes, triplets_global_indexes, utms)

# Sample 1
images_1 = torch.randn(12, 3, 4, 4)  # 12 images, 3 channels, 4x4 spatial
triplets_local_1 = torch.tensor([[0, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7], [6, 7, 8], [7, 8, 9], [8, 9, 10], [9, 10, 11]])  # 10 triplets, each with 3 indexes
triplets_global_1 = torch.tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])  # 12 global indexes
utms_1 = torch.randn(12, 2)  # 12 images, 2D coordinates

sample_1 = (images_1, triplets_local_1, triplets_global_1, utms_1)

# Sample 2
images_2 = torch.randn(12, 3, 4, 4)  # 12 images, 3 channels, 4x4 spatial
triplets_local_2 = torch.tensor([[0, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7], [6, 7, 8], [7, 8, 9], [8, 9, 10], [9, 10, 11]])  # 10 triplets, each with 3 indexes
triplets_global_2 = torch.tensor([12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])  # 12 global indexes
utms_2 = torch.randn(12, 2)  # 12 images, 2D coordinates

sample_2 = (images_2, triplets_local_2, triplets_global_2, utms_2)

batch = [sample_1, sample_2]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_and_preprocess_satellite Ran
ran, honoured the contract we drafted
arplaboratory/STHN/STHN_demo.py
code served (permissive licence) · get_code("2d86f6c4f9c9d299")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (1, 3, 16, 16) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torchvision.transforms as transforms
from PIL import Image
import io
import numpy as np

torch.manual_seed(0)

# Create a small dummy image in memory
img_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')

# Save to bytes buffer
img_buffer = io.BytesIO()
img.save(img_buffer, format='PNG')
img_buffer.seek(0)

# Create a temporary file-like path by saving to a real temporary location
import tempfile
with tempfile.NamedTemporaryFile(suffix='.png', delete=False) as tmp:
    tmp.write(img_buffer.getvalue())
    image_path = tmp.name

ARGS = {
    'image_path': image_path,
    'database_size': 16
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 16, 16) — shape (1, 3, 16, 16) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_and_preprocess_thermal Ran
ran, honoured the contract we drafted
arplaboratory/STHN/STHN_demo.py
code served (permissive licence) · get_code("2ed2d9477dedd236")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (1, 3, 128, 128) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from PIL import Image
import io

torch.manual_seed(0)

# Create a minimal valid thermal image in memory
# Create a simple grayscale image (8-bit, single channel)
img_array = np.uint8(np.random.randint(0, 256, size=(64, 64)))
img = Image.fromarray(img_array, mode='L')

# Save to bytes buffer to simulate a file path
img_buffer = io.BytesIO()
img.save(img_buffer, format='PNG')
img_buffer.seek(0)

# Create a temporary file-like object with a name attribute
class FakeImagePath:
    def __init__(self, img_pil):
        self.img_pil = img_pil
    
    def __str__(self):
        return "fake_thermal.png"

# Instead, we'll create an actual temporary file approach
import tempfile
import os

# Create a temporary image file
temp_file = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
img.save(temp_file.name)
temp_file.close()

image_path = temp_file.name
resize_width = 128

ARGS = {
    'image_path': image_path,
    'resize_width': resize_width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 128, 128) — shape (1, 3, 128, 128) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mac Ran
ran; our contract draft was wrong, not the code
arplaboratory/STHN/global_pipeline/model/functional.py
code served (permissive licence) · get_code("0b387e5979c78d55")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 1, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# mac() takes a single parameter x, which is passed to F.adaptive_max_pool2d
# F.adaptive_max_pool2d expects a 4D tensor (batch, channels, height, width)
# Create a small tensor with distinct dimensions: batch=2, channels=4, height=3, width=5
x = torch.randn(2, 4, 3, 5)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 1, 1) — shape (2, 4, 1, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
path_to_pil_img Ran
ran, honoured the contract we drafted
arplaboratory/STHN/global_pipeline/datasets_ws.py
code served (permissive licence) · get_code("f0db6d80ebf12bfa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Image. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from PIL import Image
import io

# Create a minimal valid image as bytes in memory
# Create a small 4x3 RGB image
img = Image.new('RGB', (4, 3), color=(255, 0, 0))
img_bytes = io.BytesIO()
img.save(img_bytes, format='PNG')
img_bytes.seek(0)

# Since the function uses Image.open(path), we need to provide a path
# We'll create a temporary file-like object, but we need an actual path string
# For testing purposes, we'll use a data URI approach or mock

# Actually, let's create a simple approach: use a string path
# Since we can't do actual file I/O, we'll need to mock or use a workaround
# The simplest is to create a temporary file

import tempfile
import os

# Create a temporary directory and file
temp_dir = tempfile.gettempdir()
temp_path = os.path.join(temp_dir, 'test_image.png')

# Create and save a test image to a real temporary file
test_img = Image.new('RGB', (4, 3), color=(255, 0, 0))
test_img.save(temp_path)

ARGS = {
    'path': temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sare_ind Ran
ran; our contract draft was wrong, not the code
arplaboratory/STHN/global_pipeline/model/functional.py
code served (permissive licence) · get_code("463b2f96158e03a8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Based on the function signature and body:
# - query: tensor of shape 1xn_features, used in subtraction and sum
# - positive: tensor of shape 1xn_features, used in subtraction
# - negative: tensor of shape 1xn_features, used in subtraction
# The function performs: ((query - positive) ** 2).sum(1) and ((query - negative) ** 2).sum(1)
# Then concatenates results and applies log_softmax

# Create small tensors with shape 1xn_features where n_features=4
n_features = 4

query = torch.randn(1, n_features)
positive = torch.randn(1, n_features)
negative = torch.randn(1, n_features)

ARGS = {
    "query": query,
    "positive": positive,
    "negative": negative
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sare_joint Ran
ran; our contract draft was wrong, not the code
arplaboratory/STHN/global_pipeline/model/functional.py
code served (permissive licence) · get_code("d15fdc91eec37e29")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors with distinct sizes
# query: 1 x n_features
query = torch.randn(1, 4)

# positive: 1 x n_features (same n_features as query)
positive = torch.randn(1, 4)

# negatives: n_negative x n_features (multiple negatives, same n_features)
negatives = torch.randn(3, 4)

ARGS = {
    "query": query,
    "positive": positive,
    "negatives": negatives
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 8 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
path_to_pil_img 9 other papers
5 dated earlier, 4 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2306.02994 (2023-06)
Long-range UAV Thermal Geo-localization with Satellite Imagery
2310.05184 (2023-10)
AANet: Aggregation and Alignment Network with Semi-hard Positive Sample Mining for Hierarchical Place Recognition
and 6 more not named here
mac 3 other papers
2 dated earlier, 1 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2306.02994 (2023-06)
Long-range UAV Thermal Geo-localization with Satellite Imagery
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization
sare_ind 3 other papers
2 dated earlier, 1 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2306.02994 (2023-06)
Long-range UAV Thermal Geo-localization with Satellite Imagery
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization
sare_joint 3 other papers
2 dated earlier, 1 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2306.02994 (2023-06)
Long-range UAV Thermal Geo-localization with Satellite Imagery
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization
calc_overlap 2 other papers
1 dated earlier, 1 later
2306.02994 (2023-06)
Long-range UAV Thermal Geo-localization with Satellite Imagery
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization
collate_fn 1 other paper
1 later
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization
load_and_preprocess_satellite 1 other paper
1 later
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization
load_and_preprocess_thermal 1 other paper
1 later
2502.01035 (2025-02)
UASTHN: Uncertainty-Aware Deep Homography Estimation for UAV Satellite-Thermal Geo-localization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Accurate geo-localization of Unmanned Aerial Vehicles (UAVs) is crucial for outdoor applications including search and rescue operations, power line inspections, and environmental monitoring. The vulnerability of Global Navigation Satellite Systems (GNSS) signals to interference and spoofing necessitates the development of additional robust localization methods for autonomous navigation. Visual Geo-localization (VG), leveraging onboard cameras and reference satellite maps, offers a promising solution for absolute localization. Specifically, Thermal Geo-localization (TG), which relies on image-based matching between thermal imagery with satellite databases, stands out by utilizing infrared cameras for effective nighttime localization. However, the efficiency and effectiveness of current TG approaches, are hindered by dense sampling on satellite maps and geometric noises in thermal query images. To overcome these challenges, we introduce STHN, a novel UAV thermal geo-localization approach that employs a coarse-to-fine deep homography estimation method. This method attains reliable thermal geo-localization within a 512-meter radius of the UAV's last known location even with a challenging 11% size ratio between thermal and satellite images, despite the presence of indistinct textures and self-similar patterns. We further show how our research significantly enhances UAV thermal geo-localization performance and robustness against geometric noises under low-visibility conditions in the wild. The code is made publicly available.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.20470")
get_code_for_paper("2405.20470")
have("2405.20470")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2405.20470.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2405.20470.svg)](https://syntology.ai/paper/2405.20470)

Connect an agent — have() is free.