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
6e201f17
Commit
6e201f17
authored
May 16, 2021
by
Laurent COLBOIS
Browse files
Fix lookup of database config (previous version did not work)
parent
d34a578e
Pipeline
#50814
passed with stage
in 26 minutes and 21 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/config/baseline/facenet_sanderberg.py
View file @
6e201f17
...
...
@@ -4,7 +4,9 @@ from bob.bio.face.embeddings.tf2_inception_resnet import (
from
bob.bio.face.config.baseline.helpers
import
lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
facenet_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/gabor_graph.py
View file @
6e201f17
...
...
@@ -21,7 +21,9 @@ import logging
logger
=
logging
.
getLogger
(
__name__
)
#### SOLVING IF THERE'S ANY DATABASE INFORMATION
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
get_pipeline
(
face_cropper
,
transform_extra_arguments
):
...
...
bob/bio/face/config/baseline/helpers.py
View file @
6e201f17
...
...
@@ -7,12 +7,12 @@ import logging
logger
=
logging
.
getLogger
(
__name__
)
def
lookup_config_from_database
():
def
lookup_config_from_database
(
database
):
"""
Read configuration values that might be already defined in the database configuration
file.
"""
if
"
database
"
i
n
locals
()
:
if
database
i
s
not
None
:
annotation_type
=
database
.
annotation_type
fixed_positions
=
database
.
fixed_positions
memory_demanding
=
(
...
...
bob/bio/face/config/baseline/inception_resnetv1_casiawebface.py
View file @
6e201f17
...
...
@@ -4,7 +4,9 @@ from bob.bio.face.embeddings.tf2_inception_resnet import (
from
bob.bio.face.config.baseline.helpers
import
lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
facenet_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/inception_resnetv1_msceleb.py
View file @
6e201f17
...
...
@@ -5,7 +5,9 @@ from bob.bio.face.config.baseline.helpers import lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
facenet_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/inception_resnetv2_casiawebface.py
View file @
6e201f17
...
...
@@ -5,7 +5,9 @@ from bob.bio.face.config.baseline.helpers import lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
facenet_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/inception_resnetv2_msceleb.py
View file @
6e201f17
...
...
@@ -4,7 +4,9 @@ from bob.bio.face.embeddings.tf2_inception_resnet import (
from
bob.bio.face.config.baseline.helpers
import
lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
facenet_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/lda.py
View file @
6e201f17
...
...
@@ -22,7 +22,9 @@ import logging
logger
=
logging
.
getLogger
(
__name__
)
#### SOLVING IF THERE'S ANY DATABASE INFORMATION
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
####### SOLVING THE FACE CROPPER TO BE USED ##########
...
...
@@ -70,9 +72,7 @@ def load(annotation_type, fixed_positions=None):
### BIOMETRIC ALGORITHM
algorithm
=
BioAlgorithmLegacy
(
lda
,
base_dir
=
tempdir
,
projector_file
=
os
.
path
.
join
(
tempdir
,
"Projector.hdf5"
),
lda
,
base_dir
=
tempdir
,
projector_file
=
os
.
path
.
join
(
tempdir
,
"Projector.hdf5"
),
)
return
VanillaBiometricsPipeline
(
transformer
,
algorithm
)
...
...
bob/bio/face/config/baseline/lgbphs.py
View file @
6e201f17
...
...
@@ -17,7 +17,9 @@ import bob.math
#### SOLVING IF THERE'S ANY DATABASE INFORMATION
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
get_pipeline
(
face_cropper
,
transform_extra_arguments
):
...
...
bob/bio/face/config/baseline/mobilenetv2_msceleb_arcface_2021.py
View file @
6e201f17
...
...
@@ -3,7 +3,9 @@ from bob.bio.face.config.baseline.helpers import lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
arcface_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/resnet50_msceleb_arcface_2021.py
View file @
6e201f17
...
...
@@ -3,7 +3,9 @@ from bob.bio.face.config.baseline.helpers import lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
arcface_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/resnet50_vgg2_arcface_2021.py
View file @
6e201f17
...
...
@@ -3,7 +3,9 @@ from bob.bio.face.config.baseline.helpers import lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
arcface_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
bob/bio/face/config/baseline/tf2_inception_resnet.py
View file @
6e201f17
...
...
@@ -3,7 +3,9 @@ from bob.bio.face.embeddings.tf2_inception_resnet import InceptionResnetv2
from
bob.bio.face.config.baseline.helpers
import
lookup_config_from_database
from
bob.bio.face.config.baseline.templates
import
facenet_baseline
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
()
annotation_type
,
fixed_positions
,
memory_demanding
=
lookup_config_from_database
(
locals
().
get
(
"database"
)
)
def
load
(
annotation_type
,
fixed_positions
=
None
):
...
...
Laurent COLBOIS
@lcolbois
mentioned in commit
9c50df1a
·
May 16, 2021
mentioned in commit
9c50df1a
mentioned in commit 9c50df1a6b17976fc5a3c5b01a379efaa7a1651b
Toggle commit list
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