AR Face Database

This is the Bob database entry for the AR face database.

bob.db.arface.get_config()[source]

Returns a string containing the configuration information.

class bob.db.arface.Annotation(file_id, eyes)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Annotations of the AR face database consists only of the left and right eye positions. There is exactly one annotation for each file.

file_id
id
le_x
le_y
re_x
re_y
class bob.db.arface.Client(id, group)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Information about the clients (identities) of the AR face database

gender
gender_choices = ('m', 'w')
group_choices = ('world', 'dev', 'eval')
id
sgroup
class bob.db.arface.Database(original_directory=None, original_extension='.ppm')[source]

Bases: bob.db.base.SQLiteDatabase

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.

annotations(file)[source]

Returns the annotations for the image with the given file id.

Keyword Parameters:

file
The File object to retrieve the annotations for.

Returns: the eye annotations as a dictionary {‘reye’:(y,x), ‘leye’:(y,x)}.

client_ids(groups=None, genders=None, protocol=None)[source]

Returns a list of client ids for the specific query by the user.

Keyword Parameters:

groups
One or several groups to which the models belong (‘world’, ‘dev’, ‘eval’). If not specified, all groups are returned.
genders
One of the genders (‘m’, ‘w’) of the clients. If not specified, clients of all genders are returned.
protocol
Ignored since clients are identical for all protocols.

Returns: A list containing all the client ids which have the desired properties.

clients(groups=None, genders=None, protocol=None)[source]

Returns a list of Client objects for the specific query by the user.

Keyword Parameters:

groups
One or several groups to which the models belong (‘world’, ‘dev’, ‘eval’). If not specified, all groups are returned.
genders
One of the genders (‘m’, ‘w’) of the clients. If not specified, clients of all genders are returned.
protocol
Ignored since clients are identical for all protocols.

Returns: A list containing all the Client objects which have the desired properties.

get_client_id_from_file_id(file_id, **kwargs)[source]

Returns the client_id (real client id) attached to the given file_id

Keyword Parameters:

file_id
The file_id to consider

Returns: The client_id attached to the given file_id

get_client_id_from_model_id(model_id, **kwargs)[source]

Returns the client_id attached to the given model_id

Keyword Parameters:

model_id
The model id to consider

Returns: The client_id attached to the given model_id

groups(protocol=None)[source]

Returns the names of all registered groups

model_ids(groups=None, genders=None, protocol=None)

Returns a list of client ids for the specific query by the user.

Keyword Parameters:

groups
One or several groups to which the models belong (‘world’, ‘dev’, ‘eval’). If not specified, all groups are returned.
genders
One of the genders (‘m’, ‘w’) of the clients. If not specified, clients of all genders are returned.
protocol
Ignored since clients are identical for all protocols.

Returns: A list containing all the client ids which have the desired properties.

objects(groups=None, protocol=None, purposes=None, model_ids=None, sessions=None, expressions=None, illuminations=None, occlusions=None, genders=None)[source]

Using the specified restrictions, this function returns a list of File objects.

Keyword Parameters:

groups
One or several groups to which the models belong (‘world’, ‘dev’, ‘eval’).
protocol
One of the AR protocols (‘all’, ‘expression’, ‘illumination’, ‘occlusion’, ‘occlusion_and_illumination’). Note: this field is ignored for group ‘world’.
purposes
One or several purposes for which files should be retrieved (‘enroll’, ‘probe’). Note: this field is ignored for group ‘world’.
model_ids
If given (as a list of model id’s or a single one), only the files belonging to the specified model id is returned. For ‘probe’ purposes, this field is ignored since probe files are identical for all models.
sessions
One or several sessions from (‘first’, ‘second’). If not specified, objects of all sessions are returned.
expressions
One or several expressions from (‘neutral’, ‘smile’, ‘anger’, ‘scream’). If not specified, objects with all expressions are returned. Ignored for purpose ‘enroll’.
illuminations
One or several illuminations from (‘front’, ‘left’, ‘right’, ‘all’). If not specified, objects with all illuminations are returned. Ignored for purpose ‘enroll’.
occlusions
One or several occlusions from (‘none’, ‘sunglasses’, ‘scarf’). If not specified, objects with all occlusions are returned. Ignored for purpose ‘enroll’.
genders
One of the genders (‘m’, ‘w’) of the clients. If not specified, both genders are returned.
class bob.db.arface.File(image_name)[source]

Bases: sqlalchemy.ext.declarative.api.Base, bob.db.base.File

Information about the files of the AR face database. Each file includes

  • the session (first, second)
  • the expression (neutral, smile, anger, scream)
  • the illumination (front, left, right, all)
  • the occlusion (none, sunglasses, scarf)
  • the client id
annotation
client
client_id
expression
expression_choices = ('neutral', 'smile', 'anger', 'scream')
id
illumination
illumination_choices = ('front', 'left', 'right', 'all')
occlusion
occlusion_choices = ('none', 'sunglasses', 'scarf')
path
purpose
purpose_choices = ('enroll', 'probe')
session
session_choices = ('first', 'second')
class bob.db.arface.Protocol(protocol, session, expression='neutral', illumination='front', occlusion='none')[source]

Bases: sqlalchemy.ext.declarative.api.Base

The protocols of the AR face database.

expression
id
illumination
name
occlusion
protocol_choices = ('all', 'expression', 'illumination', 'occlusion', 'occlusion_and_illumination')
session