Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.face
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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.pad.face
Commits
ef97e51a
Commit
ef97e51a
authored
6 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[database] fixed high-level interface for CASIA-SURF
parent
6da741c1
No related branches found
No related tags found
1 merge request
!77
CASIA-SURF database
Pipeline
#26254
passed
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/database/casiasurf.py
+3
-13
3 additions, 13 deletions
bob/pad/face/database/casiasurf.py
with
3 additions
and
13 deletions
bob/pad/face/database/casiasurf.py
+
3
−
13
View file @
ef97e51a
...
@@ -46,12 +46,11 @@ class CasiaSurfPadFile(VideoPadFile):
...
@@ -46,12 +46,11 @@ class CasiaSurfPadFile(VideoPadFile):
client_id
=
s
.
id
,
client_id
=
s
.
id
,
file_id
=
s
.
id
,
file_id
=
s
.
id
,
attack_type
=
attack_type
,
attack_type
=
attack_type
,
path
=
''
)
path
=
s
.
id
)
def
load
(
self
,
directory
=
None
,
extension
=
'
.jpg
'
,
frame_selector
=
FrameSelector
(
selection_style
=
'
all
'
)):
def
load
(
self
,
directory
=
None
,
extension
=
'
.jpg
'
,
frame_selector
=
FrameSelector
(
selection_style
=
'
all
'
)):
"""
Over
rid
de
n
version of the load method defined in ``VideoPadFile``.
"""
Over
loa
de
d
version of the load method defined in ``VideoPadFile``.
Parameters
Parameters
----------
----------
...
@@ -165,9 +164,7 @@ class CasiaSurfPadDatabase(PadDatabase):
...
@@ -165,9 +164,7 @@ class CasiaSurfPadDatabase(PadDatabase):
A list of CasiaSurfPadFile objects.
A list of CasiaSurfPadFile objects.
"""
"""
print
(
groups
)
groups
=
self
.
convert_names_to_lowlevel
(
groups
,
self
.
low_level_group_names
,
self
.
high_level_group_names
)
groups
=
self
.
convert_names_to_lowlevel
(
groups
,
self
.
low_level_group_names
,
self
.
high_level_group_names
)
print
(
groups
)
if
groups
is
not
None
:
if
groups
is
not
None
:
...
@@ -179,17 +176,11 @@ class CasiaSurfPadDatabase(PadDatabase):
...
@@ -179,17 +176,11 @@ class CasiaSurfPadDatabase(PadDatabase):
lowlevel_purposes
.
append
(
'
attack
'
)
lowlevel_purposes
.
append
(
'
attack
'
)
# for dev and eval
# for dev and eval
if
(
'
validation
'
in
groups
or
'
test
'
in
groups
)
and
purposes
==
'
real
'
:
if
(
'
validation
'
in
groups
or
'
test
'
in
groups
)
and
'
attack
'
in
purposes
:
lowlevel_purposes
.
append
(
'
unknown
'
)
if
(
'
validation
'
in
groups
or
'
test
'
in
groups
)
and
purposes
==
'
attack
'
:
lowlevel_purposes
.
append
(
'
unknown
'
)
lowlevel_purposes
.
append
(
'
unknown
'
)
print
(
"
In high-level DB: groups = {}
"
.
format
(
groups
))
print
(
"
In high-level DB: purposes = {}
"
.
format
(
lowlevel_purposes
))
print
(
lowlevel_purposes
)
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
]
return
samples
return
samples
...
@@ -197,4 +188,3 @@ class CasiaSurfPadDatabase(PadDatabase):
...
@@ -197,4 +188,3 @@ class CasiaSurfPadDatabase(PadDatabase):
"""
No annotations are provided with this DB
"""
No annotations are provided with this DB
"""
"""
return
None
return
None
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