Solving issue #8 from bob.bio.db . Moving database config files to bob.bio.db

parent 52ced2e3
Pipeline #3586 passed with stages
in 41 minutes and 27 seconds
#!/usr/bin/env python
from bob.bio.db import ARFaceBioDatabase
arface_directory = "[YOUR_ARFACE_DIRECTORY]"
database = ARFaceBioDatabase(
original_directory=arface_directory,
original_extension=".png",
protocol='all'
)
#!/usr/bin/env python
from bob.bio.db import BancaBioDatabase
banca_directory = "[YOUR_BANCA_DIRECTORY]"
database = BancaBioDatabase(
original_directory=banca_directory,
original_extension=".ppm",
protocol='P'
)
#!/usr/bin/env python
from bob.bio.db import CaspealBioDatabase
caspeal_directory = "[YOUR_CAS-PEAL_DIRECTORY]"
database = CaspealBioDatabase(
original_directory=caspeal_directory,
protocol='lighting'
)
#!/usr/bin/env python
import bob.db.frgc
import bob.bio.base
frgc_directory = "[YOUR_FRGC_DIRECTORY]"
database = bob.bio.base.database.DatabaseBob(
database = bob.db.frgc.Database(frgc_directory),
name = "frgc",
protocol = '2.0.1',
models_depend_on_protocol = True
)
#!/usr/bin/env python
from bob.bio.db import GBUBioDatabase
mbgc_v1_directory = "[YOUR_MBGC-V1_DIRECTORY]"
database = GBUBioDatabase(
original_directory=mbgc_v1_directory,
protocol='Good',
models_depend_on_protocol=True,
all_files_options={'subworld': 'x2'},
extractor_training_options={'subworld': 'x2'},
projector_training_options={'subworld': 'x2'},
enroller_training_options={'subworld': 'x2'}
)
#!/usr/bin/env python
from bob.bio.db import LFWBioDatabase
lfw_directory = "[YOUR_LFW_FUNNELED_DIRECTORY]"
database = LFWBioDatabase(
original_directory=lfw_directory,
annotation_type='funneled',
protocol='view1',
training_depends_on_protocol=True,
models_depend_on_protocol=True,
all_files_options={'world_type': 'restricted'},
extractor_training_options={'world_type': 'restricted'}, # 'subworld' : 'twofolds'
projector_training_options={'world_type': 'restricted'}, # 'subworld' : 'twofolds'
enroller_training_options={'world_type': 'restricted'} # 'subworld' : 'twofolds'
)
#!/usr/bin/env python
from bob.bio.db import LFWBioDatabase
lfw_directory = "[YOUR_LFW_FUNNELED_DIRECTORY]"
database = LFWBioDatabase(
original_directory=lfw_directory,
annotation_type='funneled',
protocol='view1',
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'
)
#!/usr/bin/env python
from bob.bio.db import MobioBioDatabase
mobio_image_directory = "[YOUR_MOBIO_IMAGE_DIRECTORY]"
mobio_annotation_directory = "[YOUR_MOBIO_ANNOTATION_DIRECTORY]"
database = MobioBioDatabase(
original_directory=mobio_image_directory,
original_extension=".png",
annotation_directory=mobio_annotation_directory,
protocol = 'female',
models_depend_on_protocol=True,
all_files_options={'gender': 'female'},
extractor_training_options={'gender': 'female'},
projector_training_options={'gender': 'female'},
enroller_training_options={'gender': 'female'},
z_probe_options={'gender': 'female'}
)
#!/usr/bin/env python
from bob.bio.db import MobioBioDatabase
mobio_image_directory = "[YOUR_MOBIO_IMAGE_DIRECTORY]"
mobio_annotation_directory = "[YOUR_MOBIO_ANNOTATION_DIRECTORY]"
database = MobioBioDatabase(
original_directory=mobio_image_directory,
original_extension=".png",
annotation_directory=mobio_annotation_directory,
protocol='male',
models_depend_on_protocol = True,
)
#!/usr/bin/env python
from bob.bio.db import MobioBioDatabase
mobio_image_directory = "[YOUR_MOBIO_IMAGE_DIRECTORY]"
mobio_annotation_directory = "[YOUR_MOBIO_ANNOTATION_DIRECTORY]"
database = MobioBioDatabase(
original_directory=mobio_image_directory,
original_extension=".png",
annotation_directory=mobio_annotation_directory,
protocol='male',
models_depend_on_protocol = True,
all_files_options={'gender': 'male'},
extractor_training_options={'gender': 'male'},
projector_training_options={'gender': 'male'},
enroller_training_options={'gender': 'male'},
z_probe_options={'gender': 'male'}
)
#!/usr/bin/env python
from bob.bio.db import MultipieBioDatabase
multipie_image_directory = "[YOUR_MULTI-PIE_IMAGE_DIRECTORY]"
multipie_annotation_directory = "[YOUR_MULTI-PIE_ANNOTATION_DIRECTORY]"
database = MultipieBioDatabase(
original_directory=multipie_image_directory,
annotation_directory=multipie_annotation_directory,
protocol='U',
training_depends_on_protocol = True
)
#!/usr/bin/env python
from bob.bio.db import MultipieBioDatabase
# here, we only want to have the cameras that are used in the P protocol
cameras = ('24_0', '01_0', '20_0', '19_0', '04_1', '05_0', '05_1', '14_0', '13_0', '08_0', '09_0', '12_0', '11_0')
multipie_image_directory = "[YOUR_MULTI-PIE_IMAGE_DIRECTORY]"
multipie_annotation_directory = "[YOUR_MULTI-PIE_ANNOTATION_DIRECTORY]"
database = MultipieBioDatabase(
original_directory=multipie_image_directory,
annotation_directory=multipie_annotation_directory,
protocol = 'P',
training_depends_on_protocol = True,
all_files_options={'cameras': cameras},
extractor_training_options={'cameras': cameras},
projector_training_options={'cameras': cameras, 'world_sampling': 3, 'world_first': True},
enroller_training_options={'cameras': cameras}
)
#!/usr/bin/env python
from bob.bio.db import SCFaceBioDatabase
scface_directory = "[YOUR_SC_FACE_DIRECTORY]"
database = SCFaceBioDatabase(
original_directory=scface_directory,
protocol='combined'
)
#!/usr/bin/env python
from bob.bio.db import XM2VTSBioDatabase
xm2vts_directory = "[YOUR_XM2VTS_DIRECTORY]"
database = XM2VTSBioDatabase(
original_directory=xm2vts_directory,
protocol='lp1'
)
......@@ -40,7 +40,7 @@ def _check_database(database, groups=('dev',), protocol=None, training_depends=F
assert len(database.arrange_by_client(database.training_files('train_enroller'))) > 0
for group in groups:
model_ids = database.model_ids(group, protocol=protocol)
model_ids = database.model_ids_with_protocol(group, protocol=protocol)
assert len(model_ids) > 0
assert database.client_id_from_model_id(model_ids[0]) is not None
assert len(database.enroll_files(model_ids[0], group)) > 0
......@@ -160,7 +160,7 @@ def test_mobio():
try:
_check_annotations(database)
except IOError as e:
except Exception as e:
raise SkipTest(
"The annotations could not be queried; probably the annotation files are missing. Here is the error: '%s'" % e)
......@@ -181,7 +181,7 @@ def test_multipie():
try:
_check_annotations(database)
except IOError as e:
except Exception as e:
raise SkipTest(
"The annotations could not be queried; probably the annotation files are missing. Here is the error: '%s'" % e)
......
......@@ -108,20 +108,19 @@ setup(
],
'bob.bio.database': [
'arface = bob.bio.face.config.database.arface:database',
'banca = bob.bio.face.config.database.banca_english:database',
'caspeal = bob.bio.face.config.database.caspeal:database',
'frgc = bob.bio.face.config.database.frgc:database',
'gbu = bob.bio.face.config.database.gbu:database',
'lfw-restricted = bob.bio.face.config.database.lfw_restricted:database',
'lfw-unrestricted = bob.bio.face.config.database.lfw_unrestricted:database',
'mobio-image = bob.bio.face.config.database.mobio_image:database',
'mobio-male = bob.bio.face.config.database.mobio_male:database', # MOBIO gender-dependent training
'mobio-female = bob.bio.face.config.database.mobio_female:database', # MOBIO gender-dependent training
'multipie = bob.bio.face.config.database.multipie:database',
'multipie-pose = bob.bio.face.config.database.multipie_pose:database',
'scface = bob.bio.face.config.database.scface:database',
'xm2vts = bob.bio.face.config.database.xm2vts:database',
'arface = bob.bio.db.default_configs.arface:database',
'banca = bob.bio.db.default_configs.banca_english:database',
'caspeal = bob.bio.db.default_configs.caspeal:database',
'frgc = bob.bio.db.default_configs.frgc:database',
'gbu = bob.bio.db.default_configs.gbu:database',
'lfw-restricted = bob.bio.db.default_configs.lfw_restricted:database',
'lfw-unrestricted = bob.bio.db.default_configs.lfw_unrestricted:database',
'mobio-male = bob.bio.db.default_configs.mobio_male:database', # MOBIO gender-dependent training
'mobio-female = bob.bio.db.default_configs.mobio_female:database', # MOBIO gender-dependent training
'multipie = bob.bio.db.default_configs.multipie:database',
'multipie-pose = bob.bio.db.default_configs.multipie_pose:database',
'scface = bob.bio.db.default_configs.scface:database',
'xm2vts = bob.bio.db.default_configs.xm2vts:database',
],
'bob.bio.preprocessor': [
......
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