SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper · CVPR · 2023

Harmonious Teacher for Cross-domain Object Detection

Wen Li, Lixin Duan, Dongli Xu, Jinhong Deng

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 (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper.json · badge: /api/ran/Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper.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
kinredon/Harmonious-Teacher canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
reduce_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kinredon/Harmonious-Teacher/ht_c2b/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from OpenFirework/pytorch_solov2, is pointer only (licence: NONE) · get_code("b2b9a1966482ef96")
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 OpenFirework/pytorch_solov2, 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.

varifocal_loss Ran
ran; our contract draft was wrong, not the code
kinredon/Harmonious-Teacher/ht_c2b/losses.py
code served (permissive licence) · get_code("ca0ecf19089b2a31")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for testing
# pred: prediction logits with shape (N, C) where N=2 (batch), C=4 (classes)
pred = torch.randn(2, 4)

# target: iou-aware classification score with same shape as pred
target = torch.rand(2, 4)

# weight: optional element-wise weights, same shape as pred and target
weight = torch.ones(2, 4)

# Scalar parameters
alpha = 0.75
gamma = 2.0
iou_weighted = True
reduction = 'mean'
avg_factor = None

ARGS = {
    'pred': pred,
    'target': target,
    'weight': weight,
    'alpha': alpha,
    'gamma': gamma,
    'iou_weighted': iou_weighted,
    'reduction': reduction,
    'avg_factor': avg_factor
}
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
weight_reduce_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kinredon/Harmonious-Teacher/ht_c2b/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from OpenFirework/pytorch_solov2, is pointer only (licence: NONE) · get_code("d5b31a76e797a5de")
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 OpenFirework/pytorch_solov2, 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.

is_parallel Not yet run
unverified (harvested, no recorded run)
kinredon/Harmonious-Teacher/ht_c2b/ema.py
code served (permissive licence) · get_code("bbbb5d6a28074b9d")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 0 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
reduce_loss 18 other papers
5 dated earlier, 7 later, 6 same year, order not determinable
2003.10152 (2020-03)
SOLOv2: Dynamic and Fast Instance Segmentation
2003.10778 (2020-03)
PanNuke Dataset Extension, Insights and Baselines
2107.08430 (2021-07)
YOLOX: Exceeding YOLO Series in 2021
and 15 more not named here
is_parallel 8 other papers
5 dated earlier, 1 later, 2 same year, order not determinable
1803.11365 (2018-03)
Cross-Domain Weakly-Supervised Object Detection through Progressive Domain Adaptation
2207.02541 (2022-07)
Dense Teacher: Dense Pseudo-Labels for Semi-supervised Object Detection
2209.10248 (2022-09)
BEVStereo: Enhancing Depth Estimation in Multi-view 3D Object Detection with Dynamic Temporal Stereo
and 5 more not named here
weight_reduce_loss 7 other papers
3 dated earlier, 2 later, 2 same year, order not determinable
2003.10152 (2020-03)
SOLOv2: Dynamic and Fast Instance Segmentation
2003.10778 (2020-03)
PanNuke Dataset Extension, Insights and Baselines
2107.08430 (2021-07)
YOLOX: Exceeding YOLO Series in 2021
and 4 more not named here
varifocal_loss 2 other papers
1 dated earlier, 1 later
2107.08430 (2021-07)
YOLOX: Exceeding YOLO Series in 2021
2403.09359 (2024-03)
D3T: Distinctive Dual-Domain Teacher Zigzagging Across RGB-Thermal Gap for Domain-Adaptive Object Detection

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

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 approaches recently achieved promising results in cross-domain object detection, where people iteratively generate pseudo labels for unlabeled target domain samples with a model, and select high-confidence samples to refine the model. In this work, we reveal that the consistency of classification and localization predictions are crucial to measure the quality of pseudo labels, and propose a new Harmonious Teacher approach to improve the self-training for cross-domain object detection. In particular, we first propose to enhance the quality of pseudo labels by regularizing the consistency of the classification and localization scores when training the detection model. The consistency losses are defined for both labeled source samples and the unlabeled target samples. Then, we further remold the traditional sample selection method by a sample reweighing strategy based on the consistency of classification and localization scores to improve the ranking of predictions. This allows us to fully exploit all instance predictions from the target domain without abandoning valuable hard examples. Without bells and whistles, our method shows superior performance in various cross-domain scenarios compared with the stateof-the-art baselines, which validates the effectiveness of our Harmonious Teacher. Our codes will be available at https://github.com/kinredon/Harmonious-Teacher.

For agents

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

get_harvested_code_for_paper("Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper")
get_code_for_paper("Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper")
have("Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper")

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

curl https://syntology.ai/api/ran/Deng_Harmonious_Teacher_for_Cross-Domain_Object_Detection_CVPR_2023_paper.json

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

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

Connect an agent — have() is free.