SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.00784 · 2024

EDTformer: An Efficient Decoder Transformer for Visual Place Recognition

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 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/2412.00784.json · badge: /api/ran/2412.00784.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
tong-jin01/edtformer canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran; our contract draft was wrong, not the code
tong-jin01/edtformer/datasets_ws.py
code served (permissive licence) · get_code("c160834241fc1797")
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)

# Create a single batch element: (images, triplets_local_indexes, triplets_global_indexes)
# images: (12, 3, h, w) - 12 images with 3 channels, height 4, width 5
images_1 = torch.randn(12, 3, 4, 5)
# triplets_local_indexes: (10, 3) - 10 triplets with 3 indexes each
triplets_local_indexes_1 = torch.randint(0, 12, (10, 3))
# triplets_global_indexes: (12,) - 12 global indexes
triplets_global_indexes_1 = torch.arange(12)

batch_element_1 = (images_1, triplets_local_indexes_1, triplets_global_indexes_1)

# Create a second batch element with same structure
images_2 = torch.randn(12, 3, 4, 5)
triplets_local_indexes_2 = torch.randint(0, 12, (10, 3))
triplets_global_indexes_2 = torch.arange(12, 24)

batch_element_2 = (images_2, triplets_local_indexes_2, triplets_global_indexes_2)

# Create batch as list of tuples
batch = [batch_element_1, batch_element_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
named_apply Ran
ran; our contract draft was wrong, not the code
tong-jin01/edtformer/backbone/vision_transformer.py
code served (permissive licence) · get_code("e7fcb6d9ac9deaf4")
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) and returned SimpleModel. 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 simple nested module structure
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Sequential(
            nn.Linear(3, 2),
            nn.ReLU()
        )
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        return x

# Create a simple callback function that tracks module names
collected_modules = []

def callback_fn(module, name):
    collected_modules.append((name, type(module).__name__))

# Instantiate the module
module = SimpleModel()

# Define ARGS dictionary with all parameters
ARGS = {
    'fn': callback_fn,
    'module': module,
    'name': '',
    'depth_first': True,
    'include_root': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
path_to_pil_img Ran
ran, honoured the contract we drafted
tong-jin01/edtformer/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
resume_train Ran
ran; our contract draft was wrong, not the code
tong-jin01/edtformer/util.py
code served (permissive licence) · get_code("e9c2f9f6cf885627")
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 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
import torch.nn as nn
import tempfile
import os

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model and optimizer
model = SimpleModel()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create a temporary checkpoint file
temp_dir = tempfile.mkdtemp()
checkpoint_path = os.path.join(temp_dir, 'checkpoint.pth')

# Create checkpoint with all required keys
checkpoint = {
    'epoch_num': 5,
    'model_state_dict': model.state_dict(),
    'optimizer_state_dict': optimizer.state_dict(),
    'best_r5': 85.5,
    'not_improved_num': 3
}
torch.save(checkpoint, checkpoint_path)

# Create args object
class Args:
    def __init__(self, resume_path, save_dir):
        self.resume = resume_path
        self.save_dir = save_dir

args = Args(checkpoint_path, temp_dir)

ARGS = {
    'args': args,
    'model': model,
    'optimizer': optimizer,
    'strict': False
}
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 1, 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
resume_model Not yet run
unverified (harvested, no recorded run)
tong-jin01/edtformer/util.py
code served (permissive licence) · get_code("69d14231085af9e1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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, 4 later) and 1 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
named_apply 26 other papers
16 dated earlier, 2 the same month, 6 later, 2 undated
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2204.07683 (2022-04)
Safe Self-Refinement for Transformer-based Domain Adaptation
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
and 23 more not named here
path_to_pil_img 9 other papers
6 dated earlier, 3 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
collate_fn 7 other papers
5 dated earlier, 2 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 4 more not named here
resume_model 3 other papers
2 dated earlier, 1 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2402.19231 (2024-02)
CricaVPR: Cross-image Correlation-aware Representation Learning for Visual Place Recognition
2509.25723 (2025-09)
SAGE: Spatial-visual Adaptive Graph Exploration for Efficient Visual Place Recognition

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

Visual place recognition (VPR) aims to determine the general geographical location of a query image by retrieving visually similar images from a large geo-tagged database. To obtain a global representation for each place image, most approaches typically focus on the aggregation of deep features extracted from a backbone through using current prominent architectures (e.g., CNNs, MLPs, pooling layer, and transformer encoder), giving little attention to the transformer decoder. However, we argue that its strong capability to capture contextual dependencies and generate accurate features holds considerable potential for the VPR task. To this end, we propose an Efficient Decoder Transformer (EDTformer) for feature aggregation, which consists of several stacked simplified decoder blocks followed by two linear layers to directly produce robust and discriminative global representations. Specifically, we do this by formulating deep features as the keys and values, as well as a set of learnable parameters as the queries. Our EDTformer can fully utilize the contextual information within deep features, then gradually decode and aggregate the effective features into the learnable queries to output the global representations. Moreover, to provide more powerful deep features for EDTformer and further facilitate the robustness, we use the foundation model DINOv2 as the backbone and propose a Low-rank Parallel Adaptation (LoPA) method to enhance its performance in VPR, which can refine the intermediate features of the backbone progressively in a memory- and parameter-efficient way. As a result, our method not only outperforms single-stage VPR methods on multiple benchmark datasets, but also outperforms two-stage VPR methods which add a re-ranking with considerable cost. Code will be available at https://github.com/Tong-Jin01/EDTformer.

For agents

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

get_harvested_code_for_paper("2412.00784")
get_code_for_paper("2412.00784")
have("2412.00784")

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

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

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

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

Connect an agent — have() is free.