Skip to content
Snippets Groups Projects
Commit c4c17163 authored by Olegs NIKISINS's avatar Olegs NIKISINS
Browse files

Fixed the write/read functions in the VideoFaceCrop preprocessor

parent 5e25cb0c
No related branches found
No related tags found
1 merge request!2LBP+SVM, IQM+SVM experiments and documentation
Pipeline #
......@@ -88,13 +88,16 @@ class VideoFaceCrop(Preprocessor, object):
for (k, v) in kwargs.items():
setattr(self, k, v)
self.preprocessor = FaceCrop(cropped_image_size = cropped_image_size,
cropped_positions = cropped_positions,
fixed_positions = fixed_positions,
mask_sigma = mask_sigma,
mask_neighbors = mask_neighbors,
mask_seed = mask_seed,
**kwargs)
preprocessor = FaceCrop(cropped_image_size = cropped_image_size,
cropped_positions = cropped_positions,
fixed_positions = fixed_positions,
mask_sigma = mask_sigma,
mask_neighbors = mask_neighbors,
mask_seed = mask_seed,
**kwargs)
self.video_preprocessor = bob.bio.video.preprocessor.Wrapper(preprocessor)
#==========================================================================
def __call__(self, frames, annotations):
......@@ -119,12 +122,11 @@ class VideoFaceCrop(Preprocessor, object):
Cropped faces stored in the FrameContainer.
"""
video_preprocessor = bob.bio.video.preprocessor.Wrapper(self.preprocessor)
preprocessed_video = video_preprocessor(frames = frames, annotations = annotations)
preprocessed_video = self.video_preprocessor(frames = frames, annotations = annotations)
return preprocessed_video
#==========================================================================
def write_data( self, frames, file_name ):
"""
......@@ -140,7 +142,8 @@ class VideoFaceCrop(Preprocessor, object):
name of the file.
"""
bob.bio.video.preprocessor.Wrapper.write_data(frames, file_name)
self.video_preprocessor.write_data(frames, file_name)
#==========================================================================
def read_data( self, file_name ):
......@@ -159,7 +162,7 @@ class VideoFaceCrop(Preprocessor, object):
Frames stored in the frame container.
"""
frames = bob.bio.video.preprocessor.Wrapper.read_data(file_name)
frames = self.video_preprocessor.read_data(file_name)
return frames
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment