SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.12748 · ECCV · 2022

SC-wLS: Towards Interpretable Feed-forward Camera Re-localization

Hao Zhao, Xin Wu, Hongbin Zha, Shunkai Li, Yingdian Cao

arXiv · PDF · Open in the Atlas

Code that ran

18 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (13 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 13 have no contract verdict; 5 failures of our instrument; 4 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/2210.12748.json · badge: /api/ran/2210.12748.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
xinwu98/sc-wls marked official in Papers with Code
Papers with Code archive
17 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AttentionalGNN_layer Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("ba2eebe183539fd3")
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 an instance of its own class, AttentionalGNN_layer: the run constructed the object and did not call it, so no result was computed. 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
from copy import deepcopy

torch.manual_seed(0)

def attention(query, key, value):
    dim = query.shape[1]
    scores = torch.einsum('bdhn,bdhm->bhnm', query, key) / dim ** 0.5
    prob = torch.nn.functional.softmax(scores, dim=-1)
    return (torch.einsum('bhnm,bdhm->bdhn', prob, value), prob)

class MultiHeadedAttention(nn.Module):
    """ Multi-head attention to increase model expressivitiy """

    def __init__(self, num_heads: int, d_model: int):
        super().__init__()
        assert d_model % num_heads == 0
        self.dim = d_model // num_heads
        self.num_heads = num_heads
        self.merge = nn.Conv1d(d_model, d_model, kernel_size=1)
        self.proj = nn.ModuleList([deepcopy(self.merge) for _ in range(3)])

    def forward(self, query, key, value):
        batch_dim = query.size(0)
        query, key, value = [l(x).view(batch_dim, self.dim, self.num_heads, -1) for l, x in zip(self.proj, (query, key, value))]
        x, _ = attention(query, key, value)
        return self.merge(x.contiguous().view(batch_dim, self.dim * self.num_heads, -1))

def MLP(channels: list, do_bn=True):
    """ Multi-layer perceptron """
    n = len(channels)
    layers = []
    for i in range(1, n):
        layers.append(nn.Conv1d(channels[i - 1], channels[i], kernel_size=1, bias=True))
        if i < n - 1:
            if do_bn:
                layers.append(nn.BatchNorm1d(channels[i]))
            layers.append(nn.ReLU())
    return nn.Sequential(*layers)

class AttentionalPropagation(nn.Module):

    def __init__(self, feature_dim: int, num_heads: int):
        super().__init__()
        self.attn = MultiHeadedAttention(num_heads, feature_dim)
        self.mlp = MLP([feature_dim * 2, feature_dim * 2, feature_dim])
        nn.init.constant_(self.mlp[-1].bias, 0.0)

    def forward(self, x, source):
        message = self.attn(x, source, source)
        return self.mlp(torch.cat([x, message], dim=1))

class AttentionalGNN_layer(nn.Module):

    def __init__(self, feature_dim: int):
        super().__init__()
        self.layer = AttentionalPropagation(feature_dim, 4)

    def forward(self, desc0):
        delta0 = self.layer(desc0, desc0)
        return delta0

ARGS = {
    "feature_dim": 4
}
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 AttentionalGNN_layer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AttentionalGNN_layer 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
AttentionalPropagation Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("0034df3be30ee87d")
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 an instance of its own class, AttentionalPropagation: the run constructed the object and did not call it, so no result was computed. 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
from copy import deepcopy

torch.manual_seed(0)

# Helper function from the code
def attention(query, key, value):
    dim = query.shape[1]
    scores = torch.einsum('bdhn,bdhm->bhnm', query, key) / dim ** 0.5
    prob = torch.nn.functional.softmax(scores, dim=-1)
    return (torch.einsum('bhnm,bdhm->bdhn', prob, value), prob)

# MLP function from the code
def MLP(channels: list, do_bn=True):
    """ Multi-layer perceptron """
    n = len(channels)
    layers = []
    for i in range(1, n):
        layers.append(nn.Conv1d(channels[i - 1], channels[i], kernel_size=1, bias=True))
        if i < n - 1:
            if do_bn:
                layers.append(nn.BatchNorm1d(channels[i]))
            layers.append(nn.ReLU())
    return nn.Sequential(*layers)

# MultiHeadedAttention class from the code
class MultiHeadedAttention(nn.Module):
    """ Multi-head attention to increase model expressivitiy """

    def __init__(self, num_heads: int, d_model: int):
        super().__init__()
        assert d_model % num_heads == 0
        self.dim = d_model // num_heads
        self.num_heads = num_heads
        self.merge = nn.Conv1d(d_model, d_model, kernel_size=1)
        self.proj = nn.ModuleList([deepcopy(self.merge) for _ in range(3)])

    def forward(self, query, key, value):
        batch_dim = query.size(0)
        query, key, value = [l(x).view(batch_dim, self.dim, self.num_heads, -1) for l, x in zip(self.proj, (query, key, value))]
        x, _ = attention(query, key, value)
        return self.merge(x.contiguous().view(batch_dim, self.dim * self.num_heads, -1))

# AttentionalPropagation class from the code
class AttentionalPropagation(nn.Module):

    def __init__(self, feature_dim: int, num_heads: int):
        super().__init__()
        self.attn = MultiHeadedAttention(num_heads, feature_dim)
        self.mlp = MLP([feature_dim * 2, feature_dim * 2, feature_dim])
        nn.init.constant_(self.mlp[-1].bias, 0.0)

    def forward(self, x, source):
        message = self.attn(x, source, source)
        return self.mlp(torch.cat([x, message], dim=1))

# Set up test arguments
feature_dim = 4
num_heads = 2

ARGS = {
    "feature_dim": feature_dim,
    "num_heads": num_heads,
}
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 AttentionalPropagation — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AttentionalPropagation 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
ESAC_DROID_Net Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("e01275894f89669e")
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 an instance of its own class, ESAC_DROID_Net: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np

torch.manual_seed(0)

# Create small tensors for mean (must be compatible with what the network expects)
# The network registers it as a buffer, so it should be a tensor
mean = torch.randn(3, 4, 4)

ARGS = {
    'mean': mean,
    'uncertainty': True,
    'output_dim': 128,
    'norm_fn': 'batch',
    'dropout': 0.0,
    'multidim': False
}
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 ESAC_DROID_Net — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ESAC_DROID_Net 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
ESAC_SCNet Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("90820503e12779e4")
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 an instance of its own class, ESAC_SCNet: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create a small mean tensor for the scene coordinates
# The network expects a mean tensor with 3 channels (x, y, z coordinates)
mean = torch.tensor([0.5, 0.3, 0.2], dtype=torch.float32)

# uncertainty parameter: boolean to control whether uncertainty head is used
uncertainty = True

ARGS = {
    'mean': mean,
    'uncertainty': uncertainty,
}
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 ESAC_SCNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ESAC_SCNet 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
EigFreeLoss Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("bd5fff66cf9cdbb2")
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 an instance of its own class, EigFreeLoss: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# Build a minimal config dict with all required keys
config = {
    'loss_eigfree': 1.0,
    'loss_classif': 1.0,
    'loss_essential_init_epo': 0,
    'alpha': 0.5,
    'beta': 0.1,
    'mindepth': 0.1,
    'maxdepth': 100.0,
    'obj_geod_th': 0.05,
}

ARGS = {
    'config': config,
    'relu': False,
}
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 EigFreeLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EigFreeLoss 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
MLP Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("928f0db3e1d697de")
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 Sequential. 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)

