SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.13197 · 2020

Cross-Domain Document Object Detection: Benchmark Suite and Method

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 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/2003.13197.json · badge: /api/ran/2003.13197.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
kailigo/cddod canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
parse_rec Ran
ran; our contract draft was wrong, not the code
kailigo/cddod/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
kailigo/cddod/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)
kailigo/cddod/lib/datasets/voc_eval.py
pointer only (licence: MIT); the stored copy get_code serves, from SupreethN/Hand-CNN, is pointer only (licence: NOASSERTION) · get_code("95c31c78be42f723")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from SupreethN/Hand-CNN, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

voc_eval Ran
ran; our contract draft was wrong, not the code
kailigo/cddod/lib/datasets/voc_eval.py
code served (permissive licence) · get_code("b53bbf61be478c3f")
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

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

# Create a small annotation XML file
anno_xml = """<?xml version="1.0"?>
<annotation>
  <object>
    <name>dog</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>
  <object>
    <name>cat</name>
    <pose>Left</pose>
    <truncated>1</truncated>
    <difficult>0</difficult>
    <bndbox>
      <xmin>30</xmin>
      <ymin>40</ymin>
      <xmax>120</xmax>
      <ymax>180</ymax>
    </bndbox>
  </object>
</annotation>
"""

# Create annotation directory and files
anno_dir = os.path.join(tmpdir, "annotations")
os.makedirs(anno_dir)
with open(os.path.join(anno_dir, "img1.xml"), "w") as f:
    f.write(anno_xml)
with open(os.path.join(anno_dir, "img2.xml"), "w") as f:
    f.write(anno_xml)

# Create image set file
imageset_path = os.path.join(tmpdir, "imageset.txt")
with open(imageset_path, "w") as f:
    f.write("img1\nimg2\n")

# Create detection results file
det_dir = os.path.join(tmpdir, "detections")
os.makedirs(det_dir)
det_file = os.path.join(det_dir, "dog_detections.txt")
with open(det_file, "w") as f:
    f.write("img1 0.9 15 25 95 145\n")
    f.write("img2 0.8 35 45 115 175\n")
    f.write("img1 0.7 20 30 90 140\n")

# Create cache directory
cache_dir = os.path.join(tmpdir, "cache")
os.makedirs(cache_dir)

# Paths with format strings
detpath = os.path.join(det_dir, "{}_detections.txt")
annopath = os.path.join(anno_dir, "{}.xml")

ARGS = {
    "detpath": detpath,
    "annopath": annopath,
    "imagesetfile": imageset_path,
    "classname": "dog",
    "cachedir": cache_dir,
    "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
kailigo/cddod/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
kailigo/cddod/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)
kailigo/cddod/lib/datasets/factory.py
code served (permissive licence) · get_code("3be9228820b46ef3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 6 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
15 dated earlier, 11 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 24 more not named here
xywh_to_xyxy 21 other papers
14 dated earlier, 7 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
14 dated earlier, 7 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
13 dated earlier, 7 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
11 dated earlier, 6 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
10 dated earlier, 3 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
voc_eval 3 other papers
3 dated earlier
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1906.03609 (2019-06)
Distilling Object Detectors with Fine-grained Feature Imitation
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-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

Decomposing images of document pages into high-level semantic regions (e.g., figures, tables, paragraphs), document object detection (DOD) is fundamental for downstream tasks like intelligent document editing and understanding. DOD remains a challenging problem as document objects vary significantly in layout, size, aspect ratio, texture, etc. An additional challenge arises in practice because large labeled training datasets are only available for domains that differ from the target domain. We investigate cross-domain DOD, where the goal is to learn a detector for the target domain using labeled data from the source domain and only unlabeled data from the target domain. Documents from the two domains may vary significantly in layout, language, and genre. We establish a benchmark suite consisting of different types of PDF document datasets that can be utilized for cross-domain DOD model training and evaluation. For each dataset, we provide the page images, bounding box annotations, PDF files, and the rendering layers extracted from the PDF files. Moreover, we propose a novel cross-domain DOD model which builds upon the standard detection model and addresses domain shifts by incorporating three novel alignment modules: Feature Pyramid Alignment (FPA) module, Region Alignment (RA) module and Rendering Layer alignment (RLA) module. Extensive experiments on the benchmark suite substantiate the efficacy of the three proposed modules and the proposed method significantly outperforms the baseline methods. The project page is at \url{https://github.com/kailigo/cddod}.

For agents

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

get_harvested_code_for_paper("2003.13197")
get_code_for_paper("2003.13197")
have("2003.13197")

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

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

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

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

Connect an agent — have() is free.