Commit 3a71d0eb authored by Manuel Günther's avatar Manuel Günther

Fixed buildout; added test for new Idiap model [skip ci]

parent 993e0bb4
......@@ -125,7 +125,7 @@ def test_lena_opencv():
(x, y, width, height) = opencv_detect(gray)[0]
flm = Flandmark()
keypoints = flm.locate(gray, y, x, height, width)
keypoints = flm.locate(gray, (y, x), (height, width))
nose.tools.eq_(keypoints.shape, (8, 2))
nose.tools.eq_(keypoints.dtype, 'float64')
for k in keypoints:
......@@ -153,7 +153,7 @@ def test_multi_opencv():
flm = Flandmark()
for (x, y, width, height) in bbx:
keypoints = flm.locate(gray, y, x, height, width)
keypoints = flm.locate(gray, (y, x), (height, width))
nose.tools.eq_(keypoints.shape, (8, 2))
nose.tools.eq_(keypoints.dtype, 'float64')
for k in keypoints:
......@@ -171,3 +171,13 @@ def test_multi():
nose.tools.eq_(keypoints.dtype, 'float64')
for k in keypoints:
assert is_inside(k, (y, x, height, width), eps=1)
flm = Flandmark(F('Idiap_model.xml'))
for (x, y, width, height) in MULTI_BBX:
keypoints = flm.locate(gray, (y, x), (height, width))
nose.tools.eq_(keypoints.shape, (22, 2))
nose.tools.eq_(keypoints.dtype, 'float64')
for k in keypoints:
assert is_inside(k, (y-50, x-50, height+100, width+100), eps=1)
......@@ -5,5 +5,5 @@ if [ ! -d __build ]; then
fi
cd __build
cmake ../clandmark
make -B
cmake ../clandmark -DBUILD_CPP_EXAMPLES=0 -DBUILD_MATLAB_BINDINGS=0 -DBUILD_PYTHON_BINDINGS=0 -DBUILD_SHARED_LIBS=1 -DDOUBLE_PRECISION=1 -DCMAKE_BUILD_TYPE=RELEASE
make
......@@ -20,6 +20,7 @@ develop = src/bob.extension
; options for bob.buildout extension
debug = true
verbose = true
newest = false
[sources]
bob.extension = git https://github.com/bioidiap/bob.extension
......
......@@ -6,7 +6,7 @@
"""Bindings for flandmark
"""
bob_packages = ['bob.core', 'bob.io.base']
bob_packages = ['bob.core', 'bob.io.base', 'bob.io.image', 'bob.ip.color']
from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['bob.blitz'] + bob_packages))
......@@ -22,6 +22,10 @@ packages = ['boost', 'opencv>=2.0']
boost_modules = ['system']
macros = [('DOUBLE_PRECISION', '1')]
include_dirs = ['clandmark/libclandmark', 'clandmark/3rd_party/CImg-1.5.6', 'clandmark/3rd_party/rapidxml-1.13']
libraries = ['clandmark', 'flandmark']
library_dirs = ['__build/libclandmark']
def compile_cmake(build_dir):
......@@ -93,7 +97,10 @@ setup(
version = version,
include_dirs = include_dirs,
packages = packages,
define_macros = macros,
boost_modules = boost_modules,
libraries = libraries,
library_dirs = library_dirs,
),
],
......
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