SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.01946 · 2023

ECG-Image-Kit: A Synthetic Image Generation Toolbox to Facilitate Deep Learning-Based Electrocardiogram Digitization

arXiv · PDF · Open in the Atlas

Code that ran

5 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2307.01946.json · badge: /api/ran/2307.01946.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
alphanumericslab/ecg-image-kit canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
FunctionStatusWhere it lives
L2OverlapDiff Ran
ran on a synthesized input
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/CreasesWrinkles/creases.py
code served (permissive licence) · get_code("395d6026445c36b6")
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

# Create valid arguments for L2OverlapDiff
np.random.seed(0)

# Define parameters based on function signature and usage:
# - patch: 2D array used with slicing [:, :overlap] and [:overlap, :]
# - block_size: integer dimension
# - overlap: integer for overlap region
# - res: 2D array (result/residual array) indexed by [y:y+block_size, x:x+overlap] etc.
# - y: integer row position
# - x: integer column position

block_size = 8
overlap = 3

# Create patch: should be (block_size, block_size)
patch = np.random.randn(block_size, block_size)

# Create res: larger array to accommodate indexing at various positions
# res needs to be large enough for the slicing operations
res_height = 20
res_width = 20
res = np.random.randn(res_height, res_width)

# Set y and x positions such that indexing doesn't go out of bounds
y = 5
x = 5

ARGS = {
    "patch": patch,
    "block_size": block_size,
    "overlap": overlap,
    "res": res,
    "y": y,
    "x": x,
}
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
cumsum Ran
ran, honoured the contract we drafted
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/HandwrittenText/generate.py
code served (permissive licence) · get_code("9bafc68792a5453a")
How it ran

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

import numpy as np

# Create a small numpy array with at least 3 columns
# The function takes cumsum of first 2 columns and concatenates with remaining columns
points = np.array([
    [1.0, 2.0, 5.0, 6.0],
    [3.0, 4.0, 7.0, 8.0],
    [5.0, 6.0, 9.0, 10.0]
])

ARGS = {
    "points": points
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 4) — shape (3, 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
inches_to_dots Ran
ran on a synthesized input
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/ecg_plot.py
code served (permissive licence) · get_code("5fde0f1c6454fcfd")
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 torch

torch.manual_seed(0)

ARGS = {
    "value": 2.5,
    "resolution": 300
}
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 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
sample Ran
ran, honoured the contract we drafted
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/HandwrittenText/generate.py
code served (permissive licence) · get_code("b5136c243f64693e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (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

np.random.seed(0)

ARGS = {
    'e': 0.3,
    'mu1': 1.5,
    'mu2': -0.5,
    'std1': 2.0,
    'std2': 1.5,
    'rho': 0.7
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 (3,) — shape (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
split_strokes Ran
ran, honoured the contract we drafted
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/HandwrittenText/generate.py
code served (permissive licence) · get_code("0ff24ae32bac2d32")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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

# The function expects points to be an array-like with shape (N, 3)
# where the third column (index 2) contains stroke-end markers (1.0 indicates end of stroke)
# The function splits the points into separate strokes based on these markers

# Create a sample points array with multiple strokes
# Each row is [x, y, stroke_end_flag]
# stroke_end_flag = 1.0 means this point is the end of a stroke
points = [
    [0.1, 0.2, 0.0],  # stroke 1, point 1
    [0.3, 0.4, 0.0],  # stroke 1, point 2
    [0.5, 0.6, 1.0],  # stroke 1, point 3 (end of stroke)
    [1.0, 1.1, 0.0],  # stroke 2, point 1
    [1.2, 1.3, 1.0],  # stroke 2, point 2 (end of stroke)
    [2.0, 2.1, 0.0],  # stroke 3, point 1
    [2.2, 2.3, 0.0],  # stroke 3, point 2
    [2.4, 2.5, 0.0],  # stroke 3, point 3
    [2.6, 2.7, 1.0],  # stroke 3, point 4 (end of stroke)
]

ARGS = {
    'points': points
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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
find_files Not yet run
unverified (harvested, no recorded run)
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/helper_functions.py
code served (permissive licence) · get_code("4069a5950b04a536")
How it ran

no invocation recorded.

find_records Not yet run
unverified (harvested, no recorded run)
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/helper_functions.py
code served (permissive licence) · get_code("c5b51eb34d7d9ed3")
How it ran

no invocation recorded.

randomBestPatch Not yet run
unverified (harvested, no recorded run)
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/CreasesWrinkles/creases.py
code served (permissive licence) · get_code("df59d1d988238283")
How it ran

no invocation recorded.

randomPatch Not yet run
unverified (harvested, no recorded run)
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/CreasesWrinkles/creases.py
code served (permissive licence) · get_code("ef0113b01830c177")
How it ran

no invocation recorded.

read_config_file Not yet run
unverified (harvested, no recorded run)
alphanumericslab/ecg-image-kit/codes/ecg-image-generator/helper_functions.py
code served (permissive licence) · get_code("b367121bf534f6ca")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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
cumsum 1 other paper
1 dated earlier
1308.0850 (2013-08)
Generating Sequences With Recurrent Neural Networks
sample 1 other paper
1 dated earlier
1308.0850 (2013-08)
Generating Sequences With Recurrent Neural Networks
split_strokes 1 other paper
1 dated earlier
1308.0850 (2013-08)
Generating Sequences With Recurrent Neural Networks

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

Cardiovascular diseases are a major cause of mortality globally, and electrocardiograms (ECGs) are crucial for diagnosing them. Traditionally, ECGs are printed on paper. However, these printouts, even when scanned, are incompatible with advanced ECG diagnosis software that require time-series data. Digitizing ECG images is vital for training machine learning models in ECG diagnosis and to leverage the extensive global archives collected over decades. Deep learning models for image processing are promising in this regard, although the lack of clinical ECG archives with reference time-series data is challenging. Data augmentation techniques using realistic generative data models provide a solution. We introduce ECG-Image-Kit, an open-source toolbox for generating synthetic multi-lead ECG images with realistic artifacts from time-series data. The tool synthesizes ECG images from real time-series data, applying distortions like text artifacts, wrinkles, and creases on a standard ECG paper background. As a case study, we used ECG-Image-Kit to create a dataset of 21,801 ECG images from the PhysioNet QT database. We developed and trained a combination of a traditional computer vision and deep neural network model on this dataset to convert synthetic images into time-series data for evaluation. We assessed digitization quality by calculating the signal-to-noise ratio (SNR) and compared clinical parameters like QRS width, RR, and QT intervals recovered from this pipeline, with the ground truth extracted from ECG time-series. The results show that this deep learning pipeline accurately digitizes paper ECGs, maintaining clinical parameters, and highlights a generative approach to digitization. This toolbox currently supports data augmentation for the 2024 PhysioNet Challenge, focusing on digitizing and classifying paper ECG images.

For agents

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

get_harvested_code_for_paper("2307.01946")
get_code_for_paper("2307.01946")
have("2307.01946")

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

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

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

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

Connect an agent — have() is free.