All research

Physiological signal processing · 2023–2024

Deep learning for non-invasive fetal ECG extraction

Deep learning methods that recover fetal ECG waveforms and heartbeat timing from abdominal recordings containing maternal ECG and noise.

Qatar National Research Fund NPRP 10-0123-170222 · Qatar University QUHI-CENG-22/23-548

Block diagram. Four abdominal maternal ECG channels and a reference fetal ECG are preprocessed and used to train a model. Test recordings pass through the same preprocessing and the trained model to predict fetal ECG.
Figure 1 from Rahman et al. (2023). Training and prediction pipeline for extracting fetal ECG from abdominal maternal recordings.View full-size figureSource article© 2023 Elsevier Ltd · author reuse

Approach

Can fetal ECG morphology and heartbeat timing be recovered from electrodes placed on the mother’s abdomen?

Fetal scalp electrodes provide a clear ECG, but they are invasive and can only be used around delivery. Abdominal electrodes are non-invasive, although the weak fetal signal overlaps with the stronger maternal ECG and noise. This project first used a deeply supervised segmentation network to extract fetal ECG, then used a 1D-CycleGAN to better preserve waveform morphology and estimate fetal heart measures.

  1. Record abdominal maternal ECG
  2. Reconstruct fetal ECG
  3. Evaluate waveforms and heartbeats

Extracting fetal ECG with deeply supervised LinkNet++

Engineering Applications of Artificial Intelligence · 2023

The study used two public datasets of four-channel abdominal ECG. Dataset 1 contains recordings from five women at 38 to 41 weeks of pregnancy, and Dataset 2a contains recordings from 12 women during labour, both with fetal scalp ECG as the reference. Dataset 2b adds recordings from 10 women with expert-marked fetal heartbeats.

LinkNet++ combines LinkNet’s residual encoder and feature addition with dense skip pathways and deep supervision. It was compared with U-Net, UNet variants and LinkNet using leave-one-subject-out validation. LinkNet++ gave the highest waveform correlation, improving on LinkNet by 3.56 points on Dataset 1 and 2.58 points on Dataset 2a.

Fetal QRS complexes detected from the extracted signal reached F1 scores above 99% on all three datasets. Heart rate from the extracted signal also correlated with the reference at more than 0.9.

Best waveform correlation (Dataset 2a)
87.60%
Best fetal QRS F1 score (Dataset 1)
99.6%
Women across the three datasets
27
LinkNet++ results from Tables 1 and 2 of Rahman et al. (2023). Dataset 2b has no continuous reference fetal ECG.
Waveform correlationMean absolute errorQRS precisionQRS sensitivityQRS F1
Dataset 185.58%0.06899.7%99.5%99.6%
Dataset 2a87.60%0.06199.5%99.3%99.4%
Dataset 2bNot availableNot available99.4%99.6%99.5%
LinkNet++ architecture with encoder and decoder levels joined by dense convolution blocks and deep supervision outputs, beside enlarged encoder and decoder blocks.
Figure 4 from Rahman et al. (2023). The LinkNet++ architecture.View full-size figureSource article© 2023 Elsevier Ltd · author reuse
Four pairs of plots, each with a ground-truth fetal ECG above the LinkNet++ prediction. Marked R-peaks in each prediction line up with the ground-truth peaks.
Figure 6 from Rahman et al. (2023). Reference and LinkNet++ fetal ECG with detected R-peaks for Dataset 1 (a, c) and Dataset 2a (b, d).View full-size figureSource article© 2023 Elsevier Ltd · author reuse
Bland–Altman plot and regression plot comparing heart rate from reference and extracted fetal ECG for Dataset 1. Most differences lie near zero and the points follow the regression line.
Figure 7a from Rahman et al. (2023), cropped to Dataset 1. Agreement between heart rate from extracted and reference fetal ECG.View full-size figureSource article© 2023 Elsevier Ltd · author reuse

Preserving fetal ECG morphology with 1D-CycleGAN

Expert Systems with Applications · 2024

The second study focused on the full waveform, including features such as P waves, ST segments and T waves. A 1D-CycleGAN learned to map four-channel maternal ECG to fetal ECG using the two PhysioNet datasets with scalp reference signals. Preprocessing included zero-lag filtering to avoid shifting the waveform.

A weighted loss added spectral, temporal and power terms to the adversarial loss, increasing waveform correlation by almost 10%. Among U-Net, ResNet and Self-FPN generators, a 13-block ResNet generator with a standard PatchGAN discriminator gave the best result. The full network has 0.762 million parameters.

Average waveform correlation
88.4%
Average spectral correlation
89.4%
ResNet blocks in the best generator
13
Five-fold results for the best model, from Table 2 of Basak et al. (2024) in its arXiv version. The final row gives the mean across folds.
Waveform correlationSpectral correlationRMSEMean absolute error
Fold 10.890.900.1060.069
Fold 20.880.880.1090.073
Fold 30.890.900.1030.068
Fold 40.890.900.1020.069
Fold 50.870.890.1150.077
Mean0.8840.8940.1070.071
Generator diagram with a four-channel input, one-dimensional convolution layers, residual blocks, transposed convolution layers and a single output.
Figure 8b from the arXiv version of Basak et al. (2024). The 1D-CycleGAN generator.View full-size figureSource articleCC BY 4.0
Two plots of fetal ECG over about 2,000 samples. The estimated signal closely follows the ground-truth beats and smaller waveform features.
Figure 9c from the arXiv version of Basak et al. (2024). Reference fetal ECG (top) and the extracted signal (bottom).View full-size figureSource articleCC BY 4.0

Measuring fetal heartbeats from the extracted signal

Expert Systems with Applications · 2024

Fetal QRS complexes were detected from the 1D-CycleGAN output with a tolerance of 31.25 ms. Mean heart rate and beat interval closely matched the reference, showing that the extracted signal preserved fetal timing. Short-term variation in heart rate was harder to reproduce.

Fetal QRS F1 score
96.4%
Fetal QRS precision
97.6%
Mean heart-rate error
0.25%
Average heart-rate measures across five folds, from Table 5 of Basak et al. (2024) in its arXiv version.
ReferenceExtractedError
Mean R-R interval473.19 ms474.46 ms0.27%
Mean heart rate128.52 bpm128.85 bpm0.25%
Heart-rate standard deviation14.14 bpm18.24 bpm29%
SDNN/RMSSD0.700.700.57%
pNN5040.45%41.39%2.32%
Reference and extracted fetal ECG plots with vertical markers showing R-peak locations aligned across both signals.
Figure 10a from the arXiv version of Basak et al. (2024). R-peaks detected from reference and extracted fetal ECG.View full-size figureSource articleCC BY 4.0

My contribution

For LinkNet++, I contributed substantially to the methodology, model development, experiments, analysis and validation, and manuscript writing and revision. For the 1D-CycleGAN study, I contributed to the deep learning methodology, model assessment, result analysis and interpretation, and manuscript review.

Study scope

Both studies used small public datasets from late pregnancy and labour, with limited variation in recording conditions. Scalp ECG and expert annotations provided the references. Validation across more participants, earlier gestation, different devices and fetal heart conditions is needed before clinical use.