Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
7579be17
Commit
7579be17
authored
Jun 10, 2020
by
Tiago de Freitas Pereira
Browse files
Added baselines as resources
parent
35a3b6bb
Pipeline
#40430
failed with stage
in 4 minutes and 16 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/config/baseline/facenet.py
→
bob/bio/face/config/baseline/facenet
_sanderberg
.py
View file @
7579be17
File moved
bob/bio/face/test/test_baseline.py
View file @
7579be17
...
...
@@ -2,7 +2,7 @@ from bob.extension.config import load
import
pkg_resources
import
numpy
as
np
from
bob.pipelines
import
Sample
,
SampleSet
from
bob.bio.base
import
load_resource
def
get_fake_sample
(
face_size
=
(
160
,
160
),
eyes
=
{
"leye"
:
(
46
,
107
),
"reye"
:
(
46
,
53
)}):
...
...
@@ -12,10 +12,7 @@ def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46,
def
test_facenet_baseline
():
config_name
=
pkg_resources
.
resource_filename
(
"bob.bio.face"
,
"config/baseline/facenet.py"
)
transformer
=
load
([
config_name
]).
transformer
transformer
=
load_resource
(
"facenet_sanderberg"
,
"baseline"
)
fake_sample
=
get_fake_sample
()
...
...
@@ -25,10 +22,7 @@ def test_facenet_baseline():
def
test_inception_resnetv2_msceleb
():
config_name
=
pkg_resources
.
resource_filename
(
"bob.bio.face"
,
"config/baseline/inception_resnetv2_msceleb.py"
)
transformer
=
load
([
config_name
]).
transformer
transformer
=
load_resource
(
"inception_resnetv2_msceleb"
,
"baseline"
)
fake_sample
=
get_fake_sample
()
...
...
@@ -38,10 +32,7 @@ def test_inception_resnetv2_msceleb():
def
test_inception_resnetv2_casiawebface
():
config_name
=
pkg_resources
.
resource_filename
(
"bob.bio.face"
,
"config/baseline/inception_resnetv2_casiawebface.py"
)
transformer
=
load
([
config_name
]).
transformer
transformer
=
load_resource
(
"inception_resnetv2_casiawebface"
,
"baseline"
)
fake_sample
=
get_fake_sample
()
...
...
@@ -51,10 +42,7 @@ def test_inception_resnetv2_casiawebface():
def
test_inception_resnetv1_msceleb
():
config_name
=
pkg_resources
.
resource_filename
(
"bob.bio.face"
,
"config/baseline/inception_resnetv1_msceleb.py"
)
transformer
=
load
([
config_name
]).
transformer
transformer
=
load_resource
(
"inception_resnetv1_msceleb"
,
"baseline"
)
fake_sample
=
get_fake_sample
()
...
...
@@ -64,10 +52,7 @@ def test_inception_resnetv1_msceleb():
def
test_inception_resnetv1_casiawebface
():
config_name
=
pkg_resources
.
resource_filename
(
"bob.bio.face"
,
"config/baseline/inception_resnetv1_casiawebface.py"
)
transformer
=
load
([
config_name
]).
transformer
transformer
=
load_resource
(
"inception_resnetv1_casiawebface"
,
"baseline"
)
fake_sample
=
get_fake_sample
()
...
...
@@ -79,11 +64,7 @@ def test_inception_resnetv1_casiawebface():
def
test_arcface_insight_tf
():
import
tensorflow
as
tf
tf
.
compat
.
v1
.
reset_default_graph
()
config_name
=
pkg_resources
.
resource_filename
(
"bob.bio.face"
,
"config/baseline/arcface_insight_tf.py"
)
transformer
=
load
([
config_name
]).
transformer
transformer
=
load_resource
(
"arcface_insight_tf"
,
"baseline"
)
fake_sample
=
get_fake_sample
()
...
...
setup.py
View file @
7579be17
...
...
@@ -103,8 +103,6 @@ setup(
# scripts should be declared using this entry:
'console_scripts'
:
[
'baselines.py = bob.bio.face.script.baselines:main'
,
'display_face_annotations.py = bob.bio.face.script.display_face_annotations:main'
,
],
'bob.bio.database'
:
[
...
...
@@ -143,62 +141,14 @@ setup(
'mtcnn = bob.bio.face.config.annotator.mtcnn:annotator'
,
],
'bob.bio.preprocessor'
:
[
'base = bob.bio.face.config.preprocessor.base:preprocessor'
,
# simple color conversion
'face-crop-eyes = bob.bio.face.config.preprocessor.face_crop_eyes:preprocessor'
,
# face crop
'landmark-detect = bob.bio.face.config.preprocessor.face_detect:preprocessor'
,
# face detection + landmark detection + cropping
'face-detect = bob.bio.face.config.preprocessor.face_detect:preprocessor_no_eyes'
,
# face detection + cropping
'inorm-lbp-crop = bob.bio.face.config.preprocessor.inorm_lbp:preprocessor'
,
# face crop + inorm-lbp
'tan-triggs-crop = bob.bio.face.config.preprocessor.tan_triggs:preprocessor'
,
# face crop + Tan&Triggs
'histogram-crop = bob.bio.face.config.preprocessor.histogram_equalization:preprocessor'
,
# face crop + histogram equalization
'self-quotient-crop= bob.bio.face.config.preprocessor.self_quotient_image:preprocessor'
,
# face crop + self quotient image
'inorm-lbp-landmark = bob.bio.face.config.preprocessor.inorm_lbp:preprocessor_landmark'
,
# face detection + landmark detection + cropping + inorm-lbp
'tan-triggs-landmark = bob.bio.face.config.preprocessor.tan_triggs:preprocessor_landmark'
,
# face detection + landmark detection + cropping + Tan&Triggs
'histogram-landmark = bob.bio.face.config.preprocessor.histogram_equalization:preprocessor_landmark'
,
# face detection + landmark detection + cropping + histogram equalization
'self-quotient-landmark = bob.bio.face.config.preprocessor.self_quotient_image:preprocessor_landmark'
,
# face detection + landmark detection + cropping + self quotient image
'inorm-lbp = bob.bio.face.config.preprocessor.inorm_lbp:preprocessor_no_crop'
,
# inorm-lbp w/o face-crop
'tan-triggs = bob.bio.face.config.preprocessor.tan_triggs:preprocessor_no_crop'
,
# Tan&Triggs w/o face-crop
'histogram = bob.bio.face.config.preprocessor.histogram_equalization:preprocessor_no_crop'
,
# histogram equalization w/o face-crop
'self-quotient = bob.bio.face.config.preprocessor.self_quotient_image:preprocessor_no_crop'
,
# self quotient image w/o face-crop
],
'bob.bio.extractor'
:
[
'dct-blocks = bob.bio.face.config.extractor.dct_blocks:extractor'
,
# DCT blocks
'grid-graph = bob.bio.face.config.extractor.grid_graph:extractor'
,
# Grid graph
'lgbphs = bob.bio.face.config.extractor.lgbphs:extractor'
,
# LGBPHS
],
'bob.bio.algorithm'
:
[
'gabor-jet = bob.bio.face.config.algorithm.gabor_jet:algorithm'
,
# Gabor jet comparison
'histogram = bob.bio.face.config.algorithm.histogram:algorithm'
,
# LGBPHS histograms
'bic-jets = bob.bio.face.config.algorithm.bic_jets:algorithm'
,
# BIC on gabor jets
],
#baselines
'bob.bio.baseline'
:[
'lda = bob.bio.face.baseline.baseline:lda'
,
'plda = bob.bio.face.baseline.baseline:plda'
,
'gabor_graph = bob.bio.face.baseline.baseline:gabor_graph'
,
'lgbphs = bob.bio.face.baseline.baseline:lgbphs'
,
'gmm = bob.bio.face.baseline.baseline:gmm'
,
'isv = bob.bio.face.baseline.baseline:isv'
,
'ivector = bob.bio.face.baseline.baseline:ivector'
,
'bic = bob.bio.face.baseline.baseline:bic'
,
'facenet_sanderberg = bob.bio.face.config.baseline.facenet_sanderberg:transformer'
,
'inception_resnetv1_casiawebface = bob.bio.face.config.baseline.inception_resnetv1_casiawebface:transformer'
,
'inception_resnetv2_casiawebface = bob.bio.face.config.baseline.inception_resnetv2_casiawebface:transformer'
,
'inception_resnetv1_msceleb = bob.bio.face.config.baseline.inception_resnetv1_msceleb:transformer'
,
'inception_resnetv2_msceleb = bob.bio.face.config.baseline.inception_resnetv2_msceleb:transformer'
,
'arcface_insight_tf = bob.bio.face.config.baseline.arcface_insight_tf:transformer'
,
],
},
...
...
Write
Preview
Markdown
is supported
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