ubicomplab / rPPG-Toolbox

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

viz_preprocessed_data.ipynb——Visualization issue #299

Closed Dream999999 closed 2 months ago

Dream999999 commented 4 months ago

Hello, sorry to bother you. I recently encountered an issue while using the code in viz_preprocessed_data.ipynb for visualization. It seems that the setting for the value of N appears to be unreasonable. The function mentioned is supposed to generate data that meets the requirements for FFT input, so why is there a need to set N=30*fs? Could you explain the reasoning behind this setting? 屏幕截图 2024-07-17 103912

Dream999999 commented 4 months ago

Due to uncertainty about whether N has an impact, I tried two scenarios: one without commenting out N=30*fs and the other with it commented out, using N = _next_power_of_2(label_frame.shape[0]) instead. Additionally, I added code in the update_label_frame function to call the _calculate_fft_hr function from the post_process.py file. The waveforms generated in the two different scenarios are slightly different, but the calculated HR values are the same. In the first waveform, the peak does not correspond to the calculated HR value, while in the second case, it does correspond. May I ask if my calling method is correct? Here are my waveforms, with both scenarios indicated in the frequency domain as well. Thank you for your assistance.

屏幕截图 2024-07-17 110127 图片1 图片2