Python API¶
The UTFVP Database for finger verification
-
class
bob.db.utfvp.Client(id, subclient_id)[source]¶ Bases:
sqlalchemy.ext.declarative.api.BaseDatabase clients, marked by an integer identifier and the group they belong to
-
id¶
-
subclient_id¶
-
-
class
bob.db.utfvp.Database(original_directory=None, original_extension=None)[source]¶ Bases:
bob.db.base.SQLiteDatabaseThe 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.
-
client(id)[source]¶ Returns the client object in the database given a certain id. Raises an error if that does not exist.
-
client_ids(protocol=None, groups=None)[source]¶ Returns a set of client ids for the specific query by the user.
Parameters: Returns: Containing all the clients which have the given properties.
Return type: list
-
clients(protocol=None, groups=None)[source]¶ Returns a set of clients for the specific query by the user.
Parameters: Returns
list: Containing all the clients which have the given properties.
-
get_client_id_from_model_id(model_id)[source]¶ Returns the client_id attached to the given model_id
Parameters: model_id (str) – The model_id to consider Returns: The client_id attached to the given model_id Return type: str
-
model_ids(protocol=None, groups=None)[source]¶ Returns a set of models ids for the specific query by the user.
Parameters: Returns: Containing all the models ids which have the given properties.
Return type: list
-
models(protocol=None, groups=None)[source]¶ Returns a set of models for the specific query by the user.
Parameters: Returns: containing all the models which have the given properties
Return type: list
-
objects(protocol=None, purposes=None, model_ids=None, groups=None, classes=None, finger_ids=None, session_ids=None)[source]¶ Returns a set of Files for the specific query by the user.
Parameters: - protocol (
str,list, optional) –One or several of:
1vsallnomnomLeftRingnomLeftMiddlenomLeftIndexnomRightIndexnomRightMiddlenomRightRing
- purposes (
str,list, optional) –One or several of:
trainenrollprobe
- model_ids (
str,list, optional) – Only retrieves the files for the provided list of model ids. IfNoneis given (this is the default), no filter over the model_ids is performed. - groups (
str,list, optional) –Groups the clients belong to. Should be one or several of:
worlddeveval
- classes (
str,list, optional) – The classes (types of accesses) to be retrieved (clientorimpostor) or a tuple with several of them. IfNoneis given (this is the default), it is considered the same as a tuple with all possible values. - finger_ids (
str,list, optional) – Only retrieves the files for the provided list of finger ids. IfNoneis given (this is the default), no filter over the finger_ids is performed. - session_ids (
str,list, optional) – Only retrieves the files for the provided list of session ids. IfNoneis given (this is the default), no filter over the session_ids is performed.
Returns: Containing the files which have the given properties.
Return type: list
- protocol (
-
-
class
bob.db.utfvp.File(client_id, path, finger_id, session_id)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base,bob.db.base.FileGeneric file container
-
client¶
-
client_id¶
-
finger_id¶
-
id¶
-
load(directory=None, extension='.png')[source]¶ Loads the image for this file entry
Parameters: directory (str) – The path to the root of the database installation. This is the path leading to files named DDD-GwhereD‘s correspond to digits andGto the client gender. For example032-M.Returns: - A 2D array of unsigned integers corresponding to the input
- image for this file in (y,x) notation (Bob-style).
Return type: numpy.ndarray
-
path¶
-
session_id¶
-