Synthesizing Electrocardiogram (ECG) from Photoplethysmogram(PPG) using Generative Adversarial Networks

A normal ECG wave depicting the P wave, QRS complex, and T wave
A typical ECG and PPG curve representation
A CycleGAN structure with generators and dual discriminators
  1. Dataset collection and Preparation:
  • Four datasets were used for this purpose namely BIDMC, CAPNO, DALIA, and WESAD. All the ECG-PPG data were combined to form a large multi-corpus.
  • Each of these datasets had a different number of attributes, patient information and variable sampling, and recording lengths.
  • All the combined corpus of data was resampled using an interpolation technique where the sampling rate for all ECG-PPG records became 128 Hz.
  • As a next step, a bandpass FIR-filter, as well as Butter worth filter, were applied to the PPG signals.
  • Then, Z-score normalization was performed on both the ECG and PPG data.
  • This normalized data is split into intervals of 4 seconds each with some degree of overlapping to avoid losing any data.
  • Finally, a min-max normalization was applied to ensure that the input being to the network all lie within the same range.
The architecture of Proposed CardioGAN
  • As a generator, an Attention-based U-Net was used with self-gated soft attention in usage to filter those features that pass through skip connections.
  • Dual discriminators were used to classifying the time and frequency components of a PPG signal correctly from the fake data.
  • CardioGAN was then trained in an unpaired fashion where ECG and PPG signals were shuffled and were given as input to the network with a batch size of 128.
  • With adam optimizer in action, the model has shown improvement with increased batch size and training time.
  • CardioGAN produced generated ECG and generated PPG signals as the main outputs.
  • Considering our end goal to generate the best ECG signal from the PPG signal, qualitative and quantitative results have been analyzed to put forward a conclusion.
  • It was understood that the Heart rate measure from generated output was more precise than the original ECG signal itself.
  • CardioGAN was able to generate the shape of the original ECG signal from a given PPG signal.
Sample outputs the CardioGAN network structure

--

--

--

Student at San Jose State University

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Quantum Generative Adversarial Networks

Sentence correction using Deep learning techniques

Speech Synthesis using GANs

Betting with a Model

How does a Machine actually learn, is there a hidden human inside telling it what to do?

Recurrent Neural Networks: Part 5

Real-time face recognition: training and deploying on Android using Tensorflow lite — transfer…

Dog Breed Classifier. Using Transfer Learning in CNN

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
sruthi chilukuri

sruthi chilukuri

Student at San Jose State University

More from Medium

Secret Society: Light Up, it’s 4/20!

Virtual Field Trip

Jamonswap. The future has already arrived

Understanding the world of NFTs with BlockBar founders Dov and Sam Falic