betaFeedback

WorksComputer Science

Beyond a Single Crop: In-Context Adaptation for Player Re-Identification

Abstract

Person re-identification is typically addressed by learning identity-discriminative embeddings from individual person crops. However, player re-identification in broadcast sports videos presents a unique challenge: players from the same team often share similar appearances. Conventional methods encode each player crop independently, overlooking the surrounding players and repeated observations that could help resolve these ambiguities. Here, we propose ContextReID, a framework for visual in-context adaptation that represents a player by jointly considering other players in the same frame and observations from different frames of the broadcast sequence. We implement this framework with a vision-language backbone trained with contrastive objectives for player retrieval and identity matching across the supplied context. Without requiring parameter updates or context identity labels at inference, the trained model adapts the target embedding to the supplied visual context. Experiments on SportsMOT, DanceTrack, and SoccerNet-GSR demonstrate superior retrieval performance compared with single-crop baselines. Cross-sport transfer experiments within SportsMOT further show that in-context adaptation can improve retrieval on sports excluded from training. These results highlight the empirical value of our method in utilizing spatial and temporal context without requiring identity labels or cross-frame identity associations at inference.

Introduction

Person re-identification (ReID) aims to retrieve observations of the same person across images or cameras [21]. Most approaches learn an identity-discriminative embedding from each person crop independently and compare the resulting vectors by similarity. This formulation supports

efficient retrieval and has driven progress in metric learning, CNN architectures, and transformer-based representations [6, 7, 11]. However, independently encoding each crop leaves surrounding visual evidence unused. For player re-identification, that evidence can help determine which appearance cues distinguish a target from other players in the sequence.

Broadcast sports present a particular combination of ambiguity and context. Teammates often wear nearly identical uniforms, while distinguishing details such as jersey numbers, accessories, and body shape may be small, occluded, or blurred. Yet players are rarely observed in isolation: other players appear alongside them, and additional frames provide observations under different poses and viewpoints. A cue that is weak in isolation may become useful when interpreted relative to these alternatives. This motivates a question: can a trained retrieval model adapt a player’s representation to the visual context of a sequence, without parameter updates or identity labels for that context?

We address this question through visual in-context adaptation. Inspired by in-context learning [1], we supply contextual evidence directly to the model and allow it to influence the target representation during the forward pass. Here, adaptation refers to a change in the embedding conditioned on the supplied visual input; the model parameters remain fixed at inference. The context contains unassociated player detections from the target frame and a small set of other frames. It requires neither identity labels nor cross-frame associations, and the target identity need not appear in the additional frames. This differs from aggregating observations from a known target tracklet or predicting identities from ID-labeled historical trajectories, as in MOTIP [5].

We propose ContextReID, which implements this formulation with a vision-language backbone. The model jointly processes player crops organized by frame and produces a normalized retrieval embedding for the target crop. Training combines a contextual identity-matching objective with a retrieval objective, encouraging the model to use relationships within the supplied context while producing vectors suitable for cosine-similarity matching. We instantiate the framework with Qwen2-VL-2B-Instruct and Qwen3-VL-Embedding-2B [9] [18]. Figure 1 contrasts independent crop encoding with this context-conditioned representation.

Figure 1. Visual in-context adaptation for player ReID. Conventional ReID encodes each player crop independently. ContextReID adapts the target embedding to supplied spatial and temporal player context, without parameter updates or context identity labels at inference. The output remains a retrieval vector for similarity-based matching.

Experiments on SportsMOT, DanceTrack, and SoccerNet-GSR demonstrate that visual in-context adaptation improves player retrieval across two vision-language backbones. Cross-sport transfer experiments further show that contextual evidence can improve retrieval on sports excluded from task-specific training. Additional analyses examine when contextual information is useful and distinguish its contribution from the capabilities of the underlying pretrained models.

Our contributions are threefold:

  • We introduce ContextReID, a framework that adapts player embeddings to unlabeled spatial and temporal crop context at inference, without parameter updates, context identity labels, or cross-frame identity associations.

  • We train two vision-language backbones with contextual identity-matching and retrieval objectives to produce context-adapted player embeddings.

  • We demonstrate retrieval improvements on three benchmarks and under cross-sport transfer, with controlled analyses supporting the role of contextual evidence.

Related Work

Person Re-Identification

Conventional person ReID learns identity-discriminative crop embeddings through metric learning and strong training recipes [7, 11]. TransReID models long-range spatial interactions with a transformer [6], while SOLIDER learns general human-centric representations through semantic-controllable pretraining [2]. These methods provide our single-crop reference baselines. For occluded and ambiguous detections, BPBreID learns body-part representations [14], and KPR uses keypoint prompts to identify the intended person [15]. PRTreID extends sports identity learning with team-affiliation and role-classification supervision [12]. ContextReID instead adapts a target representation using surrounding players and observations from other frames, without requiring context identity or attribute labels at inference.

Vision-Language Models for ReID

CLIP-ReID adapts image–text pretraining to person retrieval through learned identity-related prompts [10, 13]. LVM-ReID converts a large vision-language model into a discriminative person feature extractor by generating and refining a semantic token for an individual image [19]. We similarly use a VLM to produce retrieval vectors, building on Qwen2-VL and Qwen3-VL-Embedding [9] [18]. Our focus is visual in-context adaptation: the trained backbone conditions each target embedding on supplied unlabeled player crops rather than encoding that crop independently. This changes the representation at inference without parameter updates.

Temporal Evidence and Player Identity

SportsMOT and DanceTrack expose the difficulty of associating people with similar appearances [4, 17], while SoccerNet player retrieval and game-state reconstruction emphasize identity in structured sports scenes [3, 16]. Group-aware ReID uses graphs of neighboring group members to improve individual retrieval [20]. Video ReID typically aggregates target tracklets, while sports trackers use appearance for association [22]. MOTIP formulates tracking as in-context ID prediction, decoding current detection IDs from historical trajectories carrying ID information [5]. ContextReID requires no target tracklet or cross-frame association: its context comprises unassociated detections, and the target identity need not occur in the shared context. It retains crop-level retrieval while using spatial and temporal evidence to adapt the embedding.

Method

Overall Design

ContextReID learns a retrieval representation that adapts to the visual evidence supplied at inference. Given a target player crop, detections of other players in its frame, and a small set of context frames, the model produces a normalized embedding conditioned on these observations. We refer to this process as visual in-context adaptation: the supplied context changes the target representation through attention, while the trained model parameters remain fixed. Context crops carry no identity labels and require no cross-frame association.

The design draws inspiration from in-context learning, where input examples condition a model’s behavior without parameter updates [1]. Here, unlabeled player observations provide visual evidence for distinguishing the target from surrounding alternatives. The model is trained to use this evidence through two complementary objectives: contextual identity matching encourages relationships among jointly encoded observations, while retrieval learning makes embeddings from separate forward passes comparable by cosine similarity. Identity annotations define supervision during training but are never supplied as model inputs.

Let Ft={xt,1,…,xt,Nt}F_t = \{x_{t,1}, \ldots, x_{t,N_t}\} contain the detected player crops at time tt, where xt,nx_{t,n} is the nn-th crop. During training, a shared context CC is followed by either an anchor frame AA or a query frame QQ. The same backbone processes [C,A][C, A] and [C,Q][C, Q] in separate passes, producing contextual candidate embeddings and query embeddings, respectively. Figure 2 summarizes this construction and the associated training objectives.

Figure 2. Detailed method. The anchor and query passes append different target frames to the same identity-free context prefix. The shared backbone produces contextual candidate and query embeddings, optimized jointly by correspondence and retrieval losses. Dotted boxes denote the common context; highlighted players are illustrative only and no identity or tracking information enters the model.

Frame-Wise Contextual Input

We represent a small set of selected frames as a multi-turn vision-language conversation. Each frame forms one user turn containing the fixed prompt frame: followed by its player crops. Frame boundaries preserve the grouping of observations, while the input contains no player names, identity labels, team attributes, or cross-frame associations. For MM selected frames, the input takes the form

[frame:x1,1,…,x1,N1],…,[frame:xM,1,…,xM,NM].(1)\begin{aligned} [\text{frame}: x_{1,1}, \ldots, x_{1,N_1}], \ldots, \\ [\text{frame}: x_{M,1}, \ldots, x_{M,N_M}]. \tag*{(1)} \end{aligned}

