diff --git a/.travis.yml b/.travis.yml index 3eec0bb7d0c1766ce9b91f457f193f5b3f61c261..0552f90b68fe1647246d849fb8250bc997d882b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,8 +28,8 @@ install: - "python bootstrap.py" - "CFLAGS=-coverage ./bin/buildout" script: - - "./bin/python -c 'from xbob.ip.flandmark import get_config; print(get_config())'" - - "./bin/coverage run --source=xbob.ip.flandmark ./bin/nosetests -sv" + - "./bin/python -c 'from bob.ip.flandmark import get_config; print(get_config())'" + - "./bin/coverage run --source=bob.ip.flandmark ./bin/nosetests -sv" - "./bin/sphinx-build -b doctest doc sphinx" - "./bin/sphinx-build -b html doc sphinx" after_success: diff --git a/MANIFEST.in b/MANIFEST.in index ecdd145e33e6effefb2af300491e1fab95b74f08..6b63b4b8f97c1f3e7a76d90c7248463e9416629d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include README.rst buildout.cfg bootstrap.py recursive-include doc *.rst *.py -recursive-include xbob *.cpp *.h *.dat +recursive-include bob *.cpp *.h *.dat diff --git a/README.rst b/README.rst index 774b60537d90585a95995291a8f0e601b5c99e34..4b49d7a59138882ee4ad88dafca9d548cc3640ce 100644 --- a/README.rst +++ b/README.rst @@ -2,16 +2,16 @@ .. Andre Anjos <andre.anjos@idiap.ch> .. Thu 17 Apr 16:59:12 2014 CEST -.. image:: https://travis-ci.org/bioidiap/xbob.ip.flandmark.svg?branch=master - :target: https://travis-ci.org/bioidiap/xbob.ip.flandmark -.. image:: https://coveralls.io/repos/bioidiap/xbob.ip.flandmark/badge.png - :target: https://coveralls.io/r/bioidiap/xbob.ip.flandmark -.. image:: http://img.shields.io/github/tag/bioidiap/xbob.ip.flandmark.png - :target: https://github.com/bioidiap/xbob.ip.flandmark -.. image:: http://img.shields.io/pypi/v/xbob.ip.flandmark.png - :target: https://pypi.python.org/pypi/xbob.ip.flandmark -.. image:: http://img.shields.io/pypi/dm/xbob.ip.flandmark.png - :target: https://pypi.python.org/pypi/xbob.ip.flandmark +.. image:: https://travis-ci.org/bioidiap/bob.ip.flandmark.svg?branch=master + :target: https://travis-ci.org/bioidiap/bob.ip.flandmark +.. image:: https://coveralls.io/repos/bioidiap/bob.ip.flandmark/badge.png + :target: https://coveralls.io/r/bioidiap/bob.ip.flandmark +.. image:: http://img.shields.io/github/tag/bioidiap/bob.ip.flandmark.png + :target: https://github.com/bioidiap/bob.ip.flandmark +.. image:: http://img.shields.io/pypi/v/bob.ip.flandmark.png + :target: https://pypi.python.org/pypi/bob.ip.flandmark +.. image:: http://img.shields.io/pypi/dm/bob.ip.flandmark.png + :target: https://pypi.python.org/pypi/bob.ip.flandmark ============================== Python Bindings to Flandmark @@ -80,7 +80,7 @@ Testing You can run a set of tests using the nose test runner:: - $ nosetests -sv xbob.ap + $ nosetests -sv bob.ap .. warning:: @@ -97,7 +97,7 @@ You can run our documentation tests using sphinx itself:: You can test overall test coverage with:: - $ nosetests --with-coverage --cover-package=xbob.ip.flandmark + $ nosetests --with-coverage --cover-package=bob.ip.flandmark The ``coverage`` egg must be installed for this to work properly. diff --git a/xbob/__init__.py b/bob/__init__.py similarity index 100% rename from xbob/__init__.py rename to bob/__init__.py diff --git a/xbob/ip/__init__.py b/bob/ip/__init__.py similarity index 100% rename from xbob/ip/__init__.py rename to bob/ip/__init__.py diff --git a/xbob/ip/flandmark/__init__.py b/bob/ip/flandmark/__init__.py similarity index 100% rename from xbob/ip/flandmark/__init__.py rename to bob/ip/flandmark/__init__.py diff --git a/xbob/ip/flandmark/data/flandmark_model.dat b/bob/ip/flandmark/data/flandmark_model.dat similarity index 100% rename from xbob/ip/flandmark/data/flandmark_model.dat rename to bob/ip/flandmark/data/flandmark_model.dat diff --git a/xbob/ip/flandmark/data/haarcascade_frontalface_alt.xml b/bob/ip/flandmark/data/haarcascade_frontalface_alt.xml similarity index 100% rename from xbob/ip/flandmark/data/haarcascade_frontalface_alt.xml rename to bob/ip/flandmark/data/haarcascade_frontalface_alt.xml diff --git a/xbob/ip/flandmark/data/lena.jpg b/bob/ip/flandmark/data/lena.jpg similarity index 100% rename from xbob/ip/flandmark/data/lena.jpg rename to bob/ip/flandmark/data/lena.jpg diff --git a/xbob/ip/flandmark/data/multi.jpg b/bob/ip/flandmark/data/multi.jpg similarity index 100% rename from xbob/ip/flandmark/data/multi.jpg rename to bob/ip/flandmark/data/multi.jpg diff --git a/xbob/ip/flandmark/flandmark.cpp b/bob/ip/flandmark/flandmark.cpp similarity index 96% rename from xbob/ip/flandmark/flandmark.cpp rename to bob/ip/flandmark/flandmark.cpp index 5a49ee61e97cdb14b12f57359967970a96b372c0..6aee28857aab2498088d5be4af9b701090f18efc 100644 --- a/xbob/ip/flandmark/flandmark.cpp +++ b/bob/ip/flandmark/flandmark.cpp @@ -5,12 +5,12 @@ * @brief Bob/Python extension to flandmark */ -#include <xbob.blitz/cppapi.h> -#include <xbob.blitz/cleanup.h> -#include <xbob.io.base/api.h> +#include <bob.blitz/cppapi.h> +#include <bob.blitz/cleanup.h> +#include <bob.io.base/api.h> #include <structmember.h> -#include <xbob.extension/documentation.h> +#include <bob.extension/documentation.h> #include <boost/shared_ptr.hpp> #include <boost/shared_array.hpp> @@ -25,8 +25,8 @@ #define CLASS_NAME "Flandmark" -static auto s_class = xbob::extension::ClassDoc( - XBOB_EXT_MODULE_PREFIX "." CLASS_NAME, +static auto s_class = bob::extension::ClassDoc( + BOB_EXT_MODULE_PREFIX "." CLASS_NAME, "A key-point localization for faces using Flandmark", @@ -39,7 +39,7 @@ static auto s_class = xbob::extension::ClassDoc( "\n" ) .add_constructor( - xbob::extension::FunctionDoc( + bob::extension::FunctionDoc( CLASS_NAME, "Constructor", "Initializes the key-point locator with a model." @@ -170,7 +170,7 @@ static PyObject* call(PyBobIpFlandmarkObject* self, } -static auto s_call = xbob::extension::FunctionDoc( +static auto s_call = bob::extension::FunctionDoc( "locate", "Locates keypoints on a **single** facial bounding-box on the provided image." "This method will locate 8 keypoints inside the bounding-box defined " @@ -271,7 +271,7 @@ PyObject* PyBobIpFlandmark_Repr(PyBobIpFlandmarkObject* self) { /** * Expected output: * - * <xbob.ip.flandmark(model='...')> + * <bob.ip.flandmark(model='...')> */ PyObject* retval = PyUnicode_FromFormat("<%s(model='%s')>", diff --git a/xbob/ip/flandmark/flandmark_detector.cpp b/bob/ip/flandmark/flandmark_detector.cpp similarity index 100% rename from xbob/ip/flandmark/flandmark_detector.cpp rename to bob/ip/flandmark/flandmark_detector.cpp diff --git a/xbob/ip/flandmark/flandmark_detector.h b/bob/ip/flandmark/flandmark_detector.h similarity index 100% rename from xbob/ip/flandmark/flandmark_detector.h rename to bob/ip/flandmark/flandmark_detector.h diff --git a/xbob/ip/flandmark/liblbp.cpp b/bob/ip/flandmark/liblbp.cpp similarity index 100% rename from xbob/ip/flandmark/liblbp.cpp rename to bob/ip/flandmark/liblbp.cpp diff --git a/xbob/ip/flandmark/liblbp.h b/bob/ip/flandmark/liblbp.h similarity index 100% rename from xbob/ip/flandmark/liblbp.h rename to bob/ip/flandmark/liblbp.h diff --git a/xbob/ip/flandmark/main.cpp b/bob/ip/flandmark/main.cpp similarity index 74% rename from xbob/ip/flandmark/main.cpp rename to bob/ip/flandmark/main.cpp index 2aed6751ad1d191869b26958c256c27afae9b138..80faf17db715a08daa1819531d60d465eb7fa7b7 100644 --- a/xbob/ip/flandmark/main.cpp +++ b/bob/ip/flandmark/main.cpp @@ -8,14 +8,14 @@ #ifdef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY #endif -#include <xbob.blitz/capi.h> -#include <xbob.blitz/cleanup.h> -#include <xbob.io.base/api.h> -#include <xbob.extension/documentation.h> +#include <bob.blitz/capi.h> +#include <bob.blitz/cleanup.h> +#include <bob.io.base/api.h> +#include <bob.extension/documentation.h> extern PyTypeObject PyBobIpFlandmark_Type; -static auto s_setter = xbob::extension::FunctionDoc( +static auto s_setter = bob::extension::FunctionDoc( "__set_default_model__", "Internal function to set the default model for the Flandmark class" ) @@ -49,7 +49,7 @@ PyDoc_STRVAR(module_docstr, "Flandmark keypoint localization library"); #if PY_VERSION_HEX >= 0x03000000 static PyModuleDef module_definition = { PyModuleDef_HEAD_INIT, - XBOB_EXT_MODULE_NAME, + BOB_EXT_MODULE_NAME, module_docstr, -1, module_methods, @@ -69,12 +69,12 @@ static PyObject* create_module (void) { # if PY_VERSION_HEX >= 0x03000000 PyObject* m = PyModule_Create(&module_definition); # else - PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr); + PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr); # endif if (!m) return 0; auto m_ = make_safe(m); ///< protects against early returns - if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0) + if (PyModule_AddStringConstant(m, "__version__", BOB_EXT_MODULE_VERSION) < 0) return 0; /* register the types to python */ @@ -82,15 +82,15 @@ static PyObject* create_module (void) { if (PyModule_AddObject(m, "Flandmark", (PyObject *)&PyBobIpFlandmark_Type) < 0) return 0; /* imports dependencies */ - if (import_xbob_blitz() < 0) { + if (import_bob_blitz() < 0) { PyErr_Print(); - PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); + PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME); return 0; } - if (import_xbob_io_base() < 0) { + if (import_bob_io_base() < 0) { PyErr_Print(); - PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); + PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME); return 0; } @@ -99,7 +99,7 @@ static PyObject* create_module (void) { } -PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) { +PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) { # if PY_VERSION_HEX >= 0x03000000 return # endif diff --git a/xbob/ip/flandmark/test.py b/bob/ip/flandmark/test.py similarity index 92% rename from xbob/ip/flandmark/test.py rename to bob/ip/flandmark/test.py index c7d203c5d1fcd547d5b1f32d0007cce85758b59e..47651b1e838ea52424773dbe61e986e5d3981989 100644 --- a/xbob/ip/flandmark/test.py +++ b/bob/ip/flandmark/test.py @@ -11,9 +11,9 @@ import numpy import functools import pkg_resources import nose.tools -import xbob.io.base -import xbob.io.image -import xbob.ip.color +import bob.io.base +import bob.io.image +import bob.ip.color from . import Flandmark @@ -120,8 +120,8 @@ def test_is_outside(): @opencv_available def test_lena_opencv(): - img = xbob.io.base.load(LENA) - gray = xbob.ip.color.rgb_to_gray(img) + img = bob.io.base.load(LENA) + gray = bob.ip.color.rgb_to_gray(img) (x, y, width, height) = opencv_detect(gray)[0] flm = Flandmark() @@ -133,8 +133,8 @@ def test_lena_opencv(): def test_lena(): - img = xbob.io.base.load(LENA) - gray = xbob.ip.color.rgb_to_gray(img) + img = bob.io.base.load(LENA) + gray = bob.ip.color.rgb_to_gray(img) (x, y, width, height) = LENA_BBX[0] flm = Flandmark() @@ -147,8 +147,8 @@ def test_lena(): @opencv_available def test_multi_opencv(): - img = xbob.io.base.load(MULTI) - gray = xbob.ip.color.rgb_to_gray(img) + img = bob.io.base.load(MULTI) + gray = bob.ip.color.rgb_to_gray(img) bbx = opencv_detect(gray) flm = Flandmark() @@ -161,8 +161,8 @@ def test_multi_opencv(): def test_multi(): - img = xbob.io.base.load(MULTI) - gray = xbob.ip.color.rgb_to_gray(img) + img = bob.io.base.load(MULTI) + gray = bob.ip.color.rgb_to_gray(img) flm = Flandmark() for (x, y, width, height) in MULTI_BBX: diff --git a/xbob/ip/flandmark/version.cpp b/bob/ip/flandmark/version.cpp similarity index 81% rename from xbob/ip/flandmark/version.cpp rename to bob/ip/flandmark/version.cpp index 30c379860cd1283d93bfdaa489ee9fa05b750875..8eda9a3f4c5af3a7ba4966c4128cb54971d16dc5 100644 --- a/xbob/ip/flandmark/version.cpp +++ b/bob/ip/flandmark/version.cpp @@ -18,9 +18,9 @@ #ifdef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY #endif -#include <xbob.blitz/capi.h> -#include <xbob.blitz/cleanup.h> -#include <xbob.io.base/config.h> +#include <bob.blitz/capi.h> +#include <bob.blitz/cleanup.h> +#include <bob.io.base/config.h> static int dict_set(PyObject* d, const char* key, const char* value) { PyObject* v = Py_BuildValue("s", value); @@ -89,17 +89,17 @@ static PyObject* numpy_version() { } /** - * xbob.blitz c/c++ api version + * bob.blitz c/c++ api version */ -static PyObject* xbob_blitz_version() { - return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_BLITZ_API_VERSION)); +static PyObject* bob_blitz_version() { + return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_BLITZ_API_VERSION)); } /** - * xbob.io c/c++ api version + * bob.io c/c++ api version */ -static PyObject* xbob_io_base_version() { - return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_IO_BASE_API_VERSION)); +static PyObject* bob_io_base_version() { + return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_IO_BASE_API_VERSION)); } static PyObject* build_version_dictionary() { @@ -114,8 +114,8 @@ static PyObject* build_version_dictionary() { if (!dict_steal(retval, "Compiler", compiler_version())) return 0; if (!dict_steal(retval, "Python", python_version())) return 0; if (!dict_steal(retval, "NumPy", numpy_version())) return 0; - if (!dict_steal(retval, "xbob.blitz", xbob_blitz_version())) return 0; - if (!dict_steal(retval, "xbob.io", xbob_io_base_version())) return 0; + if (!dict_steal(retval, "bob.blitz", bob_blitz_version())) return 0; + if (!dict_steal(retval, "bob.io", bob_io_base_version())) return 0; Py_INCREF(retval); return retval; @@ -132,7 +132,7 @@ PyDoc_STRVAR(module_docstr, #if PY_VERSION_HEX >= 0x03000000 static PyModuleDef module_definition = { PyModuleDef_HEAD_INIT, - XBOB_EXT_MODULE_NAME, + BOB_EXT_MODULE_NAME, module_docstr, -1, module_methods, @@ -145,13 +145,13 @@ static PyObject* create_module (void) { # if PY_VERSION_HEX >= 0x03000000 PyObject* m = PyModule_Create(&module_definition); # else - PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr); + PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr); # endif if (!m) return 0; auto m_ = make_safe(m); ///< protects against early returns /* register version numbers and constants */ - if (PyModule_AddStringConstant(m, "module", XBOB_EXT_MODULE_VERSION) < 0) + if (PyModule_AddStringConstant(m, "module", BOB_EXT_MODULE_VERSION) < 0) return 0; PyObject* externals = build_version_dictionary(); @@ -159,9 +159,9 @@ static PyObject* create_module (void) { if (PyModule_AddObject(m, "externals", externals) < 0) return 0; /* imports dependencies */ - if (import_xbob_blitz() < 0) { + if (import_bob_blitz() < 0) { PyErr_Print(); - PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); + PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME); return 0; } @@ -170,7 +170,7 @@ static PyObject* create_module (void) { } -PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) { +PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) { # if PY_VERSION_HEX >= 0x03000000 return # endif diff --git a/buildout.cfg b/buildout.cfg index f889ced2fb05e31554f395a3dd4d7da16ec08e8a..aca0deac6db95235a6b881a4b7ff529e301119fb 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -4,31 +4,31 @@ [buildout] parts = scripts -eggs = xbob.ip.flandmark -extensions = xbob.buildout +eggs = bob.ip.flandmark +extensions = bob.buildout mr.developer auto-checkout = * -develop = src/xbob.extension - src/xbob.blitz - src/xbob.io.base - src/xbob.io.image - src/xbob.ip.color - src/xbob.ip.draw +develop = src/bob.extension + src/bob.blitz + src/bob.io.base + src/bob.io.image + src/bob.ip.color + src/bob.ip.draw . -; options for xbob.buildout extension +; options for bob.buildout extension debug = true verbose = true prefixes = /idiap/group/torch5spro/releases/preview/install/linux-x86_64-release /Users/andre/work/bob/b/dbg/ [sources] -xbob.extension = git https://github.com/bioidiap/xbob.extension branch=prototype -xbob.blitz = git https://github.com/bioidiap/xbob.blitz -xbob.io.base = git https://github.com/bioidiap/xbob.io.base -xbob.io.image = git https://github.com/bioidiap/xbob.io.image -xbob.ip.color = git https://github.com/bioidiap/xbob.ip.color -xbob.ip.draw = git https://github.com/bioidiap/xbob.ip.draw +bob.extension = git https://github.com/bioidiap/bob.extension +bob.blitz = git https://github.com/bioidiap/bob.blitz +bob.io.base = git https://github.com/bioidiap/bob.io.base +bob.io.image = git https://github.com/bioidiap/bob.io.image +bob.ip.color = git https://github.com/bioidiap/bob.ip.color +bob.ip.draw = git https://github.com/bioidiap/bob.ip.draw [scripts] -recipe = xbob.buildout:scripts +recipe = bob.buildout:scripts diff --git a/doc/conf.py b/doc/conf.py index 780409c143e13ead2f1ec8f594e915f0de4b5b1b..416f48fe5391d1eab12d9865ede20900f218ae8a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -59,12 +59,12 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'xbob.ip.flandmark' +project = u'bob.ip.flandmark' import time copyright = u'%s, Idiap Research Institute' % time.strftime('%Y') # Grab the setup entry -distribution = pkg_resources.require('xbob.ip.flandmark')[0] +distribution = pkg_resources.require('bob.ip.flandmark')[0] # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -130,7 +130,7 @@ if sphinx.__version__ >= "1.0": #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = 'xbob_ip_flandmark' +#html_short_title = 'bob_ip_flandmark' # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -188,7 +188,7 @@ html_favicon = 'img/favicon.ico' #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'xbob_ip_flandmark_doc' +htmlhelp_basename = 'bob_ip_flandmark_doc' # -- Options for LaTeX output -------------------------------------------------- @@ -202,7 +202,7 @@ latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'xbob_ip_flandmark.tex', u'Python bindings to the Flandmark frontal-face keypoint localizer', u'Biometrics Group, Idiap Research Institute', 'manual'), + ('index', 'bob_ip_flandmark.tex', u'Python bindings to the Flandmark frontal-face keypoint localizer', u'Biometrics Group, Idiap Research Institute', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -241,7 +241,7 @@ rst_epilog = """ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'xbob_ip_flandmark', u'Python bindings to Flandmark frontal-face keypoint localizer', [u'Idiap Research Institute'], 1) + ('index', 'bob_ip_flandmark', u'Python bindings to Flandmark frontal-face keypoint localizer', [u'Idiap Research Institute'], 1) ] # Default processing flags for sphinx diff --git a/doc/guide.rst b/doc/guide.rst index dbd373911f958ebe8f6eead5f69ea3d845d2b42a..dd13dac6a8dac7b9bf9fda0261fe4f318d1eedfd 100644 --- a/doc/guide.rst +++ b/doc/guide.rst @@ -7,7 +7,7 @@ def get_file(f): from os.path import join from pkg_resources import resource_filename - return resource_filename('xbob.ip.flandmark', join('data', f)) + return resource_filename('bob.ip.flandmark', join('data', f)) ============= Users Guide @@ -17,7 +17,7 @@ Flandmark detects 8 coordinates of important keypoints in **frontal** human faces. To properly work, the keypoint localizer requires the input of an image (of type ``uint8``, gray-scaled) and of a bounding box describing a rectangle where the face is supposed to be located in the image (see -:py:class:`xbob.ip.flandmark.Flandmark.locate`). +:py:class:`bob.ip.flandmark.Flandmark.locate`). The keypoints returned are, in this order: @@ -66,9 +66,9 @@ provided (gray-scaled) image: .. doctest:: :options: +NORMALIZE_WHITESPACE, +ELLIPSIS - >>> from xbob.io.base import load - >>> import xbob.io.image - >>> from xbob.ip.color import rgb_to_gray + >>> from bob.io.base import load + >>> import bob.io.image + >>> from bob.ip.color import rgb_to_gray >>> lena_gray = rgb_to_gray(load(get_file('lena.jpg'))) >>> try: ... from cv2 import CascadeClassifier @@ -91,13 +91,13 @@ can find the keypoints in the following way: :options: +NORMALIZE_WHITESPACE, +ELLIPSIS >>> x, y, width, height = face_bbxs[0] - >>> from xbob.ip.flandmark import Flandmark + >>> from bob.ip.flandmark import Flandmark >>> localizer = Flandmark() >>> keypoints = localizer.locate(lena_gray, y, x, height, width) >>> keypoints array([[...]]) -You can use the package ``xbob.ip.draw`` to draw the rectangles and keypoints +You can use the package ``bob.ip.draw`` to draw the rectangles and keypoints on the target image. A complete script would be something like: .. plot:: plot/show_lena.py diff --git a/doc/plot/show_lena.py b/doc/plot/show_lena.py index 553121cdee43d80bf94b2998a7106fb409a44c5b..23b438b91b4954ddc772755ffbf11131fbea8264 100644 --- a/doc/plot/show_lena.py +++ b/doc/plot/show_lena.py @@ -1,14 +1,14 @@ from matplotlib import pyplot -from xbob.ip.flandmark import Flandmark -from xbob.ip.draw import box, cross -from xbob.ip.color import rgb_to_gray +from bob.ip.flandmark import Flandmark +from bob.ip.draw import box, cross +from bob.ip.color import rgb_to_gray def get_data(f): from os.path import join from pkg_resources import resource_filename - from xbob.io.base import load - import xbob.io.image - return load(resource_filename('xbob.ip.flandmark', join('data', f))) + from bob.io.base import load + import bob.io.image + return load(resource_filename('bob.ip.flandmark', join('data', f))) lena = get_data('lena.jpg') lena_gray = rgb_to_gray(lena) diff --git a/doc/py_api.rst b/doc/py_api.rst index d37bb045ae020abe55e01acc4b675f96ddfa09de..0b9f497f67f711d687162def29f66459fdd3cbe4 100644 --- a/doc/py_api.rst +++ b/doc/py_api.rst @@ -7,7 +7,7 @@ ============ This section includes information for using the pure Python API of -``xbob.ip.flandmark``. +``bob.ip.flandmark``. -.. automodule:: xbob.ip.flandmark +.. automodule:: bob.ip.flandmark diff --git a/setup.py b/setup.py index 84721de7c962333b00ca634d901c18570c942c38..d266f2720bfd4b09adb10865ea7905d69407c71e 100644 --- a/setup.py +++ b/setup.py @@ -7,25 +7,25 @@ """ from setuptools import setup, find_packages, dist -dist.Distribution(dict(setup_requires=['xbob.blitz', 'xbob.io.base'])) -from xbob.blitz.extension import Extension -import xbob.io.base +dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.io.base'])) +from bob.blitz.extension import Extension +import bob.io.base version = '2.0.0a0' packages = ['boost', 'opencv>=2.0', 'bob-io>=1.2.2'] -include_dirs = [xbob.io.base.get_include()] +include_dirs = [bob.io.base.get_include()] setup( - name="xbob.ip.flandmark", + name="bob.ip.flandmark", version=version, description="Python bindings to the flandmark keypoint localization library", license="GPLv3", author='Andre Anjos', author_email='andre.anjos@idiap.ch', long_description=open('README.rst').read(), - url='https://github.com/bioidiap/xbob.ip.flandmark', + url='https://github.com/bioidiap/bob.ip.flandmark', packages=find_packages(), include_package_data=True, @@ -33,34 +33,34 @@ setup( install_requires=[ 'setuptools', - 'xbob.blitz', - 'xbob.io.base', - 'xbob.io.image', #for tests - 'xbob.ip.color', #for tests - 'xbob.ip.draw', #for doc generation + 'bob.blitz', + 'bob.io.base', + 'bob.io.image', #for tests + 'bob.ip.color', #for tests + 'bob.ip.draw', #for doc generation 'matplotlib', #for doc generation ], namespace_packages=[ - "xbob", - "xbob.ip", + "bob", + "bob.ip", ], ext_modules=[ - Extension("xbob.ip.flandmark.version", + Extension("bob.ip.flandmark.version", [ - "xbob/ip/flandmark/version.cpp", + "bob/ip/flandmark/version.cpp", ], include_dirs = include_dirs, version = version, packages = packages, ), - Extension("xbob.ip.flandmark._library", + Extension("bob.ip.flandmark._library", [ - "xbob/ip/flandmark/flandmark_detector.cpp", - "xbob/ip/flandmark/liblbp.cpp", - "xbob/ip/flandmark/flandmark.cpp", - "xbob/ip/flandmark/main.cpp", + "bob/ip/flandmark/flandmark_detector.cpp", + "bob/ip/flandmark/liblbp.cpp", + "bob/ip/flandmark/flandmark.cpp", + "bob/ip/flandmark/main.cpp", ], include_dirs = include_dirs, version = version,