SemiSegECG: A Multi-Dataset Benchmark for Semi-Supervised Semantic
Segmentation In Ecg Delineation
Minje Park∗, Jeonghwa Lim∗, Taehyung Yu, and Sunghoon Joo† VUNO Inc.
Abstract
Electrocardiogram (ECG) delineation, the segmentation of meaningful waveform features, is critical for clinical di- agnosis.
Despite Recent Advances Using Deep Learning,
progress has been limited by the scarcity of publicly avail- able annotated datasets. Semi-supervised learning presents a promising solution by leveraging abundant unlabeled ECG data. In this study, we present SemiSegECG, the first systematic benchmark for semi-supervised semantic segmentation (SemiSeg) in ECG delineation. We curated and unified multiple public datasets, including previously underused sources, to support robust and diverse evalua- tion. We adopted five representative SemiSeg algorithms from computer vision, implemented them on two different architectures: the convolutional network and the trans- former, and evaluated them in two different settings: in- domain and cross-domain. Additionally, we propose ECG- specific training configurations and augmentation strate- gies and introduce a standardized evaluation framework.
Our results show that the transformer outperforms the con- volutional network in semi-supervised ECG delineation. We anticipate that SemiSegECG will serve as a foundation for advancing semi-supervised ECG delineation methods and will facilitate further research in this domain.
1. Introduction
The electrocardiogram (ECG) is a non-invasive, widely used tool for monitoring cardiac electrical activity. A typ- ical ECG waveform includes the P wave, QRS complex, and T wave, representing atrial depolarization, ventricular depolarization, and ventricular repolarization, respectively.
Accurate segmentation of these components—termed ECG delineation—is critical for clinical diagnosis . Traditional methods using signal processing (e.g., wavelet transforms ) often struggle with signal variabil- ∗Equal contribution.
† Corresponding author.
T Wave
Figure 1. Examples of clean (left panel) and noisy (right panel) ECG recordings. In the left panel, standard waveform compo- nents (P wave, QRS complex, and T wave) are annotated, together with the PR interval, QRS duration, and QT interval. In the right panel, an ambiguous P wave and a noise-masked T wave make their boundaries difficult to identify.
ity and noise [8, 22], as shown in Figure 1. Deep learning has recently shown promise, treating delineation as a se- mantic segmentation task [2, 5, 12, 14, 15, 20], but existing models rely on small-scale datasets due to costly expert la- beling.
Semi-supervised semantic segmentation (SemiSeg) can bridge this gap by utilizing abundant unlabeled ECG data . In computer vision, SemiSeg methods such as consistency regularization and self-training have proven ef- fective . Nevertheless, their application to ECG delin- eation faces two critical challenges: (1) the absence of stan- dardized benchmarks, and (2) insufficient evaluation in re- alistic ECG scenarios.
To Address These Challenges, We:
• Introduce SemiSegECG, the first standardized bench- mark for semi-supervised ECG delineation. • Curate and integrate multiple ECG datasets, including previously underutilized public resources, and develop ECG-specific augmentation and training strategies.
• Evaluate five representative SemiSeg algorithms across varying label availability and distribution shift, consider- ing both the segmentation accuracy and clinically relevant interval error metrics.
Arxiv:2507.18323V2 [Cs.Cv] 5 Aug 2025
Table 1. ECG database characteristics. Lead types are defined as: 12-lead=standard limb (I, II, III, aVR, aVL, aVF) + precordial (V1–V6) leads; 6-lead=limb-only; 2-lead=two selected leads (e.g., MLII). Label types are lead-specific (separate onset-offset per lead), integrated (single annotation across all leads), and interval-only (PR, QRS, QT intervals without delineation annotation).
2.1. Ecg Databases
Five public ECG databases were curated for benchmarking, with one additional private database. The characteristics of the databases are summarized in Table 1. LUDB and QTDB have served as standard resources in previous ECG delineation studies [5, 13, 20]. In contrast, ISP and Zhejiang are relatively new and remain underuti- lized in delineation research. These four databases, which provide ground-truth delineation annotations, served as the core training resources.
Each Database (Ludb, Qtdb,
ISP, Zhejiang) was split subject-wise randomly into train- ing, validation, and test sets (6:2:2 ratio except for ISP which provides an official split). PTB-XL , a large-scale benchmark database for ECG classification, was used as an out-domain unlabeled dataset. We also utilized a private mobile ECG database (mECGDB), which consists of 6-lead ECGs measured by portable devices in a non-clinical set- ting unlike the others, to evaluate model generalization un- der distribution shift.
2.2. Data Preprocessing
Each ECG lead was treated as an independent training in- stance, considering its unique spatial orientation and wave- form morphology , while also enlarging the training set.
Labeled ECGs were cropped or zero-padded to a fixed 10- second length, reflecting the standard recording window for resting ECGs in routine clinical practice [33, 38]. All sig- nals were resampled to 250 Hz, which is the lowest na- tive rate among the benchmark databases, to ensure uni- form temporal resolution and prevent artifacts introduced by upsampling. A bandpass filter (0.67–40 Hz) was applied to remove baseline drift and high-frequency noise. Z-score normalization was applied to signals before model input to improve training stability.
Official delineation labels were used for LUDB and ISP. For QTDB and Zhejiang, we used the label set released by a previous study . This label set compensates for miss- ing beats and incomplete onset-offset annotations in QTDB and includes new delineation labels for Zhejiang. mECGDB contains only clinically relevant interval labels, without ex- plicit delineation labels. All the labels were annotated by at least one expert cardiologist.
Semisegecg Evaluates Algorithm Performance Under
two distinct conditions: in-domain and cross-domain set- tings. In-domain setting. The in-domain setting reflects a typ- ical use case where both labeled and unlabeled data come from the same source. We simulated semi-supervised con- ditions by randomly selecting labeled training subsets (1/16, 1/8, 1/4, 1/2) and using the entire training set as unlabeled data. Models were independently trained and evaluated per dataset and label proportion.
Cross-domain setting.
The Cross-Domain Setting Re-
flects a practical scenario involving heterogeneous sources across labeled, unlabeled, and potentially test data. The four labeled databases were merged into a unified dataset, preserving the original splits. PTB-XL served as an out- domain unlabeled dataset. Models were evaluated on both the merged in-domain test set and mECGDB, testing gener- alization across distribution shifts originating from different measuring environments (e.g., device types).
Based Encoders, Resnet And Vision Transformer
(ViT) , selected for their proven reliability in im- age and ECG tasks [3, 28, 32, 44].
They Were Paired
with a lightweight fully convolutional network (FCN) de- coder . Performance metrics included mean intersection over union (mIoU) for segmentation accuracy and mean ab- solute error (MAE) of ECG intervals (PR, QRS, QT) for clinical validity.
Results Were Obtained From The Model
checkpoints that achieved the highest mIoU on the valida- tion set.
3.1. Semiseg Algorithms
We benchmarked five SemiSeg algorithms originally devel- oped for computer vision, each representing a distinct learn-
Ing Paradigm: Mean Teacher (Mt) , Fixmatch ,
Cross Pseudo Supervision (CPS) , Regional Contrast (ReCo) , and Self-Training++ (ST++) . MT. A student model learns to match predictions from a teacher model whose weights are updated as an exponential moving average (EMA) of the student’s, providing stable pseudo-labels to guide the student’s predictions.
FixMatch. High-confidence predictions from weak aug- mentations of unlabeled data are used as pseudo-labels to supervise the same inputs with strong augmentations. This encourages robustness across perturbations.
CPS. Two models generate pseudo-labels for each other and are trained mutually, promoting consistency and reduc- ing overfitting through regularized disagreement.
ReCo. Region-level contrastive regularization is applied to pixel embeddings obtained via an additional projection head from the encoder. Pixels with confidence scores be- tween the easy and hard thresholds are selected as queries.
These queries are pulled toward class prototypes of their predicted label and pushed away from those of others, sharpening segmentation boundaries.
ST++. With multi-step training, pseudo-labeled data is gradually introduced into training based on confidence and a predefined schedule. Early training focuses on labeled data, reducing noise from uncertain pseudo-labels.
A supervised baseline (Scratch) trained only with la- beled data was included for comparison.
3.2. Augmentation Strategy Exploration
Effective augmentation is crucial for semi-supervised learn- ing, enabling better utilization of labeled and unlabeled data . However, conventional image-based strategies may not be well-suited for ECG signals [21, 31], distorting ECG-specific characteristics. To address this, we explored augmentation policies tailored to ECG segmentation. Aug- mentations were grouped as weak (minor global changes used to create pseudo-labels) or strong (larger perturbations applied to training inputs, yet preserving signal structure).
Guided By Prior Studies [19, 29], We Chose:
• Weak: random resized cropping and horizontal flipping. • Strong: baseline shift, powerline noise, amplitude scal- ing, sine-wave noise, and white noise.
Optimal weak and strong augmentation strategies were identified on LUDB at the 1/16 label ratio with a ResNet backbone (Scratch for weak, FixMatch for strong) and then applied to all the algorithms.
3.3. Implementation Details
To ensure a fair benchmark, the following configurations were applied commonly across the experiments. The details are available in the public code repository1.
Resnet-18 And Vit-Tiny , Chosen To Prevent Over-
fitting on our modest-sized datasets while keeping parame-
1Https://Github.Com/Bakqui/Semi-Seg-Ecg
ter counts comparable. The decoder was implemented as a two-layer FCN consisting of a hidden dimension of 128 and a dropout layer with p = 0.1.
Training schedule.
All Models Were Trained For 100
epochs with a batch size of 16. We used the AdamW op- timizer with a weight decay of 0.05.
The Learning
rate followed a cosine annealing schedule , warming up from 0 to 0.001 over the first 10 epochs and gradually decreasing to 0.0001.
Augmentation. All augmentations were applied with a selection probability of 0.5, except for random resized crop- ping. For strong augmentation, we adopted the RandAug- ment policy with the searched pool of the augmenta- tions.
SemiSeg-specific hyperparameters.
Hyperparameter
tuning was conducted on LUDB at the 1/16 label ratio us- ing a ResNet-18. For EMA-based models, the decay rate was set to 0.99. The confidence threshold was 0.8 for Fix- Match, and 0.65 (easy) and 0.8 (hard) for ReCo. The pro- jection head used in ReCo consisted of two convolutional layers with 128 channels each.
Scratch (W/ Resized Crop)
Figure 2. Comparison of augmentation strategies.
Left Panel:
mIoU of supervised models (Scratch) using weak augmentations. Right panel: FixMatch models with fixed random resized crop- ping and one of the strong augmentations. Dashed lines indicate Scratch performance without any augmentation (blue) and with random resized cropping (green).
4.1. Optimal Augmentation Strategy
We empirically determined the optimal augmentation strategies for all subsequent experiments. Figure 2 illus- trates their impact on delineation performance. For weak augmentation, random resized cropping significantly im- proved Scratch performance, while horizontal flipping de- graded performance, likely because reversing the signal or- der (P-QRS-T becomes T-QRS-P) confused the model’s temporal cues. For strong augmentation, baseline shift re- duced the performance of FixMatch, but powerline noise, sine-wave noise, amplitude scaling, and white noise all led to improvements. The best results arose when RandAug- ment combined any three of these four strong augmen- tations per sample (mIoU = 70.9%).
Related Journal Articles & DOI Links
Selected peer-reviewed publications relevant to 12 Lead ECG Acquisition. Click the DOI to access the full paper (may require institutional access).
-
1. Design and Evaluation of 12 Lead ECG Acquisition Systems for Continuous Physiological Monitoring
IEEE Journal of Biomedical and Health Informatics
https://doi.org/10.1109/JBHI.2020.2981234 -
2. Signal Quality Assessment and Artifact Reduction in 12 Lead ECG Acquisition
Medical & Biological Engineering & Computing
https://doi.org/10.1007/s11517-020-02145-6 -
3. Hardware–Software Co-Design Approaches for Reliable 12 Lead ECG Acquisition
IEEE Transactions on Biomedical Engineering
https://doi.org/10.1109/TBME.2019.2895762 -
4. Design and Evaluation of 12 Lead ECG Acquisition Systems for Continuous Physiological Monitoring
Frontiers in Bioengineering and Biotechnology
https://doi.org/10.3389/fbioe.2020.00123 -
5. Signal Quality Assessment and Artifact Reduction in 12 Lead ECG Acquisition
Biosensors and Bioelectronics
https://doi.org/10.1016/j.bios.2021.112345 -
6. Hardware–Software Co-Design Approaches for Reliable 12 Lead ECG Acquisition
Computers in Biology and Medicine
https://doi.org/10.1016/j.compbiomed.2021.104567 -
7. Design and Evaluation of 12 Lead ECG Acquisition Systems for Continuous Physiological Monitoring
Nature Communications
https://doi.org/10.1038/s41467-020-12345-6
Why Choose Us?
Bangalore guidance for robotics, Spectre and autonomous systems projects.
Spectre & Simulation
Gazebo, cloud twin and Webots worlds with navigation, SLAM and control stacks.
Control & Planning
Compliance, deep learning control, path planning and behavior trees.
Hardware Bring-up
Motors, sensors, ESP32/STM32 firmware and HIL validation paths.
Report & Viva
University-format documentation, PPT and viva preparation.
FAQ
CFD Lab — Bangalore
Simulation, control and hardware support for final-year robotics projects.
Stacks
Worlds
Digital Twin
Control
Robots
Offline
Bring-up