SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.09692 · 2024

XoFTR: Cross-modal Feature Matching Transformer

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2404.09692.json · badge: /api/ran/2404.09692.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
ondert/xoftr canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_max_candidates Ran
ran, honoured the contract we drafted
ondert/xoftr/src/xoftr/xoftr_module/coarse_matching.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yuansun-xjtu/icomma, is pointer only (licence: NONE) · get_code("67a8b79fd250e22b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yuansun-xjtu/icomma, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

conv1x1 Ran
ran; our contract draft was wrong, not the code
ondert/xoftr/src/xoftr/backbone/resnet.py
code served (permissive licence) · get_code("8ba161d133fcc70b")
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 Conv2d. 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
ondert/xoftr/src/xoftr/backbone/resnet.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_2d_gaussian_kernel Ran
ran, honoured the contract we drafted
ondert/xoftr/src/xoftr/utils/supervision.py
code served (permissive licence) · get_code("a642a221ca7c4eff")
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 2, dtype family float, shape (5, 5) 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

torch.manual_seed(0)

ARGS = {
    "kernel_size": 5,
    "sigma": 1.0,
    "device": "cpu"
}
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 2, dtype family float, shape (5, 5) — shape (5, 5) 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
mask_pts_at_padded_regions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ondert/xoftr/src/xoftr/utils/supervision.py
code served (permissive licence) · get_code("ce0eb36a1f2000b0")
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 3, dtype family float, shape (2, 12, 2) 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
from einops import repeat

torch.manual_seed(0)

# Analyze the function:
# - grid_pt: used with indexing grid_pt[~mask.bool()] = 0
#   So it needs to be a tensor that supports boolean indexing
# - mask: used with repeat(mask, 'n h w -> n (h w) c', c=2)
#   So it needs shape (n, h, w) and will be repeated to (n, h*w, 2)
#   Then used for boolean indexing, so needs .bool() method

# Create small tensors with distinct dimensions
n, h, w = 2, 3, 4
c = 2

# mask: shape (n, h, w) - will be repeated to (n, h*w, c)
mask = torch.ones(n, h, w)

# grid_pt: shape (n, h*w, c) to match the repeated mask shape
grid_pt = torch.randn(n, h * w, c)

ARGS = {
    "grid_pt": grid_pt,
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 12, 2) — shape (2, 12, 2) 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
warp_kpts Ran
ran; our contract draft was wrong, not the code
ondert/xoftr/src/xoftr/utils/geometry.py
code served (permissive licence) · get_code("b8ae61b5c67462ca")
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)

# Batch size: 2, number of keypoints: 4, image height: 8, image width: 6
N = 2
L = 4
H = 8
W = 6

# kpts0: [N, L, 2] - keypoint coordinates (x, y)
kpts0 = torch.tensor([
    [[1.5, 2.3], [2.1, 3.4], [3.2, 1.5], [4.5, 5.2]],
    [[0.8, 1.2], [2.3, 4.1], [3.7, 2.8], [1.5, 6.2]]
], dtype=torch.float32)

# depth0: [N, H, W] - depth map for first image
depth0 = torch.rand(N, H, W) * 5.0 + 0.5  # random depths between 0.5 and 5.5
depth0[0, 2, 1] = 2.5  # set depth at keypoint location
depth0[0, 3, 2] = 2.1
depth0[0, 1, 3] = 1.8
depth0[0, 5, 4] = 3.2
depth0[1, 1, 0] = 1.5
depth0[1, 4, 2] = 2.8
depth0[1, 2, 3] = 2.2
depth0[1, 6, 1] = 3.1

# depth1: [N, H, W] - depth map for second image
depth1 = torch.rand(N, H, W) * 5.0 + 0.5
depth1[0, 3, 2] = 2.6  # similar depths for consistency check
depth1[0, 4, 3] = 2.0
depth1[0, 2, 4] = 1.7
depth1[0, 6, 5] = 3.3
depth1[1, 2, 1] = 1.6
depth1[1, 5, 3] = 2.9
depth1[1, 3, 4] = 2.3
depth1[1, 7, 2] = 3.2

# T_0to1: [N, 3, 4] - transformation matrix from frame 0 to frame 1
T_0to1 = torch.eye(4).unsqueeze(0).repeat(N, 1, 1)[:, :3, :]  # identity transform
T_0to1[0, 0, 3] = 0.1  # small translation
T_0to1[1, 1, 3] = 0.05

# K0: [N, 3, 3] - intrinsic matrix for camera 0
K0 = torch.tensor([
    [[500.0, 0.0, 160.0],
     [0.0, 500.0, 120.0],
     [0.0, 0.0, 1.0]],
    [[480.0, 0.0, 160.0],
     [0.0, 480.0, 120.0],
     [0.0, 0.0, 1.0]]
], dtype=torch.float32)

# K1: [N, 3, 3] - intrinsic matrix for camera 1
K1 = torch.tensor([
    [[500.0, 0.0, 160.0],
     [0.0, 500.0, 120.0],
     [0.0, 0.0, 1.0]],
    [[480.0, 0.0, 160.0],
     [0.0, 480.0, 120.0],
     [0.0, 0.0, 1.0]]
], dtype=torch.float32)

