LivDet 2013 Database

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

Returns a string containing the configuration information.

class bob.db.livdet2013.Database[source]

Bases: object

protocols = ('Biometrika', 'CrossMatch', 'Italdata', 'Swipe')
groups = ('train', 'test')
classes = ('live', 'spoof')
objects(protocols=None, groups=None, classes=None)[source]

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

Keyword Parameters:

protocols
The ‘
groups
One of the protocolar subgroups of data as specified in the tuple groups, or a tuple with several of them. If you set this parameter to an empty string or the value None, we use reset it to the default which is to get all.
classes
Either “spoof”, “live” or any combination of those (in a tuple). Defines the class of data to be retrieved. If you set this parameter to an empty string or the value None, we use reset it to the default, (“live”, “spoof”).

Returns: A list of File objects.

class bob.db.livdet2013.File(stem)[source]

Bases: object

Generic file container

default_extension()[source]
is_live()[source]

True if the file belongs to a Live image, False otherwise

make_path(directory=None, extension=None)[source]

Wraps this files’ filename so that a complete path is formed

Keyword parameters:

directory
An optional directory name that will be prefixed to the returned result.
extension
An optional extension that will be suffixed to the returned filename. The extension normally includes the leading . character as in .png or .bmp. If not specified the default extension for the original file in the database will be used

Returns a string containing the newly generated file path.

save(data, directory=None, extension='.hdf5')[source]

Saves the input data at the specified location and using the given extension.

Keyword parameters:

data
The data blob to be saved (normally a numpy.ndarray).
directory
If not empty or None, this directory is prefixed to the final file destination
extension
The extension of the filename - this will control the type of output and the codec for saving the input blob.