SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.03482 · NeurIPS · 2022

Bridging the Gap between Object and Image-level Representations for Open-Vocabulary Detection

Salman Khan, Hanoona Rasheed, Muhammad Maaz, Muhammad Khattak, Fahad Khan

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-21; 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/2207.03482.json · badge: /api/ran/2207.03482.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
hanoonaR/object-centric-ovd canonical (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
mmaaz60/mvits_for_class_agnostic_od community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
MDefDETR Ran
ran on a synthesized input · constructed an object; no result was computed
mmaaz60/mvits_for_class_agnostic_od/models/mdef_detr/mdef_detr.py
code served (permissive licence) · get_code("74d9bf63bb0a32b7")
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 an instance of its own class, MDefDETR: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import copy

torch.manual_seed(0)

# Define a minimal backbone
class MockBackbone(nn.Module):
    def __init__(self):
        super().__init__()
        self.strides = [8, 16, 32]
        self.num_channels = [64, 128, 256]
    
    def forward(self, x):
        return [torch.randn(2, 64, 32, 32), torch.randn(2, 128, 16, 16), torch.randn(2, 256, 8, 8)]

# Define a minimal transformer
class MockDecoderLayer(nn.Module):
    def __init__(self, d_model):
        super().__init__()
        self.self_attn = nn.MultiheadAttention(d_model, num_heads=4, batch_first=True)
        self.cross_attn = nn.MultiheadAttention(d_model, num_heads=4, batch_first=True)
        self.linear1 = nn.Linear(d_model, d_model * 4)
        self.linear2 = nn.Linear(d_model * 4, d_model)
        self.norm1 = nn.LayerNorm(d_model)
        self.norm2 = nn.LayerNorm(d_model)
        self.norm3 = nn.LayerNorm(d_model)
    
    def forward(self, x, memory):
        return x

class MockDecoder(nn.Module):
    def __init__(self, d_model, num_layers):
        super().__init__()
        self.num_layers = num_layers
        self.layers = nn.ModuleList([MockDecoderLayer(d_model) for _ in range(num_layers)])
        self.bbox_embed = None
    
    def forward(self, x, memory):
        return x

class MockImgTextAttn(nn.Module):
    def __init__(self, d_model, num_layers):
        super().__init__()
        self.num_layers = num_layers
        self.layers = nn.ModuleList([nn.MultiheadAttention(d_model, num_heads=4, batch_first=True) for _ in range(num_layers)])
    
    def forward(self, x, y):
        return x

class MockTransformer(nn.Module):
    def __init__(self, d_model=128, num_decoder_layers=3):
        super().__init__()
        self.d_model = d_model
        self.decoder = MockDecoder(d_model, num_decoder_layers)
        self.img_text_attn = MockImgTextAttn(d_model, num_decoder_layers)
    
    def forward(self, x, mask, query_embed, pos):
        return x, x

backbone = MockBackbone()
transformer = MockTransformer(d_model=128, num_decoder_layers=3)

ARGS = {
    'backbone': backbone,
    'transformer': transformer,
    'num_classes': 10,
    'num_queries': 5,
    'num_feature_levels': 3,
    'with_box_refine': False,
    'two_stage': False,
    'aux_loss': False,
    'contrastive_hdim': 64,
    'contrastive_loss': False,
    'contrastive_align_loss': False,
    'split_qa_heads': True,
    'predict_final': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MDefDETR — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MDefDETR 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
get_fed_loss_inds Ran
ran; our contract draft was wrong, not the code
hanoonaR/object-centric-ovd/ovd/modeling/utils.py
code served (permissive licence) · get_code("bb583e07209fe58b")
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 1, dtype family int, shape (5,) 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)

# gt_classes: a tensor of class indices
gt_classes = torch.tensor([0, 1, 2, 1, 0], dtype=torch.long)

# num_sample_cats: number of categories to sample
num_sample_cats = 5

# C: number of classes (total number of categories)
C = 8

# weight: optional weight tensor for classes, should have length C
weight = torch.ones(C, dtype=torch.float32)

ARGS = {
    "gt_classes": gt_classes,
    "num_sample_cats": num_sample_cats,
    "C": C,
    "weight": weight,
}
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 1, dtype family int, shape (5,) — shape (5,) 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
load_class_freq Ran
ran on a synthesized input
hanoonaR/object-centric-ovd/ovd/modeling/utils.py
code served (permissive licence) · get_code("5656dece1a24175b")
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 1, dtype family float, shape (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
import json
import tempfile
import os

torch.manual_seed(0)

# Create a temporary JSON file with mock category info
temp_dir = tempfile.mkdtemp()
mock_cat_info = [
    {'id': 0, 'image_count': 100},
    {'id': 1, 'image_count': 50},
    {'id': 2, 'image_count': 200},
    {'id': 3, 'image_count': 75},
]
temp_path = os.path.join(temp_dir, 'mock_cat_info.json')
with open(temp_path, 'w') as f:
    json.dump(mock_cat_info, f)

ARGS = {
    'path': temp_path,
    'freq_weight': 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (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
get_frequency_distr Not yet run
unverified (harvested, no recorded run)
hanoonaR/object-centric-ovd/ovd/evaluation/custom_coco_eval.py
code served (permissive licence) · get_code("3ccfc563c6913087")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 3 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
get_fed_loss_inds 10 other papers
1 dated earlier, 1 the same month, 8 later
2206.11134 (2022-06)
Open Vocabulary Object Detection with Proposal Mining and Prediction Equalization
2207.13080 (2022-07)
DETRs with Hybrid Matching
2211.12914 (2022-11)
Open-vocabulary Attribute Detection
and 7 more not named here

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

Repositories linked to this paper

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

Abstract

Existing open-vocabulary object detectors typically enlarge their vocabulary sizes by leveraging different forms of weak supervision. This helps generalize to novel objects at inference. Two popular forms of weak-supervision used in openvocabulary detection (OVD) include pretrained CLIP model and image-level supervision. We note that both these modes of supervision are not optimally aligned for the detection task: CLIP is trained with image-text pairs and lacks precise localization of objects while the image-level supervision has been used with heuristics that do not accurately specify local object regions. In this work, we propose to address this problem by performing object-centric alignment of the language embeddings from the CLIP model. Furthermore, we visually ground the objects with only imagelevel supervision using a pseudo-labeling process that provides high-quality object proposals and helps expand the vocabulary during training. We establish a bridge between the above two object-alignment strategies via a novel weight transfer function that aggregates their complimentary strengths. In essence, the proposed model seeks to minimize the gap between object and image-centric representations in the OVD setting. On the COCO benchmark, our proposed approach achieves 36.6 AP 50 on novel classes, an absolute 8.2 gain over the previous best performance. For LVIS, we surpass the state-of-the-art ViLD model by 5.0 mask AP for rare categories and 3.4 overall. Code: https://github.com/hanoonaR/object-centric-ovd.

For agents

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

get_harvested_code_for_paper("2207.03482")
get_code_for_paper("2207.03482")
have("2207.03482")

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

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

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

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

Connect an agent — have() is free.