ubicomplab / rPPG-Toolbox

rPPG-Toolbox: Deep Remote PPG Toolbox (NeurIPS 2023)
https://arxiv.org/abs/2210.00716
Other
442 stars 106 forks source link

raise ValueError( ValueError: array must not contain infs or NaNs #220

Closed hakansndkc5 closed 1 month ago

hakansndkc5 commented 10 months ago

Hey i hope you are doing well. When i use UBFC-rPPG_PURE_TSCAN_BASIC.yaml config file i get Value error as i mentioned in title bar. And also Pearson and SNR values does not appear, RMSE and MAE values comes same because of that error (i hope). Can you help me to fix it out? I leave screenshot of the output.

image

girishvn commented 10 months ago

Hi @hakansndkc5,

Thanks for bringing this up. This is an edge case we will address (soon). This is occurring because you are only evaluating on a single video sample.

1) RMSE and MAE are the same as you are only evaluating on a single video. Thus the average error is the same as the root mean square error.

2) Pearson is NaN, as the correlation is undefined for a single point

3) The Value Error, much like the above is occurring because you are only evaluating on a single sample.

Takeaways: The MAE / RMSE, represent the HR bpm error for your sample. The cases that error, are undefined for a single point. We will make a change soon, to account for this edge case.

Thanks, Girish

hakansndkc5 commented 10 months ago

Thanks for help! Waiting for your change. Take care.

girishvn commented 10 months ago

For the time being, while waiting for the fix I think you can do one of two things:

Either test w/ more than one sample, or comment out the code in evaluation/metrics.py that calculates/prints BA / and PEARSON values.

Best

hakansndkc5 commented 10 months ago

Thanks a lot! From now on i can see different values on RMSE and MAE but still waiting for your attempt. :)