Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.face
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.face
Commits
ea461fff
Commit
ea461fff
authored
3 years ago
by
Laurent COLBOIS
Browse files
Options
Downloads
Patches
Plain Diff
Fix circular import
parent
5e49ee7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!119
Refactor baseline config helpers
Pipeline
#51046
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/face/helpers.py
+4
-9
4 additions, 9 deletions
bob/bio/face/helpers.py
with
4 additions
and
9 deletions
bob/bio/face/helpers.py
+
4
−
9
View file @
ea461fff
from
bob.bio.face.preprocessor
import
FaceCrop
,
MultiFaceCrop
,
Scale
from
bob.bio.face.preprocessor
import
FaceCrop
,
MultiFaceCrop
,
Scale
from
bob.bio.face.config.baseline.helpers
import
(
import
bob.bio.face.config.baseline.helpers
as
helpers
legacy_default_cropping
,
dnn_default_cropping
,
pad_default_cropping
,
)
def
face_crop_solver
(
def
face_crop_solver
(
cropped_image_size
,
cropped_image_size
,
...
@@ -68,10 +63,10 @@ def get_default_cropped_positions(mode, cropped_image_size, annotation_type):
...
@@ -68,10 +63,10 @@ def get_default_cropped_positions(mode, cropped_image_size, annotation_type):
``annotation_type`` is a list
``annotation_type`` is a list
"""
"""
if
mode
==
"
legacy
"
:
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
"
]:
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
"
:
elif
mode
==
"
pad
"
:
return
pad_default_cropping
(
cropped_image_size
,
annotation_type
)
return
helpers
.
pad_default_cropping
(
cropped_image_size
,
annotation_type
)
else
:
else
:
raise
ValueError
(
"
Unknown default cropping mode `{}`
"
.
format
(
mode
))
raise
ValueError
(
"
Unknown default cropping mode `{}`
"
.
format
(
mode
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment