Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.facelandmarks
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.ip.facelandmarks
Commits
caba24ba
Commit
caba24ba
authored
7 years ago
by
Sushil BHATTACHARJEE
Committed by
André Anjos
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
bug-fix and clean-up related to documentation
parent
bd8d3793
Branches
Branches containing commit
No related tags found
1 merge request
!5
Fix the imports
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bob/ip/facelandmarks/__init__.py
+2
-1
2 additions, 1 deletion
bob/ip/facelandmarks/__init__.py
bob/ip/facelandmarks/utils.py
+8
-9
8 additions, 9 deletions
bob/ip/facelandmarks/utils.py
doc/guide.rst
+3
-3
3 additions, 3 deletions
doc/guide.rst
doc/py_api.rst
+1
-1
1 addition, 1 deletion
doc/py_api.rst
with
14 additions
and
14 deletions
bob/ip/facelandmarks/__init__.py
+
2
−
1
View file @
caba24ba
...
...
@@ -2,7 +2,7 @@
# vim: set fileencoding=utf-8 :
from
.utils
import
*
from
.utils
import
_Result
# gets sphinx autodoc done right - don't remove it
def
__appropriate__
(
*
args
):
...
...
@@ -18,6 +18,7 @@ def __appropriate__(*args):
__appropriate__
(
_Result
,
Result
,
detect_landmarks_on_boundingbox
,
detect_landmarks
,
...
...
This diff is collapsed.
Click to expand it.
bob/ip/facelandmarks/utils.py
+
8
−
9
View file @
caba24ba
...
...
@@ -132,11 +132,10 @@ class Result(_Result):
'''
A :py:class:`collections.namedtuple` with landmark information
Attributes:
bounding_box (:py:class:`bob.ip.facedetect.BoundingBox`): A bounding box
extracted with :py:mod:`bob.ip.facedetect`.
quality (
float): A floating-point number expressing
the quality of the
quality (
:py:class:`float`):
the quality of the
extracted bounding-box, as returned by :py:mod:`bob.ip.facedetect`
'
s
Boosted classifier
...
...
@@ -173,11 +172,11 @@ def _detect_multiple_landmarks_on_gray_image(data, top=0, min_quality=0.):
data (:py:class:`numpy.ndarray`): An ``uint8`` array with 2 dimensions,
corresponding to a gray-scale image loaded with Bob (y, x) ordering.
top (int): An integer which indicates if we should only consider the first
top (
:py:class:`
int
`
): An integer which indicates if we should only consider the first
N detections or all of them. A value of zero means the selector ignores
this field.
min_quality (
float): A float that
also trims the face detector output list
min_quality (
:py:class:`float`):
also trims the face detector output list
by considering a minimum quality for the detection. A value of zero (0.0)
means
"
any quality will do
"
. Good detections have a typical value which
is greater than 30. Use this parameter with care. If this and ``top`` are
...
...
@@ -265,11 +264,11 @@ def _detect_multiple_landmarks_on_color_image(data, top=0, min_quality=0.):
data (:py:class:`numpy.ndarray`): An ``uint8`` array with 3 dimensions,
corresponding to a color image loaded with Bob (planes, y, x) ordering.
top (int): An integer which indicates if we should only consider the first
top (
:py:class:`
int
`
): An integer which indicates if we should only consider the first
N detections or all of them. A value of zero means the selector ignores
this field.
min_quality (
float): A float that
also trims the face detector output list
min_quality (
:py:class:`float`):
also trims the face detector output list
by considering a minimum quality for the detection. A value of zero (0.0)
means
"
any quality will do
"
. Good detections have a typical value which
is greater than 30. Use this parameter with care. If this and ``top`` are
...
...
@@ -300,11 +299,11 @@ def detect_landmarks(data, top=0, min_quality=0.):
dimensions, corresponding to a either a gray-scale or color image loaded
with Bob.
top (int): An integer which indicates if we should only consider the first
top (
:py:class:`
int
`
): An integer which indicates if we should only consider the first
N detections or all of them. A value of zero means the selector ignores
this field.
min_quality (
float): A float that also
trims the face detector output list
min_quality (
:py:class:`float`):
trims the face detector output list
by considering a minimum quality for the detection. A value of zero (0.0)
means
"
any quality will do
"
. Good detections have a typical value which
is greater than 30. Use this parameter with care. If this and ``top`` are
...
...
@@ -399,7 +398,7 @@ def save_landmarks(results, fname):
:py:class:`.utils.Result`, each containing the result of face detection
and landmarks extracted from the input image.
fname (str): A path with the output filename
fname (
:py:class:`
str
`
): A path with the output filename
'''
...
...
This diff is collapsed.
Click to expand it.
doc/guide.rst
+
3
−
3
View file @
caba24ba
...
...
@@ -55,7 +55,7 @@ This package also provides a handy function, ``draw_landmarks()``, for plotting
.. doctest::
>>> bob.ip.facelandmarks.
utils.
draw_landmarks(gray_image, key_points)
>>> bob.ip.facelandmarks.draw_landmarks(gray_image, key_points)
The result is shown in the image below.
...
...
@@ -113,7 +113,7 @@ Note that the return-value of ``detect_landmarks_on_boundingbox()`` is a 2D nump
>>> gray_image = bob.ip.color.rgb_to_gray(face_image)
>>> my_bounding_box, _ = bob.ip.facedetect.detect_single_face(gray_image)
>>> my_key_points = bob.ip.facelandmarks.
utils.
detect_landmarks_on_boundingbox(gray_image, my_bounding_box)
>>> my_key_points = bob.ip.facelandmarks.detect_landmarks_on_boundingbox(gray_image, my_bounding_box)
>>> print(my_key_points.shape)
(68, 2)
...
...
@@ -129,7 +129,7 @@ In the following example, the input image contains several faces, out of which,
>>> multi_image = bob.io.base.load('multiple-faces.jpg') # doctest: +SKIP
>>> gray_image = bob.ip.color.rgb_to_gray(multi_image)
>>> key_points = bob.ip.facelandmarks.
utils.
detect_landmarks(gray_image, top=5)
>>> key_points = bob.ip.facelandmarks.detect_landmarks(gray_image, top=5)
>>> for i in range(5):
... print(key_points[i].bounding_box.topleft)
(136, 2243)
...
...
This diff is collapsed.
Click to expand it.
doc/py_api.rst
+
1
−
1
View file @
caba24ba
...
...
@@ -7,4 +7,4 @@
Detailed Information
--------------------
.. automodule:: bob.ip.facelandmarks
.utils
.. automodule:: bob.ip.facelandmarks
This diff is collapsed.
Click to expand it.
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