SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.09701 · 2022

Learning Semantics for Visual Place Recognition through Multi-Scale Attention

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2201.09701.json · badge: /api/ran/2201.09701.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
valeriopaolicelli/SegVPR canonical (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
CrossEntropy2d Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/net/losses.py
code served (permissive licence) · get_code("835db6c2d4fa4ada")
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 as nn

torch.manual_seed(0)

# Create predict tensor: (batch=2, channels=4, height=3, width=5)
# Shape: (n, c, h, w) = (2, 4, 3, 5)
predict = torch.randn(2, 4, 3, 5, requires_grad=True)

# Create target tensor: (batch=2, height=3, width=5)
# Shape: (n, h, w) = (2, 3, 5)
# Values should be class indices (0 to c-1) or 255 for ignore, or -1 for invalid
target = torch.randint(0, 4, (2, 3, 5))

# Create weight tensor for class weighting (one weight per class)
# Shape: (num_classes,) = (4,)
weight = torch.ones(4)

ARGS = {
    'predict': predict,
    'target': target,
    'weight': weight,
    'reduction': 'mean'
}
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
TripletMarginLoss Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/net/losses.py
code served (permissive licence) · get_code("602fbde2d15e2d12")
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. 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, 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

torch.manual_seed(0)

# Create small tensors for global_q, global_p, global_n
# global_q: query embeddings, shape (batch_size, embedding_dim)
# global_p: positive embeddings, shape (batch_size, embedding_dim)
# global_n: negative embeddings, shape (total_negatives, embedding_dim)

batch_size = 2
embedding_dim = 4
total_negatives = 5

global_q = torch.randn(batch_size, embedding_dim)
global_p = torch.randn(batch_size, embedding_dim)
global_n = torch.randn(total_negatives, embedding_dim)

# neg_counts: number of negatives for each query
# Must sum to total_negatives (5)
neg_counts = torch.tensor([2, 3])

# n_neg: total number of negatives (scalar tensor or value)
n_neg = torch.tensor(5)

ARGS = {
    'global_q': global_q,
    'global_p': global_p,
    'global_n': global_n,
    'neg_counts': neg_counts,
    'n_neg': n_neg
}
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 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
valeriopaolicelli/SegVPR/src/net/resnet_vpr.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("2a80220dabcb742a")
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 medaitech/scrd4ad, 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
valeriopaolicelli/SegVPR/src/net/resnet_vpr.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("600ff2c45e0de056")
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 medaitech/scrd4ad, 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.

gem_pool Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/net/pooling.py
code served (permissive licence) · get_code("b4b4bd7b30ae7af4")
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)

# Construct a small 4D tensor (batch, channels, height, width)
# Using distinct sizes: batch=2, channels=4, height=3, width=5
x = torch.randn(2, 4, 3, 5)

# The function uses:
# - x.clamp(min=eps): clamps tensor values
# - x.pow(p): raises to power
# - x.size(-2), x.size(-1): gets spatial dimensions
# - F.avg_pool2d(): averages over spatial dimensions
# - .pow(1.0/p): raises to power
# So p should be a numeric value (int or float)
# eps should be a small float

ARGS = {
    'x': x,
    'p': 3,
    'eps': 1e-06
}
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
get_crop_dim Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/datasets.py
code served (permissive licence) · get_code("1879807dc6e8bf82")
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 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)

# Analyze the function:
# - image_shape: used with indexing [0] and [1], so needs to be a sequence with at least 2 elements
# - scale_percent: numeric value (default 60)

# image_shape represents an image with width and height dimensions
# Create a simple tuple representing (width, height)
image_shape = (640, 480)

ARGS = {
    "image_shape": image_shape,
    "scale_percent": 60
}
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 tuple, ndim 1, dtype family int — 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
idda_cs_mapping Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/datasets.py
code served (permissive licence) · get_code("9ed8b1e42932da0d")
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 ndarray, ndim 2, dtype family int, shape (4, 4) 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 numpy as np

# The function takes a mask parameter and performs in-place operations using .copy() and indexing
# The mask needs to support numpy operations like .copy() and boolean indexing

# Create a small numpy array representing a segmentation mask
# The mask contains class indices from 0 to 26 (matching the mapping list length)
mask = np.array([
    [0, 1, 2, 3],
    [4, 5, 6, 7],
    [8, 9, 10, 11],
    [12, 13, 14, 15]
], dtype=np.int64)

ARGS = {
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 4) 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
inv_transform Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/datasets.py
code served (permissive licence) · get_code("5cc57ac1fcde2555")
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 ndarray, ndim 3, dtype family float, shape (4, 5, 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 numpy as np

# Create a small image array with shape (3, 4, 5)
# This represents (channels, height, width)
# After transpose it will become (4, 5, 3)
image = np.random.randn(3, 4, 5).astype(np.float32)

# Define the arguments dictionary
ARGS = {
    'image': image,
    'mean': (0.485, 0.456, 0.406)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 5, 3) — shape (4, 5, 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
l2n Ran
ran on a synthesized input
valeriopaolicelli/SegVPR/src/net/pooling.py
code served (permissive licence) · get_code("3b9d9c1adb6b94aa")
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 (2, 4) 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)

# The function l2n normalizes a tensor along dimension 1 using L2 norm
# It expects x to be a 2D tensor (batch_size, feature_dim)
# Parameters: x (tensor), eps (float, default 1e-06)

x = torch.randn(2, 4)  # batch_size=2, feature_dim=4
eps = 1e-06

ARGS = {
    "x": x,
    "eps": eps,
}
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 (2, 4) — shape (2, 4) 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
get_places_resnet Not yet run
unverified (harvested, no recorded run)
valeriopaolicelli/SegVPR/src/net/resnet_vpr.py
code served (permissive licence) · get_code("135861a71f0aeea6")
How it ran

no invocation recorded.

set_paths_ws Not yet run
unverified (harvested, no recorded run)
valeriopaolicelli/SegVPR/src/utils/commons.py
code served (permissive licence) · get_code("38ecac084a4da52a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 2 later) and 8 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
conv1x1 112 other papers
18 dated earlier, 1 the same month, 92 later, 1 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 109 more not named here
conv3x3 111 other papers
16 dated earlier, 1 the same month, 93 later, 1 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 108 more not named here
l2n 1 other paper
1 dated earlier
1901.10332 (2019-01)
Who's Afraid of Adversarial Queries? The Impact of Image Modifications on Content-based Image Retrieval

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

Repositories linked to this paper

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

Abstract

In this paper we address the task of visual place recognition (VPR), where the goal is to retrieve the correct GPS coordinates of a given query image against a huge geotagged gallery. While recent works have shown that building descriptors incorporating semantic and appearance information is beneficial, current state-of-the-art methods opt for a top down definition of the significant semantic content. Here we present the first VPR algorithm that learns robust global embeddings from both visual appearance and semantic content of the data, with the segmentation process being dynamically guided by the recognition of places through a multi-scale attention module. Experiments on various scenarios validate this new approach and demonstrate its performance against state-of-the-art methods. Finally, we propose the first synthetic-world dataset suited for both place recognition and segmentation tasks.

For agents

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

get_harvested_code_for_paper("2201.09701")
get_code_for_paper("2201.09701")
have("2201.09701")

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

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

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

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

Connect an agent — have() is free.