From ddda692b6972cefba4a66fa0725871f637e9dd7d Mon Sep 17 00:00:00 2001
From: Olegs NIKISINS <onikisins@italix03.idiap.ch>
Date: Mon, 12 Mar 2018 17:48:48 +0100
Subject: [PATCH] Added BATL Db configuration

---
 bob/pad/face/config/batl_db.py | 52 ++++++++++++++++++++++++++++++++++
 setup.py                       |  2 ++
 2 files changed, 54 insertions(+)
 create mode 100644 bob/pad/face/config/batl_db.py

diff --git a/bob/pad/face/config/batl_db.py b/bob/pad/face/config/batl_db.py
new file mode 100644
index 00000000..8c97f127
--- /dev/null
+++ b/bob/pad/face/config/batl_db.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+"""
+BATL Db is a database for face PAD experiments.
+"""
+
+from bob.pad.face.database import BatlPadDatabase
+
+# Directory where the data files are stored.
+# This directory is given in the .bob_bio_databases.txt file located in your home directory
+ORIGINAL_DIRECTORY = "[YOUR_BATL_DB_DIRECTORY]"
+"""Value of ``~/.bob_bio_databases.txt`` for this database"""
+
+ORIGINAL_EXTENSION = ".hdf5"  # extension of the data files
+
+ANNOTATIONS_TEMP_DIR = "/idiap/temp/onikisins/project/ODIN/experiment_data/pad_experiments_using_bob_py36/batl_db/annotations/"
+
+database = BatlPadDatabase(
+    protocol='nowig-color-5',
+    original_directory=ORIGINAL_DIRECTORY,
+    original_extension=ORIGINAL_EXTENSION,
+    annotations_temp_dir=ANNOTATIONS_TEMP_DIR,
+    landmark_detect_method="mtcnn",
+    training_depends_on_protocol=True,
+)
+"""The :py:class:`bob.pad.base.database.BatlPadDatabase` derivative with BATL Db
+database settings.
+
+.. warning::
+
+   This class only provides a programmatic interface to load data in an orderly
+   manner, respecting usage protocols. It does **not** contain the raw
+   data files. You should procure those yourself.
+
+Notice that ``original_directory`` is set to ``[BatlPadDatabase]``.
+You must make sure to create ``${HOME}/.bob_bio_databases.txt`` file setting this
+value to the places where you actually installed the BATL database.
+"""
+
+protocol = 'nowig-color-5'
+"""
+You may modify this at runtime by specifying the option ``--protocol`` on the
+command-line of ``spoof.py`` or using the keyword ``protocol`` on a
+configuration file that is loaded **after** this configuration resource.
+"""
+
+groups = ["train", "dev", "eval"]
+"""The default groups to use for reproducing the baselines.
+
+You may modify this at runtime by specifying the option ``--groups`` on the
+command-line of ``spoof.py`` or using the keyword ``groups`` on a
+configuration file that is loaded **after** this configuration resource.
+"""
diff --git a/setup.py b/setup.py
index 4459235b..c5afd791 100644
--- a/setup.py
+++ b/setup.py
@@ -63,6 +63,7 @@ setup(
             'msu-mfsd = bob.pad.face.config.msu_mfsd:database',
             'aggregated-db = bob.pad.face.config.aggregated_db:database',
             'mifs = bob.pad.face.config.mifs:database',
+            'batl-db = bob.pad.face.config.batl_db:database',
         ],
 
         # registered configurations:
@@ -73,6 +74,7 @@ setup(
             'msu-mfsd = bob.pad.face.config.msu_mfsd',
             'aggregated-db = bob.pad.face.config.aggregated_db',
             'mifs = bob.pad.face.config.mifs',
+            'batl-db = bob.pad.face.config.batl_db',
 
             # baselines using SVM:
             'lbp-svm = bob.pad.face.config.lbp_svm',
-- 
GitLab