Open RA-DM opened 1 year ago
You can using pipeline like pyVHR_run_on_video.ipynb
#### TEST holistic approach
from pyVHR.analysis.pipeline import Pipeline
# params
videoFileName = "video.avi" # your video path
roi_approach = 'holistic' # 'holistic' or 'patches'
bpm_est = 'median' # BPM final estimate, if patches choose 'medians' or 'clustering'
method = 'cpu_CHROM' # one of the methods implemented in pyVHR
pipe = Pipeline() # object to execute the pipeline
# run
bvps, timesES, bpmES = pipe.run_on_video(videoFileName,
winsize=8,
roi_method='convexhull',
roi_approach=roi_approach,
method=method,
estimate=bpm_est,
patch_size=40,
RGB_LOW_HIGH_TH=(5,230),
Skin_LOW_HIGH_TH=(5,230),
pre_filt=True,
post_filt=True,
cuda=False,
verb=True
)
It seems that the code in https://github.com/phuselab/pyVHR/issues/13 can't work now, is there any other way to get bpm from a random video? Does the run_on_video function in readme.md take effect in a random video?