Skip to content

HR-CNN - Spetlik, R., Franc, V., Cech, J. and Matas, J. (2018) Visual Heart Rate Estimation with Convolutional Neural Network. In Proceedings of British Machine Vision Conference, 2018

License

Notifications You must be signed in to change notification settings

Beknown-J/hr-cnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HR-CNN

Spetlik, R., Franc, V., Cech, J. and Matas, J. (2018) Visual Heart Rate Estimation with Convolutional Neural Network. In Proceedings of British Machine Vision Conference, 2018

See http://cmp.felk.cvut.cz/~spetlrad/ecg-fitness/ for the original paper and the ECG-Fitness dataset.

This repo is being constructed. You can monitor the progress bellow.

Progress

  • Document the installation.
  • Convert models to a reasonable format.
  • Create public evaluation scripts.
  • Create public learning scripts.

Installation

We support only the following plug-and-play installation. You don't have to follow the steps bellow, but it may happen that it will not work :( This setup should work regardless of the operation system (i.e. Windows and Linux is OK).

  1. Clone the repo to a directory of your preference with git clone [email protected]:radimspetlik/hr-cnn.git.
  2. Change directory to the clonned repo.
  3. Install miniconda http://lmgtfy.com/?q=miniconda+install.
  4. Run conda env update --file environment.yml OR manually:
    1. Create a Python 2.7 environment hr-cnn with conda create -n hr-cnn python=2.7.
    2. Install docopt with conda install docopt.
    3. Install scipy with conda install scipy
    4. Install h5py with conda install h5py
    5. Install opencv with conda install opencv
    6. Install boost 1.65.1 with conda install boost=1.65.1
    7. Install bob.blitz with conda install bob.blitz
    8. Install lmdb-python conda install lmdb-python
  5. Activate the environment with source activate hr-cnn.
  6. Install Pytorch http://lmgtfy.com/?q=install+pytorch.
  7. Add the data.
    1. Download the models from http://cmp.felk.cvut.cz/~spetlrad/ecg-fitness/models.zip and extract them to data/models/.
    2. Copy the contents of the bbox directory (distributed in the 7zipped ECG Fitness database or available at https://goo.gl/aXDQiy) to bob/db/ecg_fitness/data/bbox/.
    3. Copy the contents of the test_h5_faces.zip (available at https://goo.gl/9iw3LY) to data/experiments/cnn/ecg-fitness-face-192x128/15/01/.
  8. Run the evaluation test script with python test-evaluation.py. The network will evaluate two sequences attached in the repo. You should get the following results:
[INFO]==================
[INFO]=== STATISTICS-whole train ===
[INFO]Root Mean Squared Error-whole = 8.38
[INFO]Mean of error-rate percentage-whole = 0.09
[INFO]Mean absolute error-whole = 8.30
[INFO]Pearson's correlation-whole = nan
[INFO]Pearson's correlation-whole significance = nan
[INFO]==================
[INFO]=== STATISTICS-whole test ===
[INFO]Root Mean Squared Error-whole = 8.38
[INFO]Mean of error-rate percentage-whole = 0.09
[INFO]Mean absolute error-whole = 8.30
[INFO]Pearson's correlation-whole = nan
[INFO]Pearson's correlation-whole significance = nan

WARNING - the computations are very GPU memory-demanding. Running the test script requires at least 12GB of GPU memory. If you don't have enough memory, try changing the batch_size variable in the test.py script.

bob.rppg.base

My scripts are using a minimalist hackish version of https://pypi.org/project/bob.rppg.base/. I am sorry for that. Be sure to checkout their repo. Just to be absolutely sure - everything you need from their repo to run my scripts is included in my repo.

About

HR-CNN - Spetlik, R., Franc, V., Cech, J. and Matas, J. (2018) Visual Heart Rate Estimation with Convolutional Neural Network. In Proceedings of British Machine Vision Conference, 2018

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 64.3%
  • Python 34.9%
  • Other 0.8%