The model infers relationships among these observations from their visual content. Only a few frames are required; the full video is not supplied.

Contextual and Retrieval Objectives

The model infers relationships among these observations from their visual content. Only a few frames are required; the full video is not supplied.

For each crop xt,nx_{t,n}, we extract the hidden state ht,nendh^{\mathrm{end}}_{t,n} at its final visual token and normalize it:

zt,n=ht,nend∥ht,nend∥2.(2)z_{t,n} = \frac{h^{\mathrm{end}}_{t,n}}{\lVert h^{\mathrm{end}}_{t,n} \rVert_2}. \tag*{(2)}

This produces a crop-specific retrieval vector conditioned on the observations preceding it. Because the backbone uses causal attention, we append the anchor or query frame after the shared context prefix.

During training, a PP–KK sampler selects up to PP players from a query frame, an anchor frame, and up to K−2K - 2 context frames from the same sequence. Identity annotations guide this sampling but are not included in the model input. During training, we shuffle the player-crop order within each frame so that fixed crop positions do not reveal cross-frame identity correspondences. When a selected identity is absent from another frame, its position is filled with another player from that frame, preventing fixed positions from specifying correspondence. Whenever possible, we also remove one query–anchor shared identity from the context, providing training examples in which the target must be matched without another observation of that identity in the context.

Contextual and Retrieval Objectives

We train the model with two complementary objectives. Contextual correspondence learning encourages the model to extract identity-discriminative evidence from the supplied observations, while retrieval learning makes embeddings produced in separate forward passes comparable for player matching. Training uses identity annotations only to form positive and negative sets outside the model. Let s(zi,zj)=τzi⊤zjs(z_i,z_j)=\tau z_i^\top z_j denote scaled cosine similarity with temperature scale τ\tau. For an embedding ziz_i, a designated positive zp(i)z_{p(i)}, and negative index set Ni\mathcal{N}_i, we use the contrastive classification loss

ℓi=−log⁡exp⁡(s(zi,zp(i)))exp⁡(s(zi,zp(i)))+∑j∈Niexp⁡(s(zi,zj)).(3)\ell_i=-\log\frac{\exp(s(z_i,z_{p(i)}))}{\exp(s(z_i,z_{p(i)}))+\sum_{j\in\mathcal{N}_i}\exp(s(z_i,z_j))}. \tag*{(3)}

If an identity has multiple positive occurrences, we designate its last matching occurrence as the positive and exclude the remaining true matches from the negative set. Rows without a valid positive are excluded from the corresponding loss.

Contextual correspondence loss. This objective encourages the model to extract identity-discriminative evidence from the supplied observations. The contextual pass jointly encodes the context frames followed by the anchor frame. For every crop whose identity occurs in another frame of this pool, we retrieve the designated matching crop against all other identities in the same example. This yields

Lctx=1∣Vctx∣∑i∈Vctxℓi,(4)\mathcal{L}_{\mathrm{ctx}}=\frac{1}{|\mathcal{V}_{\mathrm{ctx}}|}\sum_{i\in\mathcal{V}_{\mathrm{ctx}}}\ell_i, \tag*{(4)}

where Vctx\mathcal{V}_{\mathrm{ctx}} is the set of crops with at least one cross-frame match. Players within a frame are guaranteed to be distinct and therefore provide natural hard negatives, while repeated identities across frames provide positives. Since the anchor is last, the designated last match corresponds to its anchor occurrence whenever that identity is present there.

Retrieval loss. This objective makes embeddings produced in separate forward passes comparable for player matching. The retrieval pass separately encodes the same context followed by the query frame. Only embeddings from the final query frame are supervised. Each query embedding is matched against the contextual candidate pool produced by the context-plus-anchor pass. The anchor occurrence of the same identity is the positive, other occurrences of that identity are ignored, and all different identities are negatives:

Lret=1∣Vret∣∑i∈Vretℓi.(5)\mathcal{L}_{\mathrm{ret}}=\frac{1}{|\mathcal{V}_{\mathrm{ret}}|}\sum_{i\in\mathcal{V}_{\mathrm{ret}}}\ell_i. \tag*{(5)}

Here, Vret\mathcal{V}_{\mathrm{ret}} denotes the set of crops in the final query frame whose identities have a valid positive in the contextual candidate pool. This branch preserves the retrieval interface: query and candidate vectors are produced in separate forward passes and compared only by their dot product. The

overall objective averages the two groups independently before combining them,

L=Lret+Lctx,(6)\mathcal{L}=\mathcal{L}_{\mathrm{ret}}+\mathcal{L}_{\mathrm{ctx}}, \tag*{(6)}

giving the two independently averaged losses equal weight regardless of the number of valid rows contributed by each.

Inference-Time Adaptation

At inference, ContextReID adapts a target embedding using unlabeled player detections from its own frame and a few available frames from the sequence. Context players are neither aligned nor associated across frames, and the target identity need not appear in the context. Constructing the input requires only detections and frame membership; identity annotations are used exclusively for training supervision and evaluation.

For last-position targets, we reorder the target frame separately for each crop, placing that crop after its same-frame companions. Under causal attention, its embedding can then incorporate both the preceding context frames and the other players in its own frame. The resulting representation adapts to this visual evidence without parameter updates. Placing the target first instead removes access to its same-frame companions.

A fixed context prefix can be reused across targets within a sequence. Its key–value states can be computed once and reused during per-target encoding, amortizing part of the extraction cost. With the prefix fixed, gallery embeddings can also be stored for subsequent retrieval. Changing the shared context generally requires re-encoding gallery crops to obtain embeddings conditioned on the new context. We specify the experimental frame-selection policy and examine alternative selections in § 4.

Experiments

Datasets

We evaluate on three identity-annotated multi-object tracking datasets. SportsMOT contains broadcast clips from basketball, football, and volleyball and emphasizes rapid motion, moving cameras, and visually similar teammates [4]. DanceTrack contains group-dance videos in which people have highly uniform appearance but diverse and non-linear motion [17]. SN-GSR-2025 is the 2025 release of the SoccerNet Game State Reconstruction benchmark; its 30-second soccer clips annotate players, goalkeepers, and referees together with persistent within-clip track identities [16]. We convert any annotated person box into a player crop. For SN-GSR, we retain the player, goalkeeper, and referee categories.

Table 1 summarizes the frozen training, development, and test splits. SportsMOT’s labeled validation split is partitioned into 15 development and 30 test sequences, preserving source-video groups. DanceTrack’s validation split is partitioned into 8 development and 17 test sequences. For SoccerNet-GSR, we use 19 official validation sequences for development and all 49 labeled official test sequences for testing; the remaining validation sequences are unused. Development data are used for checkpoint selection, separately from final testing. An identity is a distinct track within one sequence, and counts are summed over sequences rather than globally deduplicated.

DatasetSetSeq.FramesIDsCrops
SportsMOTTrain4528,574639312,579
Dev153772154,175
Test307194267,814
DanceTrackTrain4041,796419348,930
Dev8393973,378
Test179031768,071
SN-GSR-2025Train5742,7501,349690,624
Dev195704369,231
Test491,4701,13921,216

Table 1. Dataset statistics after selecting annotated person categories. Dev and Test report retrieval inputs after approximately 1-FPS sampling; Train uses all annotated frames. IDs count sequence-local tracks present in the reported frames.

Evaluation Protocol

We construct a fixed retrieval benchmark from the held-out test sequences in Table 1. SportsMOT and DanceTrack use held-out portions of their labeled validation splits because their public test annotations do not contain ground-truth identities, whereas SN-GSR-2025 uses its labeled official test split. We sample annotated frames at approximately one frame per second using the native frame rate of each dataset. With a fixed random seed, one sampled frame from every sequence is selected as the query frame; every person crop in that frame forms a separate query. The query frame is excluded from the shared cross-frame context pool. Context frames are excluded from gallery ranking, leaving the remaining sampled non-query frames as retrieval candidates.

Ranking is performed independently within each sequence. A gallery crop is relevant exactly when it shares the query sequence and track identifier. We avoid pooling galleries across sequences because the datasets provide no global person identity, and distinct clips can come from the same game; treating an unannotated recurrence as a negative would therefore introduce label noise. Queries whose identity does not recur in the gallery are excluded. We rank normalized embeddings by cosine similarity and report mean average precision (mAP) and CMC Rank-1 accuracy.

