Python API

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

Returns a string containing the configuration information.

class bob.db.casiasurf.Database(original_directory=None, original_extension=None, annotation_directory=None, annotation_extension=None, protocol='all')[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
groups(protocol=None)[source]

Returns the names of all registered groups

Parameters:protocol (str) – ignored, since the group are the same across protocols.
purposes()[source]

Returns purposes

objects(purposes=None, groups=None)[source]

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

Note that a sample may contain up to 3 modalities (color, infrared and depth) The protocol specifies which modality(ies) should be loaded

Parameters:
  • purposes (str or tuple of str) – The purposes required to be retrieved (‘real’, ‘attack’) 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.
  • groups (str or tuple of str) – One of the groups (‘dev’, ‘eval’, ‘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.
Returns:

A list of samples which have the given properties.

Return type:

lst