Package pyVHR is a comprehensive framework for studying methods of pulse rate estimation relying on remote photoplethysmography (rPPG)

Overview

pyVHR


PyPI - Python Version PyPI GitHub last commit GitHub license

Description

Package pyVHR (short for Python framework for Virtual Heart Rate) is a comprehensive framework for studying methods of pulse rate estimation relying on remote photoplethysmography (rPPG). The methodological rationale behind the framework is that in order to study, develop and compare new rPPG methods in a principled and reproducible way, the following conditions should be met: i) a structured pipeline to monitor rPPG algorithms' input, output, and main control parameters; ii) the availability and the use of multiple datasets; iii) a sound statistical assessment of methods' performance. pyVHR allows to easily handle rPPGmethods and data, while simplifying the statistical assessment. Its main features lie in the following.

  • Analysis-oriented. It constitutes a platform for experiment design, involving an arbitrary number of methods applied to multiple video datasets. It provides a systemic end-to-end pipeline, allowing to assess different rPPG algorithms, by easily setting parameters and meta-parameters.
  • Openness. It comprises both method and dataset factory, so to easily extend the pool of elements to be evaluatedwith newly developed rPPG methods and any kind of videodatasets.
  • Robust assessment. The outcomes are arranged intostructured data ready for in-depth analyses. Performance comparison is carried out based on robust nonparametric statistical tests.

Eight well-known rPPG methods, namely ICA, PCA, GREEN,CHROM, POS, SSR, LGI, PBV, are evaluated through extensive experiments across five public video datasets, i.e. PURE, LGI, USBC, MAHNOB and COHFACE, and subsequent nonparametric statistical analysis.

pyVHR

Installation

Install the dependency first:

$ apt-get install cmake gfortran
$ pip install numpy

then, install the library directly into an activated virtual environment:

$ pip install pyvhr

or download from source and install via:

$ python setup.py install

Usage

The notebooks folder contains three different Jupyter notebooks:

Basic usage
Shows the basic steps to process video for heart rate estimation trough remote PPG methods.
[Source] [Demo]

Extend the framework
This notebook shows how to extend the framework with additional datasets and methods.
[Source] [Demo]

Statistical analysis
Includes statistical analysis and the results presented in the paper (see Reference) applying all the available methods on six different datasets.
[Source] [Demo]

Methods

The framework contains the implementation of the most common methods for remote-PPG measurement, and are located in the methods folder.
Currently implemented methods with reference publications are:

Green

Verkruysse, W., Svaasand, L. O., & Nelson, J. S. (2008). Remote plethysmographic imaging using ambient light. Optics express, 16(26), 21434-21445.

CHROM

De Haan, G., & Jeanne, V. (2013). Robust pulse rate from chrominance-based rPPG. IEEE Transactions on Biomedical Engineering, 60(10), 2878-2886.

ICA

Poh, M. Z., McDuff, D. J., & Picard, R. W. (2010). Non-contact, automated cardiac pulse measurements using video imaging and blind source separation. Optics express, 18(10), 10762-10774.

LGI

Pilz, C. S., Zaunseder, S., Krajewski, J., & Blazek, V. (2018). Local group invariance for heart rate estimation from face videos in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (pp. 1254-1262).

PBV

De Haan, G., & Van Leest, A. (2014). Improved motion robustness of remote-PPG by using the blood volume pulse signature. Physiological measurement, 35(9), 1913.

PCA

Lewandowska, M., Rumiński, J., Kocejko, T., & Nowak, J. (2011, September). Measuring pulse rate with a webcam—a non-contact method for evaluating cardiac activity. In 2011 federated conference on computer science and information systems (FedCSIS) (pp. 405-410). IEEE.

POS

Wang, W., den Brinker, A. C., Stuijk, S., & de Haan, G. (2016). Algorithmic principles of remote PPG. IEEE Transactions on Biomedical Engineering, 64(7), 1479-1491.

SSR

Wang, W., Stuijk, S., & De Haan, G. (2015). A novel algorithm for remote photoplethysmography: Spatial subspace rotation. IEEE transactions on biomedical engineering, 63(9), 1974-1984.

Datasets

Interfaces for six different datasets are provided in the datasets folder. Once the datasets are obtained, the respective files must be edited to match the correct path.
Currently supported datasets are:

COHFACE

https://www.idiap.ch/dataset/cohface

LGI-PPGI

https://github.com/partofthestars/LGI-PPGI-DB

MAHNOB-HCI

https://mahnob-db.eu/hci-tagging/

PURE

https://www.tu-ilmenau.de/en/neurob/data-sets-code/pulse/

UBFC1

https://sites.google.com/view/ybenezeth/ubfcrppg

UBFC2

