Giter Club home page Giter Club logo

bounded-kalman-filter-method-for-motion-robust-non-contact-heart-rate-estimation's Introduction

Bounded Kalman filter method for motion-robust, non-contact heart rate estimation

Introduction

Rhythmic pulsating action of the heart causes blood volume changes all over the body. This pulsating action results in the generation of cardiac pulse, which can be tracked/observed in the skin, wrist, and fingertips. Photo- plethysmography (PPG) is an optic based plethysmography method, based on the principle that blood absorbs more light than surrounding tissue and hence, variations in blood volume affect transmission or reflectance correspondingly. Prior rPPG methods of pulse-rate measurement from face videos attain high accuracies under well controlled uniformly illuminated and motion-free situations, however, their performance degrades when illumination variations and subjects’ motions are involved.

Contribution

In this paper (A Bounded Kalman Filter Method for Motion-Robust, Non-Contact Heart Rate Estimation), a HR measurement method is presented that utilizes facial key-point data to overcome the challenges presented in real world settings as described earlier. In summary, our contributions are:

  1. The ability to identify motion blur and to dynamically (algorithmically) denoise blurred frames to enable frame to frame face capture
  2. The ability to enable motion estimation of feature points with higher accuracy in terms of range and speed
  3. The ability to accurately capture heart rate at distances up to 4ft

Compiling the script and Understanding the parameters

To run the heart rate estimator, please make sure that you are using only python 2.7 and not python 3 as the estimator relies on an open-source package called geompreds which is not available in python 3 and above. Make sure you have installed all required packages. Then using your terminal run "python Proposed Algorithm_Main Program.py -v (input video)", you can omit the video argument if using the camera.

If you plan on estimating heart rate for a video, please make sure to tweak the following paramaters to ensure that you are getting an accurate estimation.

  1. Frames per second (F.P.S) of the video, which can be tweaked in line 578 of the "Proposed Algorithm_Main Program.py" script. In case you are using your camera to estimate pulse rate, please set F.P.S. according to how many frames the program is able to sample in a second as opposed to using the camera's frame sampling rate.
  2. Moving window: In the paper, we set window size (line 579 in "Proposed Algorithm_Main Program.py") as 30 seconds for an accurate estimation with the window stride being 1 second (line 605 in "Proposed Algorithm_Main Program.py").
  3. Butter bandpass filter paramaters: Order, low-cut frequency and high-cut frequency (line 589-592 in "Proposed Algorithm_Main Program.py"). We find that the order parameter affects estimation accuracy and hence should be tuned according to the dataset.
  4. Real-time graph (optional): Please refer to the comments on the script "Proposed Algorithm_Main Program.py" for more details on which lines to uncomment in order to enable the real-time graph.
  5. Output pulse rate: By default, the output pulse rates are written to a text file titled "test.txt".

Citation

If you use any of the resources provided on this page in any of your publications we ask you to cite the following work.

Prakash, S. K. A., & Tucker, C. S. (2018). Bounded Kalman filter method for motion-robust, non-contact heart rate estimation. Biomedical Optics Express, 9(2), 873-897. DOI: 10.1364/BOE.9.000873.

bounded-kalman-filter-method-for-motion-robust-non-contact-heart-rate-estimation's People

Contributors

sakthikap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bounded-kalman-filter-method-for-motion-robust-non-contact-heart-rate-estimation's Issues

face detection is a little bit slow

Hi
I read your article but still I have some questions.
my first question is face detection is a little bit slow is there any way to improve its speed?
my second question is that sometimes it takes 2 o 3 minutes to show to BPM while there is no problem in face detection. so why its takes too long?
my third question is that is the BPM real time? or it has a dealy(eg 3 sec, 4 sec...)
my fourth question is even after 2-3 minutes the heart rate is not accurate. do you have any idea for this?

Regards,
Javad

I was trying to run the program but my geompreds module is not installing.

Collecting geompreds
Using cached geompreds-1.0.2.tar.gz (52 kB)
Building wheels for collected packages: geompreds
Building wheel for geompreds (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Dell\Anaconda3\envs\heartrate\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds\setup.py'"'"'; file='"'"'C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Dell\AppData\Local\Temp\pip-wheel-h8vfp33a'
cwd: C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds
Complete output (10 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\geompreds
copying src\geompreds_init_.py -> build\lib.win-amd64-3.8\geompreds
running build_ext
building 'geompreds._geompreds' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: Failed building wheel for geompreds
Running setup.py clean for geompreds
Failed to build geompreds
Installing collected packages: geompreds
Running setup.py install for geompreds ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Dell\Anaconda3\envs\heartrate\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds\setup.py'"'"'; file='"'"'C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Dell\AppData\Local\Temp\pip-record-bfwhegbl\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Dell\Anaconda3\envs\heartrate\Include\geompreds'
cwd: C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds
Complete output (10 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\geompreds
copying src\geompreds_init_.py -> build\lib.win-amd64-3.8\geompreds
running build_ext
building 'geompreds._geompreds' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Dell\Anaconda3\envs\heartrate\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds\setup.py'"'"'; file='"'"'C:\Users\Dell\AppData\Local\Temp\pip-install-g9_d10nu\geompreds\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Dell\AppData\Local\Temp\pip-record-bfwhegbl\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Dell\Anaconda3\envs\heartrate\Include\geompreds' Check the logs for full command output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.