Python API¶
The UTFVP Database for finger verification
-
class
bob.db.utfvp.
Client
(id, subclient_id)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Database 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)¶ Bases:
bob.db.base.SQLiteDatabase
The 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: - protocol (
str
, optional) –One of the UTFVP protocols:
1vsall
nom
nomLeftRing
nomLeftMiddle
nomLeftIndex
nomRightIndex
nomRightMiddle
nomRightRing
full
fullLeftRing
fullLeftMiddle
fullLeftIndex
fullRightIndex
fullRightMiddle
fullRightRing
- groups (
str
, optional) –Groups the clients belong to. Should be one of:
world
dev
eval
Returns: Containing all the clients which have the given properties.
Return type: list
- protocol (
-
clients
(protocol=None, groups=None)[source]¶ Returns a set of clients for the specific query by the user.
Parameters: - protocol (
str
, optional) –One of the UTFVP protocols:
1vsall
nom
nomLeftRing
nomLeftMiddle
nomLeftIndex
nomRightIndex
nomRightMiddle
nomRightRing
full
fullLeftRing
fullLeftMiddle
fullLeftIndex
fullRightIndex
fullRightMiddle
fullRightRing
- groups (
str
, Optional) – ignored (The clients belong both toworld
anddev
)
Returns
list: Containing all the clients which have the given properties.- protocol (
-
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: - protocol (
str
, optional) –One of the UTFVP protocols:
1vsall
nom
nomLeftRing
nomLeftMiddle
nomLeftIndex
nomRightIndex
nomRightMiddle
nomRightRing
full
fullLeftRing
fullLeftMiddle
fullLeftIndex
fullRightIndex
fullRightMiddle
fullRightRing
- groups (
str
, optional) –Groups the clients belong to. Should be one of:
world
dev
eval
Returns: Containing all the models ids which have the given properties.
Return type: list
- protocol (
-
models
(protocol=None, groups=None)[source]¶ Returns a set of models for the specific query by the user.
Parameters: - protocol (
str
, optional) –One of the UTFVP protocols:
1vsall
nom
nomLeftRing
nomLeftMiddle
nomLeftIndex
nomRightIndex
nomRightMiddle
nomRightRing
full
fullLeftRing
fullLeftMiddle
fullLeftIndex
fullRightIndex
fullRightMiddle
fullRightRing
- groups (
str
, optional) –Groups the clients belong to. Should be one of:
dev
eval
Returns: containing all the models which have the given properties
Return type: list
- protocol (
-
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:
1vsall
nom
nomLeftRing
nomLeftMiddle
nomLeftIndex
nomRightIndex
nomRightMiddle
nomRightRing
full
fullLeftRing
fullLeftMiddle
fullLeftIndex
fullRightIndex
fullRightMiddle
fullRightRing
- purposes (
str
,list
, optional) –One or several of:
train
enroll
probe
- model_ids (
str
,list
, optional) – Only retrieves the files for the provided list of model ids. IfNone
is 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:
world
dev
eval
- classes (
str
,list
, optional) – The classes (types of accesses) to be retrieved (client
orimpostor
) or a tuple with several of them. IfNone
is 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. IfNone
is 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. IfNone
is 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)¶ Bases:
sqlalchemy.ext.declarative.api.Base
,bob.db.base.File
Generic 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-G
whereD
‘s correspond to digits andG
to 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
¶
-