SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1908.05900 · 2019

Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network

arXiv · PDF · Open in the Atlas

Code that ran

17 of 28 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 12 have no contract verdict; 5 failures of our instrument; 11 no recorded run), measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1908.05900.json · badge: /api/ran/1908.05900.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
liuch37/pan-pytorch community (classifier label)
classifier basis not recorded on the link
8 ran · 5 no recorded run
WenmuZhou/PAN.pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
liuch37/pan-tensorflow community (classifier label)
classifier basis not recorded on the link
4 ran · 3 no recorded run
FunctionStatusWhere it lives
PolyArea Ran
ran on a synthesized input
liuch37/pan-pytorch/dataset/ctw1500.py
code served (permissive licence) · get_code("f97b05c3ab59a119")
How it ran

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

import numpy as np

# PolyArea computes the area of a polygon given x and y coordinates
# It uses np.dot, np.roll, and np.abs on numpy arrays
# x and y should be 1D numpy arrays of equal length representing polygon vertices

x = np.array([0.0, 1.0, 1.0, 0.0])
y = np.array([0.0, 0.0, 1.0, 1.0])

ARGS = {
    "x": x,
    "y": y
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
channel_shuffle Ran
ran; our contract draft was wrong, not the code
WenmuZhou/PAN.pytorch/models/modules/shufflenetv2.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ddghost/new_darts, is pointer only (licence: NONE) · get_code("b9da06d4f527dd6c")
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 ddghost/new_darts, 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.

conv1x1 Ran
ran; our contract draft was wrong, not the code
WenmuZhou/PAN.pytorch/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
WenmuZhou/PAN.pytorch/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
liuch37/pan-pytorch/models/backbone.py
pointer only (licence: MIT); 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 (MIT), 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.

iou Ran
ran on a synthesized input
liuch37/pan-pytorch/loss/iou.py
code served (permissive licence) · get_code("f4570a660dddfa8b")
How it ran

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

import torch

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
spatial_dim = 4

# 'a': predictions tensor - should be class indices, flattened to (batch, spatial)
a = torch.randint(0, 2, (batch_size, spatial_dim), dtype=torch.long)

# 'b': ground truth tensor - should be class indices, flattened to (batch, spatial)
b = torch.randint(0, 2, (batch_size, spatial_dim), dtype=torch.long)

# 'mask': validity mask - 1 for valid pixels, 0 for invalid
mask = torch.ones((batch_size, spatial_dim), dtype=torch.long)
mask[0, 2] = 0  # Mark some pixels as invalid

# 'n_class': number of classes
n_class = 2

# 'reduce': whether to reduce across batch
reduce = True

ARGS = {
    'a': a,
    'b': b,
    'mask': mask,
    'n_class': n_class,
    'reduce': reduce,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
iou Ran
ran on a synthesized input
liuch37/pan-tensorflow/loss/iou.py
code served (permissive licence) · get_code("3afac97676b332d4")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
spatial_size = 4
n_class = 2

# `a` is predicted class labels - shape [batch_size, spatial_size]
a = tf.constant([[0, 1, 0, 1],
                 [1, 0, 1, 0]], dtype=tf.int32)

# `b` is ground truth class labels - shape [batch_size, spatial_size]
b = tf.constant([[0, 1, 1, 1],
                 [1, 0, 0, 0]], dtype=tf.int32)

# `mask` indicates valid pixels (1 = valid, 0 = invalid) - shape [batch_size, spatial_size]
mask = tf.constant([[1, 1, 1, 1],
                    [1, 1, 1, 1]], dtype=tf.int32)

ARGS = {
    'a': a,
    'b': b,
    'mask': mask,
    'n_class': n_class,
    'reduce': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
iou_single Ran
ran on a synthesized input
liuch37/pan-pytorch/loss/iou.py
code served (permissive licence) · get_code("0fb06a61e1673f4f")
How it ran

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

import torch

torch.manual_seed(0)

# Create small test tensors
# a: predicted class labels, shape (6,)
a = torch.tensor([0, 1, 2, 0, 1, 2], dtype=torch.long)

# b: ground truth class labels, shape (6,)
b = torch.tensor([0, 1, 1, 0, 2, 2], dtype=torch.long)

# mask: binary validity mask, shape (6,)
mask = torch.tensor([1, 1, 1, 1, 1, 0], dtype=torch.long)

# n_class: number of classes
n_class = 3

ARGS = {
    "a": a,
    "b": b,
    "mask": mask,
    "n_class": n_class
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
iou_single Ran
ran on a synthesized input
liuch37/pan-tensorflow/loss/iou.py
code served (permissive licence) · get_code("9e9653c6a1f39984")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small test tensors
batch_size = 2
n_class = 3

# Create prediction tensor 'a' with class indices (0, 1, or 2)
a = tf.constant([0, 1, 2, 1, 0, 2], dtype=tf.int32)

# Create ground truth tensor 'b' with class indices
b = tf.constant([0, 1, 1, 1, 0, 2], dtype=tf.int32)

# Create mask tensor (1 for valid, 0 for invalid)
mask = tf.constant([1, 1, 1, 1, 1, 1], dtype=tf.int32)

ARGS = {
    'a': a,
    'b': b,
    'mask': mask,
    'n_class': n_class
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
ohem_batch Ran
ran on a synthesized input
liuch37/pan-pytorch/loss/ohem.py
code served (permissive licence) · get_code("2689775f7bfd7b79")
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 3, dtype family float, shape (2, 4, 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 torch

torch.manual_seed(0)

# Create small tensors for batch processing
# Batch size: 2, Height: 4, Width: 3
batch_size = 2
height = 4
width = 3

# scores: predicted scores for each pixel
scores = torch.rand(batch_size, height, width)

# gt_text: ground truth text mask (binary-like values)
gt_text = torch.randint(0, 2, (batch_size, height, width)).float()

# training_mask: mask indicating valid training regions
training_mask = torch.ones(batch_size, height, width)
# Set some regions to 0 to test the mask logic
training_mask[0, 0, 0] = 0
training_mask[1, 1, 1] = 0

ARGS = {
    "scores": scores,
    "gt_texts": gt_text,
    "training_masks": training_mask,
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
ohem_batch Ran
ran on a synthesized input
liuch37/pan-tensorflow/loss/ohem.py
code served (permissive licence) · get_code("32d6a41495711b3c")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 1) 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 tensorflow as tf
import numpy as np

# Create small test tensors for the OHEM batch function
batch_size = 2
height = 4
width = 3

# scores: predictions for negative/positive classification
# Shape: [batch_size, height, width]
scores = tf.constant(np.random.rand(batch_size, height, width), dtype=tf.float32)

# gt_text: ground truth text mask (0 or 1 for negative/positive)
# Shape: [batch_size, height, width]
gt_text = tf.constant(np.random.randint(0, 2, (batch_size, height, width)), dtype=tf.float32)

# training_masks: which pixels are valid for training (0 or 1)
# Shape: [batch_size, height, width]
training_masks = tf.constant(np.random.randint(0, 2, (batch_size, height, width)), dtype=tf.float32)

ARGS = {
    "scores": scores,
    "gt_texts": gt_text,
    "training_masks": training_masks,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 1) — shape (2, 4, 3, 1) 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
ohem_single Ran
ran on a synthesized input
liuch37/pan-pytorch/loss/ohem.py
code served (permissive licence) · get_code("2baa67cdece3bfb9")
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 3, dtype family float, shape (1, 4, 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 torch

torch.manual_seed(0)

# Create small test tensors for the function
# The function expects 2D tensors (height, width)
height, width = 4, 3

# score: predicted scores for each pixel, shape (height, width)
score = torch.rand(height, width)

# gt_text: ground truth text mask (binary-like values), shape (height, width)
gt_text = torch.randint(0, 2, (height, width)).float()

# training_mask: mask indicating valid training pixels, shape (height, width)
training_mask = torch.ones(height, width)
# Set some pixels to have training_mask <= 0.5
training_mask[0, 0] = 0.3
training_mask[1, 1] = 0.2

ARGS = {
    "score": score,
    "gt_text": gt_text,
    "training_mask": training_mask,
}
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 3, dtype family float, shape (1, 4, 3) — shape (1, 4, 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
ohem_single Ran
ran on a synthesized input
liuch37/pan-tensorflow/loss/ohem.py
code served (permissive licence) · get_code("b9b15dfa78b4cbf1")
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 EagerTensor, ndim 3, dtype family float, shape (4, 3, 1) 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 tensorflow as tf
import numpy as np

# Create small test tensors with distinct dimensions
# score: 2D tensor (height=4, width=3) with confidence scores
score = tf.constant([
    [0.9, 0.1, 0.8],
    [0.2, 0.7, 0.3],
    [0.6, 0.4, 0.95],
    [0.15, 0.85, 0.25]
], dtype=tf.float32)

# gt_text: 2D tensor (height=4, width=3) with binary ground truth (>0.5 = text, <=0.5 = background)
gt_text = tf.constant([
    [1.0, 0.0, 1.0],
    [0.0, 1.0, 0.0],
    [1.0, 0.0, 1.0],
    [0.0, 1.0, 0.0]
], dtype=tf.float32)

# training_mask: 2D tensor (height=4, width=3) with mask indicating valid regions (>0.5 = valid)
training_mask = tf.constant([
    [1.0, 1.0, 1.0],
    [1.0, 0.0, 1.0],
    [1.0, 1.0, 1.0],
    [0.0, 1.0, 1.0]
], dtype=tf.float32)

ARGS = {
    "score": score,
    "gt_text": gt_text,
    "training_mask": training_mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (4, 3, 1) — shape (4, 3, 1) 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
quadratic Ran
ran on a synthesized input
WenmuZhou/PAN.pytorch/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
resnet18 Ran
ran on a synthesized input
liuch37/pan-pytorch/models/backbone.py
code served (permissive licence) · get_code("7b3c1056dcd60fb3")
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 ResNet. 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 = {
    'pretrained': False
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet50 Ran
ran; our contract draft was wrong, not the code
liuch37/pan-pytorch/models/backbone.py
code served (permissive licence) · get_code("a72c6ccea07df858")
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 ResNet. 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
import math

torch.manual_seed(0)

# Since the function tries to download pretrained weights, we'll set pretrained=False
# to avoid network calls
ARGS = {
    'pretrained': False,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
unshrink_offset Ran
ran on a synthesized input
WenmuZhou/PAN.pytorch/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)
WenmuZhou/PAN.pytorch/data_loader/data_utils.py
code served (permissive licence) · get_code("07471b3162a18b9d")
How it ran

no invocation recorded.

decode_clip Not yet run
unverified (harvested, no recorded run)
WenmuZhou/PAN.pytorch/predict.py
code served (permissive licence) · get_code("25a919a778671afa")
How it ran

no invocation recorded.

emb_loss Not yet run
unverified (harvested, no recorded run)
liuch37/pan-pytorch/loss/loss.py
code served (permissive licence) · get_code("927fb2481306a5de")
How it ran

no invocation recorded.

emb_loss Not yet run
unverified (harvested, no recorded run)
liuch37/pan-tensorflow/loss/loss.py
code served (permissive licence) · get_code("a45ff300d0cdd84c")
How it ran

no invocation recorded.

get_ann Not yet run
unverified (harvested, no recorded run)
liuch37/pan-pytorch/dataset/ctw1500.py
code served (permissive licence) · get_code("2134919556a5d8de")
How it ran

no invocation recorded.

get_img Not yet run
unverified (harvested, no recorded run)
liuch37/pan-pytorch/dataset/ctw1500.py
code served (permissive licence) · get_code("a059931bb3567d91")
How it ran

no invocation recorded.

kernel_loss Not yet run
unverified (harvested, no recorded run)
liuch37/pan-pytorch/loss/loss.py
code served (permissive licence) · get_code("722fdf25331ac85e")
How it ran

no invocation recorded.

kernel_loss Not yet run
unverified (harvested, no recorded run)
liuch37/pan-tensorflow/loss/loss.py
code served (permissive licence) · get_code("63aa7e5f45cfc6b3")
How it ran

no invocation recorded.

km Not yet run
unverified (harvested, no recorded run)
WenmuZhou/PAN.pytorch/post_processing/kmeans.py
code served (permissive licence) · get_code("b9d5437cc5942052")
How it ran

no invocation recorded.

text_loss Not yet run
unverified (harvested, no recorded run)
liuch37/pan-pytorch/loss/loss.py
code served (permissive licence) · get_code("5dd591bbb9fec9e4")
How it ran

no invocation recorded.

text_loss Not yet run
unverified (harvested, no recorded run)
liuch37/pan-tensorflow/loss/loss.py
code served (permissive licence) · get_code("31bc9cc1279d9178")
How it ran

no invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 26 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 8 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
143 dated earlier, 10 the same month, 533 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
42 dated earlier, 1 the same month, 387 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
17 dated earlier, 294 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
channel_shuffle 19 other papers
7 dated earlier, 12 later · 2 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1606.02147 (2016-06)
ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation
1805.12549 (2018-05)
Channel Gating Neural Networks
and 16 more not named here
resnet50 2 other papers
1 dated earlier, 1 later
1810.04650 (2018-10)
Multi-Task Learning as Multi-Objective Optimization
2206.01934 (2022-06)
Stochastic Multiple Target Sampling Gradient Descent
check_and_validate_polys 1 other paper
1 later
1911.08947 (2019-11)
Real-time Scene Text Detection with Differentiable Binarization
quadratic 1 other paper
1 later
1911.08947 (2019-11)
Real-time Scene Text Detection with Differentiable Binarization
unshrink_offset 1 other paper
1 later
1911.08947 (2019-11)
Real-time Scene Text Detection with Differentiable Binarization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

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

Abstract

Scene text detection, an important step of scene text reading systems, has witnessed rapid development with convolutional neural networks. Nonetheless, two main challenges still exist and hamper its deployment to real-world applications. The first problem is the trade-off between speed and accuracy. The second one is to model the arbitrary-shaped text instance. Recently, some methods have been proposed to tackle arbitrary-shaped text detection, but they rarely take the speed of the entire pipeline into consideration, which may fall short in practical applications.In this paper, we propose an efficient and accurate arbitrary-shaped text detector, termed Pixel Aggregation Network (PAN), which is equipped with a low computational-cost segmentation head and a learnable post-processing. More specifically, the segmentation head is made up of Feature Pyramid Enhancement Module (FPEM) and Feature Fusion Module (FFM). FPEM is a cascadable U-shaped module, which can introduce multi-level information to guide the better segmentation. FFM can gather the features given by the FPEMs of different depths into a final feature for segmentation. The learnable post-processing is implemented by Pixel Aggregation (PA), which can precisely aggregate text pixels by predicted similarity vectors. Experiments on several standard benchmarks validate the superiority of the proposed PAN. It is worth noting that our method can achieve a competitive F-measure of 79.9% at 84.2 FPS on CTW1500.

For agents

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

get_harvested_code_for_paper("1908.05900")
get_code_for_paper("1908.05900")
have("1908.05900")

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

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

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

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

Connect an agent — have() is free.