# The function MLP takes:
# - channels: list of integers representing channel dimensions for Conv1d layers
# - do_bn: boolean flag for whether to include BatchNorm1d

ARGS = {
    "channels": [3, 16, 32, 8],
    "do_bn": True
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
MultiHeadedAttention Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("6a1d48100708dee9")
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 an instance of its own class, MultiHeadedAttention: the run constructed the object and did not call it, so no result was computed. 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
from copy import deepcopy

torch.manual_seed(0)

def attention(query, key, value):
    dim = query.shape[1]
    scores = torch.einsum('bdhn,bdhm->bhnm', query, key) / dim ** 0.5
    prob = torch.nn.functional.softmax(scores, dim=-1)
    return (torch.einsum('bhnm,bdhm->bdhn', prob, value), prob)

class MultiHeadedAttention(nn.Module):
    """ Multi-head attention to increase model expressivitiy """

    def __init__(self, num_heads: int, d_model: int):
        super().__init__()
        assert d_model % num_heads == 0
        self.dim = d_model // num_heads
        self.num_heads = num_heads
        self.merge = nn.Conv1d(d_model, d_model, kernel_size=1)
        self.proj = nn.ModuleList([deepcopy(self.merge) for _ in range(3)])

    def forward(self, query, key, value):
        batch_dim = query.size(0)
        query, key, value = [l(x).view(batch_dim, self.dim, self.num_heads, -1) for l, x in zip(self.proj, (query, key, value))]
        x, _ = attention(query, key, value)
        return self.merge(x.contiguous().view(batch_dim, self.dim * self.num_heads, -1))

# Create valid arguments for MultiHeadedAttention
num_heads = 2
d_model = 4

ARGS = {
    "num_heads": num_heads,
    "d_model": d_model
}
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 MultiHeadedAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiHeadedAttention 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
OAFilter_GNN Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("0ce19bf4941b5324")
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 an instance of its own class, OAFilter_GNN: the run constructed the object and did not call it, so no result was computed. 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
from copy import deepcopy

torch.manual_seed(0)

# First, define all the helper classes and functions that OAFilter_GNN depends on

def MLP(channels: list, do_bn=True):
    """ Multi-layer perceptron """
    n = len(channels)
    layers = []
    for i in range(1, n):
        layers.append(nn.Conv1d(channels[i - 1], channels[i], kernel_size=1, bias=True))
        if i < n - 1:
            if do_bn:
                layers.append(nn.BatchNorm1d(channels[i]))
            layers.append(nn.ReLU())
    return nn.Sequential(*layers)

def attention(query, key, value):
    dim = query.shape[1]
    scores = torch.einsum('bdhn,bdhm->bhnm', query, key) / dim ** 0.5
    prob = torch.nn.functional.softmax(scores, dim=-1)
    return (torch.einsum('bhnm,bdhm->bdhn', prob, value), prob)

class MultiHeadedAttention(nn.Module):
    """ Multi-head attention to increase model expressivitiy """

    def __init__(self, num_heads: int, d_model: int):
        super().__init__()
        assert d_model % num_heads == 0
        self.dim = d_model // num_heads
        self.num_heads = num_heads
        self.merge = nn.Conv1d(d_model, d_model, kernel_size=1)
        self.proj = nn.ModuleList([deepcopy(self.merge) for _ in range(3)])

    def forward(self, query, key, value):
        batch_dim = query.size(0)
        query, key, value = [l(x).view(batch_dim, self.dim, self.num_heads, -1) for l, x in zip(self.proj, (query, key, value))]
        x, _ = attention(query, key, value)
        return self.merge(x.contiguous().view(batch_dim, self.dim * self.num_heads, -1))

class AttentionalPropagation(nn.Module):

    def __init__(self, feature_dim: int, num_heads: int):
        super().__init__()
        self.attn = MultiHeadedAttention(num_heads, feature_dim)
        self.mlp = MLP([feature_dim * 2, feature_dim * 2, feature_dim])
        nn.init.constant_(self.mlp[-1].bias, 0.0)

    def forward(self, x, source):
        message = self.attn(x, source, source)
        return self.mlp(torch.cat([x, message], dim=1))

class AttentionalGNN_layer(nn.Module):

    def __init__(self, feature_dim: int):
        super().__init__()
        self.layer = AttentionalPropagation(feature_dim, 4)

    def forward(self, desc0):
        delta0 = self.layer(desc0, desc0)
        return delta0

class squeeze(nn.Module):

    def __init__(self, dim1):
        nn.Module.__init__(self)
        self.dim1 = dim1

    def forward(self, x):
        return x.squeeze(self.dim1)

class trans(nn.Module):

    def __init__(self, dim1, dim2):
        nn.Module.__init__(self)
        self.dim1 = dim1
        self.dim2 = dim2

    def forward(self, x):
        return x.transpose(self.dim1, self.dim2)

class unsqueeze(nn.Module):

    def __init__(self, dim1):
        nn.Module.__init__(self)
        self.dim1 = dim1

    def forward(self, x):
        return x.unsqueeze(self.dim1)

class OAFilter_GNN(nn.Module):

    def __init__(self, channels, points, out_channels=None):
        nn.Module.__init__(self)
        if not out_channels:
            out_channels = channels
        self.shot_cut = None
        if out_channels != channels:
            self.shot_cut = nn.Conv2d(channels, out_channels, kernel_size=1)
        self.conv1 = nn.Sequential(nn.InstanceNorm2d(channels, eps=0.001), squeeze(-1), AttentionalGNN_layer(channels), unsqueeze(-1), trans(1, 2))
        self.conv2 = nn.Sequential(nn.BatchNorm2d(points), nn.ReLU(), nn.Conv2d(points, points, kernel_size=1))
        self.conv3 = nn.Sequential(trans(1, 2), nn.InstanceNorm2d(out_channels, eps=0.001), squeeze(-1), AttentionalGNN_layer(out_channels), unsqueeze(-1))

    def forward(self, x):
        out = self.conv1(x)
        out = out + self.conv2(out)
        out = self.conv3(out)
        if self.shot_cut:
            out = out + self.shot_cut(x)
        else:
            out = out + x
        return out

ARGS = {
    'channels': 4,
    'points': 3,
    'out_channels': 4,
}
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 OAFilter_GNN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a OAFilter_GNN 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
PointCN Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("8cafbf37beee7048")
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 an instance of its own class, PointCN: the run constructed the object and did not call it, so no result was computed. 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)

