Commit 4950137c authored by Pedro TOME's avatar Pedro TOME
Browse files

updated enrol to enroll

parent 3ab44940
......@@ -111,7 +111,7 @@ def add_protocols(session, file_list, verbose):
model_dict[model_id] = model
# Append enrollment file
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev', 'enroll'))
session.flush()
else:
......@@ -162,7 +162,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10:
p.train_files.append(f_file)
......@@ -214,7 +214,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10 and f_file.finger_id == 1:
p.train_files.append(f_file)
......@@ -264,7 +264,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10 and f_file.finger_id == 2:
p.train_files.append(f_file)
......@@ -314,7 +314,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10 and f_file.finger_id == 3:
p.train_files.append(f_file)
......@@ -364,7 +364,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10 and f_file.finger_id == 4:
p.train_files.append(f_file)
......@@ -415,7 +415,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10 and f_file.finger_id == 5:
p.train_files.append(f_file)
......@@ -466,7 +466,7 @@ def add_protocols(session, file_list, verbose):
# It is an enrollment file: append it
if isDevEnrollFile(f_file) or isEvalEnrollFile(f_file):
model_dict[model_id].enrollment_files.append(f_file)
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enrol'))
if verbose>1: print(" Adding enrollment entry ('%s') to Model ('%s') for protocol purpose ('%s', '%s','%s')..." % (f_file.path, model_id, p.name, 'dev' if isDevEnrollFile(f_file) else 'eval', 'enroll'))
elif f_file.client.subclient_id <= 10 and f_file.finger_id == 6:
p.train_files.append(f_file)
......
......@@ -177,7 +177,7 @@ class Database(bob.db.verification.utils.SQLiteDatabase):
One of the UTFVP protocols ('1vsall', 'nom','nomLeftRing','nomLeftMiddle','nomLeftIndex','nomRightIndex','nomRightMiddle','nomRightRing').
purposes
The purposes required to be retrieved ('enrol', 'probe', 'train') or a tuple
The purposes required to be retrieved ('enroll', 'probe', 'train') or a tuple
with several of them. If 'None' is given (this is the default), it is
considered the same as a tuple with all possible values. This field is
ignored for the data from the "world" group.
......@@ -245,7 +245,7 @@ class Database(bob.db.verification.utils.SQLiteDatabase):
sgroups = []
if 'dev' in groups: sgroups.append('dev')
if 'eval' in groups: sgroups.append('eval')
if 'enrol' in purposes:
if 'enroll' in purposes:
q = self.query(File).join(Client).join((Model, File.models_enroll)).join((Protocol, Model.protocol)).\
filter(and_(Protocol.name.in_(protocols), Model.sgroup.in_(sgroups)))
if model_ids:
......@@ -302,6 +302,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase):
return self.query(Protocol).filter(Protocol.name==name).one()
def purposes(self):
return ('train', 'enrol', 'probe')
return ('train', 'enroll', 'probe')
......@@ -112,8 +112,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev')), 1300) #(1440-140)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', model_ids=('1_2_3',))), 1300)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', purposes='enrol')), 1300)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', model_ids=('1_2_3',), purposes='enrol')), 1)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', purposes='enroll')), 1300)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', model_ids=('1_2_3',), purposes='enroll')), 1)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', model_ids=('1_2_3',), purposes='probe')), 1299)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', purposes='probe', classes='impostor')), 1300)
self.assertEqual(len(db.objects(protocol='1vsall', groups='dev', model_ids=('1_2_3',), purposes='probe', classes='client')), 3) # 4 acq - 1
......@@ -131,8 +131,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nom', groups='dev')), 432) #18 users * 6 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nom', groups='dev', model_ids=('11_2',))), 218) #18 users * 6 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nom', groups='dev', purposes='enrol')), 216) #18 users * 6 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nom', groups='dev', model_ids=('11_2',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nom', groups='dev', purposes='enroll')), 216) #18 users * 6 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nom', groups='dev', model_ids=('11_2',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nom', groups='dev', model_ids=('11_2',), purposes='probe')), 216) #18 users * 6 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nom', groups='dev', model_ids=('11_2',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nom', groups='dev', model_ids=('11_2',), purposes='probe', classes='impostor')), 214) #384 - 2
......@@ -140,8 +140,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nom', groups='eval')), 768) #32 users * 6 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nom', groups='eval', model_ids=('30_2',))), 386) #32 users * 6 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nom', groups='eval', purposes='enrol')), 384) #18 users * 6 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nom', groups='eval', model_ids=('30_2',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nom', groups='eval', purposes='enroll')), 384) #18 users * 6 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nom', groups='eval', model_ids=('30_2',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nom', groups='eval', model_ids=('30_2',), purposes='probe')), 384) #18 users * 6 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nom', groups='eval', model_ids=('30_2',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nom', groups='eval', model_ids=('30_2',), purposes='probe', classes='impostor')), 382) #384 - 2
......@@ -158,8 +158,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev')), 72) #18 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', model_ids=('11_1',))), 38) #18 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', purposes='enrol')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', model_ids=('11_1',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', purposes='enroll')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', model_ids=('11_1',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', model_ids=('11_1',), purposes='probe')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', model_ids=('11_1',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='dev', model_ids=('11_1',), purposes='probe', classes='impostor')), 34) #36 - 2
......@@ -167,8 +167,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval')), 128) #32 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', model_ids=('30_1',))), 66) #32 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', purposes='enrol')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', model_ids=('30_1',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', purposes='enroll')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', model_ids=('30_1',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', model_ids=('30_1',), purposes='probe')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', model_ids=('30_1',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftRing', groups='eval', model_ids=('30_1',), purposes='probe', classes='impostor')), 62) #64 - 2
......@@ -185,8 +185,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev')), 72) #18 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', model_ids=('11_2',))), 38) #18 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', purposes='enrol')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', model_ids=('11_2',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', purposes='enroll')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', model_ids=('11_2',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', model_ids=('11_2',), purposes='probe')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', model_ids=('11_2',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='dev', model_ids=('11_2',), purposes='probe', classes='impostor')), 34) #36 - 2
......@@ -194,8 +194,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval')), 128) #32 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', model_ids=('30_2',))), 66) #32 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', purposes='enrol')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', model_ids=('30_2',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', purposes='enroll')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', model_ids=('30_2',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', model_ids=('30_2',), purposes='probe')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', model_ids=('30_2',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftMiddle', groups='eval', model_ids=('30_2',), purposes='probe', classes='impostor')), 62) #64 - 2
......@@ -212,8 +212,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev')), 72) #18 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', model_ids=('11_3',))), 38) #18 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', purposes='enrol')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', model_ids=('11_3',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', purposes='enroll')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', model_ids=('11_3',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', model_ids=('11_3',), purposes='probe')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', model_ids=('11_3',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='dev', model_ids=('11_3',), purposes='probe', classes='impostor')), 34) #36 - 2
......@@ -221,8 +221,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval')), 128) #32 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', model_ids=('30_3',))), 66) #32 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', purposes='enrol')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', model_ids=('30_3',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', purposes='enroll')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', model_ids=('30_3',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', model_ids=('30_3',), purposes='probe')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', model_ids=('30_3',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomLeftIndex', groups='eval', model_ids=('30_3',), purposes='probe', classes='impostor')), 62) #64 - 2
......@@ -239,8 +239,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev')), 72) #18 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', model_ids=('11_4',))), 38) #18 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', purposes='enrol')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', model_ids=('11_4',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', purposes='enroll')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', model_ids=('11_4',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', model_ids=('11_4',), purposes='probe')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', model_ids=('11_4',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='dev', model_ids=('11_4',), purposes='probe', classes='impostor')), 34) #36 - 2
......@@ -248,8 +248,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval')), 128) #32 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', model_ids=('30_4',))), 66) #32 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', purposes='enrol')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', model_ids=('30_4',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', purposes='enroll')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', model_ids=('30_4',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', model_ids=('30_4',), purposes='probe')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', model_ids=('30_4',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomRightIndex', groups='eval', model_ids=('30_4',), purposes='probe', classes='impostor')), 62) #64 - 2
......@@ -266,8 +266,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev')), 72) #18 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', model_ids=('11_5',))), 38) #18 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', purposes='enrol')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', model_ids=('11_5',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', purposes='enroll')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', model_ids=('11_5',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', model_ids=('11_5',), purposes='probe')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', model_ids=('11_5',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='dev', model_ids=('11_5',), purposes='probe', classes='impostor')), 34) #36 - 2
......@@ -275,8 +275,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval')), 128) #32 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', model_ids=('30_5',))), 66) #32 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', purposes='enrol')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', model_ids=('30_5',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', purposes='enroll')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', model_ids=('30_5',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', model_ids=('30_5',), purposes='probe')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', model_ids=('30_5',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomRightMiddle', groups='eval', model_ids=('30_5',), purposes='probe', classes='impostor')), 62) #64 - 2
......@@ -293,8 +293,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Dev group
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev')), 72) #18 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', model_ids=('11_6',))), 38) #18 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', purposes='enrol')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', model_ids=('11_6',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', purposes='enroll')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', model_ids=('11_6',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', model_ids=('11_6',), purposes='probe')), 36) #18 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', model_ids=('11_6',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='dev', model_ids=('11_6',), purposes='probe', classes='impostor')), 34) #36 - 2
......@@ -302,8 +302,8 @@ class UTFVPDatabaseTest(unittest.TestCase):
# Eval group
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval')), 128) #32 users * 1 fingers * 4 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', model_ids=('30_6',))), 66) #32 users * 1 fingers * 2 acq + 2
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', purposes='enrol')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', model_ids=('30_6',), purposes='enrol')), 2)
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', purposes='enroll')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', model_ids=('30_6',), purposes='enroll')), 2)
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', model_ids=('30_6',), purposes='probe')), 64) #32 users * 1 fingers * 2 acq
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', model_ids=('30_6',), purposes='probe', classes='client')), 2)
self.assertEqual(len(db.objects(protocol='nomRightRing', groups='eval', model_ids=('30_6',), purposes='probe', classes='impostor')), 62) #64 - 2
......@@ -314,7 +314,7 @@ class UTFVPDatabaseTest(unittest.TestCase):
from bob.db.base.script.dbmanage import main
self.assertEqual(main('utfvp dumplist --self-test'.split()), 0)
self.assertEqual(main('utfvp dumplist --protocol=1vsall --class=client --group=dev --purpose=enrol --model=1_2_3 --self-test'.split()), 0)
self.assertEqual(main('utfvp dumplist --protocol=1vsall --class=client --group=dev --purpose=enroll --model=1_2_3 --self-test'.split()), 0)
self.assertEqual(main('utfvp checkfiles --self-test'.split()), 0)
self.assertEqual(main('utfvp reverse 0001/0001_1_1_120509-135315 --self-test'.split()), 0)
self.assertEqual(main('utfvp path 37 --self-test'.split()), 0)
......
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