database.py 711 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# Wed 20 July 14:43:22 CEST 2016

"""
  Verification API for bob.db.voxforge
"""

from bob.bio.base.database.file import BioFile
11
from bob.bio.video.utils.FrameSelector import FrameSelector
12 13 14 15 16 17 18 19 20 21 22 23


class VideoBioFile(BioFile):
    def __init__(self, f):
        """
        Initializes this File object with an File equivalent for
        VoxForge database.
        """
        super(VideoBioFile, self).__init__(client_id=f.client_id, path=f.path, file_id=f.id)

        self.__f = f

24 25 26 27
    def load(self, directory=None, extension='.avi'):
        return FrameSelector()(self.make_path(directory, extension))


28