From f1d3573df50f5a1e0bf939e1dfb8668328195d1c Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Wed, 12 May 2021 13:57:02 +0200 Subject: [PATCH] Set default annotations path --- bob/bio/face/config/database/replaymobile.py | 6 +++--- bob/bio/face/database/replaymobile.py | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bob/bio/face/config/database/replaymobile.py b/bob/bio/face/config/database/replaymobile.py index 3cfa5b3d..cb741f22 100644 --- a/bob/bio/face/config/database/replaymobile.py +++ b/bob/bio/face/config/database/replaymobile.py @@ -30,16 +30,16 @@ if 'protocol' not in locals(): logger.info(f"protocol not specified, using default: '{default_protocol}'") protocol = default_protocol -dataset_protocol_path = rc.get("bob.db.replaymobile.dataset_protocol_path", None) # TODO default +dataset_protocol_path = rc.get("bob.db.replaymobile.dataset_protocol_path", None) logger.info(f"Loading protocol from '{dataset_protocol_path}'") -data_path = rc.get("bob.db.replaymobile.directory") # TODO default +data_path = rc.get("bob.db.replaymobile.directory", None) logger.info(f"Raw data files will be fetched from '{data_path}'") data_extension = rc.get("bob.db.replaymobile.extension", ".mov") logger.info(f"Raw data files have the '{data_extension}' extension") -annotations_path = rc.get("bob.db.replaymobile.annotation_path", None) # TODO default +annotations_path = rc.get("bob.db.replaymobile.annotation_path", None) logger.info(f"Annotations files will be fetched from '{annotations_path}'") logger.debug(f"Instantiation of ReplayMobile bio database with protocol '{protocol}'") diff --git a/bob/bio/face/database/replaymobile.py b/bob/bio/face/database/replaymobile.py index c57e2790..ae61ec0b 100644 --- a/bob/bio/face/database/replaymobile.py +++ b/bob/bio/face/database/replaymobile.py @@ -257,10 +257,12 @@ class ReplayMobileBioDatabase(CSVDataset): data_path = rc.get("bob.db.replaymobile.directory", "") if annotations_path is None: - # Defaults to {data_path}/faceloc/rect if config not defined - annotations_path = rc.get( - "bob.db.replaymobile.annotation_directory", - os.path.join(data_path, "faceloc/rect/") + name = "annotations-replaymobile-mtcnn-9cd6e452.tar.xz" + annotations_path = get_file( + name, + [f"http://www.idiap.ch/software/bob/data/bob/bob.pad.face/{name}"], + cache_subdir="annotations", + file_hash="9cd6e452", ) logger.info(f"Database: Loading database definition from '{protocol_definition_path}'.") -- GitLab