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
655cebff
Commit
655cebff
authored
5 years ago
by
David GEISSBUHLER
Browse files
Options
Downloads
Patches
Plain Diff
stream api
parent
2e5a5ce0
No related branches found
No related tags found
No related merge requests found
Pipeline
#38437
failed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/database/hqwmca.py
+14
-14
14 additions, 14 deletions
bob/pad/face/database/hqwmca.py
with
14 additions
and
14 deletions
bob/pad/face/database/hqwmca.py
+
14
−
14
View file @
655cebff
...
@@ -18,12 +18,12 @@ class HQWMCAPadFile(PadFile):
...
@@ -18,12 +18,12 @@ class HQWMCAPadFile(PadFile):
vf : :py:class:`object`
vf : :py:class:`object`
An instance of the VideoFile class defined in the low level db interface
An instance of the VideoFile class defined in the low level db interface
of the HQWMCA database, in the bob.db.hqwmca.models.py file.
of the HQWMCA database, in the bob.db.hqwmca.models.py file.
load_function
: :py:
func
:
streams
: :py:
dict
:
Fun
ction
used to load data
. Should be defined in a configuration file
Di
ction
ary of bob.io.stream Stream objects
. Should be defined in a configuration file
"""
"""
def
__init__
(
self
,
vf
,
load_function
=
None
,
n_frames
=
10
):
def
__init__
(
self
,
vf
,
streams
=
None
,
n_frames
=
10
):
"""
Init
"""
Init
Parameters
Parameters
...
@@ -31,14 +31,14 @@ class HQWMCAPadFile(PadFile):
...
@@ -31,14 +31,14 @@ class HQWMCAPadFile(PadFile):
vf : :py:class:`object`
vf : :py:class:`object`
An instance of the VideoFile class defined in the low level db interface
An instance of the VideoFile class defined in the low level db interface
of the HQWMCA database, in the bob.db.hqwmca.models.py file.
of the HQWMCA database, in the bob.db.hqwmca.models.py file.
load_function
: :py:
func
:
streams
: :py:
dict
:
Fun
ction
used to load data
. Should be defined in a configuration file
Di
ction
ary of bob.io.stream Stream objects
. Should be defined in a configuration file
n_frames: int:
n_frames: int:
The number of frames, evenly spread, you would like to retrieve
The number of frames, evenly spread, you would like to retrieve
"""
"""
self
.
vf
=
vf
self
.
vf
=
vf
self
.
load_function
=
load_function
self
.
streams
=
streams
self
.
n_frames
=
n_frames
self
.
n_frames
=
n_frames
attack_type
=
str
(
vf
.
type_id
)
attack_type
=
str
(
vf
.
type_id
)
...
@@ -69,7 +69,7 @@ class HQWMCAPadFile(PadFile):
...
@@ -69,7 +69,7 @@ class HQWMCAPadFile(PadFile):
-------
-------
"""
"""
return
self
.
vf
.
load
(
directory
,
extension
,
streams
=
self
.
load_function
,
n_frames
=
self
.
n_frames
)
return
self
.
vf
.
load
(
directory
,
extension
,
streams
=
self
.
streams
,
n_frames
=
self
.
n_frames
)
class
HQWMCAPadDatabase
(
PadDatabase
):
class
HQWMCAPadDatabase
(
PadDatabase
):
...
@@ -79,13 +79,13 @@ class HQWMCAPadDatabase(PadDatabase):
...
@@ -79,13 +79,13 @@ class HQWMCAPadDatabase(PadDatabase):
----------
----------
db : :py:class:`bob.db.hqwmca.Database`
db : :py:class:`bob.db.hqwmca.Database`
the low-level database interface
the low-level database interface
load_function
: :py:
func
:
streams
: :py:
dict
:
Fun
ction
used to load data
. Should be defined in a configuration file
Di
ction
ary of bob.io.stream Stream objects
. Should be defined in a configuration file
"""
"""
def
__init__
(
self
,
protocol
=
'
grand_test
'
,
original_directory
=
rc
[
'
bob.db.hqwmca.directory
'
],
def
__init__
(
self
,
protocol
=
'
grand_test
'
,
original_directory
=
rc
[
'
bob.db.hqwmca.directory
'
],
original_extension
=
'
.h5
'
,
annotations_dir
=
None
,
load_function
=
None
,
n_frames
=
10
,
**
kwargs
):
original_extension
=
'
.h5
'
,
annotations_dir
=
None
,
streams
=
None
,
n_frames
=
10
,
**
kwargs
):
"""
Init function
"""
Init function
Parameters
Parameters
...
@@ -98,15 +98,15 @@ class HQWMCAPadDatabase(PadDatabase):
...
@@ -98,15 +98,15 @@ class HQWMCAPadDatabase(PadDatabase):
The file name extension of the original data.
The file name extension of the original data.
annotations_dir: str
annotations_dir: str
Path to the annotations
Path to the annotations
load_function
: :py:
func
:
streams
: :py:
dict
:
Fun
ction
used to load data
. Should be defined in a configuration file
Di
ction
ary of bob.io.stream Stream objects
. Should be defined in a configuration file
n_frames: int:
n_frames: int:
The number of frames, evenly spread, you would like to retrieve
The number of frames, evenly spread, you would like to retrieve
"""
"""
from
bob.db.hqwmca
import
Database
as
LowLevelDatabase
from
bob.db.hqwmca
import
Database
as
LowLevelDatabase
self
.
db
=
LowLevelDatabase
()
self
.
db
=
LowLevelDatabase
()
self
.
load_function
=
load_function
self
.
streams
=
streams
self
.
n_frames
=
n_frames
self
.
n_frames
=
n_frames
self
.
annotations_dir
=
annotations_dir
self
.
annotations_dir
=
annotations_dir
...
@@ -176,7 +176,7 @@ class HQWMCAPadDatabase(PadDatabase):
...
@@ -176,7 +176,7 @@ class HQWMCAPadDatabase(PadDatabase):
attacks
=
attack_types
,
attacks
=
attack_types
,
**
kwargs
)
**
kwargs
)
return
[
HQWMCAPadFile
(
f
,
self
.
load_function
,
self
.
n_frames
)
for
f
in
files
]
return
[
HQWMCAPadFile
(
f
,
self
.
streams
,
self
.
n_frames
)
for
f
in
files
]
def
annotations
(
self
,
file
):
def
annotations
(
self
,
file
):
...
...
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