SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.04725 · 2020

Instance-aware, Context-focused, and Memory-efficient Weakly Supervised Object Detection

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 0 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/2004.04725.json · badge: /api/ran/2004.04725.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
ppengtang/pcl.pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
dis_eval Ran
ran, honoured the contract we drafted
ppengtang/pcl.pytorch/lib/datasets/dis_eval.py
code served (permissive licence) · get_code("dd2212897360cbfa")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os
import numpy as np
import xml.etree.ElementTree as ET

# Create temporary directory for test files
tmpdir = tempfile.mkdtemp()

# Create a sample annotation XML file
anno_dir = os.path.join(tmpdir, 'annotations')
os.makedirs(anno_dir, exist_ok=True)

# Create sample annotation XML for image1
xml_content_1 = """<?xml version="1.0"?>
<annotation>
    <object>
        <name>person</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>10</xmin>
            <ymin>20</ymin>
            <xmax>100</xmax>
            <ymax>150</ymax>
        </bndbox>
    </object>
</annotation>
"""

# Create sample annotation XML for image2
xml_content_2 = """<?xml version="1.0"?>
<annotation>
    <object>
        <name>person</name>
        <pose>Left</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>50</xmin>
            <ymin>60</ymin>
            <xmax>120</xmax>
            <ymax>180</ymax>
        </bndbox>
    </object>
</annotation>
"""

with open(os.path.join(anno_dir, 'image1.xml'), 'w') as f:
    f.write(xml_content_1)

with open(os.path.join(anno_dir, 'image2.xml'), 'w') as f:
    f.write(xml_content_2)

# Create imageset file
imageset_file = os.path.join(tmpdir, 'imageset.txt')
with open(imageset_file, 'w') as f:
    f.write('image1\n')
    f.write('image2\n')

# Create detections file
det_dir = os.path.join(tmpdir, 'detections')
os.makedirs(det_dir, exist_ok=True)
det_file = os.path.join(det_dir, 'person.txt')
with open(det_file, 'w') as f:
    f.write('image1 0.95 15 25 95 145\n')
    f.write('image2 0.87 55 65 115 175\n')

# Create cache directory
cache_dir = os.path.join(tmpdir, 'cache')
os.makedirs(cache_dir, exist_ok=True)

