SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1806.02559 · 2018

Shape Robust Text Detection with Progressive Scale Expansion Network

arXiv · PDF · Open in the Atlas

Code that ran

17 of 24 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, 3 violated it and 12 have no contract verdict; 2 failures of our instrument; 7 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/1806.02559.json · badge: /api/ran/1806.02559.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
li10141110/PSENet-tf2 community (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
DePengW/PSENet extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
liuheng92/tensorflow_PSENet community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
A-ZHANG1/PSENet community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
Mael-zys/PSENet reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
PaddleEdu/OCR-models-PaddlePaddle community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
conv3x3 Ran
ran; our contract draft was wrong, not the code
A-ZHANG1/PSENet/models/fpn_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.

conv3x3 Ran
ran on a synthesized input
li10141110/PSENet-tf2/models/fpn_resnet.py
code served (permissive licence) · get_code("7c2df8af7f5531c4")
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 tensorflow as tf

ARGS = {
    'out_planes': 64,
    'strides': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
dice_loss Ran
ran, violated the contract we drafted
DePengW/PSENet/train_ic15.py
code served (permissive licence) · get_code("ef327e5c61768306")
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)

# The function expects:
# - input: a tensor that will be flattened to (batch_size, -1) after sigmoid
# - target: a tensor with same shape as input, flattened to (batch_size, -1)
# - mask: a tensor with same shape as input, flattened to (batch_size, -1)

batch_size = 2
spatial_dim = 4

# Create input tensor - logits before sigmoid
input_tensor = torch.randn(batch_size, 1, spatial_dim, spatial_dim)

# Create target tensor - binary labels
target_tensor = torch.randint(0, 2, (batch_size, 1, spatial_dim, spatial_dim)).float()

# Create mask tensor - binary mask
mask_tensor = torch.randint(0, 2, (batch_size, 1, spatial_dim, spatial_dim)).float()

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
    "mask": mask_tensor,
}
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
dice_loss Ran
ran on a synthesized input
li10141110/PSENet-tf2/train_ctw1500.py
code served (permissive licence) · get_code("58bb50d6bc6f6f8f")
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
spatial_dim = 4

# input: will be passed through sigmoid, reshaped to (batch, -1)
# Should be a float tensor of shape (batch, spatial_dim)
input_tensor = tf.constant(np.random.randn(batch_size, spatial_dim), dtype=tf.float32)

# target: binary/probability targets, reshaped to (batch, -1)
# Should be a float tensor of shape (batch, spatial_dim)
target_tensor = tf.constant(np.random.rand(batch_size, spatial_dim), dtype=tf.float32)

# mask: binary mask for valid regions, reshaped to (batch, -1)
# Should be a float tensor of shape (batch, spatial_dim)
mask_tensor = tf.constant(np.ones((batch_size, spatial_dim)), dtype=tf.float32)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
    "mask": mask_tensor,
}
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
extend_3c Ran
ran, violated the contract we drafted
Mael-zys/PSENet/test_ic15.py
pointer only (licence: NONE) · get_code("81635961fe760852")
How it ran

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