# Create a small input tensor for testing
# Shape: (batch=2, channels=4, height=3, width=5)
x = torch.randn(2, 4, 3, 5)

ARGS = {
    "channels": 4,
    "out_channels": None
}
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 PointCN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PointCN 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
attention Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from tzvikif/SuperGlue
pointer only; the stored copy get_code serves, from tzvikif/SuperGlue, is pointer only (licence: NOASSERTION) · get_code("70702edb93d9116a")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

batched_pi_inv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("fc3a1bd63762970c")
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, 4, 3) 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)

# Construct arguments for batched_pi_inv
# K: camera intrinsic matrix tensor (N, 3, 3)
# x: 2d pixel position (N, num_points, 2)
# d: depth at that pixel (N, num_points, 1)

N = 2  # batch size
num_points = 4  # number of points per batch

# Create camera intrinsic matrix (N, 3, 3)
# Standard intrinsic matrix format with focal lengths and principal point
K = torch.tensor([
    [[500.0, 0.0, 320.0],
     [0.0, 500.0, 240.0],
     [0.0, 0.0, 1.0]],
    [[480.0, 0.0, 320.0],
     [0.0, 480.0, 240.0],
     [0.0, 0.0, 1.0]]
], dtype=torch.float32)

# Create 2D pixel positions (N, num_points, 2)
x = torch.tensor([
    [[100.0, 120.0], [200.0, 150.0], [300.0, 200.0], [250.0, 180.0]],
    [[150.0, 140.0], [250.0, 160.0], [320.0, 220.0], [280.0, 200.0]]
], dtype=torch.float32)

