Commit 2d1082d4 authored by Manuel Günther's avatar Manuel Günther

Made package independent of bob.bio.face

parent 5aa884ad
include README.rst bootstrap-buildout.py buildout.cfg develop.cfg buildout-before-patch.cfg patch/bob.bio.csu.patch LICENSE.txt version.txt requirements.txt include README.rst bootstrap-buildout.py buildout.cfg develop.cfg buildout-before-patch.cfg patch/bob.bio.csu.patch LICENSE.txt version.txt requirements.txt
recursive-include doc *.py *.rst recursive-include doc *.py *.rst
recursive-include bob/bio/csu/test/data *.hdf5 recursive-include bob/bio/csu/test/data *.hdf5 *.pos *.jpg
reye 131 176
leye 222 170
...@@ -26,9 +26,9 @@ import pkg_resources ...@@ -26,9 +26,9 @@ import pkg_resources
regenerate_refs = False regenerate_refs = False
import bob.bio.base import bob.bio.base
import bob.bio.face
import facerec2010 import facerec2010
from .test_extractors import _compare_lda_face_records from .test_extractors import _compare_lda_face_records
def _compare_pca_face_records(f1, f2): def _compare_pca_face_records(f1, f2):
......
...@@ -26,10 +26,18 @@ import pkg_resources ...@@ -26,10 +26,18 @@ import pkg_resources
regenerate_refs = False regenerate_refs = False
import bob.bio.base import bob.bio.base
import bob.bio.face import bob.io.base.test_utils
import facerec2010 import facerec2010
from bob.bio.face.test.test_extractors import _compare def _compare(data, reference, write_function = bob.bio.base.save, read_function = bob.bio.base.load, atol = 1e-5, rtol = 1e-8):
# write reference?
if regenerate_refs:
write_function(data, reference)
# compare reference
reference = read_function(reference)
assert numpy.allclose(data, reference, atol=atol, rtol=rtol)
def _random_training_set(shape, count = 50, minimum = 0, maximum = 1, as_int = False, seed = 42): def _random_training_set(shape, count = 50, minimum = 0, maximum = 1, as_int = False, seed = 42):
# generate a random sequence of features # generate a random sequence of features
......
...@@ -29,13 +29,23 @@ import pkg_resources ...@@ -29,13 +29,23 @@ import pkg_resources
regenerate_refs = False regenerate_refs = False
import bob.bio.base import bob.bio.base
import bob.bio.face import bob.db.verification.utils
from bob.bio.face.test.test_preprocessors import _annotation, _compare
def _compare(data, reference, write_function = bob.bio.base.save, read_function = bob.bio.base.load, atol = 1e-5, rtol = 1e-8):
# write reference?
if regenerate_refs:
write_function(data, reference)
# compare reference
reference = read_function(reference)
assert numpy.allclose(data, reference, atol=atol, rtol=rtol)
def _image(preprocessor): def _image(preprocessor):
return preprocessor.read_original_data(pkg_resources.resource_filename('bob.bio.face.test', 'data/testimage.jpg')) return preprocessor.read_original_data(pkg_resources.resource_filename('bob.bio.csu.test', 'data/testimage.jpg'))
def _annotation():
return bob.db.verification.utils.read_annotation_file(pkg_resources.resource_filename('bob.bio.csu.test', 'data/testimage.pos'), 'named')
def test_lrpca(): def test_lrpca():
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
parts = scripts parts = scripts
eggs = PythonFaceEvaluation eggs = PythonFaceEvaluation
bob.bio.base bob.bio.base
bob.bio.face
bob.bio.csu bob.bio.csu
gridtk gridtk
...@@ -15,7 +14,6 @@ extensions = bob.buildout ...@@ -15,7 +14,6 @@ extensions = bob.buildout
auto-checkout = * auto-checkout = *
develop = ${buildout:csu-dir}/PythonFaceEvaluation develop = ${buildout:csu-dir}/PythonFaceEvaluation
src/bob.bio.base src/bob.bio.base
src/bob.bio.face
. .
csu-dir = [PATH_TO_YOUR_CSU_COPY] csu-dir = [PATH_TO_YOUR_CSU_COPY]
...@@ -27,7 +25,7 @@ newest = false ...@@ -27,7 +25,7 @@ newest = false
[sources] [sources]
bob.bio.base = git https://github.com/bioidiap/bob.bio.base bob.bio.base = git https://github.com/bioidiap/bob.bio.base
bob.bio.face = git https://github.com/bioidiap/bob.bio.face
[scripts] [scripts]
recipe = bob.buildout:scripts recipe = bob.buildout:scripts
dependent-scrpts = true
...@@ -7,7 +7,6 @@ parts = scripts ...@@ -7,7 +7,6 @@ parts = scripts
; required packages: the facereclib, the original code and our wrapper package ; required packages: the facereclib, the original code and our wrapper package
eggs = bob.bio.base eggs = bob.bio.base
bob.bio.face
PythonFaceEvaluation PythonFaceEvaluation
bob.bio.csu bob.bio.csu
...@@ -34,16 +33,13 @@ develop = src/bob.extension ...@@ -34,16 +33,13 @@ develop = src/bob.extension
src/bob.db.verification.filelist src/bob.db.verification.filelist
src/bob.db.atnt src/bob.db.atnt
src/bob.bio.base src/bob.bio.base
src/bob.learn.boosting
src/bob.ip.facedetect
src/bob.ip.flandmark
${buildout:csu-dir}/PythonFaceEvaluation ${buildout:csu-dir}/PythonFaceEvaluation
. .
csu-dir = [PATH_TO_YOUR_CSU_COPY] csu-dir = [PATH_TO_YOUR_CSU_COPY]
; options for bob.buildout extension ; options for bob.buildout extension
debug = false debug = true
verbose = true verbose = true
newest = false newest = false
...@@ -68,9 +64,6 @@ bob.db.verification.utils = git https://github.com/bioidiap/bob.db.verification. ...@@ -68,9 +64,6 @@ bob.db.verification.utils = git https://github.com/bioidiap/bob.db.verification.
bob.db.verification.filelist = git https://github.com/bioidiap/bob.db.verification.filelist 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.db.atnt = git https://github.com/bioidiap/bob.db.atnt
bob.bio.base = git https://github.com/bioidiap/bob.bio.base 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] [scripts]
recipe = bob.buildout:scripts recipe = bob.buildout:scripts
......
...@@ -130,12 +130,12 @@ if sphinx.__version__ >= "1.0": ...@@ -130,12 +130,12 @@ if sphinx.__version__ >= "1.0":
# The name of an image file (relative to this directory) to place at the top # The name of an image file (relative to this directory) to place at the top
# of the sidebar. # of the sidebar.
html_logo = '' html_logo = 'img/logo.png'
# The name of an image file (within the static path) to use as favicon of the # The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large. # pixels large.
html_favicon = '' html_favicon = 'img/favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
...@@ -243,7 +243,7 @@ autodoc_default_flags = ['members', 'undoc-members', 'inherited-members', 'show- ...@@ -243,7 +243,7 @@ autodoc_default_flags = ['members', 'undoc-members', 'inherited-members', 'show-
# For inter-documentation mapping: # For inter-documentation mapping:
from bob.extension.utils import link_documentation from bob.extension.utils import link_documentation
intersphinx_mapping = link_documentation(['python', 'bob.io.base', 'bob.bio.base']) intersphinx_mapping = link_documentation()
def setup(app): def setup(app):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment