{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/a-synthetic-electrocardiogram-ecg-image","title":"ECG-Image-Kit: A Synthetic Image Generation Toolbox to Facilitate Deep Learning-Based Electrocardiogram Digitization","arxiv_id":"2307.01946","date":"2023-07-04","proceeding":null,"authors":["Kshama Kodthalu Shivashankara","Deepanshi","Afagh Mehri Shervedani","Gari D. Clifford","Matthew A. Reyna","Reza Sameni"],"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.","url_abs":"https://arxiv.org/abs/2307.01946v4","url_pdf":"https://arxiv.org/pdf/2307.01946v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"a-synthetic-electrocardiogram-ecg-image","repo_url":"https://github.com/alphanumericslab/ecg-image-kit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"privacy-preserving","task_name":"Privacy Preserving"},{"task_slug":"time-series-1","task_name":"Time Series"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2307.01946","atlas_url":"https://app.syntology.ai/?focus=2307.01946","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.01946"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alphanumericslab/ecg-image-kit","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran_honours":3,"unverified":7},"by_repo_kind":{"official":{"samples":10,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"9bafc68792a5453a","entry":"cumsum","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/HandwrittenText/generate.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/HandwrittenText/generate.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"9bafc68792a5453a"}},{"code_sha256_prefix":"b5136c243f64693e","entry":"sample","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/HandwrittenText/generate.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/HandwrittenText/generate.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b5136c243f64693e"}},{"code_sha256_prefix":"0ff24ae32bac2d32","entry":"split_strokes","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/HandwrittenText/generate.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/HandwrittenText/generate.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"0ff24ae32bac2d32"}},{"code_sha256_prefix":"395d6026445c36b6","entry":"L2OverlapDiff","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/CreasesWrinkles/creases.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/CreasesWrinkles/creases.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"395d6026445c36b6"}},{"code_sha256_prefix":"4069a5950b04a536","entry":"find_files","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/helper_functions.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/helper_functions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4069a5950b04a536"}},{"code_sha256_prefix":"c5b51eb34d7d9ed3","entry":"find_records","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/helper_functions.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/helper_functions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c5b51eb34d7d9ed3"}},{"code_sha256_prefix":"5fde0f1c6454fcfd","entry":"inches_to_dots","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/ecg_plot.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/ecg_plot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5fde0f1c6454fcfd"}},{"code_sha256_prefix":"df59d1d988238283","entry":"randomBestPatch","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/CreasesWrinkles/creases.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/CreasesWrinkles/creases.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"df59d1d988238283"}},{"code_sha256_prefix":"ef0113b01830c177","entry":"randomPatch","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/CreasesWrinkles/creases.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/CreasesWrinkles/creases.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ef0113b01830c177"}},{"code_sha256_prefix":"b367121bf534f6ca","entry":"read_config_file","repo":"alphanumericslab/ecg-image-kit","repo_kind":"official","path":"codes/ecg-image-generator/helper_functions.py","file_url":"https://github.com/alphanumericslab/ecg-image-kit/blob/HEAD/codes/ecg-image-generator/helper_functions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b367121bf534f6ca"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}