Giter VIP home page Giter VIP logo

Comments (15)

xliucs avatar xliucs commented on June 3, 2024 5

You guys can also refer to here about how to calcuate HR.

from mtts-can.

talhaanwarch avatar talhaanwarch commented on June 3, 2024 2

You can detect peaks from PPG and calculate HR from it. I have forked this repo and add heart rate functionality to it. Check here

from mtts-can.

farukcolak53 avatar farukcolak53 commented on June 3, 2024

You can detect peaks from PPG and calculate HR from it. I have forked this repo and add heart rate functionality to it. Check here

I examined your additions. I guess you're getting just one average heart rate value but what we need is frame level or second level heart rate values. Do you have any comment on this?

from mtts-can.

talhaanwarch avatar talhaanwarch commented on June 3, 2024

First its not feasible to get on frame level, and second I did not get what is meant by second level heart rate values.
The reason why frame level is not possible is that, even doctor wait for 30 seconds or 60 seconds to count pulse. Even If we try to capture heart rate via ECG, then we have to wait some seconds to capture enough R-R peaks.
The only solution is to capture frame by frame is that, first get some frame and display HR, then keep on adding frame and until the value of HR get stable. But still this is not frame by frame. But it displays the result of last x seconds on a particular frame. Hopefully I am clear.

from mtts-can.

farukcolak53 avatar farukcolak53 commented on June 3, 2024

Thanks for explanation. I think you are right about the frame level issue.

About "second level heart rate values", actually i meant getting heart rate value for every second because there are some real time rPPG applications. Therefore we thought that the prediction can be made for every second of the video.
The reason for asking that question was single heart rate value for a video doesn't meet our needs, we need a set of values.

Finally, we thought that we can convert the pulse predictions into heart rates by specifying a window size -such as 150 frames- and taking the mean of these values, after that shifting the window by some seconds. This solution gives a set of heart rate values.

from mtts-can.

talhaanwarch avatar talhaanwarch commented on June 3, 2024

Yes, sliding window is the option, i am working on it. I will update, once I implemented it

from mtts-can.

KIBASSA avatar KIBASSA commented on June 3, 2024

Hello,
Thank you very much for this HR calculation.
Do you have another link that shows how we can calculate HRV ?

from mtts-can.

rhaizer avatar rhaizer commented on June 3, 2024

You guys can also refer to here about how to calculate HR.

Hello, did you test this? I get really wrong results with it. Got 60 bpm when the ground truth is 110! Do we need to adjust inference preprocess to cut facial ROI?

from mtts-can.

xliucs avatar xliucs commented on June 3, 2024

@rhaizer , You need to check if the cropping is correct. You don't need to do a perfect facial cropping because the network has an attention layer, but you need to make sure the your frame contains your face.

from mtts-can.

rhaizer avatar rhaizer commented on June 3, 2024

@rhaizer , You need to check if the cropping is correct. You don't need to do a perfect facial cropping because the network has an attention layer, but you need to make sure the your frame contains your face.

Thanks for the quick response. Did you test this on your own webcam videos other than the datasets? How was the result? Even though I'm sure all the frames contains the face I get really bad results. Does it need certain frame count for the video or any random length video input is acceptable. Or maybe there are some errors on HR calculation. I will continue to try to make it work.

from mtts-can.

talhaanwarch avatar talhaanwarch commented on June 3, 2024

i am surprized that your results are so incorrect. i have tested this repo and results are not that bad. I created a streamlit app. Can you check this repo, it provide a colab notebook. You have to run that notebook, and it will create a url via ngrok. you can open that url in your mobile etc
https://github.com/talhaanwarch/streamlit-rPPG-app

from mtts-can.

rhaizer avatar rhaizer commented on June 3, 2024

i am surprized that your results are so incorrect. i have tested this repo and results are not that bad. I created a streamlit app. Can you check this repo, it provide a colab notebook. You have to run that notebook, and it will create a url via ngrok. you can open that url in your mobile etc https://github.com/talhaanwarch/streamlit-rPPG-app

I just tried it but got the following error:

talhaanwarch/streamlit-rPPG-app#1

from mtts-can.

italosalgado14 avatar italosalgado14 commented on June 3, 2024

I have the same problem of @rhaizer with the code of @talhaanwarch (https://github.com/talhaanwarch/MTTS-CAN) mentioned here: talhaanwarch/streamlit-rPPG-app#2 but all my videos gives an output but always so high heart rate (e.g. ground truth = 65, but inference = 120 app). I attach a couple of photos of this. My videos are UHD and 60 fps. Do you have any suggestions to solve the inferences. I thank you in advance.
GroundTruth-65:
GroundTruth-65
GroundTruth-120:
GroundTruth-120

from mtts-can.

KenTee920806 avatar KenTee920806 commented on June 3, 2024

Yes, sliding window is the option, i am working on it. I will update, once I implemented it

@talhaanwarch have you finished the implementation of sliding window?

from mtts-can.

xliucs avatar xliucs commented on June 3, 2024

Please move to https://github.com/ubicomplab/rPPG-Toolbox

We added support there.

Thanks!

from mtts-can.

Related Issues (20)

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.