Skip to content
Snippets Groups Projects
Commit 0d2a260a authored by David GEISSBUHLER's avatar David GEISSBUHLER Committed by David GEISSBUHLER
Browse files

Added face bounding boxes to tree and cleaned database path

parent 8fcd3604
No related branches found
No related tags found
1 merge request!14MIFS database added
Showing
with 29 additions and 5 deletions
......@@ -20,7 +20,11 @@ from bob.pad.face.database import ReplayMobilePadDatabase
# Directory where the data files are stored.
# This directory is given in the .bob_bio_databases.txt file located in your home directory
<<<<<<< HEAD:bob/pad/face/config/database/replay_mobile.py
original_directory = "[YOUR_REPLAY_MOBILE_DIRECTORY]"
=======
original_directory = "[YOUR_MIFS_DATABASE_DIRECTORY]"
>>>>>>> Added face bounding boxes to tree and cleaned database path:bob/pad/face/config/database/mifs.py
"""Value of ``~/.bob_bio_databases.txt`` for this database"""
original_extension = ".mov" # extension of the data files
......
......@@ -16,7 +16,11 @@ from bob.pad.face.database import ReplayPadDatabase
# Directory where the data files are stored.
# This directory is given in the .bob_bio_databases.txt file located in your home directory
<<<<<<< HEAD:bob/pad/face/config/replay_attack.py
ORIGINAL_DIRECTORY = "[YOUR_REPLAY_ATTACK_DIRECTORY]"
=======
ORIGINAL_DIRECTORY = "[YOUR_MIFS_DATABASE_DIRECTORY]"
>>>>>>> Added face bounding boxes to tree and cleaned database path:bob/pad/face/config/mifs.py
"""Value of ``~/.bob_bio_databases.txt`` for this database"""
ORIGINAL_EXTENSION = ".mov" # extension of the data files
......
......@@ -45,7 +45,7 @@ class MIFSPadDatabase(FileListPadDatabase):
def __init__(
self,
protocol='grandtest', # grandtest is the default protocol for this database
original_directory='[MIFS_DATABASE_DIRECTORY]',
original_directory='[YOUR_MIFS_DATABASE_DIRECTORY]',
original_extension='.jpg',
**kwargs):
......@@ -67,7 +67,7 @@ class MIFSPadDatabase(FileListPadDatabase):
# **kwargs)
from pkg_resources import resource_filename
folder = resource_filename(__name__, '../lists/mifs')
folder = resource_filename(__name__, '../lists/mifs/')
super(MIFSPadDatabase, self).__init__(folder, 'mifs',
pad_file_class=MIFSPadFile,
protocol = protocol,
......@@ -97,9 +97,8 @@ class MIFSPadDatabase(FileListPadDatabase):
is the dictionary defining the coordinates of the face bounding box in frame N.
"""
path_to_file = self.original_directory + f.path
face_path = path_to_file[:-4] + '.face'
file_handle = open(face_path, 'r')
path_to_file = self.m_base_dir + '/annotations/' + f.path[:-4] + '.face'
file_handle = open(path_to_file, 'r')
line = file_handle.readline()
bbox = [int(x) for x in line.split()]
......
209 176 356 297
234 186 348 290
234 190 342 285
213 191 358 298
90 139 333 278
97 157 253 211
119 146 239 200
114 121 125 104
182 166 445 370
162 116 313 261
232 169 421 351
172 88 217 181
130 218 497 414
139 197 493 411
128 121 501 417
115 143 231 192
94 122 292 243
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