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

Merge branch 'add-casiasurf-test-labels' into 'master'

[database] added test labels for CASIA-SURF (and corresponding tests)

See merge request !102
parents 8d8bdbaa 7aee6eb7
Pipeline #36693 passed with stages
in 10 minutes and 41 seconds
...@@ -175,8 +175,10 @@ class CasiaSurfPadDatabase(PadDatabase): ...@@ -175,8 +175,10 @@ class CasiaSurfPadDatabase(PadDatabase):
lowlevel_purposes.append('attack') lowlevel_purposes.append('attack')
# for eval # for eval
if 'test' in groups and 'real' in purposes:
lowlevel_purposes.append('real')
if 'test' in groups and 'attack' in purposes: if 'test' in groups and 'attack' in purposes:
lowlevel_purposes.append('unknown') lowlevel_purposes.append('attack')
samples = self.db.objects(groups=groups, purposes=lowlevel_purposes, **kwargs) samples = self.db.objects(groups=groups, purposes=lowlevel_purposes, **kwargs)
samples = [CasiaSurfPadFile(s, stream_type=protocol) for s in samples] samples = [CasiaSurfPadFile(s, stream_type=protocol) for s in samples]
......
...@@ -224,7 +224,9 @@ def test_casiasurf(): ...@@ -224,7 +224,9 @@ def test_casiasurf():
assert len(casiasurf.objects(groups=('dev',), purposes=('real',))) == 2994 assert len(casiasurf.objects(groups=('dev',), purposes=('real',))) == 2994
assert len(casiasurf.objects(groups=('dev',), purposes=('attack',))) == 6614 assert len(casiasurf.objects(groups=('dev',), purposes=('attack',))) == 6614
assert len(casiasurf.objects(groups=('dev',), purposes=('real','attack'))) == 9608 assert len(casiasurf.objects(groups=('dev',), purposes=('real','attack'))) == 9608
assert len(casiasurf.objects(groups=('eval',), purposes=('attack',))) == 57710 assert len(casiasurf.objects(groups=('eval',), purposes=('real',))) == 17458
assert len(casiasurf.objects(groups=('eval',), purposes=('attack',))) == 40252
assert len(casiasurf.objects(groups=('eval',), purposes=('real','attack'))) == 57710
except IOError as e: except IOError as e:
raise SkipTest( raise SkipTest(
......
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