SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper · CVPR · 2023

Event-guided Person Re-Identification via Sparse-Dense Complementary Learning

Jiebo Luo, Yukun Huang, Zheng-Jun Zha, Xueyang Fu, Kunyu Wang, Chengzhi Cao, Hongjian Liu

Open in the Atlas

Code that ran

8 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 6 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper.json · badge: /api/ran/Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper.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
Chengzhi-Cao/SDCL canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
build_evaluate Ran
ran on a synthesized input
Chengzhi-Cao/SDCL/eval_metrics.py
code served (permissive licence) · get_code("d82ff25aa14ff925")
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 float, shape (2, 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)

# Create small query features tensor (m=2, feature_dim=4)
qf = torch.randn(2, 4)

# Create small gallery features tensor (n=3, feature_dim=4)
gf = torch.randn(3, 4)

# Test with euclidean method
method = 'euclidean'

ARGS = {
    'qf': qf,
    'gf': gf,
    'method': method
}
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 ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
euclidean_dist Ran
ran; our contract draft was wrong, not the code
Chengzhi-Cao/SDCL/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from needylove/regression_tightness, is pointer only (licence: NONE) · get_code("c83d9f7fca950b77")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from needylove/regression_tightness, 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.

evaluate Ran
ran on a synthesized input
Chengzhi-Cao/SDCL/eval_metrics.py
code served (permissive licence) · get_code("2267200bffdf674d")
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 numpy as np

np.random.seed(0)

# Create small synthetic data for the evaluate function
# distmat: (num_queries, num_gallery) distance matrix
num_queries = 3
num_gallery = 5

# Create a distance matrix where queries can match some gallery items
distmat = np.random.rand(num_queries, num_gallery).astype(np.float32)

# Create person IDs for queries and gallery
# Make sure some queries have matching IDs in the gallery
q_pids = np.array([0, 1, 0], dtype=np.int32)  # 3 queries: person 0, 1, 0
g_pids = np.array([0, 1, 2, 0, 1], dtype=np.int32)  # 5 gallery items

# Create camera IDs to filter out same-camera matches
q_camids = np.array([0, 1, 0], dtype=np.int32)  # Query cameras
g_camids = np.array([0, 1, 2, 1, 0], dtype=np.int32)  # Gallery cameras

# max_rank parameter
max_rank = 50

ARGS = {
    'distmat': distmat,
    'q_pids': q_pids,
    'g_pids': g_pids,
    'q_camids': q_camids,
    'g_camids': g_camids,
    'max_rank': max_rank,
}
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 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
event_loader Ran
ran on a synthesized input
Chengzhi-Cao/SDCL/event_loader.py
code served (permissive licence) · get_code("4caad7386d14888d")
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 numpy as np
import scipy.io as scio
import tempfile
import os

# Create a temporary .mat file with the structure expected by event_loader
temp_dir = tempfile.mkdtemp()
temp_mat_path = os.path.join(temp_dir, "test_events.mat")

# Create mock event data
start_timestamp = np.array([[0.0]])
section_event_timestamp = np.random.uniform(0, 1000, size=(1, 500))
section_event_timestamp = np.sort(section_event_timestamp)
section_event_polarity = np.random.choice([-1, 1], size=(1, 500))
section_event_y = np.random.randint(1, 129, size=(1, 500))
section_event_x = np.random.randint(1, 65, size=(1, 500))

mat_dict = {
    'start_timestamp': start_timestamp,
    'section_event_timestamp': section_event_timestamp,
    'section_event_polarity': section_event_polarity,
    'section_event_y': section_event_y,
    'section_event_x': section_event_x
}

scio.savemat(temp_mat_path, mat_dict)

