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
f9982baf
Commit
f9982baf
authored
9 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Improved build system
parent
050c1380
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bob/bio/face/test/test_algorithms.py
+0
-58
0 additions, 58 deletions
bob/bio/face/test/test_algorithms.py
buildout.cfg
+54
-10
54 additions, 10 deletions
buildout.cfg
requirements.txt
+25
-0
25 additions, 0 deletions
requirements.txt
setup.py
+6
-6
6 additions, 6 deletions
setup.py
with
85 additions
and
74 deletions
bob/bio/face/test/test_algorithms.py
+
0
−
58
View file @
f9982baf
...
...
@@ -25,7 +25,6 @@ import os
import
numpy
import
math
import
tempfile
import
facereclib
from
nose.plugins.skip
import
SkipTest
import
pkg_resources
...
...
@@ -112,60 +111,3 @@ def test_lgbphs():
reference
*=
2.
assert
abs
(
lgbphs
.
score
(
model2
,
feature2
)
-
reference
)
<
1e-5
assert
abs
(
lgbphs
.
score_for_multiple_probes
(
model2
,
[
feature2
,
feature2
])
-
reference
)
<
1e-5
"""
def test09_plda(self):
# read input
feature = facereclib.utils.load(self.input_dir(
'
linearize.hdf5
'
))
# assure that the config file is readable
tool = self.config(
'
pca+plda
'
)
self.assertTrue(isinstance(tool, facereclib.tools.PLDA))
# here, we use a reduced complexity for test purposes
tool = facereclib.tools.PLDA(
subspace_dimension_of_f = 2,
subspace_dimension_of_g = 2,
subspace_dimension_pca = 10,
plda_training_iterations = 1,
INIT_SEED = seed_value,
)
self.assertFalse(tool.performs_projection)
self.assertTrue(tool.requires_enroller_training)
# train the projector
t = tempfile.mkstemp(
'
pca+plda.hdf5
'
, prefix=
'
frltest_
'
)[1]
tool.train_enroller(facereclib.utils.tests.random_training_set_by_id(feature.shape, count=20, minimum=0., maximum=255.), t)
if regenerate_refs:
import shutil
shutil.copy2(t, self.reference_dir(
'
pca+plda_enroller.hdf5
'
))
# load the projector file
tool.load_enroller(self.reference_dir(
'
pca+plda_enroller.hdf5
'
))
# compare the resulting machines
test_file = bob.io.base.HDF5File(t)
test_file.cd(
'
/pca
'
)
pca_machine = bob.learn.linear.Machine(test_file)
test_file.cd(
'
/plda
'
)
plda_machine = bob.learn.em.PLDABase(test_file)
# TODO: compare the PCA machines
#self.assertEqual(pca_machine, tool.m_pca_machine)
# TODO: compare the PLDA machines
#self.assertEqual(plda_machine, tool.m_plda_base_machine)
os.remove(t)
# enroll model
model = tool.enroll([feature])
if regenerate_refs:
model.save(bob.io.base.HDF5File(self.reference_dir(
'
pca+plda_model.hdf5
'
),
'
w
'
))
# TODO: compare the models with the reference
#reference_model = tool.read_model(self.reference_dir(
'
pca+plda_model.hdf5
'
))
#self.assertEqual(model, reference_model)
# score
sim = tool.score(model, feature)
self.assertAlmostEqual(sim, 0.)
# score with a concatenation of the probe
self.assertAlmostEqual(tool.score_for_multiple_probes(model, [feature, feature]), 0.)
"""
This diff is collapsed.
Click to expand it.
buildout.cfg
+
54
−
10
View file @
f9982baf
...
...
@@ -4,17 +4,35 @@
[buildout]
parts
=
scripts
eggs
=
bob.learn.linear
bob.learn.em
bob.bio.base
bob.bio.gmm
bob.bio.face
eggs
=
bob.bio.face
gridtk
extensions
=
bob.buildout
develop
=
../../bob/layers/1/bob.learn.linear
../../bob/layers/1/bob.learn.em
../bob.bio.base
../bob.bio.gmm
mr.developer
auto-checkout
=
*
develop
=
src/bob.extension
src/bob.blitz
src/bob.core
src/bob.io.base
src/bob.io.image
src/bob.learn.activation
src/bob.math
src/bob.learn.linear
src/bob.sp
src/bob.ip.base
src/bob.ip.color
src/bob.ip.draw
src/bob.ip.gabor
src/bob.learn.em
src/bob.measure
src/bob.db.base
src/bob.db.verification.utils
src/bob.db.verification.filelist
src/bob.db.atnt
src/bob.bio.base
src/bob.learn.boosting
src/bob.ip.facedetect
src/bob.ip.flandmark
.
; options for bob.buildout
...
...
@@ -22,6 +40,32 @@ debug = true
verbose
=
true
newest
=
false
[sources]
bob.extension
=
git https://github.com/bioidiap/bob.extension
bob.blitz
=
git https://github.com/bioidiap/bob.blitz
bob.core
=
git https://github.com/bioidiap/bob.core
bob.io.base
=
git https://github.com/bioidiap/bob.io.base
bob.io.image
=
git https://github.com/bioidiap/bob.io.image
bob.learn.activation
=
git https://github.com/bioidiap/bob.learn.activation
bob.math
=
git https://github.com/bioidiap/bob.math
bob.sp
=
git https://github.com/bioidiap/bob.sp
bob.ip.base
=
git https://github.com/bioidiap/bob.ip.base
bob.ip.color
=
git https://github.com/bioidiap/bob.ip.color
bob.ip.draw
=
git https://github.com/bioidiap/bob.ip.draw
bob.ip.gabor
=
git https://github.com/bioidiap/bob.ip.gabor
bob.learn.linear
=
git https://github.com/bioidiap/bob.learn.linear
bob.learn.em
=
git https://github.com/bioidiap/bob.learn.em
bob.measure
=
git https://github.com/bioidiap/bob.measure
bob.db.base
=
git https://github.com/bioidiap/bob.db.base
bob.db.verification.utils
=
git https://github.com/bioidiap/bob.db.verification.utils
bob.db.verification.filelist
=
git https://github.com/bioidiap/bob.db.verification.filelist
bob.db.atnt
=
git https://github.com/bioidiap/bob.db.atnt
bob.bio.base
=
git https://github.com/bioidiap/bob.bio.base
bob.learn.boosting
=
git https://github.com/bioidiap/bob.learn.boosting
bob.ip.facedetect
=
git https://github.com/bioidiap/bob.ip.facedetect
bob.ip.flandmark
=
git https://github.com/bioidiap/bob.ip.flandmark
[scripts]
recipe
=
bob.buildout:scripts
dependent-scripts
=
true
This diff is collapsed.
Click to expand it.
requirements.txt
0 → 100644
+
25
−
0
View file @
f9982baf
setuptools
bob.extension
bob.blitz
bob.core
bob.io.base
bob.io.image
bob.learn.activation
bob.math
bob.sp
bob.ip.base
bob.ip.color
bob.ip.draw
bob.ip.gabor
bob.learn.linear
bob.learn.em
bob.measure
bob.db.base
bob.db.verification.utils
bob.db.verification.filelist
bob.db.atnt
# required for testing
bob.bio.base
bob.learn.boosting
bob.ip.facedetect
bob.ip.flandmark
matplotlib
# for plotting
This diff is collapsed.
Click to expand it.
setup.py
+
6
−
6
View file @
f9982baf
...
...
@@ -33,7 +33,11 @@
# allows you to test your package with new python dependencies w/o requiring
# administrative interventions.
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
,
dist
dist
.
Distribution
(
dict
(
setup_requires
=
[
'
bob.extension
'
]))
from
bob.extension.utils
import
load_requirements
install_requires
=
load_requirements
()
# The only thing we do in this file is to call the setup() function with all
# parameters that define our package.
...
...
@@ -64,11 +68,7 @@ setup(
# on the current system will be installed locally and only visible to the
# scripts of this package. Don't worry - You won't need administrative
# privileges when using buildout.
install_requires
=
[
'
setuptools
'
,
'
bob.bio.base
'
,
'
bob.bio.gmm
'
,
],
install_requires
=
install_requires
,
# Your project should be called something like 'bob.<foo>' or
# 'bob.<foo>.<bar>'. To implement this correctly and still get all your
...
...
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