SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1609.03605 · 2016

Detecting Text in Natural Image with Connectionist Text Proposal Network

arXiv · PDF · Open in the Atlas

Code that ran

30 of 35 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, 2 violated it and 21 have no contract verdict; 4 failures of our instrument; 5 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/1609.03605.json · badge: /api/ran/1609.03605.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
Sanster/tf_ctpn community (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
courao/ocr.pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
alorozco53/text-detection-ctpn community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
CrazySummerday/ctpn.pytorch community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
lostsword/character_recognition community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
HangZhouShuChengKeJi/text-detection-ctpn reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
zhaobomin/pytorch-ocr reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
eragonruan/text-detection-ctpn community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
addZeros Ran
ran on a synthesized input
lostsword/character_recognition/code/generate_dataset.py
code served (permissive licence) · get_code("4334c57883b372a3")
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 str. 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 re

def addZeros(s_):
    head, tail = s_.split('_')
    num = ''.join(re.findall('\\d', tail))
    head_num = '0' * (4 - len(num)) + num
    return head + '_' + head_num + '.jpg'

ARGS = {
    's_': 'image_42abc'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
allowed_file Ran
ran, violated the contract we drafted
HangZhouShuChengKeJi/text-detection-ctpn/main/web.py
code served (permissive licence) · get_code("9624be8c5b35939c")
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 bool, 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 numpy as np

ARGS = {
    'filename': 'document.pdf'
}
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 bool, 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
bbox_transform Ran
ran, violated the contract we drafted
Sanster/tf_ctpn/lib/model/bbox_transform.py
code served (permissive licence) · get_code("84dcf978d5570762")
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

# bbox_transform expects two numpy arrays of bounding boxes
# Each bbox is [x1, y1, x2, y2] format
# The function computes regression targets from example rois to ground truth rois

# Create small example ROIs (batch of 2 boxes, 4 coords each)
ex_rois = np.array([
    [10.0, 20.0, 50.0, 80.0],
    [5.0, 15.0, 45.0, 75.0]
], dtype=np.float32)

# Create small ground truth ROIs (batch of 2 boxes, 4 coords each)
gt_rois = np.array([
    [12.0, 22.0, 52.0, 82.0],
    [7.0, 17.0, 47.0, 77.0]
], dtype=np.float32)

ARGS = {
    "ex_rois": ex_rois,
    "gt_rois": gt_rois
}
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
bbox_transform Ran
ran on a synthesized input
alorozco53/text-detection-ctpn/lib/fast_rcnn/bbox_transform.py
code served (permissive licence) · get_code("7f1817340309b32e")
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 valid bounding box arrays
# Format: [x1, y1, x2, y2] for each box
# We need n * 4 arrays where boxes are valid (width > 0.1, height > 0.1)

# Example boxes (n=2)
ex_rois = np.array([
    [10.0, 20.0, 50.0, 80.0],  # box 1: width=41, height=61
    [100.0, 150.0, 200.0, 250.0]  # box 2: width=101, height=101
], dtype=np.float32)

# Ground truth boxes (n=2)
gt_rois = np.array([
    [12.0, 22.0, 52.0, 82.0],  # gt box 1
    [102.0, 152.0, 202.0, 252.0]  # gt box 2
], dtype=np.float32)

ARGS = {
    'ex_rois': ex_rois,
    'gt_rois': gt_rois
}
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
bbox_transform_inv Ran
ran on a synthesized input
Sanster/tf_ctpn/lib/model/bbox_transform.py
code served (permissive licence) · get_code("db910de1a7c014bc")
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, 12) 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 boxes in format [x1, y1, x2, y2]
# 2 boxes with distinct dimensions
boxes = np.array([
    [10.0, 20.0, 50.0, 80.0],
    [30.0, 40.0, 100.0, 150.0]
], dtype=np.float32)

# Create sample deltas with shape (num_boxes, num_predictions * 4)
# 2 boxes, 3 predictions per box (12 columns: 3 * 4)
deltas = np.array([
    [0.1, 0.2, 0.05, -0.1, 0.15, 0.25, 0.02, -0.05, 0.12, 0.18, 0.03, -0.08],
    [0.05, 0.1, -0.02, 0.08, 0.2, 0.3, 0.1, -0.15, 0.08, 0.12, -0.05, 0.06]
], dtype=np.float32)

ARGS = {
    "boxes": boxes,
    "deltas": deltas
}
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, 12) — shape (2, 12) 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
bbox_transform_inv Ran
ran on a synthesized input
alorozco53/text-detection-ctpn/lib/fast_rcnn/bbox_transform.py
code served (permissive licence) · get_code("d49676163bce1480")
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, 8) 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

