[refactorint2016] Moved entry points from bob.bio.db to bob.bio.video

parent 5c565d4a
#!/usr/bin/env python
from bob.bio.video.database import MobioBioDatabase
mobio_video_directory = "[YOUR_MOBIO_VIDEO_DIRECTORY]"
database = MobioBioDatabase(
original_directory=mobio_video_directory,
original_extension=".mp4",
protocol='male',
models_depend_on_protocol=True,
all_files_options={'subworld': 'twothirds-subsampled'},
extractor_training_options={'subworld': 'twothirds-subsampled'},
projector_training_options={'subworld': 'twothirds-subsampled'},
enroller_training_options={'subworld': 'twothirds-subsampled'},
)
#!/usr/bin/env python
from bob.bio.video.database import YoutubeBioDatabase
youtube_directory = "[YOUR_YOUTUBE_DIRECTORY]"
database = YoutubeBioDatabase(
original_directory=youtube_directory,
protocol='fold1',
models_depend_on_protocol=True,
training_depends_on_protocol=True,
all_files_options={'subworld': 'fivefolds'},
extractor_training_options={'subworld': 'fivefolds'},
projector_training_options={'subworld': 'fivefolds'},
enroller_training_options={'subworld': 'fivefolds'},
)
#!/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
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
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Amir Mohammadi <amir.mohammadi@idiap.ch>
# Wed 13 Jul 16:43:22 CEST 2016
"""
MOBIO database implementation of bob.bio.base.database.ZTDatabase interface.
It is an extension of an SQL-based database interface, which directly talks to Mobio database, for
verification experiments (good to use in bob.bio.base framework).
"""
from .database import VideoBioFile
from bob.bio.base.database import ZTBioDatabase, BioFile
class MobioBioDatabase(ZTBioDatabase):
"""
Implements verification API for querying Mobio database.
"""
def __init__(
self,
**kwargs
):
# call base class constructors to open a session to the database
super(MobioBioDatabase, self).__init__(name='mobio',
**kwargs)
from bob.db.mobio.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
def model_ids_with_protocol(self, groups=None, protocol=None, gender=None):
return self.__db.model_ids(groups=groups, protocol=protocol, gender=gender)
def tmodel_ids_with_protocol(self, protocol=None, groups=None, **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 [VideoBioFile(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 [VideoBioFile(f) for f in retval]
def zobjects(self, groups=None, protocol=None, **kwargs):
retval = self.__db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [VideoBioFile(f) for f in retval]
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# Sat 20 Aug 15:43:10 CEST 2016
"""
YOUTUBE database implementation of bob.bio.base.database.ZTDatabase interface.
It is an extension of an SQL-based database interface, which directly talks to YOUTUBE database, for
verification experiments (good to use in bob.bio.base framework).
"""
from .database import VideoBioFile
from bob.bio.base.database import ZTBioDatabase, BioFile
class YoutubeBioDatabase(ZTBioDatabase):
"""
Implements verification API for querying Youtube database.
"""
def __init__(
self,
**kwargs
):
# call base class constructors to open a session to the database
super(YoutubeBioDatabase, self).__init__(name='youtube',
**kwargs)
from bob.db.youtube.query import Database as LowLevelDatabase
self.__db = LowLevelDatabase()
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
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)
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 [VideoBioFile(client_id=f.client_id, path=f.path, file_id=f.id) 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 [VideoBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
def zobjects(self, groups=None, protocol=None, **kwargs):
retval = self.__db.zobjects(groups=groups, protocol=protocol, **kwargs)
return [VideoBioFile(client_id=f.client_id, path=f.path, file_id=f.id) for f in retval]
from bob.bio.db import ZTBioDatabase
from bob.bio.base.database import ZTBioDatabase
from bob.bio.base.test.utils import atnt_database_directory
......
; vim: set fileencoding=utf-8 :
; Manuel Guenther <manuel.guenther@idiap.ch>
; Thu Oct 9 16:51:06 CEST 2014
[buildout]
parts = scripts
eggs = bob.bio.face
bob.bio.video
gridtk
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/bob.extension
src/bob.blitz
src/bob.core
src/bob.io.base
src/bob.io.image
src/bob.io.video
src/bob.learn.activation
src/bob.math
src/bob.learn.linear
src/bob.sp
src/bob.ip.base
src/bob.ip.color
src/bob.ip.draw
src/bob.ip.gabor
src/bob.learn.em
src/bob.measure
src/bob.db.base
src/bob.bio.db
src/bob.db.atnt
src/bob.bio.base
src/bob.learn.boosting
src/bob.ip.facedetect
src/bob.ip.flandmark
src/bob.bio.face
.
; options for bob.buildout
debug = true
verbose = true
newest = false
[sources]
bob.extension = git https://gitlab.idiap.ch/bob/bob.extension
bob.blitz = git https://gitlab.idiap.ch/bob/bob.blitz
bob.core = git https://gitlab.idiap.ch/bob/bob.core
bob.io.base = git https://gitlab.idiap.ch/bob/bob.io.base
bob.io.image = git https://gitlab.idiap.ch/bob/bob.io.image
bob.io.video = git https://gitlab.idiap.ch/bob/bob.io.video
bob.learn.activation = git https://gitlab.idiap.ch/bob/bob.learn.activation
bob.math = git https://gitlab.idiap.ch/bob/bob.math
bob.sp = git https://gitlab.idiap.ch/bob/bob.sp
bob.ip.base = git https://gitlab.idiap.ch/bob/bob.ip.base
bob.ip.color = git https://gitlab.idiap.ch/bob/bob.ip.color
bob.ip.draw = git https://gitlab.idiap.ch/bob/bob.ip.draw
bob.ip.gabor = git https://gitlab.idiap.ch/bob/bob.ip.gabor
bob.learn.linear = git https://gitlab.idiap.ch/bob/bob.learn.linear
bob.learn.em = git https://gitlab.idiap.ch/bob/bob.learn.em
bob.measure = git https://gitlab.idiap.ch/bob/bob.measure
bob.db.base = git https://gitlab.idiap.ch/bob/bob.db.base
bob.bio.db = git https://gitlab.idiap.ch/bob/bob.bio.db
bob.db.atnt = git https://gitlab.idiap.ch/bob/bob.db.atnt
bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base branch=issue-8-remove-database-configuration
bob.bio.face = git https://gitlab.idiap.ch/bob/bob.bio.face branch=issue-8-remove-database-configuration
bob.learn.boosting = git https://gitlab.idiap.ch/bob/bob.learn.boosting
bob.ip.facedetect = git https://gitlab.idiap.ch/bob/bob.ip.facedetect
bob.ip.flandmark = git https://gitlab.idiap.ch/bob/bob.ip.flandmark
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = true
......@@ -12,28 +12,9 @@ extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/bob.extension
src/bob.blitz
src/bob.core
src/bob.io.base
src/bob.io.image
src/bob.io.video
src/bob.learn.activation
src/bob.math
src/bob.learn.linear
src/bob.sp
src/bob.ip.base
src/bob.ip.color
src/bob.ip.draw
src/bob.ip.gabor
src/bob.learn.em
src/bob.measure
src/bob.db.base
src/bob.bio.db
src/bob.db.atnt
src/bob.bio.base
src/bob.learn.boosting
src/bob.ip.facedetect
src/bob.ip.flandmark
src/bob.bio.face
.
......@@ -44,29 +25,28 @@ newest = false
[sources]
bob.extension = git https://gitlab.idiap.ch/bob/bob.extension
bob.blitz = git https://gitlab.idiap.ch/bob/bob.blitz
bob.core = git https://gitlab.idiap.ch/bob/bob.core
bob.io.base = git https://gitlab.idiap.ch/bob/bob.io.base
bob.io.image = git https://gitlab.idiap.ch/bob/bob.io.image
bob.io.video = git https://gitlab.idiap.ch/bob/bob.io.video
bob.learn.activation = git https://gitlab.idiap.ch/bob/bob.learn.activation
bob.math = git https://gitlab.idiap.ch/bob/bob.math
bob.sp = git https://gitlab.idiap.ch/bob/bob.sp
bob.ip.base = git https://gitlab.idiap.ch/bob/bob.ip.base
bob.ip.color = git https://gitlab.idiap.ch/bob/bob.ip.color
bob.ip.draw = git https://gitlab.idiap.ch/bob/bob.ip.draw
bob.ip.gabor = git https://gitlab.idiap.ch/bob/bob.ip.gabor
bob.learn.linear = git https://gitlab.idiap.ch/bob/bob.learn.linear
bob.learn.em = git https://gitlab.idiap.ch/bob/bob.learn.em
bob.measure = git https://gitlab.idiap.ch/bob/bob.measure
;bob.blitz = git https://gitlab.idiap.ch/bob/bob.blitz
;bob.core = git https://gitlab.idiap.ch/bob/bob.core
;bob.io.base = git https://gitlab.idiap.ch/bob/bob.io.base
;bob.io.image = git https://gitlab.idiap.ch/bob/bob.io.image
;bob.io.video = git https://gitlab.idiap.ch/bob/bob.io.video
;bob.learn.activation = git https://gitlab.idiap.ch/bob/bob.learn.activation
;bob.math = git https://gitlab.idiap.ch/bob/bob.math
;bob.sp = git https://gitlab.idiap.ch/bob/bob.sp
;bob.ip.base = git https://gitlab.idiap.ch/bob/bob.ip.base
;bob.ip.color = git https://gitlab.idiap.ch/bob/bob.ip.color
;bob.ip.draw = git https://gitlab.idiap.ch/bob/bob.ip.draw
;bob.ip.gabor = git https://gitlab.idiap.ch/bob/bob.ip.gabor
;bob.learn.linear = git https://gitlab.idiap.ch/bob/bob.learn.linear
;bob.learn.em = git https://gitlab.idiap.ch/bob/bob.learn.em
;bob.measure = git https://gitlab.idiap.ch/bob/bob.measure
bob.db.base = git https://gitlab.idiap.ch/bob/bob.db.base
bob.bio.db = git https://gitlab.idiap.ch/bob/bob.bio.db
bob.db.atnt = git https://gitlab.idiap.ch/bob/bob.db.atnt
bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base
bob.bio.face = git https://gitlab.idiap.ch/bob/bob.bio.face
bob.learn.boosting = git https://gitlab.idiap.ch/bob/bob.learn.boosting
bob.ip.facedetect = git https://gitlab.idiap.ch/bob/bob.ip.facedetect
bob.ip.flandmark = git https://gitlab.idiap.ch/bob/bob.ip.flandmark
bob.bio.base = git https://gitlab.idiap.ch/bob/bob.bio.base branch=issue-8-remove-database-configuration
bob.bio.face = git https://gitlab.idiap.ch/bob/bob.bio.face branch=issue-8-remove-database-configuration
;bob.learn.boosting = git https://gitlab.idiap.ch/bob/bob.learn.boosting
;bob.ip.facedetect = git https://gitlab.idiap.ch/bob/bob.ip.facedetect
;bob.ip.flandmark = git https://gitlab.idiap.ch/bob/bob.ip.flandmark
[scripts]
recipe = bob.buildout:scripts
......
......@@ -65,10 +65,12 @@ setup(
#
# In this simple example we will create a single program that will print
# the version of bob.
entry_points = {
entry_points={
'bob.bio.database': [
'dummy-video = bob.bio.video.test.dummy.database:database', # for test purposes only
'dummy-video = bob.bio.video.test.dummy.database:database',# for test purposes only
'mobio = bob.bio.video.config.database.mobio:database',
'youtube = bob.bio.video.config.database.youtube:database',
],
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment