Tiny-PPG: A Lightweight Deep Neural Network for Real-Time Detection of
  Motion Artifacts in Photoplethysmogram Signals on Edge Devices
Photoplethysmogram (PPG) signals are easily contaminated by motion artifacts
in real-world settings, despite their widespread use in Internet-of-Things
(IoT) based wearable and smart health devices for cardiovascular health
monitoring. This study proposed a lightweight deep neural network, called
Tiny-PPG, for accurate and real-time PPG artifact segmentation on IoT edge
devices. The model was trained and tested on a public dataset, PPG DaLiA, which
featured complex artifacts with diverse lengths and morphologies during various
daily activities of 15 subjects using a watch-type device (Empatica E4). The
model structure, training method and loss function were specifically designed
to balance detection accuracy and speed for real-time PPG artifact detection in
resource-constrained embedded devices. To optimize the model size and
capability in multi-scale feature representation, the model employed depth-wise
separable convolution and atrous spatial pyramid pooling modules, respectively.
Additionally, the contrastive loss was also utilized to further optimize the
feature embeddings. With additional model pruning, Tiny-PPG achieved
state-of-the-art detection accuracy of 87.4% while only having 19,726 model
parameters (0.15 megabytes), and was successfully deployed on an STM32 embedded
system for real-time PPG artifact detection. Therefore, this study provides an
effective solution for resource-constraint IoT smart health devices in PPG
artifact detection.
Yali Zheng, Chen Wu, Peizheng Cai, Zhiqiang Zhong, Hongda Huang, Yuqi Jiang
Tiny-PPG: A Lightweight Deep Neural Network for Real-Time Detection of Motion Artifacts in Photoplethysmogram Signals on Edge Devices

###### Abstract

Photoplethysmogram (PPG) signals are easily contaminated by motion artifacts in real-world settings, despite their widespread use in Internet-of-Things (IoT) based wearable and smart health devices for cardiovascular health monitoring. This study proposed a lightweight deep neural network, called Tiny-PPG, for accurate and real-time PPG artifact segmentation on IoT edge devices. The model was trained and tested on a public dataset, PPG DaLiA, which featured complex artifacts with diverse lengths and morphologies during various daily activities of 15 subjects using a watch-type device (Empatica E4). The model structure, training method and loss function were specifically designed to balance detection accuracy and speed for real-time PPG artifact detection in resource-constrained embedded devices. To optimize the model size and capability in multi-scale feature representation, the model employed deep separable convolution and atrous spatial pyramid pooling modules, respectively. Additionally, the contrastive loss was also utilized to further optimize the feature embeddings. With additional model pruning, Tiny-PPG achieved state-of-the-art detection accuracy of 87.8% while only having 19,726 model parameters (0.15 megabytes), and was successfully deployed on an STM32 embedded system for real-time PPG artifact detection. Therefore, this study provides an effective solution for resource-constraint IoT smart health devices in PPG artifact detection.

**Keywords**: Edge AI, IoT wearables, Photoplethysmogram, Motion artifacts

## 1 Introduction

Cardiovascular diseases have emerged as the leading cause of mortality in the modern society. With the advancement of sensing, electronic, and information technologies, smart wearable medical devices such as watches, glasses, and clothing have been proposed for the unobtrusive measurement of vital signs like electrocardiogram (ECG) or photoplethysmogram (PPG) [1] to monitor cardiovascular health. These devices are expected to be valuable in the prevention and precise diagnosis and treatment of cardiovascular diseases.

PPG is a simple, non-invasive, and cost-effective optical technique that measures blood volume changes in microvasculature and has been widely employed to estimate physiological parameters such as heart rate, blood pressure [2][3], oxygen saturation [4], and respiratory rate [5], etc. However, PPG signals are often interfered with by various noises, especially motion artifacts (MA) caused by relative movements between the sensor and skin. MAs are difficult to remove because they overlap with the signal frequency [6]. In most research, PPG artifacts are detected by dividing PPG signals into segments and classifying them into either clean or artifact categories [7][8]. However, pulse segmentation can be challenging in complex motion scenarios. Researchers have attempted to assess signal quality by extracting hand-crafted features such as pulse width, amplitude, and slope in a sliding window [9][10].

In recent years, deep learning methods have been increasingly employed in the analysis of various