# Construct valid arguments for bbox_transform_inv
# The function expects:
# - boxes: numpy array of shape (N, 4) with bounding box coordinates [x1, y1, x2, y2]
# - deltas: numpy array of shape (N, 4*K) with delta predictions for K boxes

# Create boxes array with shape (2, 4) - 2 boxes with 4 coordinates each
boxes = np.array([
    [10.0, 20.0, 50.0, 80.0],  # box 1: x1, y1, x2, y2
    [15.0, 25.0, 60.0, 90.0]   # box 2: x1, y1, x2, y2
], dtype=np.float32)

# Create deltas array with shape (2, 8) - 2 boxes with 8 delta values (2 sets of dx, dy, dw, dh)
deltas = np.array([
    [0.1, 0.2, 0.05, 0.1, 0.15, 0.25, 0.08, 0.12],
    [0.12, 0.18, 0.06, 0.11, 0.13, 0.22, 0.09, 0.13]
], dtype=np.float32)

ARGS = {
    "boxes": boxes,
    "deltas": deltas
}
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, 8) — shape (2, 8) 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
bbox_transfrom Ran
ran on a synthesized input
CrazySummerday/ctpn.pytorch/ctpn/utils.py
code served (permissive licence) · get_code("24c53f3b46c06a72")
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, 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 small sample data for anchors and gtboxes
# anchors and gtboxes are expected to be 2D arrays with shape (N, 4)
# where each row is [x1, y1, x2, y2]

# Create 2 anchor boxes
anchors = np.array([
    [10.0, 20.0, 50.0, 80.0],
    [15.0, 30.0, 60.0, 90.0]
], dtype=np.float32)

# Create 2 ground truth boxes
gtboxes = np.array([
    [12.0, 25.0, 55.0, 85.0],
    [18.0, 35.0, 65.0, 95.0]
], dtype=np.float32)

