From 564212df085d818b5d4aee0154699ca12b3d81b4 Mon Sep 17 00:00:00 2001 From: Manuel Guenther <manuel.guenther@idiap.ch> Date: Tue, 16 Jun 2015 18:38:00 +0200 Subject: [PATCH] baselines evaluation by default takes the default protocol --- bob/bio/face/script/baselines.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bob/bio/face/script/baselines.py b/bob/bio/face/script/baselines.py index 82af9051..3a887231 100755 --- a/bob/bio/face/script/baselines.py +++ b/bob/bio/face/script/baselines.py @@ -279,10 +279,16 @@ def main(command_line_parameters = None): logger.warn("Skipping algorithm '%s' since the results cannot be found.", algorithm) continue if len(protocols) > 1: - logger.warn("There are several protocols found in directory '%s'. Here, we use protocol '%s'.", os.path.join(result_dir, algorithm), protocols[0]) - - nonorm_sub_dir = os.path.join(algorithm, protocols[0], 'nonorm') - ztnorm_sub_dir = os.path.join(algorithm, protocols[0], 'ztnorm') + # load the default protocol of the database + protocol = bob.bio.base.load_resource(args.database, "database").protocol + if protocol not in protocols: + protocol = protocols[0] + logger.warn("There are several protocols found in directory '%s'. Here, we use protocol '%s'.", os.path.join(result_dir, algorithm), protocols[0]) + else: + protocol = protocols[0] + + nonorm_sub_dir = os.path.join(algorithm, protocol, 'nonorm') + ztnorm_sub_dir = os.path.join(algorithm, protocol, 'ztnorm') # collect the resulting files if os.path.exists(os.path.join(result_dir, nonorm_sub_dir, 'scores-dev')): -- GitLab