# Define arguments
ARGS = {
    'detpath': os.path.join(det_dir, '{}.txt'),
    'annopath': os.path.join(anno_dir, '{}.xml'),
    'imagesetfile': imageset_file,
    'classname': 'person',
    'cachedir': cache_dir,
    'ovthresh': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
filter_for_training Ran
ran; our contract draft was wrong, not the code
ppengtang/pcl.pytorch/lib/datasets/roidb.py
code served (permissive licence) · get_code("7951428fcb43dcc0")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import logging

logging.basicConfig(level=logging.INFO)

# Create a minimal roidb (Region of Interest database)
# Each entry needs to have a 'gt_classes' key with array values
roidb = [
    {
        'gt_classes': np.array([1, 2, 0]),  # Valid entry with non-zero sum
        'image_id': 0,
        'boxes': np.array([[10, 20, 30, 40]])
    },
    {
        'gt_classes': np.array([0, 0, 0]),  # Invalid entry with zero sum
        'image_id': 1,
        'boxes': np.array([[50, 60, 70, 80]])
    },
    {
        'gt_classes': np.array([1, 0, 0]),  # Valid entry with non-zero sum
        'image_id': 2,
        'boxes': np.array([[100, 110, 120, 130]])
    },
    {
        'gt_classes': np.array([2, 1, 3]),  # Valid entry with non-zero sum
        'image_id': 3,
        'boxes': np.array([[200, 210, 220, 230]])
    }
]

ARGS = {
    'roidb': roidb
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mil_losses Ran
ran on a synthesized input
ppengtang/pcl.pytorch/lib/modeling/pcl_heads.py
code served (permissive licence) · get_code("c81c733f75b132c2")
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 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for the function
# cls_score: classification scores that will be clamped to [1e-06, 1-1e-06]
# Should be float tensor with values in (0, 1) range
cls_score = torch.rand(2, 4)

# labels: binary labels that will be clamped to [0, 1]
# Should be float tensor with binary values
labels = torch.randint(0, 2, (2, 4)).float()

ARGS = {
    "cls_score": cls_score,
    "labels": labels,
}
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 0, dtype family float, shape () — shape () 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
parse_rec Ran
ran; our contract draft was wrong, not the code
ppengtang/pcl.pytorch/lib/datasets/dis_eval.py
code served (permissive licence) · get_code("0eafc51289a49033")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import xml.etree.ElementTree as ET
import tempfile
import os

# Create a minimal valid PASCAL VOC XML file
xml_content = """<?xml version="1.0" encoding="UTF-8"?>
<annotation>
    <object>
        <name>dog</name>
        <pose>Frontal</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>10</xmin>
            <ymin>20</ymin>
            <xmax>100</xmax>
            <ymax>150</ymax>
        </bndbox>
    </object>
    <object>
        <name>cat</name>
        <pose>Rear</pose>
        <truncated>1</truncated>
        <difficult>1</difficult>
        <bndbox>
            <xmin>50</xmin>
            <ymin>60</ymin>
            <xmax>200</xmax>
            <ymax>250</ymax>
        </bndbox>
    </object>
</annotation>
"""

# Create a temporary file with the XML content
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.xml', delete=False)
temp_file.write(xml_content)
temp_file.close()

ARGS = {
    'filename': temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rank_for_training Ran
ran, honoured the contract we drafted
ppengtang/pcl.pytorch/lib/datasets/roidb.py
code served (permissive licence) · get_code("1d0f686f173313ef")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small roidb (region of interest database)
# Each entry needs 'width' and 'height' keys
roidb = [
    {'width': 640, 'height': 480},
    {'width': 800, 'height': 600},
    {'width': 1024, 'height': 768},
    {'width': 400, 'height': 300},
]

ARGS = {
    'roidb': roidb,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 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.

FunctionAlso present inEarliest-datedOthers named
parse_rec 14 other papers
11 dated earlier, 2 later, 1 same year, order not determinable
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
and 11 more not named here
dis_eval 1 other paper
1 later
2402.07633 (2024-02)
Complete Instances Mining for Weakly Supervised Instance Segmentation
filter_for_training 1 other paper
1 later
2402.07633 (2024-02)
Complete Instances Mining for Weakly Supervised Instance Segmentation
rank_for_training 1 other paper
1 later
2402.07633 (2024-02)
Complete Instances Mining for Weakly Supervised Instance Segmentation

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

Weakly supervised learning has emerged as a compelling tool for object detection by reducing the need for strong supervision during training. However, major challenges remain: (1) differentiation of object instances can be ambiguous; (2) detectors tend to focus on discriminative parts rather than entire objects; (3) without ground truth, object proposals have to be redundant for high recalls, causing significant memory consumption. Addressing these challenges is difficult, as it often requires to eliminate uncertainties and trivial solutions. To target these issues we develop an instance-aware and context-focused unified framework. It employs an instance-aware self-training algorithm and a learnable Concrete DropBlock while devising a memory-efficient sequential batch back-propagation. Our proposed method achieves state-of-the-art results on COCO ($12.1\% ~AP$, $24.8\% ~AP_{50}$), VOC 2007 ($54.9\% ~AP$), and VOC 2012 ($52.1\% ~AP$), improving baselines by great margins. In addition, the proposed method is the first to benchmark ResNet based models and weakly supervised video object detection. Code, models, and more details will be made available at: https://github.com/NVlabs/wetectron.

For agents

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

get_harvested_code_for_paper("2004.04725")
get_code_for_paper("2004.04725")
have("2004.04725")

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

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

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

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

Connect an agent — have() is free.