Giter Site home page Giter Site logo

phuselab / pyvhr Goto Github PK

View Code? Open in Web Editor NEW
434.0 16.0 124.0 187.13 MB

Python framework for Virtual Heart Rate

Home Page: http://phuselab.di.unimi.it/

License: GNU General Public License v3.0

Jupyter Notebook 31.23% Python 0.76% C 0.01% C++ 0.02% Cuda 0.04% HTML 67.96%
ppg heart-rate vhr biometrics python

pyvhr's People

Contributors

aledamelio avatar arritmic avatar freaisdead avatar giulianogrossi avatar keasys avatar marcodallaba avatar vcuculo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyvhr's Issues

pyVHR==0.3 is required

Hello,

I have installed pyvhr as explained in the README file, but I am having the next error:

Installed /home/arritmic/anaconda3/envs/myenv/lib/python3.8/site-packages/pyVHR-0.0.1-py3.8.egg
Processing dependencies for pyVHR==0.0.1
error: pyVHR 0.0.1 is installed but pyVHR==0.3 is required by {'pyVHR'}

Screenshot from 2020-11-23 15-19-18

Screenshot from 2020-11-23 15-19-04

I was wondering if you should change the version of pyVHR in requirements file or it is something I am not taking into account...

Thanks.
A

installation error

iam use python 3.6 on anaconda jupyter on w10 and i have error when install step

the error is
error1
error2
can any help

AttributeError: 'Video' object has no attribute 'time_vid_start'

I am running on windows 10, python 3.8 and getting this error with basic demo file

AttributeError                            Traceback (most recent call last)
<ipython-input-8-d1815841500d> in <module>
     15 #       4 - display errors
     16 #       (use also combinations, e.g. verb=21, verb=321)
---> 17 result = test.start(outFilename='sampleExp.h5', verb=1)

D:\rPPG\paper rppg\pyVHR-master\pyenv\lib\site-packages\pyvhr-0.0.3-py3.8.egg\pyVHR\analysis\testsuite.py in start(self, saveResults, outFilename, verb)
     61                 videoFilename = dataset.getVideoFilename(v)
     62                 video = Video(videoFilename, verb)
---> 63                 video.getCroppedFaces(detector=self.videodict['detector'],
     64                                       extractor=self.videodict['extractor'])
     65                 etime = float(self.videodict['endTime'])

D:\rPPG\paper rppg\pyVHR-master\pyenv\lib\site-packages\pyvhr-0.0.3-py3.8.egg\pyVHR\signals\video.py in getCroppedFaces(self, detector, extractor)
    107             # -- extract faces and resize
    108             print('\n\n' + detector + '\n\n')
--> 109             self.__extractFace(video, method=detector)
    110 
    111             # -- store cropped faces on disk

D:\rPPG\paper rppg\pyVHR-master\pyenv\lib\site-packages\pyvhr-0.0.3-py3.8.egg\pyVHR\signals\video.py in __extractFace(self, video, method, t_downsample_rate)
    541                 new_time_vid_start = skipped_frames / self.frameRate
    542 
--> 543                 if new_time_vid_start > self.time_vid_start:
    544                     self.time_vid_start = new_time_vid_start
    545                     print("\tVideo now starts at " + str(self.time_vid_start) + " seconds\n")

AttributeError: 'Video' object has no attribute 'time_vid_start'

Unable to install properly

pip install pybdf throws error 'no module named numpy' even though i have numpy
Same error was coming for scikit-image, but simply removing the version requirement did the job there. The same doesn't happen for pybdf. Any suggestions?

Bypassing Face Detection for precropped skin videos?

First things first, I really appreciate on the work on open and easily avalible rPPG methods.

One thing that I have wondered is, for my specific usecase i will need the skin region that I have manually cropped (squared video of manually cropped skins, no background), I really wondered if there is anyways to skip either face region selection part, Or selecting entire video as a region. That would really help simplifies things a lot.

Kind regards.

getErrors() missing 2 required positional arguments: 'timesES' and 'timesGT'

On running the start() method of the MultiMethodSuite class I noticed that the getErrors() function does not take the bvps and fps variables:

RMSE, MAE, MAX, PCC, CCC = getErrors(median_bpmES, bpmGT, timesES, timesGT)

Like was done in run_on_dataset() in the Pipeline class here:
RMSE, MAE, MAX, PCC, CCC, SNR = getErrors(bvps, fps,
np.expand_dims(median_bpmES, axis=0), bpmGT, timesES, timesGT)

This is why the above error occurs.

Cannot find elementwisekernel in cupy

Hi everyone, after i try installing the same environment according to your env on the repo I try to run import Pipeline but i faced with the error:

Aattributeerror: module 'cupy' has no attribute 'elementwisekernel'

I try multiple ways to reinstall cupy through conda and pip but fail to overcome the issue. It seems that cupy 9.6 just doesn't have elementwisekernel.

What is going on here.

Signal Windowing

Hello,
First, thank you for this amazing pipeline that you have provided. I would have just one doubt regarding the windowing of the signal (splitting them into overlapping windows), as to why this is done. As I understand, it should be possible to generate one single BVP signal and then this can be processed to get the required metrics. Is there a more obvious reason that I am missing that you opt to first segment the signal and then process it.
Hoping to hear from you. :)

Issues create custom data pipeline

I am trying to feed my own videos/groundtruth into this pipeline and I cannot figure out what isn't working.

I created a dataset like this:

    Sample dataset structure:
    -----------------
        SAMPLE/
        |    |-- PARTNERDIR
        |        |-- videoSample.mp4
        |        |-- signalGT.csv
        |    ...

Here is my custom dataset file, named 'sample.py':

import csv
import numpy as np
import pandas as pd
from pyVHR.datasets.dataset import Dataset
from pyVHR.signals.bvp import BVPsignal

