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

Removed preprocessor entry points for video face crop. and frame diff., removed config files

parent 110d6c5e
No related branches found
No related tags found
1 merge request!11Added configuration files for all databases, updated the doc accordingly
#!/usr/bin/env python
from bob.pad.face.preprocessor import FrameDifference
#=======================================================================================
# Define instances here:
NUMBER_OF_FRAMES = 200 # process at most 200 frames
CHECK_FACE_SIZE_FLAG = True # Check size of the face
MIN_FACE_SIZE = 50
frame_diff_min_size_50_200_frames = FrameDifference(number_of_frames = NUMBER_OF_FRAMES,
check_face_size_flag = CHECK_FACE_SIZE_FLAG,
min_face_size = MIN_FACE_SIZE)
#!/usr/bin/env python
from bob.pad.face.preprocessor import VideoFaceCrop
#=======================================================================================
# Define instances here:
cropped_image_size = (64, 64) # The size of the resulting face
cropped_positions = {'topleft' : (0,0) , 'bottomright' : cropped_image_size}
fixed_positions = None
mask_sigma = None # The sigma for random values areas outside image
mask_neighbors = 5 # The number of neighbors to consider while extrapolating
mask_seed = None # The seed for generating random values during extrapolation
check_face_size_flag = False # Don't check the size of the face
min_face_size = 50
use_local_cropper_flag = False # Use the cropper of bob.bio.face
color_channel = 'gray' # Convert image to gray-scale format
video_face_crop_preproc_64_64 = VideoFaceCrop(cropped_image_size = cropped_image_size,
cropped_positions = cropped_positions,
fixed_positions = fixed_positions,
mask_sigma = mask_sigma,
mask_neighbors = mask_neighbors,
mask_seed = None,
check_face_size_flag = check_face_size_flag,
min_face_size = min_face_size,
use_local_cropper_flag = use_local_cropper_flag,
color_channel = color_channel)
check_face_size_flag = True # Check the size of the face
min_face_size = 50
video_face_crop_preproc_64_64_face_50 = VideoFaceCrop(cropped_image_size = cropped_image_size,
cropped_positions = cropped_positions,
fixed_positions = fixed_positions,
mask_sigma = mask_sigma,
mask_neighbors = mask_neighbors,
mask_seed = None,
check_face_size_flag = check_face_size_flag,
min_face_size = min_face_size,
use_local_cropper_flag = use_local_cropper_flag,
color_channel = color_channel)
use_local_cropper_flag = True # Use the local face cropping class (identical to Ivana's paper)
video_face_crop_preproc_64_64_face_50_local_cropper = VideoFaceCrop(cropped_image_size = cropped_image_size,
cropped_positions = cropped_positions,
fixed_positions = fixed_positions,
mask_sigma = mask_sigma,
mask_neighbors = mask_neighbors,
mask_seed = None,
check_face_size_flag = check_face_size_flag,
min_face_size = min_face_size,
use_local_cropper_flag = use_local_cropper_flag,
color_channel = color_channel)
rgb_output_flag = True # Return RGB cropped face using local cropper
video_face_crop_preproc_64_64_face_50_local_cropper_rgb = VideoFaceCrop(cropped_image_size = cropped_image_size,
cropped_positions = cropped_positions,
fixed_positions = fixed_positions,
mask_sigma = mask_sigma,
mask_neighbors = mask_neighbors,
mask_seed = None,
check_face_size_flag = check_face_size_flag,
min_face_size = min_face_size,
use_local_cropper_flag = use_local_cropper_flag,
rgb_output_flag = rgb_output_flag)
\ No newline at end of file
......@@ -88,12 +88,7 @@ setup(
# registered preprocessors:
'bob.pad.preprocessor': [
'video-face-crop-preproc-64 = bob.pad.face.config.preprocessor.video_face_crop:video_face_crop_preproc_64_64',
'video-face-crop-preproc-64-face-50 = bob.pad.face.config.preprocessor.video_face_crop:video_face_crop_preproc_64_64_face_50',
'video-face-crop-preproc-64-face-50-local-cropper = bob.pad.face.config.preprocessor.video_face_crop:video_face_crop_preproc_64_64_face_50_local_cropper',
'video-face-crop-preproc-64-face-50-local-cropper-rgb = bob.pad.face.config.preprocessor.video_face_crop:video_face_crop_preproc_64_64_face_50_local_cropper_rgb',
'empty-preprocessor = bob.pad.face.config.preprocessor.filename:empty_preprocessor', # no preprocessing
'frame-diff-min-size-50-200-frames = bob.pad.face.config.preprocessor.frame_difference:frame_diff_min_size_50_200_frames',
],
# registered preprocessors:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment