Closed dalaoplan closed 10 months ago
Hi, could you provide which line raises the error? I remember this issue has been fixed in the latest commit. You can try to run the latest commit to see if the issue still happens.
@zhaodongsun I made a mistake. The error was reported when running test.py, and the code causing the error is in test.py as follows:
60 bvp = f['bvp']
In my opinion, it is because when using processing.py
to preprocess the generated .h
file, the bvp data is not generated. Is there something missing from this processing.py
?
For train.py
, bvp is not needed. For test.py
, bvp is needed for performance evaluation.
processing.py
only stores face images into .h5
files. For bvp, you should manually store it into .h5
files. Please check readme for more details about .h5
files and test procedures.
@zhaodongsun Thank you for your reply. I made some modifications based on your tips and visualized the results. You can see from the figure that the results are very significant. But I found that there is no calculation of evaluation indicators in test.py
, and I am not very clear about this calculation. Could you please give me a specific calculation method or code? May your academic life be everlasting!
Hi, I assume you already get the saved .npy
files from test.py
. The .npy
files contain 30-sec rPPG signals and GT bvp signals. You can filter the rPPG signals by butter_bandpass
function with lowcut=0.6 and highcut=4 and get rPPG heart rates by hr_fft
function in utils_sig.py
. To get the ground truth heart rates, you should first filter ground truth PPG signals by butter_bandpass
function with lowcut=0.6 and highcut=4 and get ground truth heart rates by hr_fft
function. Then you can calculate the mean absolute errors (MAE) or RMSE between the GT and rPPG heart rates.
42.h5-49.h5
as the test set in UBFC and got the following results. This result seems to be better than the results in the paper. Why is this? Can you provide the preprocessing code for training in other data sets such as PURE and OBF?Thanks again for your reply! ! !MAE: 0.25000000000000355 RMSE: 0.5000000000000071 R: 0.9988727094555139
Hi, UBFC is a simple dataset, so your results can be better due to randomness. The preprocessing to get .h5
is the same for all the datasets. You just need to define your train and test split in line 55 of train.py
. When you use a new dataset, please check the TODO
in the train.py
and utils_data.py
for possible modification.
@zhaodongsun Thank you very much for your reply. I will continue to conduct experiments according to your prompts and read your paper carefully. Your reply is of great help to me. Thank you again. I wish you a happy life and academic longevity.
@zhaodongsun Thank you for your reply. I have used
42.h5-49.h5
as the test set in UBFC and got the following results. This result seems to be better than the results in the paper. Why is this? Can you provide the preprocessing code for training in other data sets such as PURE and OBF?Thanks again for your reply! ! !MAE: 0.25000000000000355 RMSE: 0.5000000000000071 R: 0.9988727094555139
Hello, I'm sorry to bother you, could you please provide the code for calculating heart rate and drawing rppg waveform? There are some problems in the output results of my own code, I would like to refer to yours, I promise it will only be used for scientific research, thank you very much.
Hello, I'm reproducing the code and encountered an error when running train.py. The error indicates that there is no bvp data in the preprocessed.h5 file. Can you provide a method or example for handling this?