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
3288ba13
Commit
3288ba13
authored
4 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Removed the -T hack from gabor_graph
parent
52caba64
No related branches found
No related tags found
2 merge requests
!68
Removed the -T hack from gabor_graph
,
!64
Dask pipelines
Pipeline
#42283
failed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/bio/face/config/baseline/gabor_graph.py
+3
-21
3 additions, 21 deletions
bob/bio/face/config/baseline/gabor_graph.py
bob/bio/face/config/baseline/lda.py
+3
-20
3 additions, 20 deletions
bob/bio/face/config/baseline/lda.py
with
6 additions
and
41 deletions
bob/bio/face/config/baseline/gabor_graph.py
+
3
−
21
View file @
3288ba13
from
bob.bio.base.pipelines.vanilla_biometrics
import
(
Distance
,
VanillaBiometricsPipeline
,
BioAlgorithmLegacy
,
temp_directory
BioAlgorithmLegacy
,
)
from
bob.bio.face.config.baseline.helpers
import
crop_80x64
import
math
...
...
@@ -26,7 +25,7 @@ else:
fixed_positions
=
None
def
load
(
annotation_type
,
fixed_positions
=
None
,
checkpoints_dir
=
None
):
def
load
(
annotation_type
,
fixed_positions
=
None
):
####### SOLVING THE FACE CROPPER TO BE USED ##########
# Cropping
...
...
@@ -77,26 +76,9 @@ def load(annotation_type, fixed_positions=None, checkpoints_dir=None):
# if /idiap/temp/<USER> does not exist, use /tmp/tmpxxxxxxxx
tempdir
=
tempfile
.
TemporaryDirectory
().
name
# Replace the default if provided
if
checkpoints_dir
is
not
None
:
try
:
os
.
makedirs
(
checkpoints_dir
,
exist_ok
=
True
)
except
OSError
:
logger
.
info
(
"
Could not create directory
'
{}
'
.
"
.
format
(
checkpoints_dir
)
+
"
Using default (
'
{}
'
).
"
.
format
(
tempdir
)
)
else
:
tempdir
=
checkpoints_dir
algorithm
=
BioAlgorithmLegacy
(
gabor_jet
,
base_dir
=
tempdir
)
return
VanillaBiometricsPipeline
(
transformer
,
algorithm
)
try
:
temp_directory
except
NameError
:
logger
.
info
(
"
Temporary directory not defined. Using default.
"
)
pipeline
=
load
(
annotation_type
,
fixed_positions
,
None
)
else
:
pipeline
=
load
(
annotation_type
,
fixed_positions
,
temp_directory
)
pipeline
=
load
(
annotation_type
,
fixed_positions
)
transformer
=
pipeline
.
transformer
This diff is collapsed.
Click to expand it.
bob/bio/face/config/baseline/lda.py
+
3
−
20
View file @
3288ba13
...
...
@@ -2,7 +2,6 @@ from bob.bio.base.pipelines.vanilla_biometrics import (
Distance
,
VanillaBiometricsPipeline
,
BioAlgorithmLegacy
,
temp_directory
)
from
bob.bio.face.config.baseline.helpers
import
crop_80x64
import
numpy
as
np
...
...
@@ -28,7 +27,7 @@ else:
####### SOLVING THE FACE CROPPER TO BE USED ##########
def
load
(
annotation_type
,
fixed_positions
=
None
,
checkpoints_dir
=
None
):
def
load
(
annotation_type
,
fixed_positions
=
None
):
# Cropping
face_cropper
,
transform_extra_arguments
=
crop_80x64
(
...
...
@@ -50,18 +49,6 @@ def load(annotation_type, fixed_positions=None, checkpoints_dir=None):
# if /idiap/temp/<USER> does not exist, use /tmp/tmpxxxxxxxx
tempdir
=
tempfile
.
TemporaryDirectory
().
name
# Replace the default if provided
if
checkpoints_dir
is
not
None
:
try
:
os
.
makedirs
(
checkpoints_dir
,
exist_ok
=
True
)
except
OSError
:
logger
.
info
(
"
Could not create directory
'
{}
'
.
"
.
format
(
checkpoints_dir
)
+
"
Using default (
'
{}
'
).
"
.
format
(
tempdir
)
)
else
:
tempdir
=
checkpoints_dir
lda
=
bob
.
bio
.
base
.
algorithm
.
LDA
(
use_pinv
=
True
,
pca_subspace_dimension
=
0.90
)
lda_transformer
=
AlgorithmTransformer
(
...
...
@@ -88,10 +75,6 @@ def load(annotation_type, fixed_positions=None, checkpoints_dir=None):
return
VanillaBiometricsPipeline
(
transformer
,
algorithm
)
try
:
temp_directory
except
NameError
:
logger
.
info
(
"
Temporary directory not defined. Using default.
"
)
pipeline
=
load
(
annotation_type
,
fixed_positions
,
None
)
else
:
pipeline
=
load
(
annotation_type
,
fixed_positions
,
temp_directory
)
pipeline
=
load
(
annotation_type
,
fixed_positions
)
transformer
=
pipeline
.
transformer
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