Baselines and Implementation

We retrain three single-crop baselines on the combined training splits: SOLIDER (Swin-Base) [2], TransReID (ViT-B/16) [6], and R50-IBN-a [11]. All use 128 × 256 crops, sequence-local identity supervision, and a triplet objective. Unless otherwise stated, training uses P=20P = 20, K=5K = 5 crop sampling and 25,560 optimizer updates with SGD and cosine learning-rate decay; checkpoints maximize mean development mAP. We additionally evaluate the released PRTReID (HRNet-W32) checkpoint on SN-GSR-2025 [12].

ContextReID uses Qwen2-VL-2B-Instruct [18] or Qwen3-VL-Embedding-2B [9], with 128 × 256 source crops and crop-specific <vision_end>|</vision_end> pooling. We fine-tune with LoRA [8] for approximately 14,100 optimizer updates, using a learning rate of 10−410^{-4} and P=20P = 20, K=5K = 5 frame sampling. Checkpoints minimize development query contrastive loss. We report update counts because the baseline and ContextReID samplers define epochs differently.

Results are averaged over three training seeds, except where noted. Additional implementation details and extended experimental results are provided in the supplementary material.

Main Results

Table 2 compares ContextReID with conventional single-crop ReID models and summarizes the context-count variants used in our ablation study. CF denotes the number of inference-time context frames and TP denotes the target-crop position, with F and L indicating first and last, respectively. Because the VLM uses causal attention, TP controls whether the target embedding can incorporate other players from its own frame. With TP=F, the target crop precedes its same-frame teammates and therefore cannot attend to them; with TP=L, it follows the other crops and can use their appearance as same-frame context. For the main results, we fix the context pool to the first three sampled non-query frames of each sequence. CF=1, 2, and 3 use the first one, two, and three frames of this pool, respectively; CF=0 uses no cross-frame context. All crops from the three-frame pool are excluded from gallery ranking for every method and configuration, including the single-crop baselines. This shared protocol prevents context crops from also serving as retrieval candidates and keeps every method on the same query–gallery split.

MethodCFTPSportsMOT mAPSportsMOT R-1DanceTrack mAPDanceTrack R-1SN-GSR mAPSN-GSR R-1
PRTReID––––––69.9685.91
R50-IBN-a––68.3588.5225.5659.1476.6489.87
TransReID––70.0788.5223.9149.0379.2691.34
SOLIDER†––81.7994.7626.8456.1382.4192.75
Qwen2-VL-2B-Instruct
Zero-shot––23.6643.1116.8334.1924.2445.30
ContextReID0F79.5992.0233.1557.6378.1489.00
ContextReID0L84.5594.0137.2759.7881.4791.16
ContextReID1L86.5195.1139.0260.8683.4091.57
ContextReID2L87.1995.1139.2960.4383.7091.25
ContextReID3L87.3294.8139.0558.4983.4790.42
Qwen3-VL-Embedding-2B
Zero-shot––39.8560.4823.7943.2339.9765.06
ContextReID0F82.5693.5136.5263.2380.0490.93
ContextReID0L86.1094.4140.9964.3083.1692.40
ContextReID1L89.0396.0143.3962.8085.9393.37
ContextReID2L89.9296.4144.0460.8686.6093.00
ContextReID3L90.6796.2143.5758.4986.6493.37

Table 2. Player retrieval results (%). R-1 denotes CMC Rank-1. Models report means over three training seeds, except SOLIDER†, which averages two seeds; one seed was excluded due to NaN loss. Full mean ± standard deviation results are provided in the supplementary material. Best values are bold and second-best values are underlined.

The released zero-shot checkpoints provide a reference for the effect of task-specific training. Both Qwen2-VL-2B-Instruct and Qwen3-VL-Embedding-2B are substantially below their fine-tuned ContextReID counterparts under isolated-crop inference, indicating the importance of adapting the pretrained representations to player retrieval.

The conventional baselines serve as reference points for single-crop retrieval rather than parameter-matched comcomparisons: their architectures, parameter counts, and pretraining differ from those of ContextReID. Without in-context adaptation (CF=0CF=0, TP=FTP=F), each target is represented as an isolated crop. Both ContextReID variants achieve broadly comparable retrieval performance to SOLIDER, although differences vary across datasets and metrics. For example, SportsMOT mAP is 79.59% for Qwen-2 and 82.56% for Qwen-3, compared with 81.79% for SOLIDER. On DanceTrack, both variants already achieve higher mAP in this isolated-crop setting. Thus, the larger backbones do not uniformly yield large gains under isolated-crop inference. More directly, comparing each ContextReID checkpoint with and without context holds its parameters and training fixed, allowing us to assess the additional benefit of in-context adaptation independently of model size.

Both Qwen-2 and Qwen-3 benefit from in-context adaptation. With the fixed CF=1CF=1, TP=LTP=L setting, mAP improves over their respective isolated-crop results on all three datasets: by 6.92, 5.87, and 5.26 percentage points for Qwen-2, and by 6.47, 6.87, and 5.89 points for Qwen-3 on SportsMOT, DanceTrack, and SN-GSR, respectively. These gains arise without parameter updates or identity labels for the supplied context at inference. Additional context frames further improve mAP in several settings, while Rank-1 gains are

Rank-1 gains are less uniform. The results support the value of in-context adaptation across both backbones.

Cross-Sport Transfer

We evaluate cross-sport transfer with a leave-one-sport-out protocol on SportsMOT. For each target sport, we train the Qwen-3 variant and SOLIDER, the strongest baseline, on the other two sports and select checkpoints using development data from the source sports only. The target sport is excluded from task-specific training and checkpoint selection. At inference, the model receives unlabeled visual context from the target sequence without parameter updates. Table 3 reports means over three training seeds; full mean ± standard deviation results and transfer-specific training settings are provided in the supplementary material.

MethodCFTPB + V mAPB + V R-1S mAPS R-1B + S mAPB + S R-1V mAPV R-1S + V mAPS + V R-1B mAPB R-1
SOLIDER (Swin-B)––82.8294.0555.0077.9675.0292.6976.3890.7278.38<u>91.38</u>63.0690.82
ContextReID w/ Qwen3-VL-2B0F84.0193.1160.3080.9977.8190.4176.3588.7076.0989.1276.3892.86
ContextReID w/ Qwen3-VL-2B0L86.3694.8461.1478.5179.9691.0278.4791.8878.44<u>91.38</u>79.1495.24
ContextReID w/ Qwen3-VL-2B1L89.3295.9363.2478.7982.5491.1779.80<u>91.59</u>80.3289.9783.4795.24
ContextReID w/ Qwen3-VL-2B2L<u>90.39</u><u>96.09</u><u>64.29</u><u>83.75</u><u>83.77</u><u>91.93</u><u>81.21</u><u>91.01</u><u>81.40</u>91.53<u>84.75</u><u>93.88</u>
ContextReID w/ Qwen3-VL-2B3L91.5096.2464.3984.3084.0791.7883.3990.4382.5991.2485.60<u>93.88</u>

Table 3. Cross-sport transfer on SportsMOT (%), averaged over three training seeds. B, V, and S denote basketball, volleyball, and soccer (the dataset’s football category), respectively. Each model is trained on the two source sports and evaluated on both the held-out target sport and independent test sequences from the source sports. Best and second-best values within each metric column are bold and underlined, respectively; ties receive the same emphasis.

Even without in-context adaptation (CF=0CF=0, TP=FTP=F), Qwen-3 shows a transfer advantage over the Swin baseline when soccer or basketball is held out. On soccer, it achieves 60.30% mAP and 80.99% Rank-1, compared with 55.00% and 77.96% for Swin; on basketball, it achieves 76.38% mAP and 92.86% Rank-1, compared with 63.06% and 90.82%. On held-out volleyball, isolated-crop mAP is similar (76.35% versus 76.38%), while Rank-1 is lower. These results indicate that the backbone already provides useful transfer capabilities before contextual adaptation.

