The YouTube Faces database protocol interface. Please refer to http://www.cs.tau.ac.il/~wolf/ytfaces for information how to get a copy of the original data.
Note
There has been errata data published for the database. These errata is not considered in the protocols (yet).
The YouTube database consists of 10 different splits, which are called “fold” here (to be consistent with the LFW database). In each fold 9/10 of the database are used for training, and one for evaluation. In this implementation of the YouTube protocols, up to 7/10 of the data is used for training (groups='world'), 2/10 are used for development (to estimate a threshold; groups='dev') and the last 1/10 is finally used to evaluate the system (groups='eval').
To compute recognition results, please execute experiments on all 10 protocols (protocol='fold1' ... protocol='fold10') and average the resulting classification results (cf. http://vis-www.cs.umass.edu/lfw for details on scoring).
The design of this implementation differs slightly compared to the one from http://www.cs.tau.ac.il/~wolf/ytfaces. Originally, only lists of image pairs are provided by the creators of the YouTube database. To be consistent with other Bob databases, here the lists are split up into files to be enrolled, and probe files. The files to be enrolled are always the first file in the pair, while the second pair item is used as probe.
Note
When querying probe files, please always query probe files for a specific model id: objects(..., purposes = 'probe', model_ids = (model_id,)). In this case, you will follow the default protocols given by the database.
When querying training files objects(..., groups='world'), you will automatically end up with the “image restricted configuration”. When you want to respect the “unrestricted configuration” (cf. README on http://vis-www.cs.umass.edu/lfw), please query the files that belong to the pairs, via objects(..., groups='world', world_type='unrestricted')
If you want to stick to the original protocol and use only the pairs for training and testing, feel free to query the pairs function.
Note
The pairs that are provided using the pairs function, and the files provided by the objects function (see note above) correspond to the identical model/probe pairs. Hence, either of the two approaches should give the same recognition results.
Bases: sqlalchemy.ext.declarative.api.Base
Information about the clients (identities) of the Youtube Faces database.
Bases: bob.db.verification.utils.database.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.
Keyword parameters
Returns the list of all File objects that satisfy your query. For possible keyword arguments, please check the implementation of the derived class Database.objects() function.
Returns the annotations for the given file id as a dictionary of dictionaries, e.g. {‘1.56.jpg’ : {‘topleft’:(y,x), ‘bottomright’:(y,x)}, ‘1.57.jpg’ : {‘topleft’:(y,x), ‘bottomright’:(y,x)}, ...}. Here, the key of the dictionary is the full image file name of the original image.
Keyword parameters:
Raise a RuntimeError if the database back-end is not available.
Checks the given parameter for validity, i.e., if it is contained in the set of valid parameters. If the parameter is ‘None’ or empty, the default_parameter will be returned, in case it is specified, otherwise a ValueError will be raised.
This function will return the parameter after the check tuple or list of parameters, or raise a ValueError.
Keyword parameters:
Checks the given parameters for validity, i.e., if they are contained in the set of valid parameters. It also assures that the parameters form a tuple or a list. If parameters is ‘None’ or empty, the default_parameters will be returned (if default_parameters is omitted, all valid_parameters are returned).
This function will return a tuple or list of parameters, or raise a ValueError.
Keyword parameters:
Returns a list of Client objects for the specific query by the user.
Keyword Parameters:
Returns: A list containing all Client objects which have the desired properties.
Returns the list of enrollment File objects from the given model id of the given protocol for the given groups that satisfy your query. If the model_id is None (the default), enrollment files for all models are returned. For possible keyword arguments, please check the implementation of the derived class Database.objects() function.
This function returns the list of original file names for the given list of File objects.
Keyword parameters:
Returns a list of File objects with the given file ids
Keyword Parameters:
Returns a list (that may be empty) of File objects.
Returns the client_id (real client id) attached to the given file_id
Keyword Parameters:
Returns: The client_id attached to the given file_id
Returns the client_id (real client id) attached to the given model id
Keyword Parameters:
Returns: The client_id attached to the given model
Returns the groups, which are available in the database.
Returns if a valid session has been opened for reading the database.
Returns a list of model ids for the specific query by the user. For the ‘dev’ and ‘eval’ groups, the first element of each pair is extracted.
Keyword Parameters:
Returns: A list containing all model ids which have the desired properties.
Returns a list of Directory objects (there are multiple models per client) for the specific query by the user. For the ‘dev’ and ‘eval’ groups, the first element of each pair is extracted.
Keyword Parameters:
Returns: A list containing all Directory objects which have the desired properties.
Returns a list of Directory objects for the specific query by the user.
Keyword Parameters:
Returns: A list of Directory objects considering all the filtering criteria.
Returns the list of original image names for the given directory, sorted by frame number. In opposition to other bob databases, here a list of file names is returned.
Keyword arguments:
This function returns the list of original file names for the given list of File objects.
Keyword parameters:
Queries a list of Pair’s of files.
Keyword Parameters:
Returns: A list of Pair’s considering all the filtering criteria.
Returns a full file paths considering particular file ids, a given directory and an extension
Keyword Parameters:
Returns a list (that may be empty) of the fully constructed paths given the file ids.
Returns the list of probe File objects to probe the model with the given model id of the given protocol for the given groups that satisfy your query. If the model_id is None (the default), all possible probe files are returned. For possible keyword arguments, please check the implementation of the derived class Database.objects() function.
Returns the names of the valid protocols.
Returns True if the given protocol specifies file sets for probes, instead of a single probe file. In this default implementation, False is returned, throughout. If you need different behavior, please overload this function in your derived class.
Creates a query to the database using the given arguments.
Reverses the lookup: from certain paths, return a list of File objects
Keyword Parameters:
Returns a list (that may be empty).
Returns all valid sub-worlds for the fold.. protocols.
Returns the list of all test File objects of the given groups that satisfy your query. Test objects are all File objects that serve either for enrollment or probing. For possible keyword arguments, please check the implementation of the derived class Database.objects() function.
Returns a list of T-Norm model ids that can be used for ZT norm. In fact, it uses the model ids from two other splits of the data, specifically, the last two of the training splits. Hence, to get training data independent from ZT-Norm data, use maximum subworld=’fivefolds’ in the world query.
Keyword Parameters:
Returns: A list containing all Directory objects which have the desired properties.
Returns a list of T-Norm models that can be used for ZT norm. In fact, it uses the model ids from two other splits of the data, specifically, the last two of the training splits. Hence, to get training data independent from ZT-Norm data, use maximum subworld=’fivefolds’ in the world query.
Keyword Parameters:
Returns: A list containing all Directory objects which have the desired properties.
Keyword Parameters:
Returns: A set of Directory objects with the given properties.
Returns the list of all training (world) File objects that satisfy your query. For possible keyword arguments, please check the implementation of the derived class Database.objects() function.
Sorts the given list of File objects and removes duplicates from it.
Keyword parameters:
Returns the valid types of worlds: (‘restricted’, ‘unrestricted’).
Keyword Parameters:
Returns: A set of Directory objects with the given properties.
Bases: sqlalchemy.ext.declarative.api.Base, bob.db.verification.utils.file.File
Information about the directories of the Youtube Faces database.
Wraps the current path so that a complete path is formed
Keyword parameters:
Returns a string containing the newly generated file path.
Saves the input data at the specified location and using the given extension.
Keyword parameters:
Bases: sqlalchemy.ext.declarative.api.Base
Information of the pairs (as given in the pairs.txt files) of the LFW database.