diff --git a/bob/rppg/base/script/compute_performance.py b/bob/rppg/base/script/compute_performance.py index b1209962b96cad86ef628bf9f69307cb7957d063..687f926501b2f16894f0892486110f1f4bbcc228 100644 --- a/bob/rppg/base/script/compute_performance.py +++ b/bob/rppg/base/script/compute_performance.py @@ -18,12 +18,12 @@ Options: -V, --version Show version -v, --verbose Increases the verbosity (may appear multiple times) -P, --plot Set this flag if you'd like to see some plots. - -p, --protocol=<string> Protocol [default: all]. + -p, --protocol=<string> Protocol. -s, --subset=<string> Data subset to load. If nothing is provided all the data sets will be loaded. - -i, --hrdir=<path> The path to the saved heart rate values on your disk. - -o, --resultdir=<path> The path to the output directory where the results - will be stored [default: performances]. + -i, --hrdir=<path> The path to the saved heart rate values on your disk [default: hr]. + -o, --resultdir=<path> The path to the output directory where the results + will be stored [default: results]. -O, --overwrite By default, we don't overwrite existing files. Set this flag if you want to overwrite existing files. @@ -71,7 +71,7 @@ def main(user_input=None): configuration = load([os.path.join(args['<configuration>'])]) # get various parameters, either from config file or command-line - protocol = get_parameter(args, configuration, 'protocol', '') + protocol = get_parameter(args, configuration, 'protocol', 'None') subset = get_parameter(args, configuration, 'subset', 'all') hrdir = get_parameter(args, configuration, 'hrdir', 'hr') resultdir = get_parameter(args, configuration, 'resultdir', 'results') diff --git a/bob/rppg/base/script/frequency_analysis.py b/bob/rppg/base/script/frequency_analysis.py index c5647218f623fb0741cd19cf929d6cb61afc1c3b..7a3a619b7b4c8b7f937f82ad5b67f2607736d747 100644 --- a/bob/rppg/base/script/frequency_analysis.py +++ b/bob/rppg/base/script/frequency_analysis.py @@ -20,13 +20,13 @@ Options: -V, --version Show version -P, --plot Set this flag if you'd like to follow-up the algorithm execution graphically. We'll plot some interactions. - -p, --protocol=<string> Protocol [default: all]. + -p, --protocol=<string> Protocol. -s, --subset=<string> Data subset to load. If nothing is provided all the data sets will be loaded. - -i, --pulsedir=<path> The path to the saved filtered signals on your disk - [default: filtered]. - -o, --hrdir=<path> The path to the output directory where the resulting - color signals will be stored [default: heart-rate]. + -i, --pulsedir=<path> The path to the saved filtered signals on your disk + [default: pulse]. + -o, --hrdir=<path> The path to the output directory where the resulting + color signals will be stored [default: hr]. -O, --overwrite By default, we don't overwrite existing files. The processing will skip those so as to go faster. If you still would like me to overwrite them, set this flag. @@ -83,7 +83,7 @@ def main(user_input=None): configuration = load([os.path.join(args['<configuration>'])]) # get various parameters, either from config file or command-line - protocol = get_parameter(args, configuration, 'protocol', '') + protocol = get_parameter(args, configuration, 'protocol', 'None') subset = get_parameter(args, configuration, 'subset', 'all') pulsedir = get_parameter(args, configuration, 'pulsedir', 'pulse') hrdir = get_parameter(args, configuration, 'hrdir', 'hr') @@ -93,9 +93,6 @@ def main(user_input=None): overwrite = get_parameter(args, configuration, 'overwrite', False) plot = get_parameter(args, configuration, 'plot', False) verbosity_level = get_parameter(args, configuration, 'verbose', 0) - - print(nsegments) - print(nfft) # if the user wants more verbosity, lowers the logging level from bob.core.log import set_verbosity_level diff --git a/bob/rppg/chrom/script/extract_pulse.py b/bob/rppg/chrom/script/extract_pulse.py index cd0edbd2c93e7aba10ba14de4f61bb3b0e73431f..45fd04963c5a3b0fb563a7dd170030a1b0f376a4 100644 --- a/bob/rppg/chrom/script/extract_pulse.py +++ b/bob/rppg/chrom/script/extract_pulse.py @@ -6,7 +6,7 @@ Usage: %(prog)s <configuration> [--protocol=<string>] [--subset=<string> ...] - [--dbdir=<path>] [--outdir=<path>] + [--pulsedir=<path>] [--start=<int>] [--end=<int>] [--motion=<float>] [--threshold=<float>] [--skininit] [--framerate=<int>] [--order=<int>] @@ -23,9 +23,7 @@ Options: -p, --protocol=<string> Protocol. -s, --subset=<string> Data subset to load. If nothing is provided all the data sets will be loaded. - -d, --dbdir=<path> The path to the directory where video sequences are stored - from the face area will be stored [default: pulse] - -o, --outdir=<path> The path to the directory where signal extracted + -o, --pulsedir=<path> The path to the directory where signal extracted from the face area will be stored [default: pulse] --start=<int> Starting frame index [default: 0]. --end=<int> End frame index [default: 0]. @@ -99,12 +97,11 @@ def main(user_input=None): # load configuration file configuration = load([os.path.join(args['<configuration>'])]) - + # get various parameters, either from config file or command-line - protocol = get_parameter(args, configuration, 'protocol', 'all') + protocol = get_parameter(args, configuration, 'protocol', 'None') subset = get_parameter(args, configuration, 'subset', '') - outdir = get_parameter(args, configuration, 'outdir', 'pulse') - dbdir = get_parameter(args, configuration, 'dbdir', '') + pulsedir = get_parameter(args, configuration, 'pulsedir', 'pulse') start = get_parameter(args, configuration, 'start', 0) end = get_parameter(args, configuration, 'end', 0) motion = get_parameter(args, configuration, 'motion', 0.0) @@ -117,12 +114,15 @@ def main(user_input=None): plot = get_parameter(args, configuration, 'plot', False) gridcount = get_parameter(args, configuration, 'gridcount', False) verbosity_level = get_parameter(args, configuration, 'verbose', 0) - + # if the user wants more verbosity, lowers the logging level from bob.core.log import set_verbosity_level set_verbosity_level(logger, verbosity_level) + print(configuration.database) if hasattr(configuration, 'database'): + print(protocol) + print(subset) objects = configuration.database.objects(protocol, subset) else: logger.error("Please provide a database in your configuration file !") @@ -153,7 +153,7 @@ def main(user_input=None): for obj in objects: # expected output file - output = obj.make_path(outdir, '.hdf5') + output = obj.make_path(pulsedir, '.hdf5') # if output exists and not overwriting, skip this file if os.path.exists(output) and not overwrite: @@ -161,7 +161,7 @@ def main(user_input=None): continue # load video - video = obj.load_video(dbdir) + video = obj.load_video(configuration.dbdir) logger.info("Processing input video from `%s'...", video.filename) # indices where to start and to end the processing