Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.flandmark
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
Model registry
Operate
Environments
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.ip.flandmark
Commits
7efd1cc1
Commit
7efd1cc1
authored
10 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
xbob -> bob
parent
c01c3382
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/guide.rst
+7
-7
7 additions, 7 deletions
doc/guide.rst
doc/plot/show_lena.py
+6
-6
6 additions, 6 deletions
doc/plot/show_lena.py
doc/py_api.rst
+2
-2
2 additions, 2 deletions
doc/py_api.rst
setup.py
+20
-20
20 additions, 20 deletions
setup.py
with
35 additions
and
35 deletions
doc/guide.rst
+
7
−
7
View file @
7efd1cc1
...
@@ -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('
x
bob.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:`
x
bob.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
x
bob.io.base import load
>>> from bob.io.base import load
>>> import
x
bob.io.image
>>> import bob.io.image
>>> from
x
bob.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
x
bob.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 ``
x
bob.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
...
...
This diff is collapsed.
Click to expand it.
doc/plot/show_lena.py
+
6
−
6
View file @
7efd1cc1
from
matplotlib
import
pyplot
from
matplotlib
import
pyplot
from
x
bob.ip.flandmark
import
Flandmark
from
bob.ip.flandmark
import
Flandmark
from
x
bob.ip.draw
import
box
,
cross
from
bob.ip.draw
import
box
,
cross
from
x
bob.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
x
bob.io.base
import
load
from
bob.io.base
import
load
import
x
bob.io.image
import
bob.io.image
return
load
(
resource_filename
(
'
x
bob.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
)
...
...
This diff is collapsed.
Click to expand it.
doc/py_api.rst
+
2
−
2
View file @
7efd1cc1
...
@@ -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
``
x
bob.ip.flandmark``.
``bob.ip.flandmark``.
.. automodule::
x
bob.ip.flandmark
.. automodule:: bob.ip.flandmark
This diff is collapsed.
Click to expand it.
setup.py
+
20
−
20
View file @
7efd1cc1
...
@@ -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
=
[
'
x
bob.blitz
'
,
'
x
bob.io.base
'
]))
dist
.
Distribution
(
dict
(
setup_requires
=
[
'
bob.blitz
'
,
'
bob.io.base
'
]))
from
x
bob.blitz.extension
import
Extension
from
bob.blitz.extension
import
Extension
import
x
bob.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
=
[
x
bob
.
io
.
base
.
get_include
()]
include_dirs
=
[
bob
.
io
.
base
.
get_include
()]
setup
(
setup
(
name
=
"
x
bob.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/
x
bob.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
'
,
'
x
bob.blitz
'
,
'
bob.blitz
'
,
'
x
bob.io.base
'
,
'
bob.io.base
'
,
'
x
bob.io.image
'
,
#for tests
'
bob.io.image
'
,
#for tests
'
x
bob.ip.color
'
,
#for tests
'
bob.ip.color
'
,
#for tests
'
x
bob.ip.draw
'
,
#for doc generation
'
bob.ip.draw
'
,
#for doc generation
'
matplotlib
'
,
#for doc generation
'
matplotlib
'
,
#for doc generation
],
],
namespace_packages
=
[
namespace_packages
=
[
"
x
bob
"
,
"
bob
"
,
"
x
bob.ip
"
,
"
bob.ip
"
,
],
],
ext_modules
=
[
ext_modules
=
[
Extension
(
"
x
bob.ip.flandmark.version
"
,
Extension
(
"
bob.ip.flandmark.version
"
,
[
[
"
x
bob/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
(
"
x
bob.ip.flandmark._library
"
,
Extension
(
"
bob.ip.flandmark._library
"
,
[
[
"
x
bob/ip/flandmark/flandmark_detector.cpp
"
,
"
bob/ip/flandmark/flandmark_detector.cpp
"
,
"
x
bob/ip/flandmark/liblbp.cpp
"
,
"
bob/ip/flandmark/liblbp.cpp
"
,
"
x
bob/ip/flandmark/flandmark.cpp
"
,
"
bob/ip/flandmark/flandmark.cpp
"
,
"
x
bob/ip/flandmark/main.cpp
"
,
"
bob/ip/flandmark/main.cpp
"
,
],
],
include_dirs
=
include_dirs
,
include_dirs
=
include_dirs
,
version
=
version
,
version
=
version
,
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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