From 2b70b85e976f5640a204470c17dd93080fae4f20 Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Tue, 16 Mar 2021 20:09:09 +0100 Subject: [PATCH] Fixed the 'bob_data_folder' config key --- bob/bio/face/config/database/replaymobile.py | 12 +++++++----- bob/bio/face/database/replaymobile.py | 4 ++-- 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 6452a904..e718f703 100644 --- a/bob/bio/face/config/database/replaymobile.py +++ b/bob/bio/face/config/database/replaymobile.py @@ -3,12 +3,11 @@ # Yannick Dayer <yannick.dayer@idiap.ch> """ - Replay-mobile CSV database interface instantiation + Replay-mobile CSV database interface instantiation """ -from bob.bio.face.database.replaymobile import ReplayMobileDatabase - - +from bob.bio.face.database.replaymobile import ReplayMobileBioDatabase +from bob.extension import rc import bob.core logger = bob.core.log.setup("bob.bio.face") @@ -18,4 +17,7 @@ if 'protocol' not in locals(): protocol = "grandtest" logger.debug(f"Instantiation of ReplayMobile bio database with protocol '{protocol}'") -database = ReplayMobileDatabase(protocol_name=protocol, protocol_definition_path="./csv_datasets/replay-mobile/") # TODO upload the csv files and remove this path. +database = ReplayMobileBioDatabase( + protocol_name=protocol, + protocol_definition_path=rc.get("bob_data_folder", "~/bob_data/"), # TODO upload the csv files and remove this path. +) diff --git a/bob/bio/face/database/replaymobile.py b/bob/bio/face/database/replaymobile.py index 693485e2..e53d88cd 100644 --- a/bob/bio/face/database/replaymobile.py +++ b/bob/bio/face/database/replaymobile.py @@ -201,7 +201,7 @@ class FrameBoundingBoxAnnotationLoader(AnnotationsLoader): return annotated_samples -class ReplayMobileDatabase(CSVDataset): +class ReplayMobileBioDatabase(CSVDataset): """Database interface that loads a csv definition for replay-mobile Looks for the protocol definition files (structure of CSV files). If not @@ -217,7 +217,7 @@ class ReplayMobileDatabase(CSVDataset): protocol_definition_path: str or None Specifies a path to download the database definition to. - If None: Downloads and uses the ``bob_data`` config. + If None: Downloads and uses the ``bob_data_folder`` config. (See :py:fct:`bob.extension.download.get_file`) data_path: str or None -- GitLab