Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.video
Commits
5d4acca9
Commit
5d4acca9
authored
May 18, 2016
by
Manuel Günther
Browse files
Fixed
#2
by removing unnecessary copying of projected features
parent
a1e681b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
bob/bio/video/algorithm/Wrapper.py
View file @
5d4acca9
...
...
@@ -38,7 +38,7 @@ class Wrapper (bob.bio.base.algorithm.Algorithm):
elif
isinstance
(
algorithm
,
bob
.
bio
.
base
.
algorithm
.
Algorithm
):
self
.
algorithm
=
algorithm
else
:
raise
ValueError
(
"The given algorithm could not be interprete
r
"
)
raise
ValueError
(
"The given algorithm could not be interprete
d
"
)
bob
.
bio
.
base
.
algorithm
.
Algorithm
.
__init__
(
self
,
...
...
@@ -124,9 +124,8 @@ class Wrapper (bob.bio.base.algorithm.Algorithm):
for
index
,
frame
,
quality
in
self
.
frame_selector
(
frames
):
# extract features
projected
=
self
.
algorithm
.
project
(
frame
)
features
=
projected
if
isinstance
(
projected
,
(
list
,
tuple
))
else
projected
.
copy
()
# add image to frame container
fc
.
add
(
index
,
features
,
quality
)
fc
.
add
(
index
,
projected
,
quality
)
return
fc
...
...
bob/bio/video/extractor/Wrapper.py
View file @
5d4acca9
...
...
@@ -38,7 +38,7 @@ class Wrapper (bob.bio.base.extractor.Extractor):
elif
isinstance
(
extractor
,
bob
.
bio
.
base
.
extractor
.
Extractor
):
self
.
extractor
=
extractor
else
:
raise
ValueError
(
"The given extractor could not be interprete
r
"
)
raise
ValueError
(
"The given extractor could not be interprete
d
"
)
self
.
frame_selector
=
frame_selector
self
.
compressed_io
=
compressed_io
...
...
bob/bio/video/preprocessor/Wrapper.py
View file @
5d4acca9
...
...
@@ -56,7 +56,7 @@ class Wrapper (bob.bio.base.preprocessor.Preprocessor):
elif
isinstance
(
preprocessor
,
bob
.
bio
.
base
.
preprocessor
.
Preprocessor
):
self
.
preprocessor
=
preprocessor
else
:
raise
ValueError
(
"The given
algorithm
could not be interprete
r
"
)
raise
ValueError
(
"The given
preprocessor
could not be interprete
d
"
)
bob
.
bio
.
base
.
preprocessor
.
Preprocessor
.
__init__
(
self
,
...
...
@@ -139,7 +139,7 @@ class Wrapper (bob.bio.base.preprocessor.Preprocessor):
**Parameters:**
data : 3
d
or 4D :py:class:`numpy.ndarray`, or [str]
data : 3
D
or 4D :py:class:`numpy.ndarray`, or [str]
The original data to read.
**Returns:**
...
...
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