get_img Ran
ran on a synthesized input
li10141110/PSENet-tf2/dataset/ctw1500_loader.py
code served (permissive licence) · get_code("73f41956a0cd9ce5")
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 (100, 100, 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 tempfile
import os
import numpy as np

# Create a temporary directory and a valid test image
temp_dir = tempfile.mkdtemp()
img_array = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
img_path = os.path.join(temp_dir, "test_image.jpg")
cv2.imwrite(img_path, img_array)

ARGS = {
    "img_path": img_path
}
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 (100, 100, 3) — shape (100, 100, 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
h_sigmoid Ran
ran on a synthesized input
li10141110/PSENet-tf2/models/mobilenet_v3_block.py
code served (permissive licence) · get_code("9172cf3729410434")
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 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 tensorflow as tf
import numpy as np

# Create a small test tensor
x = tf.constant([[-2.0, -1.0, 0.0, 1.0],
                 [2.0, 3.0, 4.0, 5.0]], dtype=tf.float32)

ARGS = {
    'x': x
}
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 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
h_swish Ran
ran on a synthesized input
li10141110/PSENet-tf2/models/mobilenet_v3_block.py
code served (permissive licence) · get_code("49d4334289825356")
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 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 tensorflow as tf
import numpy as np

def h_sigmoid(x):
    return tf.nn.relu6(x + 3) / 6

def h_swish(x):
    return x * h_sigmoid(x)

# Create a small TensorFlow tensor for testing
x = tf.constant(np.random.randn(2, 4).astype(np.float32))

ARGS = {
    "x": x
}
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 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
load_annoataion Ran
ran on a synthesized input
liuheng92/tensorflow_PSENet/utils/data_provider/data_provider.py
code served (permissive licence) · get_code("f539910065f78fcb")
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 csv
import numpy as np
import tempfile

# Create a temporary CSV file with annotation data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "annotations.csv")

# Write sample annotation data to the temporary file
with open(temp_file, 'w', newline='') as f:
    writer = csv.writer(f)
    # Format: x1, y1, x2, y2, x3, y3, x4, y4, label
    writer.writerow(['10.5', '20.3', '30.1', '40.2', '50.4', '60.1', '70.2', '80.3', 'text_label'])
    writer.writerow(['15.5', '25.3', '35.1', '45.2', '55.4', '65.1', '75.2', '85.3', '###'])
    writer.writerow(['12.5', '22.3', '32.1', '42.2', '52.4', '62.1', '72.2', '82.3', '*'])

ARGS = {
    'p': temp_file
}
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
mean_image_subtraction Ran
ran on a synthesized input
liuheng92/tensorflow_PSENet/nets/model.py
code served (permissive licence) · get_code("9bfc6628f89669e9")
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, 5, 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 tensorflow as tf
import numpy as np

# Create a small test image tensor with shape (batch_size, height, width, channels)
# Using batch=2, height=4, width=5, channels=3 (RGB)
images = tf.constant(np.random.randn(2, 4, 5, 3).astype(np.float32))

# Define means for the 3 channels
means = [123.68, 116.78, 103.94]

ARGS = {
    'images': images,
    'means': means
}
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, 5, 3) — shape (2, 4, 5, 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; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DePengW/PSENet/train_ic15.py
code served (permissive licence) · get_code("46a8caf20987d0ed")
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
import numpy as np

torch.manual_seed(0)

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

# scores: shape (batch_size, height, width) with float values
scores = torch.rand(batch_size, height, width, dtype=torch.float32)

# gt_texts: shape (batch_size, height, width) with binary-like values (0 or 1)
gt_texts = torch.randint(0, 2, (batch_size, height, width), dtype=torch.float32)

# training_masks: shape (batch_size, height, width) with binary-like values (0 or 1)
training_masks = torch.randint(0, 2, (batch_size, height, width), dtype=torch.float32)

# Ensure there's at least one positive example to make the function work properly
gt_texts[0, 0, 0] = 1.0
training_masks[0, 0, 0] = 1.0

ARGS = {
    'scores': scores,
    'gt_texts': gt_texts,
    '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, 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
li10141110/PSENet-tf2/train_ctw1500.py
code served (permissive licence) · get_code("61c1a6deb519c1b4")
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 (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 tensorflow as tf
import numpy as np

# Create small test tensors with distinct dimensions
batch_size = 2
height = 4
width = 3

# scores: shape (batch_size, height, width) - confidence scores for negative/positive
scores = tf.constant(np.random.rand(batch_size, height, width).astype('float32'))

# gt_text: shape (batch_size, height, width) - ground truth text mask (0 or 1)
gt_text_np = np.random.randint(0, 2, (batch_size, height, width)).astype('float32')
gt_texts = tf.constant(gt_text_np)

# training_masks: shape (batch_size, height, width) - training mask (0 or 1)
training_mask_np = np.random.randint(0, 2, (batch_size, height, width)).astype('float32')
training_masks = tf.constant(training_mask_np)

ARGS = {
    'scores': scores,
    'gt_texts': gt_texts,
    '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 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_single Ran
ran, violated the contract we drafted
DePengW/PSENet/train_ic15.py
code served (permissive licence) · get_code("abc5d78bef2217cc")
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 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 numpy as np

# Create small numpy arrays for the function parameters
# The function expects 2D arrays that will be reshaped to 3D with batch dimension

height, width = 4, 3

# score: prediction scores, should be same shape as gt_text
# Values between 0 and 1 representing model confidence
score = np.random.rand(height, width).astype('float32')

# gt_text: ground truth text mask, binary-like values
# Mix of values > 0.5 (positive) and <= 0.5 (negative)
gt_text = np.random.rand(height, width).astype('float32')
gt_text[0:2, :] = np.random.rand(2, width) + 0.5  # Some positive samples
gt_text[2:4, :] = np.random.rand(2, width) * 0.5  # Some negative samples

# training_mask: indicates which pixels are valid for training
# Values > 0.5 mean valid, <= 0.5 mean invalid/don't care
training_mask = np.ones((height, width), dtype='float32')
training_mask[3, :] = 0.0  # Mark some as invalid

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 — 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 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
pse Ran
ran on a synthesized input
PaddleEdu/OCR-models-PaddlePaddle/PSENet/models/pypse.py
code served (permissive licence) · get_code("960fcfbe3f86f157")
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, 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
import cv2
from queue import Queue

# Create small sample kernals
# The function expects a list of binary (0/1) numpy arrays
# It will perform connected components on the last one, then propagate labels backwards

height, width = 10, 12
kernal_num = 3

# Create a list of kernals (binary masks) with increasing detail
# Start with smallest/coarsest at index 0, largest/finest at the end
kernals = []

# Kernal 0 (coarse)
k0 = np.zeros((height, width), dtype='uint8')
k0[2:5, 3:8] = 1
kernals.append(k0)

# Kernal 1 (medium)
k1 = np.zeros((height, width), dtype='uint8')
k1[2:6, 3:9] = 1
kernals.append(k1)

# Kernal 2 (fine) - this is the one that gets connected components
k2 = np.zeros((height, width), dtype='uint8')
k2[1:7, 2:10] = 1
# Add a separate region to test min_area filtering
k2[8, 11] = 1
kernals.append(k2)

min_area = 3

ARGS = {
    'kernals': kernals,
    'min_area': min_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 2, dtype family int, shape (10, 12) — shape (10, 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
pse Ran
ran on a synthesized input
li10141110/PSENet-tf2/pypse.py
code served (permissive licence) · get_code("2473fba7e2d2183a")
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, 10) 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
import queue as q

# Create valid kernals and min_area arguments for the pse function
# kernals should be a list of binary numpy arrays where each array represents
# a different kernel level (from most to least restrictive)
# The function processes them from the last to the first

# Create a small test image with connected components
height, width = 10, 10

# Create multiple kernel levels - each one progressively larger/more permissive
# kernal[0] - most restrictive (smallest regions)
kernal_0 = np.zeros((height, width), dtype='uint8')
kernal_0[2:4, 2:4] = 1  # Small region
kernal_0[6:8, 6:8] = 1  # Another small region

# kernal[1] - medium
kernal_1 = np.zeros((height, width), dtype='uint8')
kernal_1[2:5, 2:5] = 1  # Slightly larger region
kernal_1[6:9, 6:9] = 1  # Slightly larger region

# kernal[2] - least restrictive (largest regions)
kernal_2 = np.zeros((height, width), dtype='uint8')
kernal_2[1:6, 1:6] = 1  # Large region
kernal_2[5:10, 5:10] = 1  # Large region

kernals = [kernal_0, kernal_1, kernal_2]
min_area = 2

ARGS = {
    'kernals': kernals,
    'min_area': min_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 2, dtype family int, shape (10, 10) — shape (10, 10) 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
random_horizontal_flip Ran
ran on a synthesized input
li10141110/PSENet-tf2/dataset/ctw1500_loader.py
code served (permissive licence) · get_code("eab615268dca3a00")
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 4, 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
import random

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

# Create sample image data - batch of 2 images with shape (height, width, channels)
# Using distinct sizes: height=4, width=3, channels=2 for clarity
img1 = np.random.rand(4, 3, 2)
img2 = np.random.rand(4, 3, 2)
imgs = [img1, img2]

ARGS = {
    "imgs": imgs
}
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, ndim 4, 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
scale Ran
ran on a synthesized input
li10141110/PSENet-tf2/dataset/ctw1500_test_loader.py
code served (permissive licence) · get_code("aff0e449324bf982")
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 (960, 1280, 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=480, width=640, 3 channels for BGR)
img = np.random.randint(0, 256, size=(480, 640, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "long_size": 1280
}
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 (960, 1280, 3) — shape (960, 1280, 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
MobileNetv2 Not yet run
unverified (harvested, no recorded run)
li10141110/PSENet-tf2/MobileNetV2/mobilenet_v2.py
code served (permissive licence) · get_code("4a0dff2bd619eb72")
How it ran

no invocation recorded.

mobilenetv2 Not yet run
unverified (harvested, no recorded run)
li10141110/PSENet-tf2/models/fpn_resnet.py
code served (permissive licence) · get_code("54822bc5ab637521")
How it ran

no invocation recorded.

polygon_from_points Not yet run
unverified (harvested, no recorded run)
Mael-zys/PSENet/test_ic15.py
pointer only (licence: NONE) · get_code("16900bc2a138ef61")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Mael-zys/PSENet 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. No invocation recorded.

relu6 Not yet run
unverified (harvested, no recorded run)
li10141110/PSENet-tf2/MobileNetV2/mobilenet_v2.py
code served (permissive licence) · get_code("d51adc9e749c6f92")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
A-ZHANG1/PSENet/models/fpn_resnet.py
code served (permissive licence) · get_code("06056d532c6d3ff8")
How it ran

no invocation recorded.

resnet34 Not yet run
unverified (harvested, no recorded run)
A-ZHANG1/PSENet/models/fpn_resnet.py
code served (permissive licence) · get_code("99c7b9e9359a3aa9")
How it ran

no invocation recorded.

unpool Not yet run
unverified (harvested, no recorded run)
liuheng92/tensorflow_PSENet/nets/model.py
code served (permissive licence) · get_code("b6b0d40667b0f177")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 3 later) and 19 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
55 dated earlier, 1 the same month, 630 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
resnet18 89 other papers
4 dated earlier, 85 later
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 86 more not named here
resnet34 53 other papers
4 dated earlier, 49 later
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 50 more not named here
MobileNetv2 1 other paper
1 dated earlier
1801.04381 (2018-01)
MobileNetV2: Inverted Residuals and Linear Bottlenecks
relu6 1 other paper
1 dated earlier
1801.04381 (2018-01)
MobileNetV2: Inverted Residuals and Linear Bottlenecks

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

The challenges of shape robust text detection lie in two aspects: 1) most existing quadrangular bounding box based detectors are difficult to locate texts with arbitrary shapes, which are hard to be enclosed perfectly in a rectangle; 2) most pixel-wise segmentation-based detectors may not separate the text instances that are very close to each other. To address these problems, we propose a novel Progressive Scale Expansion Network (PSENet), designed as a segmentation-based detector with multiple predictions for each text instance. These predictions correspond to different `kernels' produced by shrinking the original text instance into various scales. Consequently, the final detection can be conducted through our progressive scale expansion algorithm which gradually expands the kernels with minimal scales to the text instances with maximal and complete shapes. Due to the fact that there are large geometrical margins among these minimal kernels, our method is effective to distinguish the adjacent text instances and is robust to arbitrary shapes. The state-of-the-art results on ICDAR 2015 and ICDAR 2017 MLT benchmarks further confirm the great effectiveness of PSENet. Notably, PSENet outperforms the previous best record by absolute 6.37\% on the curve text dataset SCUT-CTW1500. Code will be available in https://github.com/whai362/PSENet.

For agents

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

get_harvested_code_for_paper("1806.02559")
get_code_for_paper("1806.02559")
have("1806.02559")

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

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

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

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

Connect an agent — have() is free.