In-context adaptation further improves retrieval, increasing mAP on all three held-out sports. With CF=1CF=1, TP=LTP=L, the gains over isolated-crop inference are 2.94 points on soccer, 3.45 on volleyball, and 7.09 on basketball. With three context frames, these gains reach 4.09, 7.04, and 9.22 points, respectively. Rank-1 gains vary across context settings, although each held-out sport benefits from at least one contextual configuration. These within-checkpoint comparisons show that unlabeled visual context can improve retrieval beyond the backbone’s existing transfer capability, without additional parameter updates.

Ablation Studies

We use the ContextReID variants in Table 2 to study the effects of same-frame and cross-frame context. The CF=0CF=0, TP=FTP=F configuration represents the performance of the Qwen-based model under a conventional ReID setting, where each target is embedded without cross-frame or same-frame player context. Moving the target to the last position at CF=0CF=0 supplies same-frame context and improves both metrics on all three datasets for both backbones.

For Qwen-3, mAP peaks at three context frames on SportsMOT and SN-GSR-2025 and at two on DanceTrack. Rank-1 peaks at two on SportsMOT, at zero with the target last on DanceTrack, and ties at one and three on SN-GSR-2025. These comparisons measure the effect of inference-time context, which support that both same-frame player context and observations from additional frames contribute to the learned representation, although the optimal number of context frames varies by metric and dataset.

Context-frame selection. We examine sensitivity to the supplied context using the Qwen-3 variant with CF=1, TP=L. We select the first, middle, or last sampled non-query frame, retaining the same query set and a common gallery that excludes all three candidate context frames. Table 4 reports three-seed mean mAP and sample standard deviation. The preferred selection varies across datasets: the middle frame yields the highest mAP on SportsMOT and DanceTrack, while the first frame performs best on SN-GSR. Nevertheless, the spread across selection means is limited to 1.86, 0.41, and 0.77 points, respectively, indicating stable retrieval performance across the tested choices. Together with the contextual gains in the main results, this suggests that useful adaptation is not restricted to the first-frame policy.

ContextSportsMOTDanceTrackSN-GSR
First88.93 ± 0.1143.27 ± 0.1986.03 ± 0.38
Middle90.79 ± 0.0943.68 ± 0.0485.26 ± 0.31
Last90.26 ± 0.2443.39 ± 0.2285.46 ± 0.05
Overall89.99 ± 0.1343.45 ± 0.1485.58 ± 0.24

Table 4. Context-frame selection with Qwen-3 (CF=1, TP=L): mean ± sample standard deviation of mAP (%) over three seeds. Overall mean averages the three selection policies.

Context-content control. We test whether gains arise merely from additional visual input by replacing the shared context with seeded random frames from an unrelated dataset. SportsMOT and SN-GSR-2025 use DanceTrack donors, while DanceTrack uses SN-GSR-2025 donors. All settings use the Qwen-3 variant with TP=F. Table 5 compares three-seed mean mAP against the CF=0, TP=F reference from Table 2. Unrelated context decreases mAP on SportsMOT and DanceTrack; on SN-GSR, the largest gain is 0.52 points. These changes are small relative to the gains from sequence context in the main results, suggesting that additional visual input alone is insufficient to explain those gains.

CFSportsMOTDanceTrackSN-GSR
082.5636.5280.04
1-0.17-0.04+0.52
2-0.34-0.15+0.42
3-0.65-0.41+0.01

Table 5. Qwen-3 context-content control with TP=F, averaged over three seeds. The first row reports absolute CF=0, TP=F mAP (%) from Table 2; subsequent rows report signed mAP percentage-point changes relative to this reference. Unrelated context comprises seeded random frames drawn from a different dataset.

Target-absence control. We test whether contextual gains require the query identity to appear in the shared ere from Table 2. Unrelated context decreases mAP on SportsMOT and DanceTrack; on SN-GSR, the largest gain is 0.52 points. These changes are small relative to the gains from sequence context in the main results, suggesting that additional visual input alone is insufficient to explain those gains. cross-frame context. We retain one query identity per sequence (30 SportsMOT, 17 DanceTrack, and 49 SN-GSR-2025 queries) and remove it from the shared context for both query and gallery encoding. Own-frame context and gallery membership remain unchanged. Table 6 reports three-seed Qwen-3 means. Every contextual setting improves mAP over isolated crops. Relative to same-frame context alone (CF=0, TP=L), the best additional gain is 1.11 points on SportsMOT (CF=2) and 0.94 on DanceTrack (CF=1). On SN-GSR-2025, same-frame context alone gives the highest mAP. These results support adaptation from surrounding players.

CFTPSportsMOTDanceTrackSN-GSR
0F89.2143.9483.83
0L+1.89+3.77+3.23
1L+2.37+4.71+3.02
2L+3.00+3.26+2.14
3L+1.26+2.72+1.40

Table 6. Qwen-3 target-absence control on a fixed one-identity-per-sequence query subset, averaged over three seeds. The first row reports absolute single-crop mAP (%); subsequent rows report signed mAP percentage-point changes relative to it. The designated query identity is removed from shared cross-frame context.

Embedding Case Study

Figure 3 qualitatively compares the isolated-crop and contextualized embedding spaces for one SportsMOT sequence. We jointly fit a single t-SNE projection to the embeddings from both configurations, using the same set of crops in each, and color points by ground-truth track identity. Under CF=0, TP=F, several identities exhibit visibly dispersed embeddings across their observations. With CF=3, TP=L, observations of the same identity form more compact groups while remaining separated from other identities. Although t-SNE is only a qualitative visualization, this example illustrates how contextualization can reduce variation across repeated observations and produce more coherent identity structure.

Figure 3. Joint t-SNE visualization for the same player crops from one SportsMOT sequence. Both configurations are projected together using cosine distance; colors and numeric labels denote ground-truth track identities. Compared with isolated-crop embeddings (left), contextualized embeddings using three context frames and a last-position target (right) form more compact within-identity groups.

Computational Analysis

We profile the Qwen3-VL-Embedding-2B variant in BF16 using SportsMOT inputs, grouping complete forwards by the total number of player crops. FLOPs are counted with eager attention, treating a multiply–add as two operations; runtime peak process VRAM is measured separately with SDPA and NVML. Each input uses 32 visual tokens per crop.

Figure 4 compares full recomputation with prefix-cache reuse on fixed examples containing 15 crops per frame. With one, two, and three context frames and TP=L, full forwards require 5.78, 8.84, and 12.02 TFLOPs, whereas encoding a target with an existing prefix cache requires 2.88, 2.94, and 3.00 TFLOPs. These cached costs exclude the one-time prefix construction. TP=F further reduces computation because only the target crop is processed after the prefix. The right axis shows full-forward process-memory peaks, increasing from 4.68 GiB for one crop to 5.19 GiB for 60 crops. Matched full and cached probing gives similar process-memory peaks across the tested settings, with absolute differences below 0.05 GiB; we therefore display only the full-forward measurements. Cache reuse primarily reduces repeated computation rather than peak process VRAM in these measurements.

Figure 4. Qwen-3 computational footprint. Left axis: full versus cached computation per target, excluding one-time prefix construction for cached curves. Right axis: full-forward BF16/SDPA peak process VRAM. Full and cached memory peaks are similar, so only full-forward results are shown.

Conclusion

We presented ContextReID, a framework for visual in-context adaptation in player re-identification. By conditioning a target embedding on co-occurring players and observations from a few additional frames, the trained model uses spatial and temporal evidence without parameter updates, context identity labels, or cross-frame identity associations at inference. Experiments across two vision-language backbones and three benchmarks demonstrate retrieval improvements ments beyond the same models’ isolated-crop representations. Cross-sport experiments further show that contextual adaptation improves mAP on sports excluded from task-specific training. Controlled analyses support the value of relevant visual context, including when the designated query identity is absent from the shared context. These findings highlight the empirical value of adapting player representations to the visual evidence available at inference.

LLM Usage Statement

OpenAI Codex assisted with manuscript drafting and revision, bibliographic verification, LaTeX formatting, and preparation of figures and tables from experimental outputs. It also assisted with code development, dataset preparation, experiment execution, and analysis of evaluation results. The evaluated ContextReID variants use Qwen2-VL-2B-Instruct and Qwen3-VL-Embedding-2B as described in the method and experiments.

Detailed Implementation Setup

This section expands the baseline and ContextReID implementation details described in § 4.3 of the main paper. Unless otherwise stated, the following settings apply to the main three-dataset comparison; the cross-sport baseline uses the separate settings described below.

