Commit 5d4acca9 authored by Manuel Günther's avatar Manuel Günther
Browse files

Fixed #2 by removing unnecessary copying of projected features

parent a1e681b2
......@@ -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 interpreter")
raise ValueError("The given algorithm could not be interpreted")
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
......
......@@ -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 interpreter")
raise ValueError("The given extractor could not be interpreted")
self.frame_selector = frame_selector
self.compressed_io = compressed_io
......
......@@ -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 interpreter")
raise ValueError("The given preprocessor could not be interpreted")
bob.bio.base.preprocessor.Preprocessor.__init__(
self,
......@@ -139,7 +139,7 @@ class Wrapper (bob.bio.base.preprocessor.Preprocessor):
**Parameters:**
data : 3d or 4D :py:class:`numpy.ndarray`, or [str]
data : 3D or 4D :py:class:`numpy.ndarray`, or [str]
The original data to read.
**Returns:**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment