phuselab / pyVHR

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

Inputting Folder with Images #21

Closed evanmy closed 3 years ago

evanmy commented 3 years ago

Hi,

Great package! I have tested the package on videos and works well. I was wondering if there is a built-in way to input a folder with images of each frame of the video? Thank you for your time.

Best, Evan

evanmy commented 3 years ago

I read source code, I believe I figure it out. I can just provide the path to the images and input the frame rate manually

from pyVHR.signals.video import Video
videoFilename = FOLDER_PATH
video = Video(videoFilename)
video.frameRate = 30
video.getCroppedFaces(detector='mtcnn', extractor='skvideo')
video.printVideoInfo()
video.showVideo()