Commit d41de6b0 authored by Manuel Günther's avatar Manuel Günther

Added script to test video extensions on AT&T

parent d66176e9
......@@ -47,7 +47,7 @@ class Extractor (
if self.compressed_io:
return utils.save_compressed(frame_container, filename, self.extractor.write_feature)
else:, 'w'), self.extractor.save_feature), 'w'), self.extractor.write_feature)
def train(self, data_list, extractor_file):
import bob.db.atnt
import os
from import DatabaseBob, DatabaseBobZT
from import atnt_database_directory
class DummyDatabase (DatabaseBobZT):
def __init__(self):
# call base class constructor with useful parameters
database = bob.db.atnt.Database(
original_directory = atnt_database_directory()
name = 'test',
check_original_files_for_existence = True,
training_depends_on_protocol = False,
models_depend_on_protocol = False
def all_files(self, groups = ['dev']):
return DatabaseBob.all_files(self, groups)
def t_model_ids(self, group = 'dev'):
return self.model_ids(group)
def t_enroll_files(self, model_id, group = 'dev'):
return self.enroll_files(model_id, group)
def z_probe_files(self, group = 'dev'):
return self.probe_files(None, group)
# override the original file names to return a one-element lists of file names
def original_file_names(self, files):
return [[n] for n in self.database.original_file_names(files, self.check_existence)]
database = DummyDatabase()
from __future__ import print_function
import tempfile
from import _verify
def test_verify_video():
test_dir = tempfile.mkdtemp(prefix='bobtest_')
# define dummy parameters
parameters = [
'-d', 'dummy-video',
'-p', '"dummy")',
'-e', '"dummy")',
'-a', '"dummy")',
'-s', 'test_video',
'--temp-directory', test_dir,
'--result-directory', test_dir,
'--imports', ''
print (
_verify(parameters, test_dir, 'test_video')
......@@ -104,6 +104,7 @@ setup(
'': [
'mobio-video =',
'youtube =',
'dummy-video =', # for test purposes only
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment