XM2VTS Database

This is the Bob database entry for the XM2VTS database

class bob.db.xm2vts.Database(original_directory=None, original_extension='.ppm')[source]

Bases: bob.db.base.SQLiteDatabase

The dataset 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.

groups(protocol=None)[source]

Returns the names of all registered groups

client_groups()[source]

Returns the names of the XM2VTS groups. This is specific to this database which does not have separate training, development and evaluation sets.

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

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

Keyword Parameters:

protocol

Ignored.

groups

The groups to which the clients belong either from (‘dev’, ‘eval’, ‘world’) or the specific XM2VTS ones from (‘client’, ‘impostorDev’, ‘impostorEval’) Note that ‘dev’, ‘eval’ and ‘world’ are alias for ‘client’. If no groups are specified, then both clients are impostors are listed.

Returns: A list containing all the clients which have the given properties.

models(protocol=None, groups=None)[source]
Returns a list of Client for the specific query by the user.

Models correspond to Clients for the XM2VTS database (At most one model per identity).

Keyword Parameters:

protocol

Ignored.

groups

The groups to which the subjects attached to the models belong (‘dev’, ‘eval’, ‘world’) Note that ‘dev’, ‘eval’ and ‘world’ are alias for ‘client’. If no groups are specified, then both clients are impostors are listed.

Returns: A list containing all the models (model <-> client in XM2VTS) belonging

to the given group.

model_ids(protocol=None, groups=None)[source]
Returns a list of model ids for the specific query by the user.

Models correspond to Clients for the XM2VTS database (At most one model per identity).

Keyword Parameters:

protocol

Ignored.

groups

The groups to which the subjects attached to the models belong (‘dev’, ‘eval’, ‘world’) Note that ‘dev’, ‘eval’ and ‘world’ are alias for ‘client’. If no groups are specified, then both clients are impostors are listed.

Returns: A list containing all the model ids (model <-> client in XM2VTS) belonging

to the given group.

has_client_id(id)[source]

Returns True if we have a client with a certain integer identifier

client(id)[source]

Returns the client object in the database given a certain id. Raises an error if that does not exist.

objects(protocol=None, purposes=None, model_ids=None, groups=None, classes=None)[source]

Returns a list of File for the specific query by the user.

Keyword Parameters:

protocol

One of the XM2VTS protocols (‘lp1’, ‘lp2’, ‘darkened-lp1’, ‘darkened-lp2’).

purposes

The purposes required to be retrieved (‘enrolll’, ‘probe’) or a tuple with several of them. If ‘None’ is given (this is the default), it is considered the same as a tuple with all possible values. This field is ignored for the data from the “world” group.

model_ids

Only retrieves the files for the provided list of model ids (claimed client id). The model ids are string. If ‘None’ is given (this is the default), no filter over the model_ids is performed.

groups

One of the groups (‘dev’, ‘eval’, ‘world’) or a tuple with several of them. If ‘None’ is given (this is the default), it is considered the same as a tuple with all possible values.

classes

The classes (types of accesses) to be retrieved (‘client’, ‘impostor’) or a tuple with several of them. If ‘None’ is given (this is the default), it is considered the same as a tuple with all possible values.

Returns: A list of File objects.

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)}.

protocol_names()[source]

Returns all registered protocol names

protocols()[source]

Returns all registered protocols

has_protocol(name)[source]

Tells if a certain protocol is available

protocol(name)[source]

Returns the protocol object in the database given a certain name. Raises an error if that does not exist.

protocol_purposes()[source]

Returns all registered protocol purposes

purposes()[source]

Returns the list of allowed purposes

t_model_ids(protocol, groups='dev', **kwargs)[source]

Returns the list of model ids used for T-Norm of the given protocol for the given group that satisfy your query. For possible keyword arguments, please check the tmodel_ids function.

t_enroll_files(protocol, model_id, groups='dev', **kwargs)[source]

Returns the list of T-Norm model enrollment File objects from the given model id of the given protocol for the given group that satisfy your query. For possible keyword arguments, please check the tobjects function.

z_probe_files(protocol, groups='dev', **kwargs)[source]

Returns the list of Z-Norm probe File objects to probe the model with the given model id of the given protocol for the given group that satisfy your query. For possible keyword arguments, please check the zobjects function.

class bob.db.xm2vts.Client(id, group)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Database clients, marked by an integer identifier and the group they belong to

group_choices = ('client', 'impostorDev', 'impostorEval')
id
sgroup
class bob.db.xm2vts.File(client_id, path, session_id, darkened, shot_id)[source]

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

Generic file container

id
path
client
annotation
client_id
session_id
darkened
shot_id
class bob.db.xm2vts.Protocol(name)[source]

Bases: sqlalchemy.ext.declarative.api.Base

XM2VTS protocols

id
name
class bob.db.xm2vts.ProtocolPurpose(protocol_id, sgroup, purpose)[source]

Bases: sqlalchemy.ext.declarative.api.Base

XM2VTS protocol purposes

id
group_choices = ('world', 'dev', 'eval')
purpose_choices = ('train', 'enroll', 'probe')
protocol
files
protocol_id
sgroup
purpose
class bob.db.xm2vts.Annotation(file_id, eyes)[source]

Bases: sqlalchemy.ext.declarative.api.Base

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

id
file_id
re_x
re_y
le_x
le_y
bob.db.xm2vts.get_config()[source]

Returns a string containing the configuration information.