SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.19231 · CVPR · 2024

CricaVPR: Cross-image Correlation-aware Representation Learning for Visual Place Recognition

Lijun Zhang, Chun Yuan, Yaowei Wang, Dongmei Jiang, Xiangyuan Lan, Feng Lu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 6 failures of our instrument; 2 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/2402.19231.json · badge: /api/ran/2402.19231.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
Lu-Feng/CricaVPR canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
add_residual Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Lu-Feng/CricaVPR/backbone/dinov2/block.py
code served (permissive licence) · get_code("5d16d4d4fc573ac7")
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)

# Build tiny tensors for the function arguments
# x: input tensor, shape (batch=2, features=4)
x = torch.randn(2, 4, dtype=torch.float32)

# brange: indices for where to add residual, shape should be compatible with batch dimension
brange = torch.tensor([0, 1], dtype=torch.long)

# residual: tensor to add, same shape as x
residual = torch.randn(2, 4, dtype=torch.float32)

# residual_scale_factor: scalar multiplier
residual_scale_factor = 0.5

# scaling_vector: optional vector for scaled operations, set to None for first branch
scaling_vector = None

ARGS = {
    "x": x,
    "brange": brange,
    "residual": residual,
    "residual_scale_factor": residual_scale_factor,
    "scaling_vector": scaling_vector,
}
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
collate_fn Ran
ran; our contract draft was wrong, not the code
Lu-Feng/CricaVPR/datasets_ws.py
code served (permissive licence) · get_code("937b98b0302097b0")
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: (12, 3, h, w) - 12 images with 3 channels
images = torch.randn(12, 3, 4, 4)

# triplets_local_indexes: (10, 3) - 10 triplets with 3 indices each
triplets_local_indexes = torch.randint(0, 12, (10, 3))

# triplets_global_indexes: (12,) - 12 global indices
triplets_global_indexes = torch.arange(12)

# Create batch with 2 elements
batch_elem_1 = (
    images.clone(),
    triplets_local_indexes.clone(),
    triplets_global_indexes.clone()
)

batch_elem_2 = (
    images.clone(),
    triplets_local_indexes.clone(),
    triplets_global_indexes.clone()
)

batch = [batch_elem_1, batch_elem_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
drop_add_residual_stochastic_depth Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Lu-Feng/CricaVPR/backbone/dinov2/block.py
code served (permissive licence) · get_code("85f7ffc01945bb72")
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, 3, 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
from torch import nn, Tensor
from typing import Callable

torch.manual_seed(0)

# Create a simple residual function that takes a tensor and returns a tensor of same shape
class SimpleResidualFunc(nn.Module):
    def __init__(self, dim: int):
        super().__init__()
        self.linear = nn.Linear(dim, dim)
    
    def forward(self, x: Tensor) -> Tensor:
        # x will have shape (sample_subset_size, n, d)
        # We need to return same shape
        b, n, d = x.shape
        x_flat = x.flatten(1)  # (b, n*d)
        out = self.linear(x_flat)  # (b, n*d)
        return out.view(b, n, d)

# Create input tensor with shape (batch=2, n=3, d=4)
x = torch.randn(2, 3, 4)

# Create a residual function
residual_func = SimpleResidualFunc(dim=3*4)

# Define the sample_drop_ratio parameter
sample_drop_ratio = 0.1

ARGS = {
    "x": x,
    "residual_func": residual_func,
    "sample_drop_ratio": sample_drop_ratio
}
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, 3, 4) — shape (2, 3, 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
gem Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Lu-Feng/CricaVPR/network.py
code served (permissive licence) · get_code("5926b10d708c6be5")
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)

# Create a small tensor for testing
# The function expects a 4D tensor for work_with_tokens=False (batch, channels, height, width)
# or a 3D tensor for work_with_tokens=True (batch, channels, tokens)
x_2d = torch.randn(2, 4, 3, 5)  # batch=2, channels=4, height=3, width=5
x_1d = torch.randn(2, 4, 6)     # batch=2, channels=4, tokens=6

