Commit 4e36338d authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'refactor-cropping' into 'master'

Refactor baseline config helpers

See merge request !117
parents 5f8ecbe9 412cbff8
Pipeline #51276 passed with stages
in 9 minutes and 13 seconds
import bob.pipelines as mario
from bob.bio.face.helpers import face_crop_solver
from bob.bio.face.utils import face_crop_solver, get_default_cropped_positions
from bob.bio.video.transformer import VideoWrapper
from bob.pad.face.extractor import LBPHistogram
......@@ -12,9 +12,13 @@ else:
fixed_positions = None
# Preprocessor #
cropped_image_size = (64, 64)
cropped_positions = get_default_cropped_positions(
"pad", cropped_image_size, annotation_type
)
cropper = face_crop_solver(
cropped_image_size=64,
cropped_positions=annotation_type,
cropped_image_size=cropped_image_size,
cropped_positions=cropped_positions,
color_channel="gray",
fixed_positions=fixed_positions,
)
......
import bob.pipelines as mario
from bob.bio.face.helpers import face_crop_solver
from bob.bio.face.utils import face_crop_solver, get_default_cropped_positions
from bob.bio.video.transformer import VideoWrapper
from bob.pad.face.extractor import ImageQualityMeasure
......@@ -12,7 +12,14 @@ else:
fixed_positions = None
# Preprocessor #
cropper = face_crop_solver(cropped_image_size=64, cropped_positions=annotation_type)
cropped_image_size = (64, 64)
cropped_positions = get_default_cropped_positions(
"pad", cropped_image_size, annotation_type
)
cropper = face_crop_solver(
cropped_image_size=cropped_image_size, cropped_positions=cropped_positions
)
preprocessor = VideoWrapper(cropper)
preprocessor = mario.wrap(
["sample"],
......
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