Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.pad.face
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.pad.face
Commits
2d9a724d
Commit
2d9a724d
authored
Nov 23, 2017
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use all frames. Improve docs
parent
65f0b81f
Pipeline
#14277
passed with stages
in 12 minutes and 55 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
37 deletions
+36
-37
bob/pad/face/database/database.py
bob/pad/face/database/database.py
+24
-11
bob/pad/face/database/mifs.py
bob/pad/face/database/mifs.py
+3
-0
bob/pad/face/database/msu_mfsd.py
bob/pad/face/database/msu_mfsd.py
+3
-0
bob/pad/face/database/replay.py
bob/pad/face/database/replay.py
+3
-26
bob/pad/face/database/replay_mobile.py
bob/pad/face/database/replay_mobile.py
+3
-0
No files found.
bob/pad/face/database/database.py
View file @
2d9a724d
from
bob.pad.base.database
import
PadFile
from
bob.bio.video.database
import
VideoBioFile
import
bob.bio.video
class
VideoPadFile
(
VideoBioFile
,
PadFile
):
class
VideoPadFile
(
PadFile
):
"""A simple base class that defines basic properties of File object for the
use in
PAD experiments
use in
face PAD experiments.
"""
def
__init__
(
self
,
attack_type
,
client_id
,
path
,
file_id
=
None
):
VideoBioFile
.
__init__
(
self
,
client_id
=
client_id
,
path
=
path
,
file_id
=
file_id
,
)
PadFile
.
__init__
(
self
,
super
(
VideoPadFile
,
self
).
__init__
(
attack_type
=
attack_type
,
client_id
=
client_id
,
path
=
path
,
file_id
=
file_id
,
)
def
load
(
self
,
directory
=
None
,
extension
=
'.avi'
,
frame_selector
=
bob
.
bio
.
video
.
FrameSelector
(
selection_style
=
'all'
)):
"""Loads the video file and returns in a :any:`bob.bio.video.FrameContainer`.
Parameters
----------
directory : :obj:`str`, optional
The directory to load the data from.
extension : :obj:`str`, optional
The extension of the file to load.
frame_selector : :any:`bob.bio.video.FrameSelector`, optional
Which frames to select.
Returns
-------
:any:`bob.bio.video.FrameContainer`
The loaded frames inside a frame container.
"""
return
frame_selector
(
self
.
make_path
(
directory
,
extension
))
bob/pad/face/database/mifs.py
View file @
2d9a724d
...
...
@@ -41,6 +41,9 @@ class MIFSPadFile(VideoPadFile):
Extension of the video files in the MIFS database.
Default: None
``frame_selector`` : ``FrameSelector``
The frame selector to use.
**Returns:**
``video_data`` : FrameContainer
...
...
bob/pad/face/database/msu_mfsd.py
View file @
2d9a724d
...
...
@@ -66,6 +66,9 @@ class MsuMfsdPadFile(VideoPadFile):
Note: ``extension`` value is not used in the code of this method.
Default: None
``frame_selector`` : ``FrameSelector``
The frame selector to use.
**Returns:**
``video_data`` : FrameContainer
...
...
bob/pad/face/database/replay.py
View file @
2d9a724d
...
...
@@ -48,32 +48,9 @@ class ReplayPadFile(VideoPadFile):
attack_type
=
attack_type
,
file_id
=
f
.
id
)
#==========================================================================
def
load
(
self
,
directory
=
None
,
extension
=
'.mov'
,
frame_selector
=
FrameSelector
(
selection_style
=
'all'
)):
"""
Overridden version of the load method defined in the ``VideoPadFile``.
**Parameters:**
``directory`` : :py:class:`str`
String containing the path to the Replay database.
``extension`` : :py:class:`str`
Extension of the video files in the Replay database.
**Returns:**
``video_data`` : FrameContainer
Video data stored in the FrameContainer, see ``bob.bio.video.utils.FrameContainer``
for further details.
"""
path
=
self
.
f
.
make_path
(
directory
=
directory
,
extension
=
extension
)
# path to the video file
video_data
=
frame_selector
(
path
)
# video data
return
video_data
# video data
def
make_path
(
self
,
directory
=
None
,
extension
=
'.mov'
):
# path to the video file
return
self
.
f
.
make_path
(
directory
=
directory
,
extension
=
extension
)
#==============================================================================
...
...
bob/pad/face/database/replay_mobile.py
View file @
2d9a724d
...
...
@@ -59,6 +59,9 @@ class ReplayMobilePadFile(VideoPadFile):
``extension`` : :py:class:`str`
Extension of the video files in the Replay-Mobile database.
``frame_selector`` : ``FrameSelector``
The frame selector to use.
**Returns:**
``video_data`` : FrameContainer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment