Commit ea461fff authored by Laurent COLBOIS's avatar Laurent COLBOIS
Browse files

Fix circular import

parent 5e49ee7b
Pipeline #51046 passed with stage
in 26 minutes and 41 seconds
from bob.bio.face.preprocessor import FaceCrop, MultiFaceCrop, Scale
from bob.bio.face.config.baseline.helpers import (
legacy_default_cropping,
dnn_default_cropping,
pad_default_cropping,
)
import bob.bio.face.config.baseline.helpers as helpers
def face_crop_solver(
cropped_image_size,
......@@ -68,10 +63,10 @@ def get_default_cropped_positions(mode, cropped_image_size, annotation_type):
``annotation_type`` is a list
"""
if mode == "legacy":
return legacy_default_cropping(cropped_image_size, annotation_type)
return helpers.legacy_default_cropping(cropped_image_size, annotation_type)
elif mode in ["dnn", "facenet", "arcface"]:
return dnn_default_cropping(cropped_image_size, annotation_type)
return helpers.dnn_default_cropping(cropped_image_size, annotation_type)
elif mode == "pad":
return pad_default_cropping(cropped_image_size, annotation_type)
return helpers.pad_default_cropping(cropped_image_size, annotation_type)
else:
raise ValueError("Unknown default cropping mode `{}`".format(mode))
Supports Markdown
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