Models and Initialization

We retrain SOLIDER with Swin-Base [2], TransReID with ViT-B/16 [6], and the ResNet50-IBN-a strong baseline [11]. SOLIDER starts from its released human-centric pretrained weights, while TransReID and R50-IBN-a start from ImageNet-pretrained weights. All models receive individual player crops resized to width 128 and height 256 pixels. Training uses random horizontal flipping, padding followed by random cropping, normalization, and random erasing. Evaluation uses resizing and normalization without stochastic augmentation.

Sampling and Supervision

All retrained baselines use the combined training sequences of SportsMOT, DanceTrack, and SoccerNet-GSR under the frozen development/test partition in the main paper. We construct sequence-restricted identity batches with up to P=20P = 20 identities and K=5K = 5 crops per identity, giving at most 100 crops per batch. Track identities are scoped to individual sequences. We train with a triplet objective and omit identity classification to avoid additional assumptions about identities across clips. Training uses BF16 mixed precision; the TransReID and SOLIDER runs use the numerically stable softplus formulation of the soft-margin triplet loss, while R50-IBN-a uses the original loss implementation.

A baseline epoch draws KK crops per identity rather than traversing every annotated crop. The main training schedule contains 213 batches per epoch and 120 epochs, corresponding to 25,560 optimizer-update steps. These epochs are therefore not directly comparable to ContextReID’s frame-based sampling epochs.

Optimization and Checkpoint Selection

We use SGD with weight decay 10−410^{-4} and a cosine learning-rate schedule. The base learning rates are 2×10−42 \times10^{-4} for SOLIDER, 8×10−38 \times10^{-3} for TransReID, and 2×10−32 \times10^{-3} for R50-IBN-a. The first 20 epochs use warmup starting at 1% of the base rate; the cosine scheduler has a minimum rate of 0.2% of the base rate.

Development retrieval is evaluated every ten epochs. We select the checkpoint maximizing the unweighted mean development mAP across the three datasets; test scores are not used for selection. Development retrieval uses the sampled sequence-local query/gallery protocol described in the main paper.

Runs use training seeds 42, 43, and 44 with fixed development/test selections. SOLIDER’s main-table mean uses seeds 42 and 44 because seed 43 encountered NaN loss. The supplementary numerical results should be interpreted with this two-run exception.

Released PRTReID Reference

For PRTReID [12], we use the HRNet-W32 checkpoint distributed with the SoccerNet Game State Reconstruction baseline, without retraining. We report this reference on SoccerNet-GSR only. Its saved crop embeddings are evaluated under the current sequence-restricted test protocol and shared non-query context-frame gallery exclusions. As a fixed released checkpoint, PRTReID is not included in the three-seed training protocol.

Cross-Sport Transfer Baseline

The leave-one-sport-out study retrains SOLIDER on the two source sports using BF16, the softplus triplet loss, and P=20P = 20, K=5K = 5 sampling. These runs use a reduced base learning rate of 10−510^{-5}, a 600-epoch maximum, and early stopping after 100 epochs without improvement in source-development mAP. Each seed starts from the released pretrained weights. Checkpoints are selected exclusively using source-development mAP and then evaluated on both source-sport test sequences and the held-out sport. Source-test aggregates weight each sport’s metric by its valid-query count within a run before averaging across seeds 42, 43, and 44.

ContextReID Configuration

We initialize ContextReID from Qwen2-VL-2B-Instruct [18] or Qwen3-VL-Embedding-2B [9]. Both variants receive source crops resized to 128×256128 \times256 pixels and pool the hidden state at each crop-specific <|vision_end|> token, followed by ℓ2\ell_2 normalization. Qwen3-VL uses 16×1616 \times16 patches with 2×22 \times2 spatial pooling, yielding 32 visual tokens per crop. Qwen2-VL uses 14×1414 \times14 patches with 2×22 \times2 pooling; its native processor maps the source crops to 140×252140 \times252 pixels, yielding 45 visual tokens.

We fine-tune with LoRA [8], using rank 8, scaling factor 8, and dropout 0.1 on the applicable q-proj, v-proj, and qkv modules. Training uses BF16 precision on two NVIDIA RTX A6000 GPUs, 8-bit PagedAdamW, a learning rate of 10−410^{-4}, and a linear schedule with 10% warmup. The per-device batch size is one example, with eight gradient-accumulation steps. The training budget is approximately 14,100 optimizer updates, and checkpoints are selected by the lowest development query contrastive loss rather than test retrieval performance.

Each training example samples up to P=20P = 20 players and K=5K = 5 frames: one query frame, one anchor frame, and up to three context frames. We shuffle crop order within frames during training to prevent order from encoding identity associations. The contextual-matching and retrieval losses use cosine-similarity scaling τ=20\tau= 20 and are summed with equal weight. Both variants use the same training splits and sequence-local identity supervision as the retrained baselines, with seeds 42, 43, and 44. Because the identity-balanced baseline sampler and multi-frame ContextReID sampler define epochs differently, we compare training budgets in optimizer updates rather than epochs.

Full Main Results

Table S1 expands the main-paper comparison with sample standard deviations (n−1n - 1 denominator). Fine-tuned results use training seeds 42, 43, and 44, except SOLIDER, which uses seeds 42 and 44 after the NaN-loss exclusion. The same frozen evaluation episodes are used for all runs. Released zero-shot checkpoints and PRTReID have no training-seed variation; we report their fixed-checkpoint scores without a standard deviation.

