Skip to content
Snippets Groups Projects
Commit f1d3573d authored by Yannick DAYER's avatar Yannick DAYER
Browse files

Set default annotations path

parent 1de7e2ea
No related branches found
No related tags found
1 merge request!106Vulnerability framework - CSV datasets
...@@ -30,16 +30,16 @@ if 'protocol' not in locals(): ...@@ -30,16 +30,16 @@ if 'protocol' not in locals():
logger.info(f"protocol not specified, using default: '{default_protocol}'") logger.info(f"protocol not specified, using default: '{default_protocol}'")
protocol = 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}'") 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}'") logger.info(f"Raw data files will be fetched from '{data_path}'")
data_extension = rc.get("bob.db.replaymobile.extension", ".mov") data_extension = rc.get("bob.db.replaymobile.extension", ".mov")
logger.info(f"Raw data files have the '{data_extension}' extension") 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.info(f"Annotations files will be fetched from '{annotations_path}'")
logger.debug(f"Instantiation of ReplayMobile bio database with protocol '{protocol}'") logger.debug(f"Instantiation of ReplayMobile bio database with protocol '{protocol}'")
......
...@@ -257,10 +257,12 @@ class ReplayMobileBioDatabase(CSVDataset): ...@@ -257,10 +257,12 @@ class ReplayMobileBioDatabase(CSVDataset):
data_path = rc.get("bob.db.replaymobile.directory", "") data_path = rc.get("bob.db.replaymobile.directory", "")
if annotations_path is None: if annotations_path is None:
# Defaults to {data_path}/faceloc/rect if config not defined name = "annotations-replaymobile-mtcnn-9cd6e452.tar.xz"
annotations_path = rc.get( annotations_path = get_file(
"bob.db.replaymobile.annotation_directory", name,
os.path.join(data_path, "faceloc/rect/") [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}'.") logger.info(f"Database: Loading database definition from '{protocol_definition_path}'.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment