Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
ea461fff
Commit
ea461fff
authored
May 27, 2021
by
Laurent COLBOIS
Browse files
Fix circular import
parent
5e49ee7b
Pipeline
#51046
passed with stage
in 26 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/helpers.py
View file @
ea461fff
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
))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment