Commit 1ec2a411 authored by Anjith GEORGE's avatar Anjith GEORGE
Browse files

Commenting out private db import

parent 2ce0edf9
Pipeline #26475 passed with stage
in 9 minutes and 25 seconds
......@@ -303,7 +303,6 @@ class BatlPadDatabase(PadDatabase):
self.map_dict=map_dict
@property
def original_directory(self):
return self.db.original_directory
......@@ -360,13 +359,6 @@ class BatlPadDatabase(PadDatabase):
return mod_files
def parse_protocol(self, protocol):
"""
Parse the protocol name, which is give as a string.
......
......@@ -220,135 +220,135 @@ def test_casiasurf():
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
% e)
# Test the BATL database
@db_available('batl-db')
def test_aggregated_db():
batl_db = bob.bio.base.load_resource(
'batl-db',
'database',
preferred_package='bob.pad.face',
package_prefix='bob.pad.')
try:
assert len(
batl_db.objects(groups=['train', 'dev', 'eval'])) == 1679
assert len(batl_db.objects(groups=['train', 'dev'])) == 1122
assert len(batl_db.objects(groups=['train'])) == 565
assert len(batl_db.objects(groups='train')) == 565
assert len(batl_db.objects(groups='dev')) == 557
assert len(batl_db.objects(groups='eval')) == 557
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'], protocol='grandtest')) == 1679
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest',
purposes='real')) == 347
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest',
purposes='attack')) == 1332
#tests for join_train_dev protocols
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-join_train_dev')) == 1679
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-join_train_dev')) == 1679
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-join_train_dev')) == 557
# test for LOO_fakehead
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_fakehead')) == 1149
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_fakehead')) == 1017
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_fakehead')) == 132
# test for LOO_flexiblemask
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_flexiblemask')) == 1132
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_flexiblemask')) == 880
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_flexiblemask')) == 252
# test for LOO_glasses
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_glasses')) == 1206
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_glasses')) == 1069
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_glasses')) == 137
# test for LOO_papermask
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_papermask')) == 1308
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_papermask')) == 1122
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_papermask')) == 186
# test for LOO_prints
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_prints')) == 1169
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_prints')) == 988
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_prints')) == 181
# test for LOO_replay
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_replay')) == 1049
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_replay')) == 854
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_replay')) == 195
# test for LOO_rigidmask
assert len(
batl_db.objects(
groups=['train', 'dev', 'eval'],
protocol='grandtest-color-50-LOO_rigidmask')) == 1198
assert len(
batl_db.objects(
groups=['train', 'dev'], protocol='grandtest-color-50-LOO_rigidmask')) == 1034
assert len(
batl_db.objects(groups='eval',
protocol='grandtest-color-50-LOO_rigidmask')) == 164
except IOError as e:
raise SkipTest(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
% e)
\ No newline at end of file
# # Test the BATL database
# @db_available('batl-db')
# def test_aggregated_db():
# batl_db = bob.bio.base.load_resource(
# 'batl-db',
# 'database',
# preferred_package='bob.pad.face',
# package_prefix='bob.pad.')
# try:
# assert len(
# batl_db.objects(groups=['train', 'dev', 'eval'])) == 1679
# assert len(batl_db.objects(groups=['train', 'dev'])) == 1122
# assert len(batl_db.objects(groups=['train'])) == 565
# assert len(batl_db.objects(groups='train')) == 565
# assert len(batl_db.objects(groups='dev')) == 557
# assert len(batl_db.objects(groups='eval')) == 557
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'], protocol='grandtest')) == 1679
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest',
# purposes='real')) == 347
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest',
# purposes='attack')) == 1332
# #tests for join_train_dev protocols
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-join_train_dev')) == 1679
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-join_train_dev')) == 1679
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-join_train_dev')) == 557
# # test for LOO_fakehead
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_fakehead')) == 1149
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_fakehead')) == 1017
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_fakehead')) == 132
# # test for LOO_flexiblemask
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_flexiblemask')) == 1132
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_flexiblemask')) == 880
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_flexiblemask')) == 252
# # test for LOO_glasses
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_glasses')) == 1206
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_glasses')) == 1069
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_glasses')) == 137
# # test for LOO_papermask
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_papermask')) == 1308
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_papermask')) == 1122
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_papermask')) == 186
# # test for LOO_prints
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_prints')) == 1169
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_prints')) == 988
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_prints')) == 181
# # test for LOO_replay
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_replay')) == 1049
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_replay')) == 854
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_replay')) == 195
# # test for LOO_rigidmask
# assert len(
# batl_db.objects(
# groups=['train', 'dev', 'eval'],
# protocol='grandtest-color-50-LOO_rigidmask')) == 1198
# assert len(
# batl_db.objects(
# groups=['train', 'dev'], protocol='grandtest-color-50-LOO_rigidmask')) == 1034
# assert len(
# batl_db.objects(groups='eval',
# protocol='grandtest-color-50-LOO_rigidmask')) == 164
# except IOError as e:
# raise SkipTest(
# "The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
# % e)
\ No newline at end of file
......@@ -67,7 +67,6 @@ test:
- bob.db.mobio
- bob.db.maskattack
- bob.db.casiasurf
- bob.db.batl
- bob.rppg.base
about:
......
Supports Markdown
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