KegangWangCCNU / PhysBench

Simple, fast, and fair evaluation of remote physiological sensing models
Other
80 stars 6 forks source link

Inquire saved values via inference.py #7

Open raminicano opened 10 months ago

raminicano commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 9 months ago

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! :)