ARGS = {
    "anchors": anchors,
    "gtboxes": gtboxes
}
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, 2) — shape (2, 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
cal_iou Ran
ran on a synthesized input
courao/ocr.pytorch/detect/ctpn_utils.py
code served (permissive licence) · get_code("f2bdee89194ccb33")
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 (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

# Construct arguments for cal_iou function
# box1: single bounding box [x1, y1, x2, y2]
box1 = np.array([10.0, 20.0, 50.0, 60.0])

# box1_area: area of the single bounding box
box1_area = (50.0 - 10.0) * (60.0 - 20.0)  # width * height = 40 * 40 = 1600

# boxes2: multiple bounding boxes [Msample, x1, y1, x2, y2]
# Using 2 sample boxes
boxes2 = np.array([
    [15.0, 25.0, 55.0, 65.0],  # box that overlaps with box1
    [100.0, 100.0, 120.0, 120.0]  # box that doesn't overlap
])

# boxes2_area: areas of each box in boxes2
boxes2_area = np.array([
    (55.0 - 15.0) * (65.0 - 25.0),  # 40 * 40 = 1600
    (120.0 - 100.0) * (120.0 - 100.0)  # 20 * 20 = 400
])

ARGS = {
    "box1": box1,
    "box1_area": box1_area,
    "boxes2": boxes2,
    "boxes2_area": boxes2_area
}
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 (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
clip_boxes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Sanster/tf_ctpn/lib/model/bbox_transform.py
code served (permissive licence) · get_code("d24c99284beca7a6")
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 boxes array
# Shape: (num_boxes, num_coords) where coords are in format [x1, y1, x2, y2, ...]
# Using 2 boxes with 4 coordinates each (x1, y1, x2, y2)
boxes = np.array([
    [10.5, 20.3, 100.7, 150.2],
    [5.1, 15.8, 200.4, 300.9]
], dtype=np.float32)

# Image shape as (height, width)
im_shape = (256, 512)

ARGS = {
    "boxes": boxes,
    "im_shape": im_shape
}
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
clip_boxes Ran
ran on a synthesized input
alorozco53/text-detection-ctpn/lib/text_connector/other.py
code served (permissive licence) · get_code("22b228f6941b5b16")
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 boxes in format [x1, y1, x2, y2] for 2 boxes
boxes = np.array([
    [-10.5, 5.2, 100.3, 95.8],
    [50.1, -5.0, 200.5, 150.2]
], dtype=np.float32)

# Create image shape as (height, width)
im_shape = (120, 150)

ARGS = {
    "boxes": boxes,
    "im_shape": im_shape
}
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
compute_iou Ran
ran on a synthesized input
CrazySummerday/ctpn.pytorch/ctpn/utils.py
code served (permissive licence) · get_code("5dfe6dd29f57f960")
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 (3, 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 small sample data for anchors and bounding boxes
# anchors: shape (num_anchors, 4) with format [x1, y1, x2, y2]
# bbox: shape (num_bbox, 4) with format [x1, y1, x2, y2]

anchors = np.array([
    [0.0, 0.0, 10.0, 10.0],
    [5.0, 5.0, 15.0, 15.0],
    [20.0, 20.0, 30.0, 30.0]
], dtype=np.float32)

bbox = np.array([
    [2.0, 2.0, 8.0, 8.0],
    [10.0, 10.0, 20.0, 20.0]
], dtype=np.float32)

ARGS = {
    "anchors": anchors,
    "bbox": bbox
}
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 (3, 2) — shape (3, 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
conv3x3 Ran
ran on a synthesized input
courao/ocr.pytorch/recognize/crnn.py
code served (permissive licence) · get_code("938e4e638f594536")
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 = {
    'nIn': 3,
    'nOut': 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
create_label Ran
ran on a synthesized input
lostsword/character_recognition/code/ctpn/src/create_dataset.py
code served (permissive licence) · get_code("965956d702b2c2ee")
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 os
import tempfile
import numpy as np

# Create temporary directories for the function to use
tmpdir = tempfile.mkdtemp()
train_img_dir = os.path.join(tmpdir, 'images')
train_txt_dir = os.path.join(tmpdir, 'annotations')
os.makedirs(train_img_dir, exist_ok=True)
os.makedirs(train_txt_dir, exist_ok=True)

# Create sample image files (just empty files with image extensions)
image_files_to_create = ['image1.jpg', 'image2.png', 'image3.bmp']
for img_file in image_files_to_create:
    with open(os.path.join(train_img_dir, img_file), 'w') as f:
        f.write('')

# Create corresponding annotation files with label data
# Format: x1 y1 x2 y2 (space or comma separated)
annotations = {
    'image1.txt': '10 20 30 40\n50 60 70 80',
    'image2.txt': '5,15,25,35\n45,55,65,75',
    'image3.txt': '100 200 300 400',
}

for txt_file, content in annotations.items():
    with open(os.path.join(train_txt_dir, txt_file), 'w', encoding='gbk') as f:
        f.write(content)

# Define the arguments
ARGS = {
    'train_img_dir': train_img_dir,
    'train_txt_dir': train_txt_dir,
    'prefix': ''
}
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
find_in_path Ran
ran on a synthesized input
Sanster/tf_ctpn/lib/setup_cpu.py
code served (permissive licence) · get_code("ca14946efd571693")
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 str. 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 os
from os.path import join as pjoin
import tempfile

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
search_dir_1 = pjoin(temp_dir, "dir1")
search_dir_2 = pjoin(temp_dir, "dir2")
os.makedirs(search_dir_1, exist_ok=True)
os.makedirs(search_dir_2, exist_ok=True)

# Create a test file in search_dir_1
test_file_name = "test_executable"
test_file_path = pjoin(search_dir_1, test_file_name)
with open(test_file_path, "w") as f:
    f.write("#!/bin/bash\necho test\n")

# Construct the search path
search_path = search_dir_1 + os.pathsep + search_dir_2

ARGS = {
    "name": "test_executable",
    "path": search_path
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gen_anchor Ran
ran on a synthesized input
CrazySummerday/ctpn.pytorch/ctpn/utils.py
code served (permissive licence) · get_code("1b8bcc0ce345dcea")
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 (960, 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

# Construct arguments for gen_anchor function
featuresize = (8, 12)  # (height, width) - small feature map
scale = 16  # stride/scale factor
heights = [11, 16, 23, 33, 48, 68, 97, 139, 198, 283]  # default heights
widths = [16, 16, 16, 16, 16, 16, 16, 16, 16, 16]  # default widths

ARGS = {
    'featuresize': featuresize,
    'scale': scale,
    'heights': heights,
    'widths': widths
}
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 (960, 4) — shape (960, 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
gen_anchor Ran
ran on a synthesized input
courao/ocr.pytorch/detect/ctpn_utils.py
code served (permissive licence) · get_code("fc27893bf6fb8354")
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 (120, 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

# Analyze the function:
# - featuresize: used as (h, w) tuple/list that gets unpacked
# - scale: used in multiplication with numpy arrays
# Both are simple numeric types

ARGS = {
    "featuresize": (3, 4),  # (height, width) as tuple
    "scale": 16  # scalar multiplier for shifts
}
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 (120, 4) — shape (120, 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
generate_anchors Ran
ran on a synthesized input
Sanster/tf_ctpn/lib/layer_utils/generate_anchors.py
code served (permissive licence) · get_code("1ffc760a4459d409")
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 int, shape (10, 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

ARGS = {
    'base_height': 11,
    'num_anchors': 10,
    'anchor_width': 16,
    'h_ratio_step': 0.7
}
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 int, shape (10, 4) — shape (10, 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
generate_anchors_pre Ran
ran on a synthesized input
Sanster/tf_ctpn/lib/layer_utils/generate_anchors.py
code served (permissive licence) · get_code("782e46a465c0d3f1")
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 numpy as np

# Analyze the function signature and body:
# generate_anchors_pre(height, width, feat_stride, num_anchors=10, anchor_width=16, anchor_h_ratio_step=0.7)
#
# The function uses:
# - height: used in np.arange(0, height) - needs to be an integer
# - width: used in np.arange(0, width) - needs to be an integer
# - feat_stride: used in multiplication with arange results - needs to be numeric
# - num_anchors: passed to generate_anchors, used in range(0, num_anchors) - integer
# - anchor_width: passed to generate_anchors - numeric
# - anchor_h_ratio_step: passed to generate_anchors - numeric
#
# All parameters are simple scalars, no complex objects needed

ARGS = {
    "height": 4,
    "width": 5,
    "feat_stride": 16,
    "num_anchors": 10,
    "anchor_width": 16,
    "anchor_h_ratio_step": 0.7
}
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
init_optimizer Ran
ran; our contract draft was wrong, not the code
zhaobomin/pytorch-ocr/train_ctpn.py
pointer only (licence: NONE) · get_code("99b4d1927696d2e8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhaobomin/pytorch-ocr 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.

parse_rec Ran
ran; our contract draft was wrong, not the code
Sanster/tf_ctpn/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
readxml Ran
ran on a synthesized input
CrazySummerday/ctpn.pytorch/ctpn/dataset.py
code served (permissive licence) · get_code("43aa0c2175ad6786")
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 int, 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
import xml.etree.ElementTree as ET
import tempfile
import os

# Create a temporary XML file with bounding box data
xml_content = """<?xml version="1.0"?>
<annotation>
    <filename>test.jpg</filename>
    <size>
        <width>640</width>
        <height>480</height>
    </size>
    <object>
        <name>cat</name>
        <bndbox>
            <xmin>10.5</xmin>
            <ymin>20.3</ymin>
            <xmax>100.7</xmax>
            <ymax>150.2</ymax>
        </bndbox>
    </object>
    <object>
        <name>dog</name>
        <bndbox>
            <xmin>200.1</xmin>
            <ymin>250.9</ymin>
            <xmax>350.4</xmax>
            <ymax>400.8</ymax>
        </bndbox>
    </object>
</annotation>
"""

# Write to temporary file
temp_fd, temp_path = tempfile.mkstemp(suffix='.xml')
try:
    os.write(temp_fd, xml_content.encode('utf-8'))
    os.close(temp_fd)
    
    ARGS = {
        'path': temp_path
    }
finally:
    pass
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 int, 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
resize Ran
ran on a synthesized input
courao/ocr.pytorch/detect/ctpn_utils.py
code served (permissive licence) · get_code("38401bcff05e1d84")
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 3, dtype family int, shape (8, 6, 3) 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 cv2
import numpy as np

# Create a small test image (4 rows x 3 columns with 3 color channels)
image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "image": image,
    "width": 6,
    "height": None,
    "inter": cv2.INTER_AREA
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (8, 6, 3) — shape (8, 6, 3) 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
resize_im Ran
ran on a synthesized input
eragonruan/text-detection-ctpn/ctpn/demo_pb.py
code served (permissive licence) · get_code("b9828f64fd08b6f3")
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 cv2
import numpy as np

# Create a small test image (height=100, width=80, channels=3)
# Using uint8 for typical image format
im = np.random.randint(0, 256, size=(100, 80, 3), dtype=np.uint8)

# Define arguments for the resize_im function
ARGS = {
    "im": im,
    "scale": 50,
    "max_scale": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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
sort_box Ran
ran on a synthesized input
courao/ocr.pytorch/ocr.py
code served (permissive licence) · get_code("0bb4ac67d48f720d")
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 2, dtype family int; 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

torch.manual_seed(0)

# The sort_box function expects a list of box objects where each box
# has at least 8 elements (indices 0-7), and it sorts by the sum of
# elements at indices 1, 3, 5, 7.
# We'll create a list of simple box representations as lists.

box = [
    [10, 5, 20, 3, 30, 2, 40, 1],      # sum of [1,3,5,7] = 5+3+2+1 = 11
    [10, 2, 20, 4, 30, 6, 40, 8],      # sum of [1,3,5,7] = 2+4+6+8 = 20
    [10, 1, 20, 1, 30, 1, 40, 1],      # sum of [1,3,5,7] = 1+1+1+1 = 4
]

ARGS = {
    "box": box
}
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 list, ndim 2, dtype family int — 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
strsort Ran
ran on a synthesized input
lostsword/character_recognition/code/generate_dataset.py
code served (permissive licence) · get_code("74f85a99e9a1fa74")
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 re

def addZeros(s_):
    head, tail = s_.split('_')
    num = ''.join(re.findall('\\d', tail))
    head_num = '0' * (4 - len(num)) + num
    return head + '_' + head_num + '.jpg'

def strsort(alist):
    alist.sort(key=lambda i: addZeros(i))
    return alist

# Setup: The function takes a list of strings that follow a pattern
# of "head_tail" where tail contains digits to be extracted and zero-padded
test_list = [
    'image_42.jpg',
    'image_5.jpg',
    'image_123.jpg',
    'photo_8.jpg',
    'photo_1.jpg'
]

ARGS = {
    'alist': test_list
}
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
threshold Ran
ran on a synthesized input
alorozco53/text-detection-ctpn/lib/text_connector/other.py
code served (permissive licence) · get_code("d11f151f0452c0a7")
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 coordinate data
coords = np.array([[1.5, 2.3, 0.5, 3.2],
                    [-1.0, 5.5, 2.1, 1.8]], dtype=np.float32)

# Define min and max bounds
min_ = np.array([0.0, 1.0, 0.5, 1.5], dtype=np.float32)
max_ = np.array([3.0, 4.0, 2.5, 3.0], dtype=np.float32)

ARGS = {
    "coords": coords,
    "min_": min_,
    "max_": max_
}
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
unique_boxes Ran
ran, honoured the contract we drafted
Sanster/tf_ctpn/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)
Sanster/tf_ctpn/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.

xywh_to_xyxy Ran
ran, honoured the contract we drafted
Sanster/tf_ctpn/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
Sanster/tf_ctpn/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
dumpRotateImage Not yet run
unverified (harvested, no recorded run)
courao/ocr.pytorch/ocr.py
code served (permissive licence) · get_code("a042b74b081841eb")
How it ran

no invocation recorded.

get_char_nums Not yet run
unverified (harvested, no recorded run)
lostsword/character_recognition/code/generate_dataset.py
code served (permissive licence) · get_code("6121b647865394aa")
How it ran

no invocation recorded.

get_imdb Not yet run
unverified (harvested, no recorded run)
Sanster/tf_ctpn/lib/datasets/factory.py
code served (permissive licence) · get_code("3be9228820b46ef3")
How it ran

no invocation recorded.

get_imdb Not yet run
unverified (harvested, no recorded run)
alorozco53/text-detection-ctpn/lib/datasets/factory.py
code served (permissive licence) · get_code("e3d6d8098adf58aa")
How it ran

no invocation recorded.

voc_eval Not yet run
unverified (harvested, no recorded run)
Sanster/tf_ctpn/lib/datasets/voc_eval.py
code served (permissive licence) · get_code("7fc3942117603f02")
How it ran

no invocation recorded.

Also present in other papers' code

Of 35 samples lifted from this paper's linked repositories, 35 carry a function identity and 0 do not. Of the 35 distinct functions with an identity, 11 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 1 the same month, 11 later) and 24 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
2 dated earlier, 1 the same month, 24 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.04836 (2016-09)
On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima
and 24 more not named here
xywh_to_xyxy 21 other papers
3 dated earlier, 18 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
3 dated earlier, 18 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
4 dated earlier, 16 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
2 dated earlier, 15 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
1612.03144 (2016-12)
Feature Pyramid Networks for Object Detection
and 14 more not named here
parse_rec 14 other papers
2 dated earlier, 12 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
1612.03144 (2016-12)
Feature Pyramid Networks for Object Detection
and 11 more not named here
clip_boxes 7 other papers
2 dated earlier, 5 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1506.02025 (2015-06)
Spatial Transformer Networks
1611.06607 (2016-11)
A Hierarchical Approach for Generating Descriptive Image Paragraphs
and 4 more not named here
allowed_file 4 other papers
1 dated earlier, 3 later
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1612.01010 (2016-12)
DeepBach: a Steerable Model for Bach Chorales Generation
1911.06311 (2019-11)
Sato: Contextual Semantic Type Detection in Tables
and 1 more not named here
bbox_transform 4 other papers
2 dated earlier, 2 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1506.02025 (2015-06)
Spatial Transformer Networks
1611.06607 (2016-11)
A Hierarchical Approach for Generating Descriptive Image Paragraphs
and 1 more not named here
find_in_path 2 other papers
2 later
1809.04427 (2018-09)
Real-time Multiple People Tracking with Deeply Learned Candidate Selection and Person Re-Identification
1908.11542 (2019-08)
Satellite Pose Estimation with Deep Landmark Regression and Nonlinear Pose Refinement
voc_eval 1 other paper
1 later
2601.11779 (2026-01)
Cross-Domain Object Detection Using Unsupervised Image Translation

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

We propose a novel Connectionist Text Proposal Network (CTPN) that accurately localizes text lines in natural image. The CTPN detects a text line in a sequence of fine-scale text proposals directly in convolutional feature maps. We develop a vertical anchor mechanism that jointly predicts location and text/non-text score of each fixed-width proposal, considerably improving localization accuracy. The sequential proposals are naturally connected by a recurrent neural network, which is seamlessly incorporated into the convolutional network, resulting in an end-to-end trainable model. This allows the CTPN to explore rich context information of image, making it powerful to detect extremely ambiguous text. The CTPN works reliably on multi-scale and multi- language text without further post-processing, departing from previous bottom-up methods requiring multi-step post-processing. It achieves 0.88 and 0.61 F-measure on the ICDAR 2013 and 2015 benchmarks, surpass- ing recent results [8, 35] by a large margin. The CTPN is computationally efficient with 0:14s/image, by using the very deep VGG16 model [27]. Online demo is available at: http://textdet.com/.

For agents

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

get_harvested_code_for_paper("1609.03605")
get_code_for_paper("1609.03605")
have("1609.03605")

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

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

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

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

Connect an agent — have() is free.