ARGS = {
    'img_path': temp_mat_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, scipy — 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
getNeuronConfig Ran
ran on a synthesized input
Chengzhi-Cao/SDCL/models/SDCLv1.py
code served (permissive licence) · get_code("097b0f7e144aaa39")
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 dict. 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 numpy as np

torch.manual_seed(0)

ARGS = {
    'type': 'SRMALPHA',
    'theta': 10.0,
    'tauSr': 1.0,
    'tauRef': 1.0,
    'scaleRef': 2.0,
    'tauRho': 0.3,
    'scaleRho': 1.0
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
hard_example_mining Ran
ran on a synthesized input
Chengzhi-Cao/SDCL/losses.py
code served (permissive licence) · get_code("93f2c0b80ea7f36e")
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 2, 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)

# Create a distance matrix of shape [N, N]
# N = 4 samples
N = 4
dist_mat = torch.randn(N, N)
dist_mat = torch.abs(dist_mat)  # Make distances positive

# Create labels - we need samples grouped by class
# For hard example mining to work properly, we need multiple samples per class
# Let's have 2 classes with 2 samples each
labels = torch.LongTensor([0, 0, 1, 1])

ARGS = {
    "dist_mat": dist_mat,
    "labels": labels,
    "return_inds": 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 tuple, ndim 2, 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
normalize Ran
ran; our contract draft was wrong, not the code
Chengzhi-Cao/SDCL/losses.py
code served (permissive licence) · get_code("e3b2a83f52101f2d")
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)

# Create a small tensor with batch size 2 and feature dimension 4
x = torch.randn(2, 4)

ARGS = {
    "x": x,
    "axis": -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 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
read_image Ran
ran on a synthesized input
Chengzhi-Cao/SDCL/event_loader.py
code served (permissive licence) · get_code("80bda819706e052f")
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 tempfile
import os
from PIL import Image

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.jpg")

# Create a simple RGB image and save it
test_image = Image.new('RGB', (100, 100), color='red')
test_image.save(temp_image_path)

ARGS = {
    'img_path': temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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
evaluate_reranking Not yet run
unverified (harvested, no recorded run)
Chengzhi-Cao/SDCL/eval_metrics.py
code served (permissive licence) · get_code("7f17bb218a74c364")
How it ran

no invocation recorded.

get_offset Not yet run
unverified (harvested, no recorded run)
Chengzhi-Cao/SDCL/models/SDCLv1.py
code served (permissive licence) · get_code("27ee770b227bfda5")
How it ran

no invocation recorded.

read_mat Not yet run
unverified (harvested, no recorded run)
Chengzhi-Cao/SDCL/event_loader.py
code served (permissive licence) · get_code("b9f688dc6f792f0b")
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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
normalize 29 other papers
15 dated earlier, 9 later, 5 same year, order not determinable
1609.01775 (2016-09)
Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking
1804.01438 (2018-04)
Learning Discriminative Features with Multiple Granularities for Person Re-Identification
1811.07130 (2018-11)
Batch DropBlock Network for Person Re-identification and Beyond
and 26 more not named here
euclidean_dist 20 other papers
14 dated earlier, 4 later, 2 same year, order not determinable · 4 only as an assembly brick
1902.09212 (2019-02)
Deep High-Resolution Representation Learning for Human Pose Estimation
1903.07071 (2019-03)
Bag of Tricks and A Strong Baseline for Deep Person Re-identification
1904.02998 (2019-04)
Relation-Aware Global Attention for Person Re-identification
and 17 more not named here
hard_example_mining 7 other papers
7 dated earlier
1902.09212 (2019-02)
Deep High-Resolution Representation Learning for Human Pose Estimation
1903.07071 (2019-03)
Bag of Tricks and A Strong Baseline for Deep Person Re-identification
1904.07223 (2019-04)
Joint Discriminative and Generative Learning for Person Re-identification
and 4 more not named here
read_image 2 other papers
2 dated earlier
1811.07130 (2018-11)
Batch DropBlock Network for Person Re-identification and Beyond
1905.00953 (2019-05)
Omni-Scale Feature Learning for Person Re-Identification
evaluate 1 other paper
1 dated earlier
1905.00953 (2019-05)
Omni-Scale Feature Learning for Person Re-Identification

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

Repositories linked to this paper

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

Abstract

Video-based person re-identification (Re-ID) is a prominent computer vision topic due to its wide range of video surveillance applications. Most existing methods utilize spatial and temporal correlations in frame sequences to obtain discriminative person features. However, inevitable degradation, e.g., motion blur contained in frames, leading to the loss of identity-discriminating cues. Recently, a new bio-inspired sensor called event camera, which can asynchronously record intensity changes, brings new vitality to the Re-ID task. With the microsecond resolution and low latency, it can accurately capture the movements of pedestrians even in the degraded environments. In this work, we propose a Sparse-Dense Complementary Learning (SDCL) Framework, which effectively extracts identity features by fully exploiting the complementary information of dense frames and sparse events. Specifically, for frames, we build a CNN-based module to aggregate the dense features of pedestrian appearance step by step, while for event streams, we design a bio-inspired spiking neural network (SNN) backbone, which encodes event signals into sparse feature maps in a spiking form, to extract the dynamic motion cues of pedestrians. Finally, a cross feature alignment module is constructed to fuse motion information from events and appearance cues from frames to enhance identity representation learning. Experiments on several benchmarks show that by employing events and SNN into Re-ID, our method significantly outperforms competitive methods. The code is available at https://github.com/Chengzhi-Cao/SDCL.

For agents

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

get_harvested_code_for_paper("Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper")
get_code_for_paper("Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper")
have("Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper")

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

curl https://syntology.ai/api/ran/Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper.json

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

[![Syntology run record](https://syntology.ai/api/ran/Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper.svg)](https://syntology.ai/paper/Cao_Event-Guided_Person_Re-Identification_via_Sparse-Dense_Complementary_Learning_CVPR_2023_paper)

Connect an agent — have() is free.