A package for processing signals recorded using wearable sensors, such as Electrocardiogram (ECG), Photoplethysmogram (PPG), Electrodermal activity (EDA) and 3-axis acceleration (ACC).
A package for processing signals recorded using wearable sensors, such as Electrocardiogram (ECG), Photoplethysmogram (PPG), Electrodermal activity (EDA) and 3-axis acceleration (ACC).
BIOBSS's main focus is to generate end-to-end pipelines by adding required processes from BIOBSS or other Python packages. Some preprocessing methods were not implemented from scratch but imported from the existing packages.
Main features:
(*): Not all methods were implemented from scratch but imported from existing packages.
The table shows the capabilites of BIOBSS and the other Python packages for physiological signal processing.
Functionality | BIOBSS | BioSPPy | HeartPy | HRV | hrv-analysis | pyHRV | pyPhysio | PySiology | Neurokit2 | FLIRT | |
---|---|---|---|---|---|---|---|---|---|---|---|
File reader | ✓ | ✓ | ✓ | ||||||||
Sliding window | ✓ | ✓ | ✓ | ||||||||
Preprocessing | ✓ | ✓ | ✓ | ✓ | |||||||
Pipeline | ✓(*) | ✓ | |||||||||
Processing | ECG | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
PPG | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
IBI / RRI | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
EDA | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
ACC | ✓ | ✓ | ✓ | ||||||||
Feature Extraction | ECG | ✓ | |||||||||
PPG | ✓ | ||||||||||
EDA | ✓ | ✓ | |||||||||
ACC | ✓ | ✓ |
(*): Pipeline module differs between the two packages. BIOBSS pipeline aims to provide a more flexible and customizable pipeline for the user.
Modified from Föll, Simon, et al. “FLIRT: A feature generation toolkit for wearable data.” Computer Methods and Programs in Biomedicine 212 (2021): 106461.
You can also read the blog post about BIOBSS.
BIOBSS has modules with basic signal preprocessing functionalities. These include:
BIOBSS has basic plotting modules specific to each signal type. Using the modules, the signals and peaks can be plotted using Matplotlib or Plotly packages.
Signal quality assessment steps listed below can be used with PPG and ECG signals.
Signal | Domain / Type | Features |
---|---|---|
ECG | Time | Morphological features related to fiducial point locations and amplitudes |
PPG | Time | Morphological features related to fiducial point locations and amplitudes, zero-crossing rate, signal to noise ratio |
Frequency | Amplitude and frequency of FFT peaks, signal power | |
Statistical | Mean, median, standard deviation, percentiles, mean absolute deviation, skewness, kurtosis, entropy | |
VPG | Time | Morphological features related to fiducial point locations and amplitudes |
APG | Time | Morphological features related to fiducial point locations and amplitudes |
ACC | Frequency | Mean, median, standard deviation, min, max, range, mean absolute deviation, median absolute deviation, interquartile range, skewness, kurtosis, energy, entropy of fft signal; fft-peak related features and signal power |
Statistical | Mean, median, standard deviation, min, max, range, mean absolute deviation, median absolute deviation, interquartile range, skewness, kurtosis, energy, momentum of ACC signals; peak related features | |
Correlation | Correlation of ACC signals of different axes | |
EDA | Time | Rms, acr length, integral, average power |
Frequency | FFT peak related features, energy, entropy of fft signal | |
Statistical | Mean, standard deviation, min, max, range, kurtosis, skewness, momentum | |
Hjorth | Activity, complexity, mobility |
Heart rate variability analysis can be performed with BIOBSS and the parameters given below can be calculated for PPG or ECG signals.
Domain | Parameters |
---|---|
Time-domain | mean_nni, sdnn, rmssd, sdsd, nni_50, pnni_50, nni_20, pnni_20, cvnni, cvsd, median_nni, range_nni mean_hr, min_hr, max_hr, std_hr, mad_nni, mcv_nni, iqr_nni |
Frequency-domain | vlf, lf, hf, lf_hf_ratio, total_power, lfnu, hfnu, lnLF, lnHF, vlf_peak, lf_peak, hf_peak |
Nonlinear | SD1, SD2, SD2_SD1, CSI, CVI, CSI_mofidied, ApEn, SampEn |
BIOBSS has functionality to calculate activity indices from 3-axis acceleration signals. These indices are:
Reference: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0261718
The preprocessing steps which should be applied on the raw acceleration differs for each of the activity indices listed above. In other words, each activity index can be calculated only from specific datasets. These datasets can be generated using BIOBSS both independently or as a part of activity index calculation pipeline.
The generated datasets are:
BIOBSS has modules to perform basic respiratory analyses. The functionalities are:
The main focus of BIOBSS is to generate and save pipelines for signal processing and feature extraction problems. Thus, it is aimed to :
To learn more, visit the Documentation page.
Through pip,
pip install biobss
or build from source,
git clone https://github.com/obss/biobss.git
cd BIOBSS
python setup.py install
Licensed under the MIT License.
If you have ideas for improving existing features or adding new features to BIOBSS, please contact us.