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

Loading RPPG Transformer in pyVHR 2.0 #95

Open
shamussim-ai opened this issue Jul 5, 2024 · 0 comments
Open

Loading RPPG Transformer in pyVHR 2.0 #95

shamussim-ai opened this issue Jul 5, 2024 · 0 comments

Comments

@shamussim-ai
Copy link

Hi. I am struggling to load the RPPG transformer model in the pyVHR_demo_deep.ipynb notebook. I managed to run the notebook successfully until the rppg model. MTTS-CAN and HR CNN worked fine for me.

My setup:
NVIDIA V100
pyvhr 2.0
Python 3.9.7
Setup the package following the instructions for pyvhr GPU. Including git clone

Code

patch_bvps = np.array(patch_bvps)
bvp_pred = vhr.deepRPPG.RPPG_TRANSFORMER_bvp_pred(patch_bvps[:,0:104,:])

Error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[65], [line 2](vscode-notebook-cell:?execution_count=65&line=2)
      [1](vscode-notebook-cell:?execution_count=65&line=1) patch_bvps = np.array(patch_bvps)
----> [2](vscode-notebook-cell:?execution_count=65&line=2) bvp_pred = vhr.deepRPPG.RPPG_TRANSFORMER_bvp_pred(patch_bvps[:,0:104,:])

AttributeError: module 'pyVHR.deepRPPG' has no attribute 'RPPG_TRANSFORMER_bvp_pred'

Some additional debugging steps

import pyVHR.deepRPPG as deepRPPG

print(dir(deepRPPG))

Returns
['Attention_mask', 'DataLoader', 'FaceHRNet09V4ELU', 'HR_CNN', 'HR_CNN_bvp_pred', 'MTTS_CAN', 'MTTS_CAN_deep', 'OrderedDict', 'PulseDataset', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'butter', 'butter_bandpass_filter', 'cv2', 'detrend', 'h5py', 'hr_cnn', 'img_as_float', 'mtts_can', 'np', 'os', 'preprocess_raw_video', 'pyVHR', 'requests', 'scipy', 'spdiags', 'tf', 'time', 'torch', 'transforms']

As u can see RPPG_TRANSFORMER_bvp_pred is not listed in this directory. So I am wondering if this issue has to do with the installation and setup of pyvhr 2.0?

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

1 participant