SMART-BP: Sem-Resnet and Auto-Regressor Based on a Two-Stage Framework for Noninvasive Blood Pressure Measurement
We used public MIMIC-III and CAS-BP dataset and our collected private Mindray dataset in this study.
- Python==2.7
- Pytorch==0.4.1
- CUDA==9.0
- Scikit-learn==0.23.2
- Numpy==1.16.5
- Imbalanced-learn==1.7.0
- Scipy==1.3.1
- Pandas==0.23.4
- Matplotlib==3.3.2
To add new dataset (e.g., NewData), it should be placed in a folder named: NewData in the datasets directory.
Since "NewData" has several domains, each domain should be split into train/test splits with naming style as "train_i_x.pt" and "test_i_x.pt" for each i-th fold.
The structure of data files should in dictionary form as follows:
train.pt = {"samples": data, "labels: labels}
, and similarly for test.pt
.
Next, you have to add a class with the name NewData in the configs/data_model_configs.py
file.
You can find similar parameter settings for existing datasets as guidelines.
Also, you have to specify the cross-domain scenarios in self.scenarios
variable.
Last, you have to add another class with the name NewData in the configs/hparams.py
file to specify
the training parameters.
- To add a new Regressor, place it in
algorithms/algorithms.py
file. - To add a new Architecture, place it in
models/arch.py
file.
The experiments are organised in a hierarchical way such that:
- Several filters are collected under one directory assigned by
--filters
. - Several segmentation methods are collected under one directory assigned by
--segments
. - Several feature extraction methods are collected under one directory assigned by
--feat_extrat
. - Several visualization methods are collected under one directory assigned by
--visualization
.
For BP interval classification:
python trainers/train.py --experiment_description cls \
--run_description run_1 \
--da_method SEM-ResNet \
--dataset MIMIC \
--backbone resnet \
--num_runs 200 \
--mode train
For BP values estimation:
python trainers/train.py --experiment_description reg \
--run_description run_2 \
--da_method AutoML \
--dataset MIMIC \
--backbone XGBoost \
--mode train
python cascade.py
import os
from PIL import Image
def view_images_in_folder(folder_path):
# Get a list of all files in the folder
file_list = os.listdir(folder_path)
# Iterate over the files
for filename in file_list:
# Check if the file is an image (supports more formats than just .jpg)
if filename.endswith(".jpg") or filename.endswith(".png") or filename.endswith(".jpeg"):
# Construct the full file path
file_path = os.path.join(folder_path, filename)
try:
# Open and display the image using Pillow
img = Image.open(file_path)
img.show()
except Exception as e:
print(f"Error opening {file_path}: {e}")
# Provide the folder path to view the images
folder_path = "./misc"
view_images_in_folder(folder_path)
If you found this work useful for you, please consider citing it.
@article{SMART-BP,
title = {SMART-BP: Sem-Resnet and Auto-Regressor Based on a Two-Stage Framework for Noninvasive Blood Pressure Measurement},
author = {Chenbin Ma, Yangyang Sun, Peng Zhang, Fan Song, Youdan Feng, Yufang He, GuangLei Zhang},
journal = {####},
year = {2023}
}
For any issues/questions regarding the paper or reproducing the results, please contact any of the following.
Chenbin Ma: machenbin@buaa.edu.cn
Department of Biomedical Engineering, Beihang University, 37 Xueyuan Road, Beijing, 100853