SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.03609 · 2019

Distilling Object Detectors with Fine-grained Feature Imitation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 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/1906.03609.json · badge: /api/ran/1906.03609.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
twangnh/Distilling-Object-Detectors canonical (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
parse_rec Ran
ran; our contract draft was wrong, not the code
twangnh/Distilling-Object-Detectors/lib/datasets/voc_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
unique_boxes Ran
ran, honoured the contract we drafted
twangnh/Distilling-Object-Detectors/lib/datasets/ds_utils.py
code served (permissive licence) · get_code("8a015c012f507631")
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 int, shape (2,) 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 a small array of bounding boxes
# boxes should be a 2D numpy array where each row is a box (x1, y1, x2, y2)
boxes = np.array([
    [10.5, 20.3, 100.7, 200.9],
    [10.5, 20.3, 100.7, 200.9],  # duplicate
    [15.2, 25.1, 105.3, 205.5],
], dtype=np.float32)

scale = 1.0

ARGS = {
    "boxes": boxes,
    "scale": scale
}
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 int, shape (2,) — shape (2,) 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
voc_ap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
twangnh/Distilling-Object-Detectors/lib/datasets/voc_eval.py
code served (permissive licence) · get_code("ec3e5aa793d6ce69")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create sample precision and recall arrays
# rec: recall values - should be monotonically increasing, values in [0, 1]
# prec: precision values - should be in [0, 1], typically decreasing or variable
rec = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
prec = np.array([0.95, 0.90, 0.85, 0.80, 0.75, 0.70, 0.65, 0.60, 0.55])

ARGS = {
    "rec": rec,
    "prec": prec,
    "use_07_metric": False
}
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 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
voc_eval Ran
ran; our contract draft was wrong, not the code
twangnh/Distilling-Object-Detectors/lib/datasets/voc_eval.py
code served (permissive licence) · get_code("2f16ecec36118ba9")
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 tempfile
import os
import pickle
import numpy as np
import xml.etree.ElementTree as ET

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

# Create a sample XML annotation file
def create_sample_xml(filepath, imagename):
    root = ET.Element('annotation')
    
    filename_elem = ET.SubElement(root, 'filename')
    filename_elem.text = imagename
    
    # Add an object with the class name "dog"
    obj = ET.SubElement(root, 'object')
    name_elem = ET.SubElement(obj, 'name')
    name_elem.text = 'dog'
    pose_elem = ET.SubElement(obj, 'pose')
    pose_elem.text = 'Unspecified'
    truncated_elem = ET.SubElement(obj, 'truncated')
    truncated_elem.text = '0'
    difficult_elem = ET.SubElement(obj, 'difficult')
    difficult_elem.text = '0'
    
    bndbox = ET.SubElement(obj, 'bndbox')
    xmin = ET.SubElement(bndbox, 'xmin')
    xmin.text = '10'
    ymin = ET.SubElement(bndbox, 'ymin')
    ymin.text = '20'
    xmax = ET.SubElement(bndbox, 'xmax')
    xmax.text = '100'
    ymax = ET.SubElement(bndbox, 'ymax')
    ymax.text = '150'
    
    tree = ET.ElementTree(root)
    tree.write(filepath)

# Create annotation files
annopath_dir = os.path.join(tmpdir, 'annotations')
os.makedirs(annopath_dir)

image_names = ['img1', 'img2']
for img_name in image_names:
    create_sample_xml(os.path.join(annopath_dir, f'{img_name}.xml'), img_name)

# Create imageset file
imageset_file = os.path.join(tmpdir, 'imageset.txt')
with open(imageset_file, 'w') as f:
    for img_name in image_names:
        f.write(img_name + '\n')

# Create detection results file
detpath_dir = os.path.join(tmpdir, 'detections')
os.makedirs(detpath_dir)
detpath_file = os.path.join(detpath_dir, 'dog_detections.txt')
with open(detpath_file, 'w') as f:
    f.write('img1 0.9 10 20 100 150\n')
    f.write('img2 0.8 15 25 95 145\n')

# Create cache directory
cachedir = os.path.join(tmpdir, 'cache')

ARGS = {
    'detpath': os.path.join(detpath_dir, '{}_detections.txt'),
    'annopath': os.path.join(annopath_dir, '{}.xml'),
    'imagesetfile': imageset_file,
    'classname': 'dog',
    'cachedir': cachedir,
    'ovthresh': 0.5,
    'use_07_metric': False
}
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 — 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
xywh_to_xyxy Ran
ran, honoured the contract we drafted
twangnh/Distilling-Object-Detectors/lib/datasets/ds_utils.py
code served (permissive licence) · get_code("d3e019b11b709edb")
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 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 numpy as np

# Create a small batch of boxes in [x y w h] format
# Using shape (2, 4) for 2 boxes with 4 coordinates each
boxes = np.array([
    [10.0, 20.0, 30.0, 40.0],  # x, y, width, height
    [5.0, 15.0, 25.0, 35.0]
], dtype=np.float32)

ARGS = {
    "boxes": boxes
}
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 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
xyxy_to_xywh Ran
ran, honoured the contract we drafted
twangnh/Distilling-Object-Detectors/lib/datasets/ds_utils.py
code served (permissive licence) · get_code("a832e5017f504280")
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 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 numpy as np

# Create sample bounding boxes in [x1 y1 x2 y2] format
boxes = np.array([
    [10, 20, 50, 80],
    [100, 150, 200, 300]
], dtype=np.float32)

ARGS = {
    "boxes": boxes
}
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 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_imdb Not yet run
unverified (harvested, no recorded run)
twangnh/Distilling-Object-Detectors/lib/datasets/factory.py
code served (permissive licence) · get_code("3be9228820b46ef3")
How it ran

no invocation recorded.

vg_eval Not yet run
unverified (harvested, no recorded run)
twangnh/Distilling-Object-Detectors/lib/datasets/vg_eval.py
code served (permissive licence) · get_code("c485a145dcf5de8e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 8 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
voc_ap 27 other papers
10 dated earlier, 17 later
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 24 more not named here
xywh_to_xyxy 21 other papers
9 dated earlier, 12 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1506.02025 (2015-06)
Spatial Transformer Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
and 18 more not named here
xyxy_to_xywh 21 other papers
9 dated earlier, 12 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1506.02025 (2015-06)
Spatial Transformer Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
and 18 more not named here
unique_boxes 20 other papers
10 dated earlier, 10 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1506.02025 (2015-06)
Spatial Transformer Networks
1511.02853 (2015-11)
Weakly Supervised Deep Detection Networks
and 17 more not named here
get_imdb 17 other papers
8 dated earlier, 9 later
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 14 more not named here
parse_rec 14 other papers
6 dated earlier, 8 later
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
voc_eval 3 other papers
1 dated earlier, 2 later
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1911.12529 (2019-11)
One-Shot Object Detection with Co-Attention and Co-Excitation
2003.13197 (2020-03)
Cross-Domain Document Object Detection: Benchmark Suite and Method
vg_eval 2 other papers
1 dated earlier, 1 later
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1911.12529 (2019-11)
One-Shot Object Detection with Co-Attention and Co-Excitation

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

State-of-the-art CNN based recognition models are often computationally prohibitive to deploy on low-end devices. A promising high level approach tackling this limitation is knowledge distillation, which let small student model mimic cumbersome teacher model's output to get improved generalization. However, related methods mainly focus on simple task of classification while do not consider complex tasks like object detection. We show applying the vanilla knowledge distillation to detection model gets minor gain. To address the challenge of distilling knowledge in detection model, we propose a fine-grained feature imitation method exploiting the cross-location discrepancy of feature response. Our intuition is that detectors care more about local near object regions. Thus the discrepancy of feature response on the near object anchor locations reveals important information of how teacher model tends to generalize. We design a novel mechanism to estimate those locations and let student model imitate the teacher on them to get enhanced performance. We first validate the idea on a developed lightweight toy detector which carries simplest notion of current state-of-the-art anchor based detection models on challenging KITTI dataset, our method generates up to 15% boost of mAP for the student model compared to the non-imitated counterpart. We then extensively evaluate the method with Faster R-CNN model under various scenarios with common object detection benchmark of Pascal VOC and COCO, imitation alleviates up to 74% performance drop of student model compared to teacher. Codes released at https://github.com/twangnh/Distilling-Object-Detectors

For agents

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

get_harvested_code_for_paper("1906.03609")
get_code_for_paper("1906.03609")
have("1906.03609")

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

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

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

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

Connect an agent — have() is free.