https://sites.google.com/view/ybenezeth/ubfcrppg

Reference

G. Boccignone, D. Conte, V. Cuculo, A. D’Amelio, G. Grossi and R. Lanzarotti, "An Open Framework for Remote-PPG Methods and their Assessment," in IEEE Access, doi: 10.1109/ACCESS.2020.3040936.

To cite the paper:

@article{pyVHR2020,
  doi = {10.1109/access.2020.3040936},
  url = {https://doi.org/10.1109/access.2020.3040936},
  year = {2020},
  publisher = {Institute of Electrical and Electronics Engineers ({IEEE})},
  pages = {1--1},
  author = {Giuseppe Boccignone and Donatello Conte and Vittorio Cuculo and Alessandro D’Amelio and Giuliano Grossi and Raffaella Lanzarotti},
  title = {An Open Framework for Remote-{PPG} Methods and their Assessment},
  journal = {{IEEE} Access}
}

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details

Comments
  • BPM for a random video input

    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.

    opened by rhaizer 8
  • Can I get HRV from this repo ?

    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.

    opened by robert-go 5
  • EnvironmentFileNotFound Error

    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

    opened by rhaizer 5
  • Cannot clone repository due to invalid path 'results/ALL_WIN10/Cohface_03-13-2020_15:11_winSize10'

    Cannot clone repository due to invalid path 'results/ALL_WIN10/Cohface_03-13-2020_15:11_winSize10'

    Hi,

    thank you for your work on this project, the package looks super helpful. I would like to see how easily the analysis pipeline could be interfaced with Psychopy to perform remote PPG during psychological experiments.

    However, for now, I am not able to clone the repository due to the path error I am reporting in the title.

    opened by LegrandNico 5
  • list index out of range in while executing rPPG method(part)

    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

    opened by rupakkatwal 4
  • ResolvePackageNotFound: Error

    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.

    opened by wgb-10 3
  • i cant install properly the pyVHR through pip any  suggestions i am working on windows and GPU with cuda version 10.1

    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.

    opened by saranzeb 3
  • New BVP method: OMIT

    New BVP method: OMIT

    I have added the code for a new BVP method described in this paper: https://arxiv.org/abs/2202.04101. The article is under revision. We do not know when it will be accepted, but I will change the paper information after its acceptation...

    I have tested it well, just only adding the method and evaluating it in UBFC1 with your default configuration files. Find below some screenshots: pyVHR_Merge1

    pyVHR_Merge2

    In you need something else, let me now. Cheers, Arritmic

    opened by Arritmic 2
  • Issue while creating the pyvhr environment

    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

    opened by Lokesh-Vakkalakula 2
  • Subjects in UBFC2

    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.

    opened by Arritmic 2
  • Dependencies potentially missing: failed to load the demo video.

    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

    opened by PHJT003 2
  • module 'pyVHR' has no attribute 'BVP'

    module 'pyVHR' has no attribute 'BVP'

    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?

    opened by mbpictures 0
  • How to download UBFC-Phys

    How to download UBFC-Phys

    Hi, I am wondering how did you download UBFC-PHYS dataset? I am having trouble downloading it, could you help me with it? Did you download it manually (clicking each "zip" file on the ieee website ) Or you use a command line? Thx

    opened by ouyuxuanbridge 0
  • run_on_video() pre-filtering part is never used

    run_on_video() pre-filtering part is never used

    Hello, First of all, thanks for your great work. I believe there is a problem in the run_on_video() function about the pre-filtering process (see the related part of the code below). If i'm not wrong RGB_sig_to_BVP() always takes windowed_sig as parameter, which means that the results of the two apply_filter() functions above are never used. And despite the fact that the lists are mutable, you use copy() when you apply the filters so windowed_sig is never modified.


    pyVHR/pipeline.py (lines 120-158):

    # -- PRE FILTERING
    filtered_windowed_sig = windowed_sig
    
    # -- color threshold - applied only with patches
    if roi_approach == 'patches':
        filtered_windowed_sig = apply_filter(windowed_sig, rgb_filter_th, params={'RGB_LOW_TH':  75, 'RGB_HIGH_TH': 230})
    
    if pre_filt:
        module = import_module('pyVHR.BVP.filters')
        method_to_call = getattr(module, 'BPfilter')
        bvps = apply_filter(filtered_windowed_sig, method_to_call, fps=fps, params={'minHz':0.65, 'maxHz':4.0, 'fps':'adaptive', 'order':6})
    
    # [...]
    
    bvps = RGB_sig_to_BVP(windowed_sig, fps, device_type=method_device, method=method_to_call, params=pars)
    
    opened by b-brebion 1
  • Pre-filtering Causes Error in run_on_video

    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!

    opened by jw1858 1
  • test on ubfc-phys gives bad results.

    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?

    opened by ycyoon 0
Releases(v1.0.2-cpu)
Feature engineering library that helps you keep track of feature dependencies, documentation and schema

Feature engineering library that helps you keep track of feature dependencies, documentation and schema

28 May 31, 2022
Sigma coding youtube - This is a collection of all the code that can be found on my YouTube channel Sigma Coding.

Sigma Coding Tutorials & Resources YouTube • Facebook Support Sigma Coding Patreon • GitHub Sponsor • Shop Amazon Table of Contents Overview Topics Re

Alex Reed 927 Jan 08, 2023
Anonymous Dark Web Tool

Anonymous Dark Web Tool v1.0 Features Anonymous Mode Darkweb Search Engines Check Onion Url/s Scanning Host/IP Keep eyes on v2.0 soon. Requirement Deb

Mounib Kamhaz 11 Apr 10, 2022
Task dispatcher for Postgres

Features a task being ran as an OS process supports task queue with priority and process limit per node fully database driven (a worker and task can b

2 Dec 06, 2021
Repository voor verhalen over de woningbouw-opgave in Nederland

Analyse plancapaciteit woningen In deze notebook zetten we cijfers op een rij om de woningbouwplannen van Nederlandse gemeenten in kaart te kunnen bre

Follow the Money 10 Jun 30, 2022
Project in which we modelise an Among Us problem using graph theories.

Python-AmongUsProblem Project in which we modelise an Among Us problem using graph theories. The rules are as following: Total of 100 players 10 playe

Gabriel Shenouda 1 Feb 09, 2022
Collection of Python scripts to perform Eikonal Tomography

Collection of Python scripts to perform Eikonal Tomography

Emanuel Kästle 10 Nov 04, 2022
Think DSP: Digital Signal Processing in Python, by Allen B. Downey.

ThinkDSP LaTeX source and Python code for Think DSP: Digital Signal Processing in Python, by Allen B. Downey. The premise of this book (and the other

Allen Downey 3.2k Jan 08, 2023
Powerful Assistant

Delta-Assistant Hi I'm Phoenix This project is a smart assistant This is the 1.0 version of this project I am currently working on the third version o

1 Nov 17, 2021
Geodesic Dome Math

dome Geodesic Dome Math Python dome tool dome.py calculates an icosahedron or 2v geodesic dome and creates 3d printable hubs as OpenSCAD sources. usag

Brian Olson 2 Feb 09, 2022
edgetest is a tox-inspired python library that will loop through your project's dependencies, and check if your project is compatible with the latest version of each dependency

Bleeding edge dependency testing Full Documentation edgetest is a tox-inspired python library that will loop through your project's dependencies, and

Capital One 16 Dec 07, 2022
ALSPAC data analysis studying links between screen-usage and mental health issues in children. Provided data has been synthesised.

ADSMH - Mental Health and Screen Time Group coursework for Applied Data Science at the University of Bristol. Overview The data set that you have was

Kai 1 Jan 13, 2022
Data on COVID-19 (coronavirus) cases, deaths, hospitalizations, tests • All countries • Updated daily by Our World in Data

COVID-19 Dataset by Our World in Data Find our data on COVID-19 and its documentation in public/data. Documentation Data: complete COVID-19 dataset Da

Our World in Data 5.5k Jan 03, 2023
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
A simple program to run through inputs for a 3n+1 problem

Author Tyler Windemuth Collatz_Conjecture A simple program to run through inputs for a 3n+1 problem Purpose: doesn't really have a purpose, did this t

0 Apr 22, 2022
This library is an ongoing effort towards bringing the data exchanging ability between Java/Scala and Python

PyJava This library is an ongoing effort towards bringing the data exchanging ability between Java/Scala and Python

Byzer 6 Oct 17, 2022
Modern robots.txt Parser for Python

Robots Exclusion Protocol Parser for Python Robots.txt parsing in Python. Goals Fetching -- helper utilities for fetching and parsing robots.txts, inc

Moz 176 Dec 16, 2022
A smart personal companion and health assistant.

Steps to Install : Clone the repository Go to ResQ-Sources Execute ResQ-Lite.py --: Manual Controls : DanceRobot.py --: You can call functions like fo

Tuhinadri Banerjee 1 May 25, 2022
Replay Felica Exchange For Python

FelicaReplay Replay Felica Exchange Description Standalone Replay Module Usage Save FelicaRelay (=2.0) output to file, then python replay.py [FILE].

3 Jul 14, 2022
x-tools is a collection of tools developed in Python

x-tools X-tools is a collection of tools developed in Python Commands\

5 Jan 24, 2022