Skip to content

ajaiantilal/ppg-vae

Repository files navigation

❤️ PPG-VAE: Photoplethysmography Variational Autoencoder (PyTorch)

DOI ReadMe Style

This project is a PyTorch port of the original Julia code presented in the paper:

"Advantages of Modeling Photoplethysmography (PPG) Signals using Variational Autoencoders" by Abhi Jaiantilal, John Jedziniak, Trent Yarosevich, presented at the 2024 46th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC).


📚 Paper Abstract

We use Variational Autoencoders (VAE) for PPG signal interpretation by decomposing a PPG wave into the wave and a linear slope.

Abstract: Abstract—Photoplethysmography (PPG) signal analysis is an emerging field of research and has been applied to a variety of tasks like disease detection and blood pressure monitoring, and the signal waveforms when properly deciphered continue to expose increasing levels of details about the physiology of a person. Variational Autoencoders (VAE) is a fundamental deep learning technique that is within the category of generative models in artificial intelligence. The transformative nature of VAEs enable a powerful approach of processing and interpreting PPG signals. In this paper, we propose a VAE model for PPG heart beats, called PPG-VAE, and discuss its advantages and sample applications. We show how this model can help identifying localized slope of a PPG Heart Beat (HB) Wave or pulse, removal of localized high frequency noise, and allows generating new signal segments matching existing signal segment morphology.


Model Overview

image

📈 Dataset Overview

Since the original data was proprietary in nature, this implementation utilizes the publicly available MIMIC PERform Training and Test Dataset.

  • Source: MIMIC PERform Training and Test Dataset
  • Processing: Data was extracted from 200 adult subjects, then segmented and filtered to ensure reasonable waveform quality. Data was collated together from both the training and test PERform datasets.
  • Normalization: Each unique waveform was normalized to a length of 64 and scaled between 0-1.
  • Size: The resulting dataset contains roughly 100,000 unique waveforms and saved as a .mat file.

✨ Key Features & Applications

The PPG-VAE model provides several powerful tools for analyzing PPG heart beats:

Feature Description Status
Slope Extraction Extracts the linear slope that characterizes the baseline wander present in PPG waves. This model allows you to see the extracted slope and the extracted wave; the actual observed wave is the sum of the slope and the wave. Included
Noise Reduction Reconstructs a noise-free version of the input waveform (corrupted) via the VAE's latent space representation. Included
Waveform Generation (Omitted in this port, but present in the paper) Allows for the construction of simulated wave segments that accurately match the morphology of an input segment. Omitted

Some Results (from the paper)

Present in this code:

image

Present in this code:

image

Absent in this code:

image

🛠️ Installation and Prerequisites

To run the PPG-VAE, you will need the following Python libraries.

Prerequisites

Ensure you have a modern version of Python installed (3.8+ recommended).

Installation

Clone the repository and install the required dependencies and then run the pytorch_PPGVAE_Model.ipynb notebook in jupyter:

# 1. Clone the repository
git clone https://github.com/ajaiantilal/ppg-vae.git
cd ppg-vae

# 2. Install Python packages
# [torch is system specific] so follow instructions here  https://pytorch.org/get-started/locally/
pip install torchinfo numpy matplotlib h5py tensorboard

Citation

If you find this useful, please cite as:

@article{Jaiantilal2024Advantages,
  title     = {Advantages of Modeling Photoplethysmography (PPG) Signals using Variational Autoencoders},
  author    = {Jaiantilal, Abhi and Jedziniak, John and Yarosevich, Trent},
  journal   = {Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC)},
  year      = {2024},
  volume    = {2024},
  pages     = {1--7},
  doi       = {10.1109/EMBC53108.2024.10782502},
  publisher = {IEEE},
}

About

PPG-VAE paper presented at EMBC 2024. Shows how to extract PPG waves and the slope

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published