SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.11228 · AAAI · 2024

Unifying Visual and Vision-Language Tracking via Contrastive Learning

Tianzhu Zhang, Wenfei Yang, Jinpeng Zhang, Yinchao Ma, Yuyang Tang, Mengxue Kang

arXiv · PDF · Open in the Atlas

Code that ran

1 of 1 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 1 has no contract verdict; 0 failures of our instrument; 0 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/2401.11228.json · badge: /api/ran/2401.11228.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
OpenSpaceAI/UVLTrack community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
UVLTrack Ran
ran on a synthesized input
OpenSpaceAI/UVLTrack/lib/models/uvltrack/uvltrack.py
code served (permissive licence) · get_code("d54937064fe3d6d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from torch import nn

class DummyBackbone(nn.Module):
    def __init__(self, feat_dim=32):
        super().__init__()
        self.conv = nn.Conv2d(3, feat_dim, 3, padding=1)
        self.text_proj = nn.Linear(64, feat_dim)
        
    def forward(self, template, search, text, flag):
        # template: [B, C, H, W]
        # search: [B, C, H', W']
        # text: [B, text_len, text_dim]
        # flag: str or similar
        B = template.shape[0]
        feat_dim = self.conv.out_channels
        
        template_feat = self.conv(template)  # [B, feat_dim, H, W]
        search_feat = self.conv(search)  # [B, feat_dim, H', W']
        
        # Flatten spatial dims
        B, C, H, W = template_feat.shape
        template_feat_flat = template_feat.flatten(2).permute(0, 2, 1)  # [B, H*W, C]
        
        B, C, H2, W2 = search_feat.shape
        search_feat_flat = search_feat.flatten(2).permute(0, 2, 1)  # [B, H'*W', C]
        
        # Process text
        text_feat = self.text_proj(text)  # [B, text_len, feat_dim]
        
        return {
            'template_feat': template_feat_flat,
            'search_feat': search_feat_flat,
            'text_feat': text_feat,
            'flag': flag
        }


class DummyBoxHead(nn.Module):
    def __init__(self, feat_dim=32, num_boxes=4):
        super().__init__()
        self.feat_dim = feat_dim
        self.num_boxes = num_boxes
        self.box_predictor = nn.Linear(feat_dim, 4)  # x, y, w, h
        self.prompt_gen = nn.Linear(feat_dim, feat_dim)
        
    def forward(self, backbone_info):
        # Extract features
        search_feat = backbone_info['search_feat']  # [B, N, C]
        template_mask = backbone_info.get('template_mask', None)
        context_mask = backbone_info.get('context_mask', None)
        prompt = backbone_info.get('prompt', None)
        
        # Simple pooling
        if prompt is not None:
            pooled = (search_feat + prompt.unsqueeze(1)).mean(dim=1)  # [B, C]
        else:
            pooled = search_feat.mean(dim=1)  # [B, C]
        
        boxes = self.box_predictor(pooled)  # [B, 4]
        
        return {
            'pred_boxes': boxes,
            'features': pooled
        }
    
    def forward_prompt(self, backbone_info):
        # Generate prompt from template and text
        template_feat = backbone_info['template_feat']  # [B, N, C]
        text_feat = backbone_info.get('text_feat', None)
        
        # Pool template features
        pooled_template = template_feat.mean(dim=1)  # [B, C]
        
        if text_feat is not None:
            pooled_text = text_feat.mean(dim=1)  # [B, C]
            combined = pooled_template + pooled_text
        else:
            combined = pooled_template
            
        prompt = self.prompt_gen(combined)  # [B, C]
        return prompt


backbone = DummyBackbone(feat_dim=32)
box_head = DummyBoxHead(feat_dim=32, num_boxes=4)

INIT_ARGS = {
    'backbone': backbone,
    'box_head': box_head
}

ARGS = {
    'template': torch.randn(2, 3, 8, 8),
    'search': torch.randn(2, 3, 12, 12),
    'text': torch.randn(2, 5, 64),
    'template_mask': torch.ones(2, 8*8).bool(),
    'context_mask': torch.ones(2, 12*12).bool(),
    'flag': 'train'
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)

Also present in other papers' code

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

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

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

Single object tracking aims to locate the target object in a video sequence according to the state specified by different modal references, including the initial bounding box (BBOX), natural language (NL), or both (NL+BBOX). Due to the gap between different modalities, most existing trackers are designed for single or partial of these reference settings and overspecialize on the specific modality. Differently, we present a unified tracker called UVLTrack, which can simultaneously handle all three reference settings (BBOX, NL, NL+BBOX) with the same parameters. The proposed UVL-Track enjoys several merits. First, we design a modalityunified feature extractor for joint visual and language feature learning and propose a multi-modal contrastive loss to align the visual and language features into a unified semantic space. Second, a modality-adaptive box head is proposed, which makes full use of the target reference to mine everchanging scenario features dynamically from video contexts and distinguish the target in a contrastive way, enabling robust performance in different reference settings. Extensive experimental results demonstrate that UVLTrack achieves promising performance on seven visual tracking datasets, three vision-language tracking datasets, and three visual grounding datasets. Codes and models will be open-sourced at https://github.com/OpenSpaceAI/UVLTrack.

For agents

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

get_harvested_code_for_paper("2401.11228")
get_code_for_paper("2401.11228")
have("2401.11228")

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

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

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

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

Connect an agent — have() is free.