ARGS = {
    "kpts0": kpts0,
    "depth0": depth0,
    "depth1": depth1,
    "T_0to1": T_0to1,
    "K0": K0,
    "K1": K1,
}
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
warp_kpts_fine Ran
ran; our contract draft was wrong, not the code
ondert/xoftr/src/xoftr/utils/geometry.py
code served (permissive licence) · get_code("a5a46d9a8b0a60be")
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)

# Image dimensions
H, W = 32, 40
# Number of keypoints per image
L = 8
# Batch size
N = 2
# Number of selected batch ids
M = 2

# kpts0: [N, L, 2] - keypoint coordinates (x, y)
kpts0 = torch.rand(N, L, 2) * torch.tensor([W - 1, H - 1])

# depth0: [N, H, W] - depth map for image 0
depth0 = torch.rand(N, H, W) * 5.0
depth0[depth0 < 0.5] = 0  # Some zero depths

# depth1: [N, H, W] - depth map for image 1
depth1 = torch.rand(N, H, W) * 5.0
depth1[depth1 < 0.5] = 0  # Some zero depths

# T_0to1: [N, 3, 4] - transformation matrix from frame 0 to frame 1
T_0to1 = torch.zeros(N, 3, 4)
T_0to1[:, :3, :3] = torch.eye(3).unsqueeze(0).repeat(N, 1, 1)  # Identity rotation
T_0to1[:, :3, 3] = torch.randn(N, 3) * 0.1  # Small translation

# K0: [N, 3, 3] - intrinsic matrix for camera 0
K0 = torch.eye(3).unsqueeze(0).repeat(N, 1, 1)
K0[:, 0, 0] = 500.0  # fx
K0[:, 1, 1] = 500.0  # fy
K0[:, 0, 2] = W / 2  # cx
K0[:, 1, 2] = H / 2  # cy

# K1: [N, 3, 3] - intrinsic matrix for camera 1
K1 = torch.eye(3).unsqueeze(0).repeat(N, 1, 1)
K1[:, 0, 0] = 500.0  # fx
K1[:, 1, 1] = 500.0  # fy
K1[:, 0, 2] = W / 2  # cx
K1[:, 1, 2] = H / 2  # cy

# b_ids: [M] - selected batch ids
b_ids = torch.tensor([0, 1])

ARGS = {
    "kpts0": kpts0,
    "depth0": depth0,
    "depth1": depth1,
    "T_0to1": T_0to1,
    "K0": K0,
    "K1": K1,
    "b_ids": b_ids,
}
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
spvs_coarse Not yet run
unverified (harvested, no recorded run)
ondert/xoftr/src/xoftr/utils/supervision.py
code served (permissive licence) · get_code("4d55e92108cd25e2")
How it ran

no invocation recorded.

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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 2 later) and 4 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
conv3x3 686 other papers
578 dated earlier, 9 the same month, 82 later, 17 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 16 other papers
16 dated earlier · 1 only as an assembly brick
2003.00707 (2020-03)
Unbiased Mean Teacher for Cross-domain Object Detection
2007.03815 (2020-07)
Real-time Semantic Segmentation with Fast Attention
2104.00680 (2021-04)
LoFTR: Detector-Free Local Feature Matching with Transformers
and 13 more not named here
compute_max_candidates 5 other papers
4 dated earlier, 1 later
2104.00680 (2021-04)
LoFTR: Detector-Free Local Feature Matching with Transformers
2203.09645 (2022-03)
MatchFormer: Interleaving Attention in Transformers for Feature Matching
2204.10144 (2022-04)
A case for using rotation invariant features in state of the art feature matchers
and 2 more not named here
warp_kpts 2 other papers
2 dated earlier
2104.00680 (2021-04)
LoFTR: Detector-Free Local Feature Matching with Transformers
2402.02800 (2024-02)
Extreme Two-View Geometry From Object Poses with Diffusion Models

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-22.

Repositories linked to this paper

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

Abstract

We introduce, XoFTR, a cross-modal cross-view method for local feature matching between thermal infrared (TIR) and visible images. Unlike visible images, TIR images are less susceptible to adverse lighting and weather conditions but present difficulties in matching due to significant texture and intensity differences. Current hand-crafted and learning-based methods for visible-TIR matching fall short in handling viewpoint, scale, and texture diversities. To address this, XoFTR incorporates masked image modeling pre-training and fine-tuning with pseudo-thermal image augmentation to handle the modality differences. Additionally, we introduce a refined matching pipeline that adjusts for scale discrepancies and enhances match reliability through sub-pixel level refinement. To validate our approach, we collect a comprehensive visible-thermal dataset, and show that our method outperforms existing methods on many benchmarks.

For agents

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

get_harvested_code_for_paper("2404.09692")
get_code_for_paper("2404.09692")
have("2404.09692")

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

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

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

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

Connect an agent — have() is free.