SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.06293 · ICML · 2022

Learning Domain Adaptive Object Detection with Probabilistic Teacher

Lei Zhang, Xinchao Wang, Yueting Zhuang, Meilin Chen, Weijie Chen, Shicai Yang, Jie Song, Yunfeng Yan, Donglian Qi, Di Xie, Shiliang Pu

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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 5 have no contract verdict; 4 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/2206.06293.json · badge: /api/ran/2206.06293.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
hikvision-research/probabilisticteacher canonical (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
shengcao-cao/cmt community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_iou Ran
ran on a synthesized input
hikvision-research/probabilisticteacher/augment/transforms.py
code served (permissive licence) · get_code("759772ff94a3641e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (1,) 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 numpy as np

# Create two bounding boxes in format [xmin, ymin, xmax, ymax]
# bbox1: a single bounding box
bbox1 = np.array([10.0, 20.0, 50.0, 60.0])

# bbox2: a single bounding box (or could be multiple, but function handles it)
bbox2 = np.array([30.0, 40.0, 70.0, 80.0])

ARGS = {
    "bbox1": bbox1,
    "bbox2": bbox2,
}
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 ndarray, ndim 1, dtype family float, shape (1,) — shape (1,) 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
hikvision-research/probabilisticteacher/pt/modeling/utils.py
code served (permissive licence) · get_code("cad594317b0f657a")
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 Conv2d. 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

torch.manual_seed(0)

ARGS = {
    'in_planes': 3,
    'out_planes': 64,
    'stride': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
hikvision-research/probabilisticteacher/pt/modeling/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

free_pass_trans_info Ran
ran on a synthesized input
hikvision-research/probabilisticteacher/augment/transforms.py
code served (permissive licence) · get_code("b416f49365bfa24d")
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 function. 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
from functools import wraps

torch.manual_seed(0)

def free_pass_trans_info(func):
    """Wrapper to make the function bypass the second argument(transf)."""

    @wraps(func)
    def decorator(img, transf, ratio):
        return (func(img), transf, ratio)
    return decorator

# Create a simple function to be decorated
def simple_func(img):
    return img * 2

# Decorate it
decorated_func = free_pass_trans_info(simple_func)

# Create test arguments
img = torch.randn(2, 3, 4, 5)  # batch=2, channels=3, height=4, width=5
transf = {
    "rotation": 45,
    "flip": True,
    "scale": 1.2
}
ratio = 0.8

ARGS = {
    "func": decorated_func,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
gaussian_dist_pdf Ran
ran; our contract draft was wrong, not the code
shengcao-cao/cmt/CMT_PT/pt/modeling/box_regression.py
code served (permissive licence) · get_code("588484103d646920")
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) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for the function parameters
val = torch.randn(2, 4)
mean = torch.randn(2, 4)
var = torch.abs(torch.randn(2, 4)) + 0.1  # variance should be positive

ARGS = {
    "val": val,
    "mean": mean,
    "var": var,
    "eps": 1e-09
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_mean_and_std Ran
ran on a synthesized input
hikvision-research/probabilisticteacher/augment/normalize.py
code served (permissive licence) · get_code("1bc251af2efa1bd9")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes a single parameter 'dataset' which is a string
# It checks the dataset name against known values: 'cifar10', 'cifar100', 'svhn', 'imagenet'
# and returns corresponding means and stds tuples

ARGS = {
    'dataset': 'cifar10'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
grad_reverse Ran
ran; our contract draft was wrong, not the code
hikvision-research/probabilisticteacher/pt/modeling/utils.py
code served (permissive licence) · get_code("9edd40180616c9cc")
How it ran

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

import torch
import torch.nn as nn
from torch.autograd import Function

torch.manual_seed(0)

class GRLayer(Function):

    @staticmethod
    def forward(ctx, input):
        ctx.alpha = 0.1
        return input.view_as(input)

    @staticmethod
    def backward(ctx, grad_outputs):
        output = grad_outputs.neg() * ctx.alpha
        return output

def grad_reverse(x):
    return GRLayer.apply(x)

# Create a small tensor for testing
x = torch.randn(2, 4, requires_grad=True)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
laplace_dist_pdf Ran
ran on a synthesized input
hikvision-research/probabilisticteacher/pt/modeling/box_regression.py
code served (permissive licence) · get_code("dcd1a611db1d54f3")
How it ran

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

import torch

torch.manual_seed(0)

# Create small tensors for the laplace_dist_pdf function
val = torch.randn(2, 4)
mean = torch.randn(2, 4)
var = torch.abs(torch.randn(2, 4)) + 0.1  # Ensure variance is positive
eps = 1e-09

ARGS = {
    "val": val,
    "mean": mean,
    "var": var,
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
paste_to_batch Ran
ran on a synthesized input
hikvision-research/probabilisticteacher/augment/transforms.py
code served (permissive licence) · get_code("dbd59bac9b7d4329")
How it ran

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

import torch
import numpy as np
import random

torch.manual_seed(0)
random.seed(0)

# Create small test tensors for views (batch_size=2, channels=3, height=64, width=64)
views = torch.randint(0, 256, (2, 3, 64, 64), dtype=torch.float32)

# Create boxes structure: list of lists
# boxes is a list where each element represents boxes from one source
# Each element is a list of box_2view items
# Each box_2view is a list of 2 tensors (one for each view)
# Each tensor represents a box image with shape (channels, height, width)

# Create a small box tensor (3 channels, 20 height, 15 width)
box1_view0 = torch.randint(0, 256, (3, 20, 15), dtype=torch.float32)
box1_view1 = torch.randint(0, 256, (3, 20, 15), dtype=torch.float32)

# Create another box
box2_view0 = torch.randint(0, 256, (3, 25, 18), dtype=torch.float32)
box2_view1 = torch.randint(0, 256, (3, 25, 18), dtype=torch.float32)

# Structure boxes as expected by the function
boxes = [
    [
        [box1_view0, box1_view1],
        [box2_view0, box2_view1]
    ]
]

ARGS = {
    'views': views,
    'boxes': boxes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 3 later) and 4 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
conv3x3 686 other papers
394 dated earlier, 3 the same month, 278 later, 11 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 16 other papers
7 dated earlier, 9 later · 1 only as an assembly brick
2003.00707 (2020-03)
Unbiased Mean Teacher for Cross-domain Object Detection
2007.03815 (2020-07)
Real-time Semantic Segmentation with Fast Attention
2104.00680 (2021-04)
LoFTR: Detector-Free Local Feature Matching with Transformers
and 13 more not named here
free_pass_trans_info 1 other paper
1 dated earlier
2106.06162 (2021-06)
Hybrid Generative-Contrastive Representation Learning
get_mean_and_std 1 other paper
1 dated earlier
2106.06162 (2021-06)
Hybrid Generative-Contrastive Representation Learning
grad_reverse 1 other paper
1 later
2304.02950 (2023-04)
Multi-view Adversarial Discriminator: Mine the Non-causal Factors for Object Detection in Unseen Domains

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

Self-training for unsupervised domain adaptive object detection is a challenging task, of which the performance depends heavily on the quality of pseudo boxes. Despite the promising results, prior works have largely overlooked the uncertainty of pseudo boxes during self-training. In this paper, we present a simple yet effective framework, termed as Probabilistic Teacher (PT), which aims to capture the uncertainty of unlabeled target data from a gradually evolving teacher and guides the learning of a student in a mutually beneficial manner. Specifically, we propose to leverage the uncertainty-guided consistency training to promote classification adaptation and localization adaptation, rather than filtering pseudo boxes via an elaborate confidence threshold. In addition, we conduct anchor adaptation in parallel with localization adaptation, since anchor can be regarded as a learnable parameter. Together with this framework, we also present a novel Entropy Focal Loss (EFL) to further facilitate the uncertainty-guided self-training. Equipped with EFL, PT outperforms all previous baselines by a large margin and achieve new state-of-the-arts.

For agents

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

get_harvested_code_for_paper("2206.06293")
get_code_for_paper("2206.06293")
have("2206.06293")

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

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

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

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

Connect an agent — have() is free.