# Create depth values (N, num_points, 1)
d = torch.tensor([
    [[1.0], [2.0], [3.0], [2.5]],
    [[1.5], [2.5], [3.5], [2.0]]
], dtype=torch.float32)

ARGS = {
    'K': K,
    'x': x,
    'd': d
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) 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
batched_transpose Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("45c5974d8eff4f99")
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, 4, 3) 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)

# Batch size: 2
# Number of points: 4
# Spatial dimension: 3

# R: rotation matrices (B=2, 3, 3)
R = torch.randn(2, 3, 3)

# t: translation vectors (B=2, 3)
t = torch.randn(2, 3)

# X: 3D points (B=2, num_points=4, 3)
X = torch.randn(2, 4, 3)

ARGS = {
    'R': R,
    't': t,
    '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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) 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
diff_pool Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("d176f7db8f8575cd")
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 an instance of its own class, diff_pool: the run constructed the object and did not call it, so no result was computed. 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)

# Define the arguments for diff_pool
in_channel = 4
output_points = 3

ARGS = {
    "in_channel": in_channel,
    "output_points": output_points,
}
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 diff_pool — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a diff_pool 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
diff_unpool Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("226db41e21219b27")
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 an instance of its own class, diff_unpool: the run constructed the object and did not call it, so no result was computed. 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)

# Construct arguments for diff_unpool
in_channel = 4
output_points = 3

# Create the module instance
model = nn.Sequential(
    nn.InstanceNorm2d(in_channel, eps=0.001),
    nn.BatchNorm2d(in_channel),
    nn.ReLU(),
    nn.Conv2d(in_channel, output_points, kernel_size=1)
)

# Create dummy tensors for forward pass
# x_up: (batch, in_channel, height, width)
x_up = torch.randn(2, in_channel, 5, 6)
# x_down: (batch, feature_dim, height, 1) - will be squeezed on dim 3
x_down = torch.randn(2, 7, 5, 1)

# Map parameters to values
ARGS = {
    'in_channel': in_channel,
    'output_points': output_points
}
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 diff_unpool — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a diff_unpool 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
reproj_label_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("e79dea9c10047201")
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, ndim 3, dtype family float; 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

torch.manual_seed(0)

# Build sparse_data: (B, num_points, 5)
# Format: [:, :, :2] = Pc_norm, [:, :, 2:] = pred_X (3D points)
B = 2
num_points = 4
sparse_data = torch.randn(B, num_points, 5)