class SAMPLE(Dataset):
    """
    Sample dataset structure:
    -----------------
        SAMPLE/
        |    |-- PARTNERDIR
        |        |-- videoSample.mp4
        |        |-- signalGT.csv
        |    ...
    """
    name = 'SAMPLE'
    videodataDIR = '../sampledata/'  # path relative to notebook dir in pyVHR filesystem on GitHub
    BVPdataDIR = '../sampledata/'    # path relative to notebook dir in pyVHR filesystem on GitHub
    signalGT = 'BVP'          # GT signal type
    numLevels = 1             # depth of the filesystem collecting video and BVP files
    numSubjects = 1          # number of subjects
    video_EXT = 'mp4'         # extension of the video files
    frameRate = 25            # vieo frame rate
    VIDEO_SUBSTRING = 'cv_camera' # substring contained in the filename
    SIG_EXT = 'csv'           # extension of the BVP files
    SIG_SUBSTRING = ''      # substring contained in the filename
    SIG_SampleRate = 2000       # sample rate of the BVP files
    
    def readSigfile(self, filename):
        """ Load BVP signal.
            Must return a 1-dim (row array) signal
        """
        gtTime = []
        gtHR = []
        df = pd.read_csv(filename, sep='\t')
        df = df.dropna()

        cols = []
        cols_ = []
        count = 0
        cols
        for i in df.columns:
            if 'bpm' in i.lower():
                cols.append(i)
        if len(cols) > 2:
            for j in cols:
                    if 'ppg' in j.lower():
                        cols_.append(j)
            cols = cols_
        df = df[cols]
        gtHR = df[0]
        gtTime = df["b'time (s)'"]
                  
        time = np.array(gtTime)
        hr = np.array(gtHR)
        self.SIG_SampleRate = np.round(1/np.mean(np.diff(time)))

        '''import matplotlib.pyplot as plt
        plt.plot(hr)
        plt.show()'''

        return BVPsignal(data, self.SIG_SampleRate)

Here is the config file for it, named sample.cfg:

# default_test.cfg - default test configuration file for TestSuite class

## Default parameters
#
#  winsize   = Duration of the time window to process the video (in seconds)
#  winsizeGT = Duration of the time window to process the ground truth signal (in seconds)
#  timeStep  = Time step of the estimation (in seconds)
#  methods   = A list of methods to test (['CHROM','Green','ICA','LGI','PBV','PCA','POS','SSR'])
#
## Video signal Preprocessing
#
#  zeroMeanSTDnorm = Apply Zero Mean and Unit Standard Deviation (0/1)
#  detrending      = Apply detrenting algorithm (0/1)
#  detrMethod      = Detrenting algorithm (tarvainen/scipy)
#  detLambda       = If detrending = 1, regularization parameter of detrending algorithm
#  BPfilter        = Apply band pass filtering (0/1)
#  minHz           = If BPfilter = 1, the lower cut-off frequency (in hertz)
#  maxHz           = If BPfilter = 1, the upper cut-off frequency (in hertz)

[DEFAULT]
winSize         = 5
winSizeGT       = 5
timeStep        = 1
methods         = ['POS','CHROM']
zeroMeanSTDnorm = 0
detrending      = 0
detLambda       = 10
BPfilter        = 1
minHz           = 0.75
maxHz           = 4.0

## Video signal
#
#  dataset      = Name of the dataset to test ('PURE', 'UBFC1', 'UBFC2', 'LGI-PPGI', 'COHFACE', 'MAHNOB')
#  videoIdx     = A list of IDs reffered to the videos to test (eg. [0,1,2,...]) 
#                 or the string 'all' to test on the whole database
#  detector     = Method used for face detection (mtcnn, dlib, mtcnn_kalman)
#  extractor    = Preferred library to read video files (opencv/skvideo)
#  startTime    = Process video file from  start time (in seconds)
#  endTime      = Process video file until end time (in seconds). If < 0: process until (video length - endTime) 

[VIDEO]
dataset     = SAMPLE
videodataDIR= ../SAMPLE/
BVPdataDIR  = ../SAMPLE/
videoIdx    = [0]
detector    = mtcnn
extractor   = skvideo
startTime   = 3
endTime     = -3
ROImask = skin_fix
skinFix   = [40, 60]
skinAdapt = 0.2
rectCoords= [[0, 0, 150, 150]]
evm = 0
stat = mean

## Method specific configurations

[CHROM]
zeroMeanSTDnorm = 0
detrending      = 1
detrMethod      = scipy
BPfilter        = 0

[POS]
zeroMeanSTDnorm = 0
detrending      = 0
BPfilter        = 0

When I try to create my dataset with this code:

# -- dataset object
dataset = datasetFactory("SAMPLE", videodataDIR='../SAMPLE', BVPdataDIR='../SAMPLE')

I get this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~/connor_asi/rppg_tests/pyVHR/pyVHR/datasets/dataset.py in datasetFactory(datasetName, videodataDIR, BVPdataDIR)
     10         datasetModule = import_module('pyVHR.datasets.' + moduleName) #, package='pyVHR')
---> 11         classOBJ = getattr(datasetModule, className)
     12         #obj = classOBJ(*args, **kwargs)

AttributeError: module 'pyVHR.datasets.sample' has no attribute 'SAMPLE'

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-223-01cfb362e158> in <module>
      1 # -- dataset object
----> 3 dataset = datasetFactory("SAMPLE", videodataDIR='../SAMPLE', BVPdataDIR='../SAMPLE')
      4 
      5 # -- videos filenames of the dataset

~/connor_asi/rppg_tests/pyVHR/pyVHR/datasets/dataset.py in datasetFactory(datasetName, videodataDIR, BVPdataDIR)
     14 
     15     except (AttributeError, ModuleNotFoundError):
---> 16         raise ImportError('{} is not part of pyVHR dataset collection!'.format(datasetName))
     17 
     18     return obj

