Commit 10738838 authored by Amir Mohammadi's avatar Amir Mohammadi

fixes several bugs regarding database annotations

parent 9d8dfd03
Pipeline #6389 canceled with stages
in 12 minutes and 12 seconds
......@@ -9,4 +9,3 @@ database = BancaBioDatabase(
original_extension=".ppm",
protocol='P'
)
......@@ -8,4 +8,3 @@ database = CaspealBioDatabase(
original_directory=caspeal_directory,
protocol='lighting'
)
......@@ -14,4 +14,3 @@ database = GBUBioDatabase(
projector_training_options={'subworld': 'x2'},
enroller_training_options={'subworld': 'x2'}
)
......@@ -12,9 +12,8 @@ database = LFWBioDatabase(
training_depends_on_protocol=True,
models_depend_on_protocol=True,
all_files_options = { 'world_type' : 'unrestricted' },
extractor_training_options = { 'world_type' : 'unrestricted' }, # 'subworld' : 'twofolds'
projector_training_options = { 'world_type' : 'unrestricted' }, # 'subworld' : 'twofolds'
enroller_training_options = { 'world_type' : 'unrestricted' } # 'subworld' : 'twofolds'
all_files_options={'world_type': 'unrestricted'},
extractor_training_options={'world_type': 'unrestricted'}, # 'subworld' : 'twofolds'
projector_training_options={'world_type': 'unrestricted'}, # 'subworld' : 'twofolds'
enroller_training_options={'world_type': 'unrestricted'} # 'subworld' : 'twofolds'
)
......@@ -9,5 +9,5 @@ database = MultipieBioDatabase(
original_directory=multipie_image_directory,
annotation_directory=multipie_annotation_directory,
protocol='U',
training_depends_on_protocol = True
training_depends_on_protocol=True
)
......@@ -48,5 +48,6 @@ __appropriate__(
FRGCBioDatabase,
CUHK_CUFSBioDatabase,
SCFaceBioDatabase,
ReplayMobileBioDatabase,
)
__all__ = [_ for _ in dir() if not _.startswith('_')]
......@@ -10,27 +10,45 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class ARFaceBioFile(FaceBioFile):
def __init__(self, f):
super(ARFaceBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class ARFaceBioDatabase(BioDatabase):
"""
Implements verification API for querying ARFACE database.
ARFace database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of an SQL-based database interface, which directly talks to ARFACE database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.ppm',
**kwargs
):
# call base class constructors to open a session to the database
super(ARFaceBioDatabase, self).__init__(name='arface', **kwargs)
super(ARFaceBioDatabase, self).__init__(
name='arface',
original_directory=original_directory,
original_extension=original_extension,
**kwargs)
from bob.db.arface.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [ARFaceBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -10,27 +10,38 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class AtntBioDatabase(BioDatabase):
"""
Implements verification API for querying Atnt database.
ATNT database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of the database interface, which directly talks to ATNT database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.pgm',
**kwargs
):
# call base class constructors to open a session to the database
super(AtntBioDatabase, self).__init__(name='atnt', **kwargs)
super(AtntBioDatabase, self).__init__(
name='atnt',
original_directory=original_directory,
original_extension=original_extension,
**kwargs)
from bob.db.atnt.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
def annotations(self, file):
return None
......@@ -10,38 +10,56 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import ZTBioDatabase, BioFile
from bob.bio.base.database import ZTBioDatabase
class BancaBioFile(FaceBioFile):
def __init__(self, f):
super(BancaBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class BancaBioDatabase(ZTBioDatabase):
"""
Implements verification API for querying Banca database.
BANCA database implementation of :py:class:`bob.bio.base.database.ZTBioDatabase` interface.
It is an extension of an SQL-based database interface, which directly talks to Banca database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension=None,
**kwargs
):
# call base class constructors to open a session to the database
super(BancaBioDatabase, self).__init__(name='banca', **kwargs)
super(BancaBioDatabase, self).__init__(
name='banca',
original_directory=original_directory,
original_extension=original_extension,
**kwargs)
from bob.db.banca.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def tmodel_ids_with_protocol(self, protocol=None, groups=None, **kwargs):
return self.__db.tmodel_ids(protocol=protocol, groups=groups, **kwargs)
return self._db.tmodel_ids(protocol=protocol, groups=groups, **kwargs)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [BancaBioFile(f) for f in retval]
def tobjects(self, groups=None, protocol=None, model_ids=None, **kwargs):
retval = self.__db.tobjects(groups=groups, protocol=protocol, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.tobjects(groups=groups, protocol=protocol, model_ids=model_ids, **kwargs)
return [BancaBioFile(f) for f in retval]
def zobjects(self, groups=None, protocol=None, **kwargs):
retval = self.__db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [BancaBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -10,27 +10,45 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class CaspealBioFile(FaceBioFile):
def __init__(self, f):
super(CaspealBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class CaspealBioDatabase(BioDatabase):
"""
Implements verification API for querying Caspeal database.
Caspeal database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of an SQL-based database interface, which directly talks to Caspeal database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.tif',
**kwargs
):
# call base class constructors to open a session to the database
super(CaspealBioDatabase, self).__init__(name='caspeal', **kwargs)
super(CaspealBioDatabase, self).__init__(
name='caspeal',
original_directory=original_directory,
original_extension=original_extension,
**kwargs)
from bob.db.caspeal.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [CaspealBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -10,38 +10,60 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import ZTBioDatabase, BioFile
from bob.bio.base.database import ZTBioDatabase
class CUHK_CUFSBioFile(FaceBioFile):
def __init__(self, f):
super(CUHK_CUFSBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class CUHK_CUFSBioDatabase(ZTBioDatabase):
"""
Implements verification API for querying CUHK_CUFS database.
CUHK_CUFS database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of an SQL-based database interface, which directly talks to CUHK_CUFS database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension=None,
arface_directory="",
xm2vts_directory="",
**kwargs
):
# call base class constructors to open a session to the database
super(CUHK_CUFSBioDatabase, self).__init__(name='cuhk_cufs', **kwargs)
super(CUHK_CUFSBioDatabase, self).__init__(
name='cuhk_cufs',
original_directory=original_directory,
original_extension=original_extension,
arface_directory=arface_directory,
xm2vts_directory=xm2vts_directory,
**kwargs)
from bob.db.cuhk_cufs.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension, arface_directory, xm2vts_directory)
def model_ids_with_protocol(self, groups=None, protocol="search_split1_p2s", **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def tmodel_ids_with_protocol(self, protocol="search_split1_p2s", groups=None, **kwargs):
return self.__db.tmodel_ids(protocol=protocol, groups=groups, **kwargs)
return self._db.tmodel_ids(protocol=protocol, groups=groups, **kwargs)
def objects(self, groups=None, protocol="search_split1_p2s", purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [CUHK_CUFSBioFile(f) for f in retval]
def tobjects(self, groups=None, protocol="search_split1_p2s", model_ids=None, **kwargs):
retval = self.__db.tobjects(groups=groups, protocol=protocol, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.tobjects(groups=groups, protocol=protocol, model_ids=model_ids, **kwargs)
return [CUHK_CUFSBioFile(f) for f in retval]
def zobjects(self, groups=None, protocol="search_split1_p2s", **kwargs):
retval = self.__db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [CUHK_CUFSBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -11,27 +11,45 @@
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class FRGCBioFile(FaceBioFile):
def __init__(self, f):
super(FRGCBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class FRGCBioDatabase(BioDatabase):
"""
Implements verification API for querying FRGC database.
FRGC database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of the low-level database interface, which directly talks to FRGC database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.jpg',
**kwargs
):
# call base class constructors to open a session to the database
super(FRGCBioDatabase, self).__init__(name='frgc', **kwargs)
super(FRGCBioDatabase, self).__init__(
name='frgc',
original_directory=original_directory,
original_extension=original_extension,
**kwargs)
from bob.db.frgc.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FRGCBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -10,27 +10,45 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class GBUBioFile(FaceBioFile):
def __init__(self, f):
super(GBUBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class GBUBioDatabase(BioDatabase):
"""
Implements verification API for querying gbu database.
GBU database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of an SQL-based database interface, which directly talks to GBU database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.jpg',
**kwargs
):
# call base class constructors to open a session to the database
super(GBUBioDatabase, self).__init__(name='GBU', **kwargs)
super(GBUBioDatabase, self).__init__(
name='GBU',
original_directory=original_directory,
original_extension=original_extension,
**kwargs)
from bob.db.gbu.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [GBUBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -10,27 +10,48 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class IJBABioFile(FaceBioFile):
def __init__(self, f):
super(IJBABioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class IJBABioDatabase(BioDatabase):
"""
Implements verification API for querying IJBA database.
IJBA database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of an SQL-based database interface, which directly talks to IJBA database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
annotations_directory=None,
original_extension=None,
**kwargs
):
# call base class constructors to open a session to the database
super(IJBABioDatabase, self).__init__(name='ijba', **kwargs)
super(IJBABioDatabase, self).__init__(
name='ijba',
original_directory=original_directory,
annotations_directory=annotations_directory,
original_extension=original_extension,
**kwargs)
from bob.db.ijba.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, annotations_directory,
original_extension)
def model_ids_with_protocol(self, groups=None, protocol="search_split1", **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol="search_split1", purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [IJBABioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -11,27 +11,47 @@
from .database import FaceBioFile
from bob.bio.base.database import BioDatabase, BioFile
from bob.bio.base.database import BioDatabase
class LFWBioFile(FaceBioFile):
def __init__(self, f):
super(LFWBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class LFWBioDatabase(BioDatabase):
"""
Implements verification API for querying LFW database.
LFW database implementation of bob.bio.base.database.Database interface.
It is an extension of an SQL-based database interface, which directly talks to LFW database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.jpg',
annotation_type=None,
**kwargs
):
# call base class constructors to open a session to the database
super(LFWBioDatabase, self).__init__(name='lfw', **kwargs)
super(LFWBioDatabase, self).__init__(
name='lfw',
original_directory=original_directory,
original_extension=original_extension,
annotation_type=annotation_type,
**kwargs)
from bob.db.lfw.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory, original_extension, annotation_type)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [LFWBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -18,7 +18,7 @@ class MobioBioFile(FaceBioFile):
"""FaceBioFile implementation of the Replay Mobile Database"""
def __init__(self, f):
super(FaceBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
super(MobioBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
......
......@@ -10,39 +10,63 @@
"""
from .database import FaceBioFile
from bob.bio.base.database import ZTBioDatabase, BioFile
from bob.bio.base.database import ZTBioDatabase
class MultipieBioFile(FaceBioFile):
def __init__(self, f):
super(MultipieBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
class MultipieBioDatabase(ZTBioDatabase):
"""
Implements verification API for querying MULTIPIE database.
Multipie database implementation of bob.bio.base.database.Database interface.
It is an extension of an SQL-based database interface, which directly talks to Multipie database, for
verification experiments (good to use in bob.bio.base framework).
"""
def __init__(
self,
original_directory=None,
original_extension='.png',
annotation_directory=None,
annotation_extension='.pos',
**kwargs
):
# call base class constructors to open a session to the database
super(MultipieBioDatabase, self).__init__(name='multipie', **kwargs)
super(MultipieBioDatabase, self).__init__(
name='multipie',
original_directory=original_directory,
original_extension=original_extension,
annotation_directory=annotation_directory,
annotation_extension=annotation_extension,
**kwargs)
from bob.db.multipie.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
self._db = LowLevelDatabase(original_directory,
original_extension,
annotation_directory,
annotation_extension)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups=groups, protocol=protocol)
return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
retval = self.__db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [BioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.objects(groups=groups, protocol=protocol, purposes=purposes, model_ids=model_ids, **kwargs)
return [MultipieBioFile(f) for f in retval]
def tmodel_ids_with_protocol(self, protocol=None, groups=None, **kwargs):
return self.__db.tmodel_ids(protocol=protocol, groups=groups, **kwargs)
return self._db.tmodel_ids(protocol=protocol, groups=groups, **kwargs)
def tobjects(self, groups=None, protocol=None, model_ids=None, **kwargs):
retval = self.__db.tobjects(groups=groups, protocol=protocol, model_ids=model_ids, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.tobjects(groups=groups, protocol=protocol, model_ids=model_ids, **kwargs)
return [MultipieBioFile(f) for f in retval]
def zobjects(self, groups=None, protocol=None, **kwargs):
retval = self.__db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [FaceBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
retval = self._db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [MultipieBioFile(f) for f in retval]
def annotations(self, myfile):
return self._db.annotations(myfile._f)
......@@ -18,7 +18,7 @@ class ReplayBioFile(FaceBioFile):
"""BioFile implementation for the bob.db.replay database"""
def __init__(self, f):
super(FaceBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
super(ReplayBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)
self._f = f
def load(self, directory=None, extension=None):
......@@ -29,8 +29,10 @@ class ReplayBioFile(FaceBioFile):
class ReplayBioDatabase(BioDatabase):
"""
Implements verification API for querying Replay database.
This database only loads the 10th image from the video files
Replay attack database implementation of bob.bio.base.database.BioDatabase interface.
It is an extension of an SQL-based database interface, which directly talks to Replay database, for
verification experiments (good to use in bob.bio.base framework).
It also implements a kind of hack so that you can run vulnerability analysis with it.
"""
__doc__ = __doc__
......@@ -39,7 +41,7 @@ class ReplayBioDatabase(BioDatabase):