# Build T: (B, 3, 4) transformation matrix [R|t]
T = torch.randn(B, 3, 4)

# Build K: (B, 3, 3) camera intrinsic matrix
K = torch.randn(B, 3, 3)

# Build config dict with required keys
config = {
    'mindepth': 0.1,
    'maxdepth': 100.0,
    'obj_geod_th': 0.5
}

ARGS = {
    'sparse_data': sparse_data,
    'T': T,
    'K': K,
    'config': config
}
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, ndim 3, dtype family float — a tuple 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
squeeze Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("91578de2d449c2c1")
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 an instance of its own class, squeeze: the run constructed the object and did not call it, so no result was computed. 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)

# The squeeze module takes a tensor and squeezes dimension dim1
# We need to create a tensor where squeezing that dimension is valid
# (i.e., the dimension has size 1)

# Create a tensor with shape (2, 1, 4, 3)
# This allows us to squeeze dimension 1 (which has size 1)
x = torch.randn(2, 1, 4, 3)

ARGS = {
    "dim1": 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 squeeze — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a squeeze 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
trans Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("a480f6c63dfab335")
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 an instance of its own class, trans: the run constructed the object and did not call it, so no result was computed. 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)

# Create a small tensor with distinct dimensions to probe shapes
x = torch.randn(2, 4, 3)  # batch=2, dim1=4, dim2=3

# Define the arguments for the trans module
ARGS = {
    'dim1': 1,
    'dim2': 2
}
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 trans — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a trans 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
unsqueeze Ran
ran on a synthesized input · constructed an object; no result was computed
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("22a1b6d839018e4b")
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 an instance of its own class, unsqueeze: the run constructed the object and did not call it, so no result was computed. 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)

# Create a small input tensor: batch_size=2, feature_dim=4
x = torch.randn(2, 4)

# The unsqueeze module takes a dim parameter and calls x.unsqueeze(dim1)
# We'll use dim=1 to insert a dimension in the middle
dim1 = 1

ARGS = {
    "dim1": dim1,
}
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 unsqueeze — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a unsqueeze 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
DLT_postprocess Not yet run
unverified (harvested, no recorded run)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("19316b649c693b4c")
How it ran

no invocation recorded.

DenseSC_GNN Not yet run
unverified (harvested, no recorded run)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("5c92b498d064e647")
How it ran

no invocation recorded.

OAGNN Not yet run
unverified (harvested, no recorded run)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("cf1877380ef3d1b0")
How it ran

no invocation recorded.

OANBlock_GNN Not yet run
unverified (harvested, no recorded run)
xinwu98/sc-wls/models/Dense_networks_e2e_GNN.py
code served (permissive licence) · get_code("caaad9966ff78006")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 20 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
MLP
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 same year, order not determinable
1712.07629 (2017-12)
SuperPoint: Self-Supervised Interest Point Detection and Description
2206.07710 (2022-06)
PlanarRecon: Real-time 3D Plane Detection and Reconstruction from Posed Monocular Videos
attention
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
1712.07629 (2017-12)
SuperPoint: Self-Supervised Interest Point Detection and Description
2206.07710 (2022-06)
PlanarRecon: Real-time 3D Plane Detection and Reconstruction from Posed Monocular Videos
2310.01680 (2023-10)
Keypoint-Augmented Self-Supervised Learning for Medical Image Segmentation with Limited Annotation

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

Visual re-localization aims to recover camera poses in a known environment, which is vital for applications like robotics or augmented reality. Feed-forward absolute camera pose regression methods directly output poses by a network, but suffer from low accuracy. Meanwhile, scene coordinate based methods are accurate, but need iterative RANSAC post-processing, which brings challenges to efficient end-to-end training and inference. In order to have the best of both worlds, we propose a feed-forward method termed SC-wLS that exploits all scene coordinate estimates for weighted least squares pose regression. This differentiable formulation exploits a weight network imposed on 2D-3D correspondences, and requires pose supervision only. Qualitative results demonstrate the interpretability of learned weights. Evaluations on 7Scenes and Cambridge datasets show significantly promoted performance when compared with former feed-forward counterparts. Moreover, our SC-wLS method enables a new capability: self-supervised test-time adaptation on the weight network. Codes and models are publicly available.

For agents

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

get_harvested_code_for_paper("2210.12748")
get_code_for_paper("2210.12748")
have("2210.12748")

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

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

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

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

Connect an agent — have() is free.