Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquire saved values via inference.py #7

Open
raminicano opened this issue Nov 14, 2023 · 3 comments
Open

Inquire saved values via inference.py #7

raminicano opened this issue Nov 14, 2023 · 3 comments

Comments

@raminicano
Copy link

raminicano commented Nov 14, 2023

Hello, First of all, I would like to thank you for sharing your valuable knowledge and results.
I am a student to use the model implemented in your repository.
In the code implemented on inference.py , there are lines 68, 69

predict = np.nanmean(_, axis=0)
bvp = np.concatenate([bvp, predict])

Can you tell me what the bvp value obtained through this code means? When I read read.me , it's called the wave value, but I don't know because I'm not familiar with this domain.

Which code should I refer to if I want to extract and save my heart rate?
I'd appreciate your help.

@KegangWangCCNU
Copy link
Owner

Hello, if you have executed the code correctly, then you will obtain a CSV file containing BVP signals. You need to read this CSV and then use the get_hr function (found in utils.py) to calculate HR. Note that inference.py defaults to using 30fps, which may not perform well at other frame rates.

The model does not directly output HR, so you must call get_hr to obtain it.

@KegangWangCCNU
Copy link
Owner

Hello, forgive my late update.

inference.py has been updated; it now supports eight models: seq, tscan, deepphys, efficientphys, physnet, chrom, pos, and ica, and allows for specifying weights as well as visualizing waveforms.

It can now directly provide the heart rate without the need for additional processing.

Please read the readme to understand how to use it.

If you encounter any issues during use, feel free to send an email or submit an issue!

@raminicano
Copy link
Author

I just checked! I'm sorry I can't reflect that update because my study period is over, but thank you for your kind reply. Have a nice day! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants