Skip to content
Snippets Groups Projects
Commit 7efd1cc1 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

xbob -> bob

parent c01c3382
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
def get_file(f): def get_file(f):
from os.path import join from os.path import join
from pkg_resources import resource_filename 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 Users Guide
...@@ -17,7 +17,7 @@ Flandmark detects 8 coordinates of important keypoints in **frontal** human ...@@ -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 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 (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 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: The keypoints returned are, in this order:
...@@ -66,9 +66,9 @@ provided (gray-scaled) image: ...@@ -66,9 +66,9 @@ provided (gray-scaled) image:
.. doctest:: .. doctest::
:options: +NORMALIZE_WHITESPACE, +ELLIPSIS :options: +NORMALIZE_WHITESPACE, +ELLIPSIS
>>> from xbob.io.base import load >>> from bob.io.base import load
>>> import xbob.io.image >>> import bob.io.image
>>> from xbob.ip.color import rgb_to_gray >>> from bob.ip.color import rgb_to_gray
>>> lena_gray = rgb_to_gray(load(get_file('lena.jpg'))) >>> lena_gray = rgb_to_gray(load(get_file('lena.jpg')))
>>> try: >>> try:
... from cv2 import CascadeClassifier ... from cv2 import CascadeClassifier
...@@ -91,13 +91,13 @@ can find the keypoints in the following way: ...@@ -91,13 +91,13 @@ can find the keypoints in the following way:
:options: +NORMALIZE_WHITESPACE, +ELLIPSIS :options: +NORMALIZE_WHITESPACE, +ELLIPSIS
>>> x, y, width, height = face_bbxs[0] >>> x, y, width, height = face_bbxs[0]
>>> from xbob.ip.flandmark import Flandmark >>> from bob.ip.flandmark import Flandmark
>>> localizer = Flandmark() >>> localizer = Flandmark()
>>> keypoints = localizer.locate(lena_gray, y, x, height, width) >>> keypoints = localizer.locate(lena_gray, y, x, height, width)
>>> keypoints >>> keypoints
array([[...]]) 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: on the target image. A complete script would be something like:
.. plot:: plot/show_lena.py .. plot:: plot/show_lena.py
......
from matplotlib import pyplot from matplotlib import pyplot
from xbob.ip.flandmark import Flandmark from bob.ip.flandmark import Flandmark
from xbob.ip.draw import box, cross from bob.ip.draw import box, cross
from xbob.ip.color import rgb_to_gray from bob.ip.color import rgb_to_gray
def get_data(f): def get_data(f):
from os.path import join from os.path import join
from pkg_resources import resource_filename from pkg_resources import resource_filename
from xbob.io.base import load from bob.io.base import load
import xbob.io.image import bob.io.image
return load(resource_filename('xbob.ip.flandmark', join('data', f))) return load(resource_filename('bob.ip.flandmark', join('data', f)))
lena = get_data('lena.jpg') lena = get_data('lena.jpg')
lena_gray = rgb_to_gray(lena) lena_gray = rgb_to_gray(lena)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
============ ============
This section includes information for using the pure Python API of 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
...@@ -7,25 +7,25 @@ ...@@ -7,25 +7,25 @@
""" """
from setuptools import setup, find_packages, dist from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['xbob.blitz', 'xbob.io.base'])) dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.io.base']))
from xbob.blitz.extension import Extension from bob.blitz.extension import Extension
import xbob.io.base import bob.io.base
version = '2.0.0a0' version = '2.0.0a0'
packages = ['boost', 'opencv>=2.0', 'bob-io>=1.2.2'] 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( setup(
name="xbob.ip.flandmark", name="bob.ip.flandmark",
version=version, version=version,
description="Python bindings to the flandmark keypoint localization library", description="Python bindings to the flandmark keypoint localization library",
license="GPLv3", license="GPLv3",
author='Andre Anjos', author='Andre Anjos',
author_email='andre.anjos@idiap.ch', author_email='andre.anjos@idiap.ch',
long_description=open('README.rst').read(), 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(), packages=find_packages(),
include_package_data=True, include_package_data=True,
...@@ -33,34 +33,34 @@ setup( ...@@ -33,34 +33,34 @@ setup(
install_requires=[ install_requires=[
'setuptools', 'setuptools',
'xbob.blitz', 'bob.blitz',
'xbob.io.base', 'bob.io.base',
'xbob.io.image', #for tests 'bob.io.image', #for tests
'xbob.ip.color', #for tests 'bob.ip.color', #for tests
'xbob.ip.draw', #for doc generation 'bob.ip.draw', #for doc generation
'matplotlib', #for doc generation 'matplotlib', #for doc generation
], ],
namespace_packages=[ namespace_packages=[
"xbob", "bob",
"xbob.ip", "bob.ip",
], ],
ext_modules=[ 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, include_dirs = include_dirs,
version = version, version = version,
packages = packages, packages = packages,
), ),
Extension("xbob.ip.flandmark._library", Extension("bob.ip.flandmark._library",
[ [
"xbob/ip/flandmark/flandmark_detector.cpp", "bob/ip/flandmark/flandmark_detector.cpp",
"xbob/ip/flandmark/liblbp.cpp", "bob/ip/flandmark/liblbp.cpp",
"xbob/ip/flandmark/flandmark.cpp", "bob/ip/flandmark/flandmark.cpp",
"xbob/ip/flandmark/main.cpp", "bob/ip/flandmark/main.cpp",
], ],
include_dirs = include_dirs, include_dirs = include_dirs,
version = version, version = version,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment