Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.db.replay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.db.replay
Commits
5da5f476
Commit
5da5f476
authored
12 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Add special methods for break-down analysis
parent
e42a55ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xbob/db/replay/spoofing.py
+39
-0
39 additions, 0 deletions
xbob/db/replay/spoofing.py
with
39 additions
and
0 deletions
xbob/db/replay/spoofing.py
+
39
−
0
View file @
5da5f476
...
@@ -93,6 +93,16 @@ class Database(DatabaseBase):
...
@@ -93,6 +93,16 @@ class Database(DatabaseBase):
return
return
create_subparser
.
__doc__
=
DatabaseBase
.
create_subparser
.
__doc__
create_subparser
.
__doc__
=
DatabaseBase
.
create_subparser
.
__doc__
def
name
(
self
):
from
.driver
import
Interface
i
=
Interface
()
return
"
Replay Attack Database (%s)
"
%
i
.
name
()
def
version
(
self
):
from
.driver
import
Interface
i
=
Interface
()
return
i
.
version
()
def
short_description
(
self
):
def
short_description
(
self
):
return
"
Anti-Spoofing database with 1300 videos produced at Idiap, Switzerland
"
return
"
Anti-Spoofing database with 1300 videos produced at Idiap, Switzerland
"
...
@@ -135,6 +145,35 @@ class Database(DatabaseBase):
...
@@ -135,6 +145,35 @@ class Database(DatabaseBase):
return
self
.
get_data
(
'
test
'
)
return
self
.
get_data
(
'
test
'
)
get_test_data
.
__doc__
=
DatabaseBase
.
get_test_data
.
__doc__
get_test_data
.
__doc__
=
DatabaseBase
.
get_test_data
.
__doc__
def
get_test_filters
(
self
):
return
(
'
device
'
,
'
support
'
)
def
get_filtered_test_data
(
self
,
filter
):
def
device_filter
(
obj
,
filter
):
return
obj
.
make_path
().
find
(
'
attack_
'
+
filter
)
!=
-
1
def
support_filter
(
obj
,
filter
):
return
obj
.
make_path
().
find
(
filter
)
!=
-
1
real
,
attack
=
self
.
get_test_data
()
if
filter
==
'
device
'
:
return
{
'
print
'
:
(
real
,
[
k
for
k
in
attack
if
device_filter
(
k
,
'
print
'
)]),
'
mobile
'
:
(
real
,
[
k
for
k
in
attack
if
device_filter
(
k
,
'
mobile
'
)]),
'
highdef
'
:
(
real
,
[
k
for
k
in
attack
if
device_filter
(
k
,
'
highdef
'
)]),
}
elif
filter
==
'
support
'
:
return
{
'
hand
'
:
(
real
,
[
k
for
k
in
attack
if
support_filter
(
k
,
'
hand
'
)]),
'
fixed
'
:
(
real
,
[
k
for
k
in
attack
if
support_filter
(
k
,
'
fixed
'
)]),
}
raise
RuntimeError
,
\
"
filter parameter should specify a valid filter among `%s
'"
%
\
self
.
get_test_filters
()
def
get_all_data
(
self
):
def
get_all_data
(
self
):
return
self
.
get_data
(
None
)
return
self
.
get_data
(
None
)
get_all_data
.
__doc__
=
DatabaseBase
.
get_all_data
.
__doc__
get_all_data
.
__doc__
=
DatabaseBase
.
get_all_data
.
__doc__
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment