Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Nov 11:13:1020458.
doi: 10.3389/fphys.2022.1020458. eCollection 2022.

vital_sqi: A Python package for physiological signal quality control

Affiliations

vital_sqi: A Python package for physiological signal quality control

Van-Khoa D Le et al. Front Physiol. .

Abstract

Electrocardiogram (ECG) and photoplethysmogram (PPG) are commonly used to determine the vital signs of heart rate, respiratory rate, and oxygen saturation in patient monitoring. In addition to simple observation of those summarized indexes, waveform signals can be analyzed to provide deeper insights into disease pathophysiology and support clinical decisions. Such data, generated from continuous patient monitoring from both conventional bedside and low-cost wearable monitors, are increasingly accessible. However, the recorded waveforms suffer from considerable noise and artifacts and, hence, are not necessarily used prior to certain quality control (QC) measures, especially by those with limited programming experience. Various signal quality indices (SQIs) have been proposed to indicate signal quality. To facilitate and harmonize a wider usage of SQIs in practice, we present a Python package, named vital_sqi, which provides a unified interface to the state-of-the-art SQIs for ECG and PPG signals. The vital_sqi package provides with seven different peak detectors and access to more than 70 SQIs by using different settings. The vital_sqi package is designed with pipelines and graphical user interfaces to enable users of various programming fluency to use the package. Multiple SQI extraction pipelines can take the PPG and ECG waveforms and generate a bespoke SQI table. As these SQI scores represent the signal features, they can be input in any quality classifier. The package provides functions to build simple rule-based decision systems for signal segment quality classification using user-defined SQI thresholds. An experiment with a carefully annotated PPG dataset suggests thresholds for relevant PPG SQIs.

Keywords: Python toolbox; continuous monitoring; electrocardiogram; open-source; photoplethysmogram; signal quality index; vital signs.

PubMed Disclaimer

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Figures

FIGURE 1
FIGURE 1
All core SQI functions are implemented in the SQI module. The pipeline module includes functions to load data, preprocess data, and define rules as shown in their respective modules. The pipeline module builds on top of the package to provide general flow from raw waveform to the final result.
FIGURE 2
FIGURE 2
vital_sqi filtering signal using different bandpass techniques on ECG upper and PPG lower.
FIGURE 3
FIGURE 3
ight-hand side figures illustrate the output of the entire segment when applying the smoothing window with ECG and PPG. The left-hand side indicates a clearer beat morphology of PPG when applying the tapering technique and smoothing windows.
FIGURE 4
FIGURE 4
Sample rule definition in the JSON format.
FIGURE 5
FIGURE 5
Annotation tool for PPG. The tool indicates multiple factors and the final classification label.
FIGURE 6
FIGURE 6
ample segment of the accepted and rejected groups (NG1 and NG2). The red dots indicate the peaks, detected by vitalsqi, while the green dots define the troughs.
FIGURE 7
FIGURE 7
Distribution of different SQI scores with respect to the normal and invalid groups.

References

    1. Akbilgic O., Butler L., Karabayir I., Chang P. P., Kitzman D. W., Alonso A., et al. (2021). ECG-AI: Electrocardiographic artificial intelligence model for prediction of heart failure. Eur. Heart J. Digit. Health 2, 626–634. 10.1093/ehjdh/ztab080 - DOI - PMC - PubMed
    1. Badawi A. A., Badr A., Elgazzar K. (2021). “Ecg real-time monitoring and heart anomaly detection reimagined,” in 2021 IEEE 7th World Forum on Internet of Things (WF-IoT), 326–331. 10.1109/WF-IoT51360.2021.9595639 - DOI
    1. Becker D. (2006). Fundamentals of electrocardiography interpretation. Anesth. Prog. 53, 53–63. quiz 64. 10.2344/0003-3006(2006)53[53:FOEI]2.0.CO;2 - DOI - PMC - PubMed
    1. Billauer E. (2009). peakdet: Peak detection using matlab. my tech blog Accessed: 2022-12-05.
    1. Elgendi M., Norton I., Brearley M., Abbott D., Schuurmans D. (2013). Systolic peak detection in acceleration photoplethysmograms measured from emergency responders in tropical conditions. PLoS ONE 8, 765855. 10.1371/journal.pone.0076585 - DOI - PMC - PubMed