phuselab / pyVHR

Python framework for Virtual Heart Rate
http://phuselab.di.unimi.it/
GNU General Public License v3.0
450 stars 127 forks source link

module 'pyVHR' has no attribute 'BVP' #62

Closed mbpictures closed 1 year ago

mbpictures commented 1 year ago

Hi!

First of all, thanks for this awesome repo!

I installed and activated the conda env like you mentioned in the readme and installed the pyvhr package inside of it. Running the GUI works like a charm, but when I create a notebook with the provided sample code for using the Pipeline, I'm getting this error:

AttributeError                            Traceback (most recent call last)
Cell In [22], line 12
      9 if not isfile(join(datadir, file)): continue
     11 pipe = Pipeline()
---> 12 time, BPM, uncertainty = pipe.run_on_video(join(datadir, file), roi_approach="patches", roi_method="faceparsing")
     14 plt.figure()
     15 plt.plot(time, BPM)

File B:\Projects\pyVHR\pyVHR\analysis\pipeline.py:67, in Pipeline.run_on_video(self, videoFileName, cuda, roi_method, roi_approach, method, bpm_type, pre_filt, post_filt, verb)
     64 assert os.path.isfile(videoFileName), "\nThe provided video file does not exists!"
     66 sig_processing = SignalProcessing()
---> 67 av_meths = getmembers(pyVHR.BVP.methods, isfunction)
     68 available_methods = [am[0] for am in av_meths]
     70 assert method in available_methods, "\nrPPG method not recognized!!"

AttributeError: module 'pyVHR' has no attribute 'BVP'

Do you have a fix for this?

giulianogrossi commented 1 year ago

A new version of the framework, pyVHR 2.0, has been released. Please check if problems persist and report them for future bug fixes.

best the pyVHR team