Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.tensorflow_extractor
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
Model registry
Operate
Environments
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.ip.tensorflow_extractor
Merge requests
!2
Update FaceNet.py -- Add an example preprocessor
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update FaceNet.py -- Add an example preprocessor
p1
into
master
Overview
1
Commits
1
Pipelines
1
Changes
1
Merged
Amir MOHAMMADI
requested to merge
p1
into
master
7 years ago
Overview
1
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
25af8bfd
1 commit,
7 years ago
1 file
+
17
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bob/ip/tensorflow_extractor/FaceNet.py
+
17
−
0
Options
@@ -52,6 +52,23 @@ class FaceNet(object):
class FaceNetExtractor(FaceNet, Extractor):
pass
extractor = FaceNetExtractor()
And for a preprocessor you can use::
from bob.bio.face.preprocessor import FaceCrop
# This is the size of the image that this model expects
CROPPED_IMAGE_HEIGHT = 160
CROPPED_IMAGE_WIDTH = 160
# eye positions for frontal images
RIGHT_EYE_POS = (46, 53)
LEFT_EYE_POS = (46, 107)
# Crops the face using eye annotations
preprocessor = FaceCrop(
cropped_image_size=(CROPPED_IMAGE_HEIGHT, CROPPED_IMAGE_WIDTH),
cropped_positions={
'
leye
'
: LEFT_EYE_POS,
'
reye
'
: RIGHT_EYE_POS},
color_channel=
'
rgb
'
)
"""
def
__init__
(
self
,
Loading