ImportError: SAMPLE is not part of pyVHR dataset collection!

Any ideas what is going wrong? I can't find any other places I need to instantiate my custom data and I believe I've followed your examples precisely.

Thank you!

Basic demo Files (Ground truth values )

hello sir need a little help regarding
Do we need the ground truth values for notebook (basic demo and factory demo ) files if yes from where we can get it i.e. from where we can get the BVP files for BVPdateDIR ? and what about the other datasets like LGI_PPGI etc do they have the ground truth files ie its bvp and ecg files or we have to create by ourselves
Another question the IDI files containing some Videos' s what about other (xml) files they have like
cms50_stream_handler
andc
v_camera_sensor_timer_stream_handler
they are having the BVP or BPM and time values ?

Logical bug in VHRroutine

Hi, we want to cite this project so we research it.
But we found there may be a logical bug in the ./pyVHR/realtime/VHRroutine.py.
The block of if-statement, line 192.
The counting method will count one more frame to the sig_stride (fps)?
So the number of the windows will be not correct.

Can I get HRV from this repo ?

This repo is amazing
It helped me a lot
I read its code and was able to get HR(bpm)
But can I get HRV?
Can I get R peaks or RR intervals?
Should I start from the BVP list?
Do you have any suggestions?
I can contribute to this project.

Inputting Folder with Images

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

Estimated HR output length is not match with its actual input

Hello, I use this project for measuring HR from video input.

I recorded a video with my camera (1920x1080 video, 30FPS) and get rPPG by using the pyVHR GUI kit(GUI.py) with the CHROM method.

But its output length is not matched its actual input

For example, If I input a 1261-sec video then I got only 1214-sec of HR for results. (It should be 1256-sec)
And If Input 316-sec video the results are only 299-sec. (It should be 311-sec)

I tried many different cases and figured out that this tendency follows a linear function.
So, it must be a problem with repeatable functions in this project.
With this assumption, me and my colleague tracking it now to solve this problem.

We'll fix it ASAP but if anyone has some advice to fix it, please give us help. ๐Ÿ‘

+We tried with 900-sec 25FPS video(counted frame, 22,500 exactly), but still not matched correctly.

list index out of range in while executing rPPG method(part)

cfgFilename = '/Users/rupakkatwal/Downloads/pyVHR-master/pyVHR/analysis/sample.cfg'
test = TestSuite(configFilename=cfgFilename)
result = test.start(outFilename='sampleExp.h5', verb=4)

IndexError Traceback (most recent call last)
in
1 cfgFilename = '/Users/rupakkatwal/Downloads/pyVHR-master/pyVHR/analysis/sample.cfg'
2 test = TestSuite(configFilename=cfgFilename)
----> 3 result = test.start(outFilename='sampleExp.h5', verb=4)

~/opt/anaconda3/lib/python3.8/site-packages/pyVHR/analysis/testsuite.py in start(self, saveResults, outFilename, verb)
58
59 # -- video object
---> 60 videoFilename = dataset.getVideoFilename(v)
61 video = Video(videoFilename, verb)
62 video.getCroppedFaces(detector=self.videodict['detector'],

~/opt/anaconda3/lib/python3.8/site-packages/pyVHR/datasets/dataset.py in getVideoFilename(self, videoIdx)
49 def getVideoFilename(self, videoIdx=0):
50 """Get video filename given the progressive index"""
---> 51 return self.videoFilenames[videoIdx]
52
53 def getSigFilename(self, videoIdx=0):

IndexError: list index out of range

Face anti-spoofing datasets - CASIA & MSU

Hello, I am a Msc student and I am developing a zero-shot learning solution to the face spoofing problem. I am trying to incorporate a rPPG component. I have tried to use a code similar to the one on the basic_demo notebook, only changing it to run through a lot of samples in a loop. It has worked fine on the REPLAY-ATTACK and on OULU but I am having two errors on the datasets CASIA and MSU:

I am using the following params: params = {"video": video, "verb":1, "ROImask":"skin_adapt", "skinAdapt":0.2, "winSize":5}

CASIA: "WARNING! Strange face crop: video frame 36 probably does not contain the whole face... Reshaping Crop" that then leads to "OpenCV(4.1.2) /io/opencv/modules/imgproc/src/resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'resize'".

MSU: On the code line "bpmES_chrom, timesES_chrom = chrom.runOffline(**params)" --> ValueError: The length of the input vector x must be greater than padlen, which is 39.

Also, this warning appears a lot of times: "WARNING!! Found more than 2 HDIs in Hue Channel empirical Distribution... Considering only 2" should I be worried?

I would be very thankful for any help.

Taking not all possible frames into account

for j in range(normalized_len - 1):

Not sure if i understand this correctly, but it seems to me like you are unnecessarily leaving out an image in the loop. I am developing a script to run this in realtime, therefore my input are always 2 frames (current and previous frame). The algorithm should work with two frames, but it doesnt. Since normalized_len = 1, for j in range(0). I think the minus 1 in the loop is unnecessary since you are already subtracting 1 in line 36

Error while visualizing landmarks

Hey everyone,

I am running the framework on Windows 10 and there seems to be an issue in the file pyVHR_demo.ipynb in the first cell shown below:

image

Upon printing vhr.__path__, I think this is happening because pyVHR.__path__[0] returns a path with escaped directory backslashes and the concatenation that happens messes up the final path string as shown in the last cell.

Also, D:\anaconda3\envs\pyvhr\Lib\site-packages\pyVHR\resources\img doesn't contain face.png for me. As shown below:

image

Can you check if this is the same for you all as well?

test on ubfc-phys gives bad results.

I tested PURE, UBFC2, COFACE, and UBFC-Phys with mtts-can model.
Only a model trained with ubfc-phys gives bad results. (overfitted on the training dataset and fails on valid set)
I used s50~s56 as a valid set and trained with other videos.
Any idea? or does Anyone succeed in training with the UBFC-Phys dataset?

run_on_dataset Error (method)

Helo i am trying to run this code but i a getting an keyerror that i couldnt trace. Hope you can help..Thanks

import os
import sys
import time

from pyVHR.analysis.multi_method_suite import MultiMethodSuite, TestResult
from pyVHR.analysis.pipeline import Pipeline
from pyVHR.analysis.stats import StatAnalysis
import matplotlib.pyplot as plt
import plotly.graph_objects as go

def main():

t1 = time.time()

# Evaluation
evaluation = Pipeline()
results = evaluation.run_on_dataset(configFilename=r"D:\Files\pyVHR-master\pyVHR-master\pyVHR\analysis\ubfc1_evaluation.cfg", verb=True)
results.saveResults(r"D:\Files\pyVHR-master\pyVHR-master\results\ufc1_quick_evaluation.h5")
print(" #### Time consumed in the evaluation: {} seconds...".format(time.time() - t1))

# Visulization of results
st = StatAnalysis(filepath=r"D:\Files\pyVHR-master\pyVHR-master\results\ufc1_quick_evaluation.h5")
y_df, fig_stats = st.run_stats()
fig = st.displayBoxPlot(metric='MAE')
fig.show()
fig = st.displayBoxPlot(metric='RMSE')
fig.show()
fig = st.displayBoxPlot(metric='SNR')
fig.show()

if name == 'main':
main()

** Run the test with the following config:
dataset: UBFC1
methods: ['CUPY_CHROM_FILTER', 'CUPY_POS_FILTER', 'CPU_OMIT']

Time consumed in the evaluation: 0.060054779052734375 seconds...


KeyError Traceback (most recent call last)
File ~\anaconda3\envs\pyvhr\lib\site-packages\pandas\core\indexes\base.py:3621, in Index.get_loc(self, key, method, tolerance)
3620 try:
-> 3621 return self._engine.get_loc(casted_key)
3622 except KeyError as err:

File ~\anaconda3\envs\pyvhr\lib\site-packages\pandas_libs\index.pyx:136, in pandas._libs.index.IndexEngine.get_loc()

File ~\anaconda3\envs\pyvhr\lib\site-packages\pandas_libs\index.pyx:163, in pandas._libs.index.IndexEngine.get_loc()

File pandas_libs\hashtable_class_helper.pxi:5198, in pandas._libs.hashtable.PyObjectHashTable.get_item()

File pandas_libs\hashtable_class_helper.pxi:5206, in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'method'

The above exception was the direct cause of the following exception:

KeyError Traceback (most recent call last)
Input In [1], in <cell line: 33>()
30 fig.show()
33 if name == 'main':
---> 34 main()

Input In [1], in main()
20 print(" #### Time consumed in the evaluation: {} seconds...".format(time.time() - t1))
22 # Visulization of results
---> 23 st = StatAnalysis(filepath=r"D:\Files\pyVHR-master\pyVHR-master\results\ufc1_quick_evaluation.h5")
24 y_df, fig_stats = st.run_stats()
25 fig = st.displayBoxPlot(metric='MAE')

File ~\anaconda3\envs\pyvhr\lib\site-packages\pyVHR\analysis\stats.py:48, in StatAnalysis.init(self, filepath, join_data, remove_ouliers)
45 self.remove_ouliers = remove_ouliers
47 # -- get data
---> 48 self.__getMethods()
49 self.metricSort = {'MAE':'min','RMSE':'min','PCC':'max', 'CCC': 'max'}
50 self.scale = {'MAE':'log','RMSE':'log','PCC':'linear', 'CCC':'linear'}

File ~\anaconda3\envs\pyvhr\lib\site-packages\pyVHR\analysis\stats.py:478, in StatAnalysis.__getMethods(self)
475 self.datasetNames.append(file)
476 data = pd.read_hdf(filename)
--> 478 mets.append(set(list(data['method'])))
479 dataFrame.append(data)
481 if not self.join_data:
482 # -- method names intersection among datasets

File ~\anaconda3\envs\pyvhr\lib\site-packages\pandas\core\frame.py:3505, in DataFrame.getitem(self, key)
3503 if self.columns.nlevels > 1:
3504 return self._getitem_multilevel(key)
-> 3505 indexer = self.columns.get_loc(key)
3506 if is_integer(indexer):
3507 indexer = [indexer]

File ~\anaconda3\envs\pyvhr\lib\site-packages\pandas\core\indexes\base.py:3623, in Index.get_loc(self, key, method, tolerance)
3621 return self._engine.get_loc(casted_key)
3622 except KeyError as err:
-> 3623 raise KeyError(key) from err
3624 except TypeError:
3625 # If we have a listlike key, _check_indexing_error will raise
3626 # InvalidIndexError. Otherwise we fall through and re-raise
3627 # the TypeError.
3628 self._check_indexing_error(key)

KeyError: 'method'

Subset Mahnob

Hi,
In your manuscript, you say:

In this paper only a subset of the video data has been used.

Could you specify which is that subset? Which videos are included? I could not find in the framework or original paper which videos are used to evaluate.

Thanks in advance.

Google Colab notebook

Can this pyVHR be used in the Google Colab? Please advice how to use the framework in Google Colab.

Performance on darker skin tones

Hi there!
thanks for this great work it is really impressive!

By any chance have you ever tested these solutions on darker skin tones? It seems it is a major limitation of rPPG, I was wondering if you have some clues on how to tackle it

Thanks!

Best

Error Found When Plotting Window

In pyVHR_demo.ipynb the current code uses a hardcoded value of 18, which can be more than the total number of windows.

image

It should instead use the value of w (window number) generated:

image

hello sir

hello sir need a little help regarding
Do we need the ground truth values for notebook (basic demo and factory demo ) files if yes from where we can get it i.e. from where we can get the BVP files for BVPdateDIR ? and what about the other datasets like LGI_PPGI etc do they have the ground truth files ie its bvp and ecg files or we have to create by ourselves
Another question the IDI files containing some Videos' s what about other (xml) files they have like
cms50_stream_handler
andc
v_camera_sensor_timer_stream_handler
they are having the BVP or BPM and time values ?

i cant install properly the pyVHR through pip any suggestions i am working on windows and GPU with cuda version 10.1

4d65715b129aee13d69f7d227e78e
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\saran\anaconda3\envs\pyt13\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0\setup.py'"'"'; file='"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\saran\AppData\Local\Temp\pip-wheel-4elw3_ab'
cwd: C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0
Complete output (53 lines):
running bdist_wheel
running build
running build_py
package init file 'dlib_init_.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Users\saran\anaconda3\envs\pyt13\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\saran\anaconda3\envs\pyt13\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\saran\anaconda3\envs\pyt13\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\saran\anaconda3\envs\pyt13\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0\setup.py", line 223, in
setup(
File "C:\Users\saran\anaconda3\envs\pyt13\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(attrs)
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\saran\anaconda3\envs\pyt13\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\saran\anaconda3\envs\pyt13\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\dlib_37a5bd04b741435580d050a7fe5c76c0\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n
*****************************************************************\n" +
RuntimeError:


CMake must be installed to build the following extensions: dlib



ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Building wheel for ipaddr (setup.py) ... done
Created wheel for ipaddr: filename=ipaddr-2.2.0-py3-none-any.whl size=18280 sha256=2e8a90df4c48ac1c6a08bc3ef7166c1db0bf506d17381444c750011bfbc3bc02
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\38\59\0e\c20fbbd7969a095fa10b79bdde5d9852227f60bdbdd3a90b49
Building wheel for msgpack (setup.py) ... done
Created wheel for msgpack: filename=msgpack-0.6.2-cp38-cp38-win_amd64.whl size=73014 sha256=d5a26713cb0e9c4daba032eafecc1419a8fad4f1f84e90b48bc22359d003f7ba
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\5d\f2\04\0d19c10080b996bef17c908a6243e6e65d8da1a4094a3f604d
Building wheel for bottleneck (PEP 517) ... done
Created wheel for bottleneck: filename=Bottleneck-1.3.2-cp38-cp38-win_amd64.whl size=107737 sha256=e2e0f3e2c0758041116919653357bc64b47d47a4bca7293d8b1c434ef266f279
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\29\60\c9\98f744fb5c7d1ffb38d096318d9e873a08c0f5df07d6487626
Building wheel for et-xmlfile (setup.py) ... done
Created wheel for et-xmlfile: filename=et_xmlfile-1.0.1-py3-none-any.whl size=8915 sha256=41c445068586f7428cb5efafbff1f3b8754db2476d3af4eced353be57b9dd7fd
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\6e\df\38\abda47b884e3e25f9f9b6430e5ce44c47670758a50c0c51759
Building wheel for progress (setup.py) ... done
Created wheel for progress: filename=progress-1.5-py3-none-any.whl size=8073 sha256=34e5f7b2d179509c5258f4b2ded26bc4cf46c06e99c23733cfa79b6770db2999
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\f1\5b\38\115b213dfbf5562108ea22df17c063f6378350205a819795aa
Building wheel for pybdf (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\saran\anaconda3\envs\pyt13\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b\setup.py'"'"'; file='"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\saran\AppData\Local\Temp\pip-wheel-30hapa_l'
cwd: C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b
Complete output (50 lines):
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "libforbdf" sources
f2py options: []
adding 'build\src.win-amd64-3.8\build\src.win-amd64-3.8\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.8\build\src.win-amd64-3.8' to include_dirs.
build_src: building npy-pkg config files
running build_py
creating build\lib.win-amd64-3.8
copying pybdf.py -> build\lib.win-amd64-3.8
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
warning: build_ext: f77_compiler=None is not available.

building 'libforbdf' extension
error: extension 'libforbdf' has Fortran sources but no Fortran compiler found

ERROR: Failed building wheel for pybdf
Running setup.py clean for pybdf
Building wheel for python-louvain (setup.py) ... done
Created wheel for python-louvain: filename=python_louvain-0.15-py3-none-any.whl size=9401 sha256=9281fb48affe483e2cb86ce92e610b6922398a90768984819b4ed44582359914
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\c8\68\21\d04741956802581119d875a0d9fce6895e8f9ffae71223f3e3
Building wheel for retrying (setup.py) ... done
Created wheel for retrying: filename=retrying-1.3.3-py3-none-any.whl size=11430 sha256=22628f0401c5a0864859fec4407cc25f8062fd3ab4b9ae0e809501468abfd6ca
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\c4\a7\48\0a434133f6d56e878ca511c0e6c38326907c0792f67b476e56
Building wheel for serverfiles (setup.py) ... done
Created wheel for serverfiles: filename=serverfiles-0.3.1-py3-none-any.whl size=6932 sha256=a96c94824b7089fe45cb3c924fc02ed15622fd37ced925076d7b4cb352988bc8
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\84\4b\a4\233da5e4477309b7a6e38f3e48511005fcfd1e4a2a8c4be34f
Building wheel for termcolor (setup.py) ... done
Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4832 sha256=d52e9091cf68ef7fc4ba95cda8208a74d7b7dd3b4d4d37a23284ee2c48426d19
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\a0\16\9c\5473df82468f958445479c59e784896fa24f4a5fc024b0f501
Building wheel for pandocfilters (setup.py) ... done
Created wheel for pandocfilters: filename=pandocfilters-1.4.3-py3-none-any.whl size=7991 sha256=2bc94e4e17831b634547aa6f10a5befad24685407e9c473684cb681ddbcef798
Stored in directory: c:\users\saran\appdata\local\pip\cache\wheels\fc\39\52\8d6f3cec1cca4ceb44d658427c35711b19d89dbc4914af657f
Successfully built distlib ipaddr msgpack bottleneck et-xmlfile progress python-louvain retrying serverfiles termcolor pandocfilters
Failed to build dlib pybdf
Installing collected packages: ipython-genutils, traitlets, six, pywin32, wcwidth, urllib3, pyzmq, pyparsing, parso, jupyter-core, idna, certifi, webencodings, requests, pygments, prompt-toolkit, pickleshare, packaging, nest-asyncio, nbformat, msgpack, MarkupSafe, jupyter-client, jedi, decorator, colorama, backcall, async-generator, testpath, pywinpty, pandocfilters, nbclient, mistune, lockfile, jupyterlab-pygments, jinja2, ipython, entrypoints, defusedxml, CacheControl, bleach, terminado, sniffio, Send2Trash, scipy, rfc3986, qasync, pytz, PyQt5-sip, prometheus-client, nbconvert, ipykernel, h11, docutils, dictdiffer, commonmark, argon2-cffi, AnyQt, scikit-learn, pyyaml, pywin32-ctypes, pyqtgraph, PyQt5, patsy, pandas, orange-canvas-core, notebook, networkx, matplotlib, jdcal, httpcore, et-xmlfile, xlsxwriter, xlrd, widgetsnbextension, tifffile, termcolor, tensorflow-estimator, tensorboard, statsmodels, shortuuid, serverfiles, seaborn, retrying, PyWavelets, python-louvain, PyQtWebEngine, orange-widget-base, opt-einsum, openTSNE, openpyxl, opencv-python, numexpr, keyrings.alt, keyring, keras-preprocessing, keras, imageio, httpx, google-pasta, gast, bottleneck, bidict, baycomp, astunparse, tensorflow, tables, scikit-video, scikit-posthocs, scikit-image, pytoml, pybdf, progress, plotly, pep517, orange3, mtcnn, ipywidgets, ipaddr, html5lib, dlib, distro, distlib, contextlib2, biosppy, appdirs, pyvhr
Attempting uninstall: six
Found existing installation: six 1.15.0
Uninstalling six-1.15.0:
Successfully uninstalled six-1.15.0
Attempting uninstall: urllib3
Found existing installation: urllib3 1.26.2
Uninstalling urllib3-1.26.2:
Successfully uninstalled urllib3-1.26.2
Attempting uninstall: pyparsing
Found existing installation: pyparsing 2.4.7
Uninstalling pyparsing-2.4.7:
Successfully uninstalled pyparsing-2.4.7
Attempting uninstall: idna
Found existing installation: idna 2.10
Uninstalling idna-2.10:
Successfully uninstalled idna-2.10
Attempting uninstall: certifi
Found existing installation: certifi 2020.12.5
Uninstalling certifi-2020.12.5:
Successfully uninstalled certifi-2020.12.5
Attempting uninstall: requests
Found existing installation: requests 2.25.0
Uninstalling requests-2.25.0:
Successfully uninstalled requests-2.25.0
Attempting uninstall: colorama
Found existing installation: colorama 0.4.4
Uninstalling colorama-0.4.4:
Successfully uninstalled colorama-0.4.4
Attempting uninstall: scipy
Found existing installation: scipy 1.6.1
Uninstalling scipy-1.6.1:
Successfully uninstalled scipy-1.6.1
Attempting uninstall: scikit-learn
Found existing installation: scikit-learn 0.23.2
Uninstalling scikit-learn-0.23.2:
Successfully uninstalled scikit-learn-0.23.2
Attempting uninstall: matplotlib
Found existing installation: matplotlib 3.3.2
Uninstalling matplotlib-3.3.2:
Successfully uninstalled matplotlib-3.3.2
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.4.0
Uninstalling tensorboard-2.4.0:
Successfully uninstalled tensorboard-2.4.0
Running setup.py install for pybdf ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\saran\anaconda3\envs\pyt13\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b\setup.py'"'"'; file='"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\saran\AppData\Local\Temp\pip-record-o_2raxtq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\saran\anaconda3\envs\pyt13\Include\pybdf'
cwd: C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b
Complete output (50 lines):
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "libforbdf" sources
f2py options: []
adding 'build\src.win-amd64-3.8\build\src.win-amd64-3.8\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.8\build\src.win-amd64-3.8' to include_dirs.
build_src: building npy-pkg config files
running build_py
creating build\lib.win-amd64-3.8
copying pybdf.py -> build\lib.win-amd64-3.8
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
warning: build_ext: f77_compiler=None is not available.

building 'libforbdf' extension
error: extension 'libforbdf' has Fortran sources but no Fortran compiler found
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\saran\anaconda3\envs\pyt13\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b\setup.py'"'"'; file='"'"'C:\Users\saran\AppData\Local\Temp\pip-install-x_xscd44\pybdf_1225b8add233498aadfb1268ce560e2b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\saran\AppData\Local\Temp\pip-record-o_2raxtq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\saran\anaconda3\envs\pyt13\Include\pybdf' Check the logs for full command output.

Dependencies potentially missing: failed to load the demo video.

Hi,
I could install the library from the source, but could not get through the basic_demo.ipynb.

The errors

Unfortunately, when I tried to load the video, I got this error message.

AssertionError: Cannot find installation of real FFmpeg (which comes with ffprobe).

After fixing it, another error popped out.

ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context' 

I have managed to load the video now, but it took me a while, so I thought it might be worth opening an issue.
Below is what I did before I could load the video.

How I fixed the errors

My OS

Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

Instructions

I could not use pip install pyvhr in a virtual environment.

After installing from the source, I run the following commands in my terminal:

  1. sudo apt install youtube-dl;
  2. sudo apt-get install ffmpeg;
  3. pip install tensorflow-gpu.

You might need to sudo apt-get update && sudo apt-get upgrade at the end.

I hope this might be useful and thank you for developing this Python library.

Best wishes,
Valerio

PCA implementation

Hello,
I had a question about the PCA implementations in your /BVP/methods.py file. I see that you indeed fit the data(rgb signal ) but you don't transform it. Is there something I am missing that you don't need to transform the data and just you the independent components*magnitude?

Pre-filtering Causes Error in run_on_video

Hey,

When using the run_on_video function, setting the pre_filt argument to True leads to the following error. It works fine when I set the pre_filt argument to False.

---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_5704\2147753529.py in <module>
      1 file = 'test.mp4'
----> 2 time, BPM, uncertainty = pipe.run_on_video(videoFileName = file, cuda=False, roi_method='convexhull', roi_approach='patches', method='cpu_CHROM', bpm_type='welch', pre_filt=True, post_filt=True, verb=True)
      3 plt.figure()
      4 plt.plot(time, BPM)
      5 plt.fill_between(time, BPM-uncertainty, BPM+uncertainty, alpha=0.2)

~\miniconda3\envs\pyvhr\lib\site-packages\pyVHR\analysis\pipeline.py in run_on_video(self, videoFileName, cuda, roi_method, roi_approach, method, bpm_type, pre_filt, post_filt, verb)
    128             module = import_module('pyVHR.BVP.filters')
    129             method_to_call = getattr(module, 'BPfilter')
--> 130             bvps = apply_filter(bvps, 
    131                                 method_to_call,
    132                                 fps=fps,

UnboundLocalError: local variable 'bvps' referenced before assignment

Looking at the code in the main repo, I assume there is some issue with implicit type casting when using the apply_filter function.

Thanks,
Joe

ps. Great work on this project!

Error when generating bpm values from videos (concatenate of several images)

Hi,
thanks for sharing this awesome repos.

just would like raise issue with the video that consist of small frames between 2-10 frames. So, i concat several images into video, and try to get the bpm values using pos method. Thus resulting winsize too big.

i had changed the win size, yet the error : IndexError: list index out of range raised.

Do the framework could only handle constraint about the frames within the video or any restriction of the total length?

Thanks

backlog

if the computer is compute slowly ,
the prediction img is slower than reading img
a backlog is increasing

EnvironmentFileNotFound Error

conda env create --file https://github.com/phuselab/pyVHR/blob/pyVHR_CPU/pyVHR_CPU_env.yml

Gives the following error:

EnvironmentFileNotFound:

OS: Windows10

ResolvePackageNotFound: Error

When trying to create the conda environments using the installation instructions given in the readme, I get the ResolvePackageNotFound error as shown in the image below:

pyVHR_Issue1

The same error appears when trying to create the environment for the CPU only version as shown below:

pyVHR_Issue2

I eventually was able to install the framework by creating my own environment manually and installing the required packages which was quite tedious.

pybdf requires fortran compiler

In 05445d8, pybdf 0.2.5 was added to dependencies, but it requires fortran compiler to install pybdf.
So, one of ['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang'] these compilers should be installed.

When fortran compiler is not installed, then this error occured while creating conda environment.

get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
  customize GnuFCompiler
  Could not locate executable g77
  Could not locate executable f77
  customize IntelVisualFCompiler
  Could not locate executable ifort
  Could not locate executable ifl
  customize AbsoftFCompiler
  Could not locate executable f90
  customize CompaqVisualFCompiler
  Could not locate executable DF
  customize IntelItaniumVisualFCompiler
  Could not locate executable efl
  customize Gnu95FCompiler
  Could not locate executable gfortran
  Could not locate executable f95
  customize G95FCompiler
  Could not locate executable g95
  customize IntelEM64VisualFCompiler
  customize IntelEM64TFCompiler
  Could not locate executable efort
  Could not locate executable efc
  customize PGroupFlangCompiler
  Could not locate executable flang
  don't know how to compile Fortran code on platform 'nt'
  warning: build_ext: f77_compiler=None is not available.

  building 'libforbdf' extension
  error: extension 'libforbdf' has Fortran sources but no Fortran compiler found

  ########### EXT COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: x64
    Compiler    : msvc

  CPU baseline  :
    Requested   : 'min'
    Enabled     : SSE SSE2 SSE3
    Flags       : none
    Extra checks: none

  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
    Generated   : none
  CCompilerOpt.cache_flush[809] : write cache to path -> C:\Users\metr0\AppData\Local\Temp\pip-install-r0obsdvc\pybdf_a32e49ae207b455ea28809dfd681d120\build\temp.win-amd64-3.9\Release\ccompiler_opt_cache_ext.py
  ----------------------------------------
  ERROR: Failed building wheel for pybdf
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\metr0\.conda\envs\pyvhr\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\metr0\\AppData\\Local\\Temp\\pip-install-r0obsdvc\\pybdf_a32e49ae207b455ea28809dfd681d120\\setup.py'"'"'; __file__='"'"'C:\\Users\\metr0\\AppData\\Local\\Temp\\pip-install-r0obsdvc\\pybdf_a32e49ae207b455ea28809dfd681d120\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\metr0\AppData\Local\Temp\pip-record-jz1b0wj3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\metr0\.conda\envs\pyvhr\Include\pybdf'
         cwd: C:\Users\metr0\AppData\Local\Temp\pip-install-r0obsdvc\pybdf_a32e49ae207b455ea28809dfd681d120\
    Complete output (54 lines):
    running install
    C:\Users\metr0\.conda\envs\pyvhr\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building py_modules sources
    building extension "libforbdf" sources
    f2py options: []
      adding 'build\src.win-amd64-3.9\build\src.win-amd64-3.9\fortranobject.c' to sources.
      adding 'build\src.win-amd64-3.9\build\src.win-amd64-3.9' to include_dirs.
    copying C:\Users\metr0\.conda\envs\pyvhr\lib\site-packages\numpy\f2py\src\fortranobject.c -> build\src.win-amd64-3.9\build\src.win-amd64-3.9
    copying C:\Users\metr0\.conda\envs\pyvhr\lib\site-packages\numpy\f2py\src\fortranobject.h -> build\src.win-amd64-3.9\build\src.win-amd64-3.9
    build_src: building npy-pkg config files
    running build_py
    creating build\lib.win-amd64-3.9
    copying pybdf.py -> build\lib.win-amd64-3.9
    running build_ext
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    customize MSVCCompiler using build_ext
    get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
    customize GnuFCompiler
    Could not locate executable g77
    Could not locate executable f77
    customize IntelVisualFCompiler
    Could not locate executable ifort
    Could not locate executable ifl
    customize AbsoftFCompiler
    Could not locate executable f90
    customize CompaqVisualFCompiler
    Could not locate executable DF
    customize IntelItaniumVisualFCompiler
    Could not locate executable efl
    customize Gnu95FCompiler
    Could not locate executable gfortran
    Could not locate executable f95
    customize G95FCompiler
    Could not locate executable g95
    customize IntelEM64VisualFCompiler
    customize IntelEM64TFCompiler
    Could not locate executable efort
    Could not locate executable efc
    customize PGroupFlangCompiler
    Could not locate executable flang
    don't know how to compile Fortran code on platform 'nt'
    warning: build_ext: f77_compiler=None is not available.

    building 'libforbdf' extension
    error: extension 'libforbdf' has Fortran sources but no Fortran compiler found
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\metr0\.conda\envs\pyvhr\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\metr0\\AppData\\Local\\Temp\\pip-install-r0obsdvc\\pybdf_a32e49ae207b455ea28809dfd681d120\\setup.py'"'"'; __file__='"'"'C:\\Users\\metr0\\AppData\\Local\\Temp\\pip-install-r0obsdvc\\pybdf_a32e49ae207b455ea28809dfd681d120\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\metr0\AppData\Local\Temp\pip-record-jz1b0wj3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\metr0\.conda\envs\pyvhr\Include\pybdf' Check the logs for full command output.

failed

BPM for a random video input

Thank you so much for creating this framework! I have a question about usage.

How can I get the BPM values of a video that any GT values are not available? Is there any documentation that anyone can link? Because from example notebooks it only shows to visualize BPM with the comparison with GT values. It would be really great if anyone could give me an example to get BPM output from a random video input without ground truth values.

installation error

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

I am installing pyVHR on linux system and this above error occurs when i try to run this command: apt get install cmake gfortran?

How cam I resove this?

BPFilter fails if any windows have had all patches rejected

When using the patch RGB threshold filter; if all patches are rejected this results in an empty window. Some filters and RPPG calculation methods can deal with this; they simply 'propagate' the empty window while processing all other windows fine. However the BPFilter cannot deal with it and throws an error.

This can be easily replicated by using the video ID 0 of the LGI-PPGI dataset in the demo notebook and using the RGB threshold settings as in the hollistic.cfg file.

Any thoughts on how best to deal with this? I can think of two options, either that a window never rejects all patches by choosing at least one signal that has breaks the threshold least eggregiously, or by outputting a default signal somewhere along the line (either when all patches are rejected or as an output of the BVPFilter)

TypeError: __init__() got an unexpected keyword argument 'videodataDIR'

I get this error working through the factory_demo.ipynb notebook. I pip installed pyVHR successfully and cloned the repo. I have the UBFC1 dataset.

Any ideas what is going wrong here?

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-292ea3b0cdc6> in <module>
      1 # -- dataset object
----> 2 dataset = datasetFactory("UBFC1", videodataDIR='../../../UBFC_dataset/dataset1', BVPdataDIR='../../../UBFC_dataset/dataset1')
      3 
      4 # -- videos filenames of the dataset
      5 print("List of video filenames:")

~/anaconda3/envs/cv2/lib/python3.6/site-packages/pyVHR/datasets/dataset.py in datasetFactory(datasetName, *args, **kwargs)
      9         datasetModule = import_module('pyVHR.datasets.' + moduleName) #, package='pyVHR')
     10         classOBJ = getattr(datasetModule, className)
---> 11         obj = classOBJ(*args, **kwargs)
     12 
     13     except (AttributeError, ModuleNotFoundError):

TypeError: __init__() got an unexpected keyword argument 'videodataDIR'

Configuration file

Hi,

Could you confirm that the configuration file you have used to obtain the results in the paper is the default_test.cfg file?
If not, could you share the exact file you have used to do the evaluation in the paper?

Thanks in advance,
Tino A

Issue while creating the pyvhr environment

Unfortunately I am facing issue in windows 10 while creating pyvhr environment. Have tried in anaconda and then downloaded minianaconda also, but got same issue. Any leads would be helpful. Please check.

conda env create --file https://raw.githubusercontent.com/phuselab/pyVHR/pyVHR_CPU/pyVHR_CPU_env.yml

######error#######
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:

ncurses=6.2
libidn2=2.3.2
nettle=3.7.3
_openmp_mutex=4.5
libgcc-ng=11.2.0
libstdcxx-ng=11.2.0
libunistring=0.9.10
lame=3.100
openh264=2.1.0
ld_impl_linux-64=2.35.1
nss=3.69
libgomp=11.2.0
gmp=6.2.1
libtasn1=4.16.0
gnutls=3.6.15
nspr=4.30
libuuid=2.32.1
readline=8.1

Subjects in UBFC2

Hi,

Could you tell me what subjects you have used to evaluate the UBFC2? The dataset contains 42 subjects but in the results appear 24.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.