Python API

class bob.db.fargo.Database(original_directory=None, original_extension=None, annotation_directory=None, annotation_extension=None, protocol='mc-rgb')[source]

Bases: bob.db.base.SQLiteDatabase

Class representing the database

See parent class :py:class:bob.db.base.SQLiteDatabase for more details …

original_directory

Path where the database is stored

Type

str

original_extension

Extension of files in the database

Type

str

annotation_directory

Path where the annotations are stored

Type

str

annotation_extension

Extension of anootation files

Type

str

property modalities
groups(protocol=None)[source]

Returns the names of all registered groups

Parameters

protocol (str) – ignored, since the group are the same across protocols.

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

Returns a set of clients for the specific query by the user.

Parameters
  • protocol (str) – Ignored since the clients are identical for all protocols.

  • groups (str or tuple of str) – The groups to which the clients belong (‘world’, ‘dev’, ‘eval’).

  • Returns

  • lst – list containing clients which have the given properties.

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

Returns a set of models for the specific query by the user.

Parameters
  • protocol – Ignored since the models are identical for all protocols.

  • groups – The groups to which the subjects attached to the models belong

Returns

A list containing all the models which have the given properties.

Return type

lst

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

Returns a set of models ids for the specific query by the user.

Parameters
  • protocol – Ignored since the models are identical for all protocols.

  • groups – The groups to which the subjects attached to the models belong

Returns

A list containing all the models ids which have the given properties.

Return type

lst

client(id)[source]

Returns the client object of the specified id.

Parameters

id (int) – The client id.

Raises

Error: – if the client does not exist.

protocol_names()[source]

Returns all registered protocol names

protocols()[source]

Returns all registered protocols

purposes()[source]

Returns purposes

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

Returns a set of Files for the specific query by the user.

Parameters
  • protocol (str) – One of the FARGO protocols.

  • purposes (str or tuple of str) – The purposes required to be retrieved (‘enroll’, ‘probe’, ‘train’) 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 (int or tuple of int) – Only retrieves the files for the provided list of model ids. If ‘None’ is given, no filter over the model_ids is performed.

  • groups (str or tuple of str) – 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.

  • modality (str or tuple) – One of the three modalities ‘rgb’, ‘nir’ and ‘depth’

Returns

A list of files which have the given properties.

Return type

lst

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

Returns a string containing the configuration information.