Commit 96cfc35b authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[refactoring_2016] Redefinition of the low level API

parent aa590c4a
Pipeline #3225 failed with stages
in 11 minutes and 56 seconds
......@@ -13,14 +13,34 @@
.. image::
.. image::
IJB-A Database Interface for Bob
This package is part of the signal-processing and machine learning toolbox
This package contains an interface for the evaluation protocols of the *IARPA Janus Benchmark A* (IJB-A) database and does not contain the original image data for the database.
The original data should be obtained using the link above.
The IJB-A database is a mixture of frontal and non-frontal images and videos (provided as single frames) from 500 different identities.
In many of the images and video frames, there are several people visible, but only the ones that are annotated with a bounding box should be taken into consideration.
For both model enrollment as well as for probing, images and video frames of one person are combined into so-called Templates.
The database is divided in 10 splits each defining training, enrollment and probe data.
This package implements the database interface including all its particularities:
- First, it implements the FileSet protocol, since for some probes, several files (a mixture of images and video frames) are defined.
In the Database.object_sets() function, FileSet objects are only returned for probe purposes.
- Second, some images contain several identities. Therefore, every physical image file can be stored in several File objects.
Also, the File.make_path() function can create two different styles of file names: the original file name (to read original images), or a unique filename (to define a unique name for each extracted face).
- Third, the Templates with the same template_id might differ between the protocols, so that the Template.template_id is **not** unique.
On the other hand, the is used as a unique key to query the SQL database.
......@@ -43,4 +63,4 @@ development `mailing list`_.
.. Place your references here:
.. _bob:
.. _installation:
.. _mailing list:!forum/bob-devel
\ No newline at end of file
.. _mailing list:!forum/bob-devel
......@@ -26,20 +26,21 @@ from bob.db.base import utils
from .driver import Interface
from .reader import get_templates, get_comparisons
import bob.db.verification.utils
import bob.db.base
class Database(bob.db.verification.utils.Database):
class Database(bob.db.base.Database):
"""The database class opens and maintains a connection opened to the Database.
It provides many different ways to probe for the characteristics of the data
and for the data itself inside the database.
def __init__(self, original_directory = None, annotations_directory=None):
def __init__(self, original_directory = None, annotations_directory=None, original_extension=None):
# call base class constructor
bob.db.verification.utils.Database.__init__(self, original_directory=original_directory, original_extension=None)
self.original_directory = original_directory
self.original_extension = original_extension
#Creating our data structure to deal with the db files
self.memory_db = {}
......@@ -23,7 +23,42 @@ from __future__ import print_function
import os
from bob.db.verification.utils import File
import bob.db.base
class File(bob.db.base.File):
IJBA File class
Diferent from its ascendent class, this one has the client ID as input
def __init__(self, client_id, path, file_id = None):
"""**Constructor Documentation**
Initialize the File object with the minimum required data.
client_id : various type
The id of the client, this file belongs to.
The type of it is dependent on your implementation.
If you use an SQL database, this should be an SQL type like Integer or String.
path : str
The path of this file, relative to the basic directory.
If you use an SQL database, this should be the SQL type String.
Please do not specify any file extensions.
file_id : various type
The id of the file.
The type of it is dependent on your implementation.
If you use an SQL database, this should be an SQL type like Integer or String.
If you are using an automatically determined file id, you can skip selecting the file id.
super(File, self).__init__(path, file_id)
self.client_id = client_id
class Template():
......@@ -13,7 +13,6 @@ develop = src/bob.extension
; options for bob.buildout extension
......@@ -27,7 +26,6 @@ bob.blitz = git
bob.core = git = git
bob.db.base = git
bob.db.verification.utils = git
recipe = bob.buildout:scripts
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment