BIOBSS: A biological signal processing and feature extraction library

İpek Karakuş
Codable
Published in
4 min readFeb 3, 2023
Photo by Rubaitul Azad on Unsplash

Github: https://github.com/obss/BIOBSS

What is BIOBSS used for?

Wearable sensors are becoming more and more popular these days, and with that, comes the need to process the signals these sensors collect. To help with this, several open-source tools and packages have been developed, and BIOBSS is a relatively new one among them, developed by OBSS R&D team.

BIOBSS is a signal processing and feature extraction library that can process electrocardiography (ECG), photoplethysmography (PPG), electrodermal activity (EDA), and 3-axis acceleration (ACC) signals. With BIOBSS, you can create end-to-end pipelines by adding the necessary processes from BIOBSS or other Python packages.

Here are the things you can do with BIOBSS:

  • Applying basic preprocessing steps (*)
  • Assessing the quality of PPG and ECG signals
  • Extracting features from ECG, PPG, EDA, and ACC signals
  • Performing Heart Rate Variability (HRV) analysis using PPG and ECG signals
  • Extracting respiratory signals from PPG or ECG signals and estimating respiratory rate (*)
  • Calculating activity indices from ACC signals
  • Creating and saving pipelines

(*): Not all methods were implemented from scratch but imported from existing packages

In simple words, BIOBSS is a tool that can help you have a deeper look and insight into the data your wearable sensor collects by processing and analyzing it.

What sets BIOBSS apart from similar packages?

BIOBSS has some functionalities that set it apart from its peers. Below, you can see a table that compares existing packages with BIOBSS and highlights its unique functionalities.

Modified from Föll, Simon, et al. “FLIRT: A feature generation toolkit for wearable data.” Computer Methods and Programs in Biomedicine 212 (2021): 106461.

Here are the key features that make BIOBSS stand out:

1) One of the biggest advantage of BIOBSS is its ability to create end-to-end pipelines for signal processing and feature extraction. This means, you can use the functions independently or string them together to create a custom pipeline that fits your specific needs. Other Python packages (e.g. Neurokit2) may have the option to splice functions together, but BIOBSS’s well-structured pipeline module makes it easy to define input/output signals and add processes. Additionally, BIOBSS’s pipeline module has the flexibility of incorporating processes from both BIOBSS’s own modules and other external Python packages that may better suit your needs.

A generic pipeline

2) With BIOBSS, you can extract commonly used features from ECG, PPG, EDA and ACC signals. To the best of our knowledge, BIOBSS is the only package to calculate PPG features. It also has modules for fiducial point detection and feature extraction of VPG (first derivative of PPG) and APG (second derivative of PPG) signals.

Types of features which can be calculated using BIOBSS

3) BIOBSS can calculate commonly used activity metrics from ACC signals by processing raw acceleration signals, properly, for each index. While other Python packages may calculate specific activity metrics, BIOBSS has the advantage of preprocessing the raw signal properly and returning multiple metrics calculated for various datasets (preprocessing alternatives) at one time.

Activity metrics which can be calculated using BIOBSS (Source: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0261718)

4) BIOBSS enables you to evaluate the quality of ECG and PPG signals by utilizing morphological filtering. You can apply rule-based steps and a template matching method either separately or together. While the signal quality assessment module requires further development, it is still a useful tool for those who want to understand the standards a high-quality signal should meet.

How to install and import BIOBSS?

You can install BIOBSS via pip:

pip install biobss

or build from source,

git clone https://github.com/obss/biobss.git
cd BIOBSS
python setup.py install

To import BIOBSS:

import biobss

How to use BIOBSS?

We created tutorial notebooks for specific signal processing and feature extraction scenarios. You can have a look at them and start using BIOBSS for your needs.

  • For tutorial notebooks :

https://github.com/obss/BIOBSS/tree/main/examples

To learn more about BIOBSS, you can also visit the official documentation page:

https://biobss.readthedocs.io/en/latest/

Final words

BIOBSS is a versatile package that can help you process signals from wearable sensors in a variety of ways. Whether you’re looking to extract features, create pipelines, or assess signal quality; BIOBSS has the tools you need to get the job done. It is important to note that, BIOBSS is still under development and we are working to improve existing functionalities and add new features to it.

Stay tuned!

Acknowledgement: Thanks to Devrim Çavuşoğlu and Cagatay Tasci for their valuable feedback.

--

--