MethodCFTPSportsMOT mAPSportsMOT R-1DanceTrack mAPDanceTrack R-1SoccerNet-GSR mAPSoccerNet-GSR R-1
PRTReID––––––69.9685.91
R50-IBN-a––68.35 ± 0.4588.52 ± 1.0525.56 ± 0.5659.14 ± 0.3776.64 ± 0.5289.87 ± 0.79
TransReID––70.07 ± 1.0788.52 ± 0.8623.91 ± 0.8949.03 ± 1.1279.26 ± 0.5491.34 ± 0.52
SOLIDER{sup}†`––81.79 ± 0.1594.76 ± 0.2126.84 ± 0.7656.13 ± 2.7482.41 ± 0.2392.75 ± 0.68
Qwen2-VL-2B-Instruct
Zero-shot––23.6643.1116.8334.1924.2445.30
ContextReID0F79.59 ± 0.5692.02 ± 0.6933.15 ± 1.0957.63 ± 0.9978.14 ± 0.3389.00 ± 0.35
ContextReID0L84.55 ± 0.3694.01 ± 1.0437.27 ± 0.6659.78 ± 3.3181.47 ± 0.2991.16 ± 0.50
ContextReID1L86.51 ± 0.1995.11 ± 0.3539.02 ± 0.4260.86 ± 1.9783.40 ± 0.3291.57 ± 0.77
ContextReID2L87.19 ± 0.1095.11 ± 0.6239.29 ± 0.2560.43 ± 2.9883.70 ± 0.2091.25 ± 0.83
ContextReID3L87.32 ± 0.1994.81 ± 0.9139.05 ± 0.4358.49 ± 2.4483.47 ± 0.1690.42 ± 0.81
Qwen3-VL-Embedding-2B
Zero-shot––39.8560.4823.7943.2339.9765.06
ContextReID0F82.56 ± 0.1493.51 ± 1.1336.52 ± 0.0663.23 ± 1.7180.04 ± 0.2190.93 ± 0.49
ContextReID0L86.10 ± 0.2094.41 ± 0.6240.99 ± 0.2364.30 ± 1.3483.16 ± 0.2992.40 ± 0.63
ContextReID1L89.03 ± 0.1096.01 ± 0.7543.39 ± 0.0862.80 ± 1.4985.93 ± 0.3993.37 ± 0.24
ContextReID2L89.92 ± 0.3196.41 ± 0.6044.04 ± 0.6560.86 ± 1.3486.60 ± 0.3493.00 ± 0.68
ContextReID3L90.67 ± 0.1196.21 ± 0.6243.57 ± 0.4058.49 ± 1.3486.64 ± 0.2393.37 ± 0.77

Table S1. Full main results (%): mean ± sample standard deviation across training seeds. † SOLIDER averages two seeds; all other retrained models average three. Fixed released checkpoints are shown without a standard deviation. CF and TP follow the definitions in the main paper.

Full Cross-Sport Transfer Results

Tables S2–S4 report three-seed means and sample standard deviations for the source-test and held-out-target evaluations, covering B + V → S, B + S → V, and S + V → B, respectively. All models are selected using source-development data only. Source-test metrics are first weighted by valid-query counts across the two source sports within each seed; standard deviations are then computed across seeds. B, V, and S denote basketball, volleyball, and soccer, respectively. The training and test partitions and selected checkpoints match the main-paper transfer table.

Input Format and Crop-Order Ablations

Training Input Format

We compare frame-wise conversations with a flat/shuffled input using Qwen3-VL-Embedding-2B. Both variants use the same pretrained initialization, training splits, P=20P = 20, K=5K = 5 sampling, source-crop resolution, LoRA settings, optimizer schedule, and development-query-loss checkpoint selection. We train each variant with seeds 42, 43, and 44 and evaluate on the same frozen test episodes and corrected shared non-query support protocol. During training, the flat/shuffled variant removes the frame: markers and frame-turn boundaries and places context crops in one user turn with their order shuffled across frames. Anchor/query crops remain at the tail with their supervision aligned. This cross-frame crop-order shuffling is used only during training: at inference, both variants receive the same crops in the same order, encoded in their respective frame-wise or flat representations, without additional shuffling. This comparison therefore tests the combined effect of frame markers, turn boundaries, and ordering rather than isolating any one component.

MethodCFTPSource mAPSource R-1Target mAPTarget R-1
Swin-B––82.82±1.9082.82 \pm1.9094.05±1.4394.05 \pm1.4355.00±1.5055.00 \pm1.5077.96±1.7277.96 \pm1.72
Ours0F84.01±0.7184.01 \pm0.7193.11±0.2793.11 \pm0.2760.30±0.8360.30 \pm0.8380.99±3.6080.99 \pm3.60
Ours0L86.36±0.4686.36 \pm0.4694.84±0.0094.84 \pm0.0061.14±0.9361.14 \pm0.9378.51±0.8378.51 \pm0.83
Ours1L89.32±0.4589.32 \pm0.4595.93±0.7295.93 \pm0.7263.24±1.6163.24 \pm1.6178.79±0.9578.79 \pm0.95
Ours2L90.39±0.5390.39 \pm0.5396.09±0.2796.09 \pm0.2764.29±0.5064.29 \pm0.5083.75±1.2683.75 \pm1.26
Ours3L91.50±0.4391.50 \pm0.4396.24±0.4796.24 \pm0.4764.39±0.2964.39 \pm0.2984.30±1.6584.30 \pm1.65

Table S2. B+V→SB + V \to S transfer: mean ±\pm sample standard deviation (%) across three seeds. Ours denotes ContextReID with Qwen3-VL-Embedding-2B. Source scores are query-weighted across the two training sports’ test sets.

MethodCFTPSource mAPSource R-1Target mAPTarget R-1
Swin-B––75.02±1.4175.02 \pm1.4192.69±1.2192.69 \pm1.2176.38±1.1876.38 \pm1.1890.72±1.0090.72 \pm1.00
Ours0F77.81±0.3277.81 \pm0.3290.41±0.9190.41 \pm0.9176.35±2.6576.35 \pm2.6588.70±2.3088.70 \pm2.30
Ours0L79.96±0.6179.96 \pm0.6191.02±3.0491.02 \pm3.0478.47±1.7078.47 \pm1.7091.88±2.8091.88 \pm2.80
Ours1L82.54±0.4382.54 \pm0.4391.17±1.7391.17 \pm1.7379.80±1.4379.80 \pm1.4391.59±1.0091.59 \pm1.00
Ours2L83.77±0.2483.77 \pm0.2491.93±0.9591.93 \pm0.9581.21±1.4381.21 \pm1.4391.01±1.3391.01 \pm1.33
Ours3L84.07±0.0884.07 \pm0.0891.78±0.4691.78 \pm0.4683.39±1.2083.39 \pm1.2090.43±0.8790.43 \pm0.87

Table S3. B+S→VB + S \to V transfer: mean ±\pm sample standard deviation (%) across three seeds. Ours denotes ContextReID with Qwen3-VL-Embedding-2B. Source scores are query-weighted across the two training sports’ test sets.

MethodCFTPSource mAPSource R-1Target mAPTarget R-1
Swin-B––78.38±0.9578.38 \pm0.9591.38±0.4991.38 \pm0.4963.06±3.5063.06 \pm3.5090.82±2.7090.82 \pm2.70
Ours0F76.09±0.6576.09 \pm0.6589.12±0.4989.12 \pm0.4976.38±2.1676.38 \pm2.1692.86±3.6892.86 \pm3.68
Ours0L78.44±1.0078.44 \pm1.0091.38±0.8891.38 \pm0.8879.14±1.1079.14 \pm1.1095.24±0.5995.24 \pm0.59
Ours1L80.32±0.7180.32 \pm0.7189.97±0.2489.97 \pm0.2483.47±1.1683.47 \pm1.1695.24±1.1895.24 \pm1.18
Ours2L81.40±0.8881.40 \pm0.8891.53±1.5391.53 \pm1.5384.75±0.7084.75 \pm0.7093.88±1.0293.88 \pm1.02
Ours3L82.59±0.6482.59 \pm0.6491.24±0.4991.24 \pm0.4985.60±0.8385.60 \pm0.8393.88±1.7793.88 \pm1.77

Table S4. S+V→BS + V \to B transfer: mean ±\pm sample standard deviation (%) across three seeds. Ours denotes ContextReID with Qwen3-VL-Embedding-2B. Source scores are query-weighted across the two training sports’ test sets.

CFTPFrame-wiseFlat/shuffledPaired Δ\Delta
0F82.56±0.1482.56 \pm0.1482.43±0.3782.43 \pm0.370.12±0.290.12 \pm0.29
0L86.10±0.2086.10 \pm0.2083.87±0.7183.87 \pm0.712.24±0.572.24 \pm0.57
1L89.03±0.1089.03 \pm0.1085.13±0.5885.13 \pm0.583.89±0.513.89 \pm0.51
2L89.92±0.3189.92 \pm0.3186.26±0.3786.26 \pm0.373.66±0.153.66 \pm0.15
3L90.67±0.1190.67 \pm0.1187.56±0.4887.56 \pm0.483.12±0.403.12 \pm0.40
0F36.52±0.0636.52 \pm0.0635.44±0.4135.44 \pm0.411.09±0.391.09 \pm0.39
0L40.99±0.2340.99 \pm0.2338.46±0.8838.46 \pm0.882.54±0.942.54 \pm0.94
1L43.39±0.0843.39 \pm0.0839.47±0.8739.47 \pm0.873.92±0.923.92 \pm0.92
2L44.04±0.6544.04 \pm0.6539.87±0.9639.87 \pm0.964.17±1.554.17 \pm1.55
3L43.57±0.4043.57 \pm0.4039.91±0.7639.91 \pm0.763.67±0.893.67 \pm0.89
0F80.04±0.2180.04 \pm0.2180.57±0.2080.57 \pm0.20−0.53±0.32-0.53 \pm0.32
0L83.16±0.2983.16 \pm0.2981.82±0.1381.82 \pm0.131.35±0.291.35 \pm0.29
1L85.93±0.3985.93 \pm0.3983.29±0.0683.29 \pm0.062.63±0.422.63 \pm0.42
2L86.60±0.3486.60 \pm0.3484.05±0.1484.05 \pm0.142.55±0.402.55 \pm0.40
3L86.64±0.2386.64 \pm0.2384.25±0.1584.25 \pm0.152.38±0.232.38 \pm0.23

Table S5. Input-format ablation: mean ±\pm sample standard deviation of mAP (%) across three training seeds. Paired differences are computed as frame-wise minus flat/shuffled within each seed before averaging.

Table S5 shows higher frame-wise mAP on every dataset under all TP=L settings. At CF=1, TP=L, the paired improvements are 3.89 points on SportsMOT, 3.92 on DanceTrack, and 2.63 on SoccerNet-GSR. Under isolated-crop inference, differences are smaller and mixed, including a 0.53-point decrease on SoccerNet-GSR. These results support preserving frame structure when learning to use contextual observations, while leaving the individual contributions of markers, boundaries, and ordering unresolved.

Inference Crop-Order Robustness

We separately test whether retrieval depends on a particular within-frame crop order. We fix the Qwen3-VL-Embedding-2B checkpoint trained with seed 42 and evaluate five inference shuffle seeds (0–4) under CF=0, TP=L and CF=1, TP=L. Each frame’s crops are independently permuted while preserving frame order and keeping the crop being embedded last in its own frame. The same shared context ordering is used for query and gallery encoding within a run. CF=1 uses the first sampled non-query frame; both configurations retain the main protocol’s first-three-non-query-frame gallery exclusion. Thus, these runs use the same crops and ranking population, changing only their within-frame input order. Unlike the context-frame-selection experiment, this experiment does not exclude the union of first, middle, and last candidate frames.

Table S6 shows limited mAP variation across the tested permutations, with standard deviations of 0.06–0.22 percentage points. Adding one cross-frame context frame improves mean mAP by 2.47 points on SportsMOT, 2.71 on DanceTrack, and 2.75 on SN-GSR (computed before rounding). These results indicate that the observed contextual benefit is not restricted to a single within-frame ordering.

CFTPSportsMOTDanceTrackSN-GSR
0L86.34±0.1186.34 \pm0.1140.60±0.1240.60 \pm0.1282.68±0.0682.68 \pm0.06
1L88.81±0.2288.81 \pm0.2243.31±0.2043.31 \pm0.2085.43±0.1485.43 \pm0.14

Table S6. Inference crop-order robustness: mAP (%), mean ±\pm sample standard deviation over five shuffle seeds for one fixed training-seed-42 checkpoint. These deviations measure input-order sensitivity, not training-seed variability.

Temporal Aggregation References

ContextReID uses observations from multiple frames, raising the question of whether its gains can be obtained simply by pooling independently encoded crops rather than adapting embeddings to the supplied context. We therefore evaluate post-hoc temporal aggregation with both label-free nearest-crop associations and ground-truth identity associations. The former provides a comparison without inference-time identity labels, while the latter examines the benefit of correctly associated temporal evidence under privileged supervision.

We reuse the trained SOLIDER and Qwen3-VL-Embedding-2B checkpoints without further training; Qwen3-VL-Embedding-2B features are extracted under CF=0, TP=F. Qwen3-VL-Embedding-2B averages seeds 42, 43, and 44, while SOLIDER averages seeds 42 and 44, retaining the main-paper seed exclusion.

Association and pooling. For each target crop, label-free nearest-crop pooling independently selects the maximum-cosine crop from each support frame using the original target embedding. It averages the unit-normalized target and selected features with equal weight, then normalizes the result. No identity labels, confidence threshold, or one-to-one assignment are used. Query and gallery crops are processed independently; gallery aggregation never uses the query frame. The oracle reference instead pools only crops with the same ground-truth sequence-local identity. Missing observations are skipped without searching beyond the selected window; if none is available, the original target embedding is retained. Oracle associations provide privileged inference-time information that ContextReID does not require.

AggregationWWSportsMOTDanceTrackSN-GSR
SOLIDER
Single crop–81.79 ± 0.1526.84 ± 0.7682.41 ± 0.23
Nearest crop174.91 ± 0.2223.81 ± 1.5078.03 ± 0.06
Nearest crop277.24 ± 0.4623.46 ± 1.9078.54 ± 0.35
Nearest crop379.00 ± 0.3923.86 ± 1.2778.54 ± 0.92
Oracle ID194.63 ± 0.1488.25 ± 0.0093.78 ± 0.03
Oracle ID296.17 ± 0.0691.88 ± 0.0194.34 ± 0.12
Oracle ID397.71 ± 0.0691.83 ± 0.0294.53 ± 0.12
Qwen3-VL-Embedding-2B
Single crop–82.56 ± 0.1436.52 ± 0.0680.04 ± 0.21
Nearest crop175.47 ± 0.3234.50 ± 0.9575.57 ± 0.46
Nearest crop277.26 ± 0.3535.08 ± 1.0375.55 ± 0.49
Nearest crop379.86 ± 0.6135.49 ± 0.5775.78 ± 0.51
Oracle ID195.41 ± 0.2088.51 ± 0.0194.35 ± 0.16
Oracle ID296.68 ± 0.2092.19 ± 0.0594.68 ± 0.16
Oracle ID397.59 ± 0.1092.14 ± 0.0694.82 ± 0.17

Table S6 (PDF p. 14).

Table S7. Temporal aggregation using the first WW sampled non-query frames. mAP scores are mean ± sample standard deviation (%) over three Qwen3-VL-Embedding-2B seeds and two SOLIDER seeds. Oracle ID uses ground-truth inference-time associations and is a privileged reference, not a label-free baseline. All rows share the matched gallery for this table.

AggregationWWSportsMOTDanceTrackSN-GSR
SOLIDER
Single crop–80.97 ± 0.2526.02 ± 0.7581.43 ± 0.14
Nearest crop178.78 ± 0.1024.74 ± 0.1479.29 ± 0.35
Nearest crop278.38 ± 0.8323.85 ± 0.5778.79 ± 0.18
Nearest crop378.25 ± 0.6724.31 ± 1.4277.99 ± 0.25
Oracle ID189.03 ± 0.3330.70 ± 0.7587.88 ± 0.16
Oracle ID292.10 ± 0.2534.88 ± 0.2890.07 ± 0.08
Oracle ID393.26 ± 0.1938.74 ± 0.6191.39 ± 0.18
Qwen3-VL-Embedding-2B
Single crop–81.83 ± 0.2736.12 ± 0.0479.06 ± 0.28
Nearest crop179.38 ± 0.5435.67 ± 0.7177.34 ± 0.40
Nearest crop279.12 ± 0.2435.64 ± 0.5977.13 ± 0.27
Nearest crop379.02 ± 0.4536.16 ± 0.5276.63 ± 0.62
Oracle ID190.64 ± 0.3642.60 ± 0.5887.63 ± 0.07
Oracle ID293.34 ± 0.1546.65 ± 0.4890.38 ± 0.08
Oracle ID394.49 ± 0.2849.90 ± 0.4792.03 ± 0.05

Table S7.

tbl:S8. Temporal aggregation using each target’s preceding WW eligible sampled frames. mAP scores are mean ± sample standard deviation (%) over three Qwen3-VL-Embedding-2B seeds and two SOLIDER seeds. Oracle ID uses ground-truth inference-time associations and is a privileged reference, not a label-free baseline. All rows share the matched gallery for this table.

Frame policies and matched evaluation. The fixed-first policy uses the first W∈{1,2,3}W \in\{1,2,3\} sampled non-query frames as shared support. All settings exclude the first three non-query frames from gallery ranking, matching the main protocol. The preceding-frame policy uses each query or gallery target’s own preceding up-to-WW eligible sampled frames at approximately 1 FPS. Targets with insufficient history use the available frames. In addition to the main exclusions, the query’s preceding three sampled frames are excluded from ranking for every window and for the single-crop reference, but remain eligible as gallery aggregation history. The query frame is always forbidden in gallery history. Consequently, the preceding-frame results must be compared with their own matched reference rather than directly with the main table.

Results. Table S7 and S8 report both policies. Nearest-crop pooling reduces mAP relative to its matched single-crop reference on SportsMOT and SoccerNet-GSR for both encoders at every tested window. DanceTrack results also mostly decline, with only a small increase for Qwen3-VL-Embedding-2B using three preceding frames. Oracle identity associations instead substantially improve retrieval, illustrating the benefit of correctly associated temporal observations. These results show that the tested label-free association-and-pooling scheme does not reproduce ContextReID’s gains. In particular, oracle pooling addresses a different, association-informed inference setting.

Attention-Mass Case Study

We examine how ContextReID distributes attention over supplied player crops using Qwen3-VL-Embedding-2B on one SportsMOT frame pair. Figure S1 shows all crops: IDs 8–14 belong to one team and IDs 0–7 to the other; player 14 in the own frame is the target. Labels 0-ii and 1-ii denote player ii in the context and own frame, respectively. IDs and team membership are used only for this analysis and visualization, not supplied to the model. Identity-aligned columns in the contact sheet do not represent the permuted model input order.

Figure S1. All player crops in the attention case study. The top row is the cross-frame context, supplied only under CF=1; the bottom row is the target’s own frame. IDs 0–7 and 8–14 form the two teams. Gold borders highlight target identity 14 in both frames, with the own-frame crop 1-14 serving as the embedding target. Columns are identity-aligned for display only.

Measurement and order controls. For each attention head and layer, we take the attention row at the target crop’s <|vision end|> readout and sum the weights assigned to each crop’s 32 visual tokens and its <|vision end|> token. We average these masses over heads, layers, and orders without renormalizing over crops; attention to other text and special tokens is not included in the plotted bars. We exclude the own-frame target self-pair. Cosine distances are computed between final crop readouts and the target readout within each order, then averaged by crop identity.

Under CF=0, TP=L, we use 14 cyclic rotations and their 14 reversed counterparts, placing every non-target crop at each available position twice while keeping target 14 last. Under CF=1, TP=L, we independently rotate the 15 context crops and 14 non-target own-frame crops, yielding 15×14=21015 \times14 = 210 combinations, again with the target last. This balances positions within each frame group. Error bars are sample standard deviations across these dependent orders, not independent repetitions or confidence intervals.

Appearance-related but non-monotonic attention. Figure S2 shows a negative relationship between embedding distance and attention mass under CF=0: Spearman ρ=−0.56\rho= -0.56. Same-team players often have smaller distances and attract more attention, but the correspondence is not strict. For example, player 10 receives less attention than player 1 despite having a substantially smaller embedding distance. Under CF=1, the correlations remain negative for both the context frame (ρ=−0.60\rho= -0.60) and other own-frame crops (ρ=−0.82\rho= -0.82). These patterns are consistent with appearance-related attention.

Figure S2. Attention-mass distributions under balanced crop orders: (a) CF=0, TP=L over 28 orders; (b,c) CF=1, TP=L over 210 order combinations. Bars show mean attention mass (left axis), with sample standard deviations across orders; dashed curves show mean contextualized-embedding cosine distance from the target (right axis). The target self-pair is excluded. Colors identify the two teams, with gold denoting the context observation of target identity 14. ρ\rho is the Spearman correlation between per-crop mean distance and mean mass in each panel. Order variability is not a confidence interval or training-seed variability.

Attention to the cross-frame target observation. With CF=1, TP=L, the context observation of player 14 receives 4.03 ± 0.48% attention mass, the largest among all non-self crops. The next-largest context-crop mean is 1.04% for player 9. The emphasis on the same identity across frames is consistent with the model recognizing a relevant cross-frame observation without being given its identity or association. However, attention alone does not establish successful identity recognition or a causal contribution to retrieval. This single-target case study reveals some connections between attention and identity. How these patterns generalize across frames, players, and sports remains an open question.

References

  1. [1]Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In Advances in Neural Information Processing Systems, pages 1877–1901, 2020. 1, 3arxiv.org/abs/2005.14165
  2. [2]Weihua Chen, Xianzhe Xu, Jian Jia, Hao Luo, Yaohua Wang, Fan Wang, Rong Jin, and Xiuyu Sun. Beyond appearance: A semantic controllable self-supervised learning framework for human-centric visual tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 15050–15063, 2023. 2, 5, 11arxiv.org/abs/2303.17602
  3. [3]Anthony Cioppa, Adrien Deliege, Silvio Giancola, Bernard Ghanem, and Marc Van Droogenbroeck. SoccerNet-v3: Scaling up soccernet with multi-view spatial localization and re-identification. Scientific Data, 9:355, 2022. 2DOI
  4. [4]Yutao Cui, Chenkai Zeng, Xiaoyu Zhao, Yichun Yang, Gangshan Wu, and Limin Wang. SportsMOT: A large multi-object tracking dataset in multiple sports scenes. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 9921–9931, 2023. 2, 4arxiv.org/abs/2304.05170
  5. [5]Ruopeng Gao, Ji Qi, and Limin Wang. Multiple object tracking as ID prediction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 27883–27893, 2025. 2arxiv.org/abs/2403.16848
  6. [6]Shuting He, Hao Luo, Pichao Wang, Fan Wang, Hao Li, and Wei Jiang. TransReID: Transformer-based object re-identification. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 15013–15022, 2021. 1, 2, 5, 11arxiv.org/abs/2102.04378
  7. [7]Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. 1, 2arxiv.org/abs/1703.07737
  8. [8]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. 5, 11arxiv.org/abs/2106.09685
  9. [9]Mingxin Li, Yanzhao Zhang, Dingkun Long, Keqin Chen, Sibo Song, Shuai Bai, Zhibo Yang, Pengjun Xie, An Yang, Dayiheng Liu, Jingren Zhou, and Junyang Lin. Qwen3-vl-embedding and qwen3-vl-reranker: A unified framework for state-of-the-art multimodal retrieval and ranking. arXiv preprint arXiv:2601.04720, 2026. 2, 5, 11
  10. [10]Siyuan Li, Li Sun, and Qingli Li. CLIP-ReID: Exploiting vision-language model for image re-identification without concrete text labels. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 1405–1413, 2023. 2arxiv.org/abs/2211.13977
  11. [11]Hao Luo, Wei Jiang, Youzhi Gu, Fuxu Liu, Xingyu Liao, Shenqi Lai, and Jianyong Gu. A strong baseline and batch normalization neck for deep person re-identification. IEEE Transactions on Multimedia, 22(10):2597–2609, 2020. 1, 2, 5, 11DOI
  12. [12]Amir M. Mansourian, Vladimir Somers, Christophe De Vleeschouwer, and Shohreh Kasaei. Multi-task learning for joint re-identification, team affiliation, and role classification for sports visual tracking. In Proceedings of the 6th International Workshop on Multimedia Content Analysis in Sports (MMSports), pages 103–112, Ottawa, Canada, 2023. ACM. 2, 5, 11DOI
  13. [13]Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the International Conference on Machine Learning (ICML), pages 8748–8763, 2021. 2arxiv.org/abs/2103.00020
  14. [14]Vladimir Somers, Christophe De Vleeschouwer, and Alexandre Alahi. Body part-based representation learning for occluded person re-identification. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 1613–1623, 2023. 2DOI
  15. [15]Vladimir Somers, Alexandre Alahi, and Christophe De Vleeschouwer. Keypoint promptable re-identification. In Computer Vision – ECCV 2024, pages 216–233. Springer, 2024. 2DOI
  16. [16]Vladimir Somers, Victor Joos, Anthony Cioppa, Silvio Giancola, Seyed Abolfazl Ghasemzadeh, Floriane Magera, Baptiste Standaert, Amir Mohammad Mansourian, Xin Zhou, Shohreh Kasaei, Bernard Ghanem, Alexandre Alahi, Marc Van Droogenbroeck, and Christophe De Vleeschouwer. SoccerNet game state reconstruction: End-to-end athlete tracking and identification on a minimap. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 3293–3305, 2024. 2, 4arxiv.org/abs/2404.11335
  17. [17]Peize Sun, Jinkun Cao, Yi Jiang, Zehuan Yuan, Song Bai, Kris Kitani, and Ping Luo. DanceTrack: Multi-object track- Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. Qwen2-VL: Enhancing vision-language model’s perception of the world at any resolution. arXiv:2409.12191, 2024. 2, 5, 11
  18. [19]Qizao Wang, Bin Li, and Xiangyang Xue. When large vision-language models meet person re-identification. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2026. 2DOI
  19. [20]Yichao Yan, Jie Qin, Bingbing Ni, Jiaxin Chen, Li Liu, Fan Zhu, Wei-Shi Zheng, Xiaokang Yang, and Ling Shao. Learning multi-attention context graph for group-based re-identification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(6):7001–7018, 2023. 2
  20. [21]Mang Ye, Jianbing Shen, Gaofei Lin, Tao Xiang, Ling Shao, and Steven C. H. Hoi. Deep learning for person re-identification: A survey and outlook. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(6):2872–2893, 2022. 1DOI
  21. [22]Ruiheng Zhang, Lingxiang Wu, Yukun Yang, Wanneng Wu, Yueqiang Chen, and Min Xu. Multi-camera multi-player tracking with deep player identification in sports video. Pattern Recognition, 102:107260, 2020. 2DOI

Paper details

vlnc:W_3fuk2kes
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Codex

View statement
Looking for related papers…
Contents