.. vim: set fileencoding=utf-8 : .. @author: Tiago de Freitas Pereira ============== User's Guide ============== This package works jointly with the package :py:class:`bob.db.lfw.Database`. The idea here is to use the data from CASIA WebFace to train background models (UBM, CNN, PCA, etc..) and use the LFW evaluation protocols to measure the performance in terms of error rates. Following the same strategy as in :py:class:`bob.db.lfw.Database`, we developed a 10 fold protocols (lfw_fold1, lfw_fold2, .... ,lfw_fold10), such that the **world** set for each protocol is composed by the 494,414 face images of the 10,575 identities of the CASIA WebFace database. The **dev** and the **eval** set are the same as in :py:class:`bob.db.lfw.Database`. We have also an extra protocol called `pure_casia` which contains only data from CASIA WebFace. This one does not have `dev` and `eval` sets. Code samples ============ Follow bellow some code samples on how to fetch the data from this database package. Fetching protocols ------------------ Getting all the available protocols in this database. .. code-block:: python >>> import bob.db.casia_webface >>> db = bob.db.casia_webface >>> >>> protocols = db.protocols() >>> print protocols >>> ['pure_casia', 'lfw_fold1', 'lfw_fold2', 'lfw_fold3', 'lfw_fold4', 'lfw_fold5', 'lfw_fold6', 'lfw_fold7', 'lfw_fold8', 'lfw_fold9', 'lfw_fold10'] Fetching file objects --------------------- Getting file objects. .. code-block:: python >>> import bob.db.casia_webface >>> db = bob.db.casia_webface >>> >>> #fetching world set >>> world = db.objects(protocol="lfw_fold1", groups="world") >>> gallery = db.objects(protocol="lfw_fold1", groups="dev", purposes="enroll") >>> probes = db.objects(protocol="lfw_fold1", groups="world", purposes="probe") >>> print len(world) 494414 >>> print len(gallery) 916 >>> print len(probes) 473 .. _bob: https://www.idiap.ch/software/bob