SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.08947 · 2019

Real-time Scene Text Detection with Differentiable Binarization

arXiv · PDF · Open in the Atlas

Code that ran

20 of 25 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 16 have no contract verdict; 4 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/1911.08947.json · badge: /api/ran/1911.08947.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
huyhoang17/DB_text_minimal community (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
SURFZJY/Real-time-Text-Detection community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
Mushroomcat9998/DBNet community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
18520339/dbnet-tf2 community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
mindee/doctr community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
WenmuZhou/DBNet.pytorch community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
FunctionStatusWhere it lives
cal_text_score Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/text_metrics.py
code served (permissive licence) · get_code("0b16bed946565da6")
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 torch
import numpy as np

torch.manual_seed(0)

# Create sample tensors
batch_size = 2
height = 4
width = 3

texts = torch.rand(batch_size, height, width)
gt_texts = torch.rand(batch_size, height, width)
training_masks = torch.randint(0, 2, (batch_size, height, width)).float()

# Create a minimal running_metric_text class that has update() and get_scores() methods
class MinimalMetric:
    def __init__(self):
        self.gts = []
        self.preds = []
    
    def update(self, gt, pred):
        self.gts.append(gt)
        self.preds.append(pred)
    
    def get_scores(self):
        # Return a dummy score and None
        score = np.mean([np.sum(p == g) / p.size for p, g in zip(self.preds, self.gts)])
        return score, None

running_metric_text = MinimalMetric()

ARGS = {
    "texts": texts,
    "gt_texts": gt_texts,
    "training_masks": training_masks,
    "running_metric_text": running_metric_text,
    "thresh": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
compute_distance Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/db_transforms.py
code served (permissive licence) · get_code("0362f3cc6b5edc59")
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 (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 data for the function
# xs and ys are coordinate arrays
xs = np.array([0.0, 1.0, 2.0, 3.0])
ys = np.array([0.0, 1.0, 2.0, 3.0])

# point_1 and point_2 are tuples/lists with 2 coordinates each
point_1 = (0.0, 0.0)
point_2 = (1.0, 1.0)

ARGS = {
    'xs': xs,
    'ys': ys,
    'point_1': point_1,
    'point_2': point_2
}
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 (4,) — shape (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
conv1x1 Ran
ran; our contract draft was wrong, not the code
SURFZJY/Real-time-Text-Detection/models/modules/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
conv3x3 Ran
ran; our contract draft was wrong, not the code
SURFZJY/Real-time-Text-Detection/models/modules/resnet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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 Conv2d. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
conv3x3 Ran
ran; our contract draft was wrong, not the code
WenmuZhou/DBNet.pytorch/models/backbone/resnet.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

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

crop_patch Ran
ran on a synthesized input
18520339/dbnet-tf2/tfdbnet/utils.py
code served (permissive licence) · get_code("380431820253ae48")
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 (75, 140, 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 numpy as np
import cv2

# Create a small test image (page)
page = np.random.randint(0, 255, (100, 150, 3), dtype=np.uint8)

# Create box_points - 4 corner points of a quadrilateral
# Using points that form a valid quadrilateral within the image bounds
box_points = np.array([
    [10.0, 20.0],      # top-left area
    [140.0, 15.0],     # top-right area
    [145.0, 90.0],     # bottom-right area
    [5.0, 95.0]        # bottom-left area
], dtype=np.float32)

ARGS = {
    'page': page,
    'box_points': box_points
}
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 (75, 140, 3) — shape (75, 140, 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
get_images Ran
ran on a synthesized input
SURFZJY/Real-time-Text-Detection/genText.py
code served (permissive licence) · get_code("b1827bd3314d5a57")
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 os
import tempfile
from pathlib import Path

# Create a temporary directory with some test image files
temp_dir = tempfile.mkdtemp()

# Create subdirectories and image files
subdir1 = os.path.join(temp_dir, "subdir1")
subdir2 = os.path.join(temp_dir, "subdir2")
os.makedirs(subdir1, exist_ok=True)
os.makedirs(subdir2, exist_ok=True)

# Create dummy image files with valid extensions
Path(os.path.join(temp_dir, "image1.jpg")).touch()
Path(os.path.join(temp_dir, "image2.png")).touch()
Path(os.path.join(subdir1, "image3.jpeg")).touch()
Path(os.path.join(subdir1, "image4.JPG")).touch()
Path(os.path.join(subdir2, "image5.PNG")).touch()
Path(os.path.join(temp_dir, "notimage.txt")).touch()

ARGS = {
    "img_path": temp_dir
}
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
get_max_width_length_ratio Ran
ran on a synthesized input
mindee/doctr/doctr/models/_utils.py
code served (permissive licence) · get_code("14c65cfb11d94847")
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 float, 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 cv2
import numpy as np

# Create a valid contour for cv2.minAreaRect
# A contour should be a numpy array of shape (n, 1, 2) representing points
# We'll create a simple rectangular contour with 4 points
contour = np.array([
    [[0, 0]],
    [[100, 0]],
    [[100, 50]],
    [[0, 50]]
], dtype=np.float32)

ARGS = {
    "contour": contour
}
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 float, 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
get_txts Ran
ran on a synthesized input
SURFZJY/Real-time-Text-Detection/genText.py
code served (permissive licence) · get_code("acbee53c5f8e1a9a")
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 os
import tempfile
import shutil

# Create a temporary directory with some .txt files for testing
temp_dir = tempfile.mkdtemp()
subdir = os.path.join(temp_dir, "subdir")
os.makedirs(subdir)

# Create some dummy .txt files
with open(os.path.join(temp_dir, "file1.txt"), "w") as f:
    f.write("test content 1")

with open(os.path.join(temp_dir, "file2.txt"), "w") as f:
    f.write("test content 2")

with open(os.path.join(subdir, "file3.txt"), "w") as f:
    f.write("test content 3")

# Also create a non-.txt file to ensure it's filtered out
with open(os.path.join(temp_dir, "file4.json"), "w") as f:
    f.write("not a txt file")

ARGS = {
    "txt_path": temp_dir
}
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
quadratic Ran
ran on a synthesized input
SURFZJY/Real-time-Text-Detection/data_loader/data_utils.py
code served (permissive licence) · get_code("a133283a2aa3440f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 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 math

def quadratic(a, b, c):
    if b * b - 4 * a * c < 0:
        return 'None'
    Delte = math.sqrt(b * b - 4 * a * c)
    if Delte > 0:
        x = (-b + Delte) / (2 * a)
        y = (-b - Delte) / (2 * a)
        return (x, y)
    else:
        x = -b / (2 * a)
        return x

ARGS = {
    'a': 1,
    'b': -5,
    'c': 6
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rectify_crops Ran
ran on a synthesized input
mindee/doctr/doctr/models/_utils.py
code served (permissive licence) · get_code("0ef99817b8bb3cdb")
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. 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

# Create sample crops - small 2D arrays representing image patches
crops = [
    np.random.randint(0, 256, size=(4, 3), dtype=np.uint8),  # First crop: 4x3
    np.random.randint(0, 256, size=(5, 6), dtype=np.uint8),  # Second crop: 5x6
]

# Create orientations list - integers representing rotation predictions
orientations = [0, 2]  # 0 means no rotation, 2 means 180 degree rotation

ARGS = {
    "crops": crops,
    "orientations": orientations,
}
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 list — a list 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
resize_image Ran
ran on a synthesized input
Mushroomcat9998/DBNet/data_loader/modules/augment.py
code served (permissive licence) · get_code("74c3e5afa7495d81")
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 with shape (height, width, channels)
# Using distinct dimensions: 96 x 128 x 3 (RGB image)
img = np.random.randint(0, 256, (96, 128, 3), dtype=np.uint8)

# short_size parameter - a small integer value
short_size = 32

ARGS = {
    "img": img,
    "short_size": short_size
}
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
resize_image_short_side Ran
ran on a synthesized input
18520339/dbnet-tf2/tfdbnet/utils.py
code served (permissive licence) · get_code("a5ebf7edacfab1eb")
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 (736, 1472, 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 (height=100, width=200, channels=3)
# This is a BGR image as cv2 expects
test_image = np.random.randint(0, 256, (100, 200, 3), dtype=np.uint8)

ARGS = {
    "image": test_image,
    "image_short_side": 736
}
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 (736, 1472, 3) — shape (736, 1472, 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
shrink_polygon_py Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Mushroomcat9998/DBNet/data_loader/modules/make_shrink_map.py
code served (permissive licence) · get_code("a48b1586c42ff5fe")
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 (4, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small polygon as a numpy array with shape (4, 2)
# representing 4 points with (x, y) coordinates
polygon = np.array([
    [0.0, 0.0],
    [10.0, 0.0],
    [10.0, 10.0],
    [0.0, 10.0]
], dtype=np.float32)

# Shrink ratio - a scalar value that determines how much to shrink
# The function shrinks towards the center point by multiplying distances by shrink_ratio
shrink_ratio = 0.5

ARGS = {
    "polygon": polygon,
    "shrink_ratio": shrink_ratio
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 2) — shape (4, 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
split_regions Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/db_transforms.py
code served (permissive licence) · get_code("af7b1b462f45fefc")
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
import numpy as np

torch.manual_seed(0)

# The function expects an array-like object (axis) that supports:
# - .shape[0] to get the first dimension
# - indexing with [i] to access elements
# - slicing with [min_axis_index:i]
# The function checks if consecutive elements differ by 1

# Create a numpy array that will produce some regions
# We want elements that are mostly consecutive but have gaps
axis = np.array([0, 1, 2, 5, 6, 7, 10], dtype=np.int32)

ARGS = {
    "axis": axis
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
step_function Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/losses.py
code served (permissive licence) · get_code("06d815aba9fc17d6")
How it ran

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

import torch

torch.manual_seed(0)

# The function takes x and y which are converted to tensors, and k which is a scalar
# x and y should be array-like that can be converted to torch.Tensor
# They need to have compatible shapes for the operation (x - y)

x_data = [0.1, 0.2, 0.3, 0.4]
y_data = [0.15, 0.25, 0.35, 0.45]
k_value = 50

ARGS = {
    'x': x_data,
    'y': y_data,
    'k': k_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (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
test_preprocess Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/db_handler.py
code served (permissive licence) · get_code("bcb66632e553eda2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (1, 3, 640, 480) 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
import torch

torch.manual_seed(0)

# Create a small test image: 4 height x 3 width x 3 channels (BGR)
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "mean": [103.939, 116.779, 123.68],
    "to_tensor": True,
    "pad": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 640, 480) — shape (1, 3, 640, 480) 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
test_resize Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/db_handler.py
code served (permissive licence) · get_code("80b87673405e6943")
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 (640, 512, 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 with shape (h, w, c)
# Using distinct dimensions: 100x80x3 (height, width, channels)
img = np.random.randint(0, 256, (100, 80, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "size": 640,
    "pad": False
}
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 (640, 512, 3) — shape (640, 512, 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
to_list_tuples Ran
ran on a synthesized input
huyhoang17/DB_text_minimal/src/make_eval.py
code served (permissive licence) · get_code("a8adaa21874014ed")
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
import numpy as np

torch.manual_seed(0)

# The function takes a sample and converts each element to a tuple
# sample should be an iterable of iterables (lists, arrays, etc.)
# that can be converted to tuples

sample = [
    [1, 2, 3, 4],
    [5, 6, 7, 8],
    [9, 10, 11, 12]
]

ARGS = {
    "sample": sample
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
unshrink_offset Ran
ran on a synthesized input
SURFZJY/Real-time-Text-Detection/data_loader/data_utils.py
code served (permissive licence) · get_code("d1012dc3a8f720ea")
How it ran

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

def quadratic(a, b, c):
    if b * b - 4 * a * c < 0:
        return 'None'
    Delte = math.sqrt(b * b - 4 * a * c)
    if Delte > 0:
        x = (-b + Delte) / (2 * a)
        y = (-b - Delte) / (2 * a)
        return (x, y)
    else:
        x = -b / (2 * a)
        return x

def unshrink_offset(poly, ratio):
    area = cv2.contourArea(poly)
    peri = cv2.arcLength(poly, True)
    a = 8
    b = peri - 4
    c = 1 - 0.5 * peri - area / ratio
    return quadratic(a, b, c)

# Create a valid polygon contour for cv2 functions
# Polygon must be a numpy array of shape (N, 1, 2) for cv2.contourArea and cv2.arcLength
poly = np.array([
    [[10, 10]],
    [[100, 10]],
    [[100, 100]],
    [[10, 100]]
], dtype=np.float32)

ratio = 2.0

ARGS = {
    'poly': poly,
    'ratio': ratio
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_and_validate_polys Not yet run
unverified (harvested, no recorded run)
SURFZJY/Real-time-Text-Detection/data_loader/data_utils.py
code served (permissive licence) · get_code("07471b3162a18b9d")
How it ran

no invocation recorded.

dcn_conv3x3 Not yet run
unverified (harvested, no recorded run)
SURFZJY/Real-time-Text-Detection/models/modules/resnet.py
code served (permissive licence) · get_code("f9244a258a55a5ab")
How it ran

no invocation recorded.

deformable_resnet18 Not yet run
unverified (harvested, no recorded run)
WenmuZhou/DBNet.pytorch/models/backbone/resnet.py
code served (permissive licence) · get_code("ae0dd302eac3e5eb")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
WenmuZhou/DBNet.pytorch/models/backbone/resnet.py
code served (permissive licence) · get_code("7bee880a6603be77")
How it ran

no invocation recorded.

shrink_polygon_pyclipper Not yet run
unverified (harvested, no recorded run)
Mushroomcat9998/DBNet/data_loader/modules/make_shrink_map.py
code served (permissive licence) · get_code("e5fc5488f52a4d68")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 25 distinct functions with an identity, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 4 later) and 18 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
conv3x3 686 other papers
169 dated earlier, 8 the same month, 509 later · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 431 other papers
48 dated earlier, 5 the same month, 377 later, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
20 dated earlier, 4 the same month, 287 later, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
check_and_validate_polys 1 other paper
1 dated earlier
1908.05900 (2019-08)
Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network
quadratic 1 other paper
1 dated earlier
1908.05900 (2019-08)
Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network
shrink_polygon_py 1 other paper
1 later
aaai_27844 (2024 (year only))
SRFormer: Text Detection Transformer with Incorporated Segmentation and Regression
unshrink_offset 1 other paper
1 dated earlier
1908.05900 (2019-08)
Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recently, segmentation-based methods are quite popular in scene text detection, as the segmentation results can more accurately describe scene text of various shapes such as curve text. However, the post-processing of binarization is essential for segmentation-based detection, which converts probability maps produced by a segmentation method into bounding boxes/regions of text. In this paper, we propose a module named Differentiable Binarization (DB), which can perform the binarization process in a segmentation network. Optimized along with a DB module, a segmentation network can adaptively set the thresholds for binarization, which not only simplifies the post-processing but also enhances the performance of text detection. Based on a simple segmentation network, we validate the performance improvements of DB on five benchmark datasets, which consistently achieves state-of-the-art results, in terms of both detection accuracy and speed. In particular, with a light-weight backbone, the performance improvements by DB are significant so that we can look for an ideal tradeoff between detection accuracy and efficiency. Specifically, with a backbone of ResNet-18, our detector achieves an F-measure of 82.8, running at 62 FPS, on the MSRA-TD500 dataset. Code is available at: https://github.com/MhLiao/DB

For agents

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

get_harvested_code_for_paper("1911.08947")
get_code_for_paper("1911.08947")
have("1911.08947")

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

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

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

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

Connect an agent — have() is free.