ARGS = {
    "x": x_2d,
    "p": 3,
    "eps": 1e-06,
    "work_with_tokens": 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 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_branges_scales Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Lu-Feng/CricaVPR/backbone/dinov2/block.py
code served (permissive licence) · get_code("5be3610fa1fee19e")
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)

# Construct a small tensor with shape (batch=2, sequence=4, dim=3)
x = torch.randn(2, 4, 3)

# Define arguments
ARGS = {
    "x": x,
    "sample_drop_ratio": 0.0
}
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
Lu-Feng/CricaVPR/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
Lu-Feng/CricaVPR/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_model Not yet run
unverified (harvested, no recorded run)
Lu-Feng/CricaVPR/util.py
code served (permissive licence) · get_code("69d14231085af9e1")
How it ran

no invocation recorded.

resume_train Not yet run
unverified (harvested, no recorded run)
Lu-Feng/CricaVPR/util.py
code served (permissive licence) · get_code("8e0b90019577ffc0")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

FunctionAlso present inEarliest-datedOthers named
named_apply 26 other papers
6 dated earlier, 18 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
drop_add_residual_stochastic_depth 21 other papers
3 dated earlier, 1 the same month, 15 later, 2 undated
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2312.02366 (2023-12)
Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
and 18 more not named here
add_residual 17 other papers
2 dated earlier, 1 the same month, 13 later, 1 undated
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2312.02366 (2023-12)
Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
2402.03138 (2024-02)
Just Cluster It: An Approach for Exploration in High-Dimensions using Clustering and Pre-Trained Representations
and 14 more not named here
get_branges_scales 17 other papers
2 dated earlier, 1 the same month, 13 later, 1 undated
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2312.02366 (2023-12)
Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
2402.03138 (2024-02)
Just Cluster It: An Approach for Exploration in High-Dimensions using Clustering and Pre-Trained Representations
and 14 more not named here
path_to_pil_img 9 other papers
3 dated earlier, 1 the same month, 5 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
3 dated earlier, 1 the same month, 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 4 more not named here
resume_model 3 other papers
1 dated earlier, 2 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2412.00784 (2024-12)
EDTformer: An Efficient Decoder Transformer for Visual Place Recognition
2509.25723 (2025-09)
SAGE: Spatial-visual Adaptive Graph Exploration for Efficient Visual Place Recognition
resume_train 3 other papers
1 dated earlier, 2 later
2204.03444 (2022-04)
Deep Visual Geo-localization Benchmark
2502.16601 (2025-02)
SelaVPR++: Towards Seamless Adaptation of Foundation Models for Efficient Place Recognition
2509.25723 (2025-09)
SAGE: Spatial-visual Adaptive Graph Exploration for Efficient Visual Place Recognition
gem 2 other papers
1 dated earlier, 1 later
2310.05184 (2023-10)
AANet: Aggregation and Alignment Network with Semi-hard Positive Sample Mining for Hierarchical Place Recognition
2502.16601 (2025-02)
SelaVPR++: Towards Seamless Adaptation of Foundation Models for Efficient 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

Over the past decade, most methods in visual place recognition (VPR) have used neural networks to produce feature representations. These networks typically produce a global representation of a place image using only this image itself and neglect the cross-image variations (e.g. viewpoint and illumination), which limits their robustness in challenging scenes. In this paper, we propose a robust global representation method with cross-image correlation awareness for VPR, named CricaVPR. Our method uses the attention mechanism to correlate multiple images within a batch. These images can be taken in the same place with different conditions or viewpoints, or even captured from different places. Therefore, our method can utilize the cross-image variations as a cue to guide the representation learning, which ensures more robust features are produced. To further facilitate the robustness, we propose a multi-scale convolution-enhanced adaptation method to adapt pre-trained visual foundation models to the VPR task, which introduces the multi-scale local information to further enhance the cross-image correlation-aware representation. Experimental results show that our method outperforms state-of-the-art methods by a large margin with significantly less training time. The code is released at https://github.com/Lu-Feng/CricaVPR.

For agents

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

get_harvested_code_for_paper("2402.19231")
get_code_for_paper("2402.19231")
have("2402.19231")

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

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

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

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

Connect an agent — have() is free.