Python API

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

Returns a string containing the configuration information.

class bob.db.brsu.Database(original_directory=None, original_extension=None, annotation_directory=None, annotation_extension=None, protocol='test')[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 contains 4 images (color + 4 SWIR images)

Parameters
  • purposes (str or (str, 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 (str, str, str)) – One of the groups (‘test’, ‘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

list