Commit a0e5b73e authored by Sushil BHATTACHARJEE's avatar Sushil BHATTACHARJEE
Browse files

update to fix sphinx problems

parent 2dccc00f
Loading
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :

#from .utils import *
from .utils import Result


def get_config():
@@ -14,19 +12,6 @@ def get_config():
    return bob.extension.get_config(__name__)


# gets sphinx autodoc done right - don't remove it 
def __appropriate__(*args):   
    """Says object was actually declared here, an not on the import module.   

    Parameters:     *args: An iterable of objects to modify   

    Resolves `Sphinx referencing issues   <https://github.com/sphinx-doc/sphinx/issues/3048>`   """   

    for obj in args: obj.__module__ = __name__

__appropriate__(
    Result,
    )

# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')]
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ def main(user_input=None):
  if args['--verbose'] == 1: logging.getLogger().setLevel(logging.INFO)
  elif args['--verbose'] >= 2: logging.getLogger().setLevel(logging.DEBUG)

  from .. import detect_landmarks, draw_landmarks, save_landmarks
  from bob.ip.facelandmarks.utils import detect_landmarks, draw_landmarks, save_landmarks

  data = bob.io.base.load(args['<input>'])
  top = int(args['--limit-to'])
+2 −2
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@ import pkg_resources
import bob.io.base
import bob.io.base.test_utils

from .utils import detect_landmarks, draw_landmarks
from .utils import detect_landmarks_on_boundingbox
from bob.ip.facelandmarks.utils import detect_landmarks, draw_landmarks, save_landmarks, Result
from bob.ip.facelandmarks.utils import detect_landmarks_on_boundingbox
from .script.detect_landmarks import main as app


+5 −5
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ def _detect_multiple_landmarks_on_gray_image(data, top=0, min_quality=0.):

  Returns:

    list: A list of named tuples of type :py:class:`Result`, each containing
    list: A list of named tuples of type :py:class:`bob.ip.facelandmarks.utils.Result`, each containing
      the result of face detection and landmarks extracted from the input
      image.
      The list MAY BE EMPTY if no face is detected in the input image (data).
@@ -278,7 +278,7 @@ def _detect_multiple_landmarks_on_color_image(data, top=0, min_quality=0.):

  Returns:

    list: A list of named tuples of type :py:class:`Result`, each containing
    list: A list of named tuples of type :py:class:`bob.ip.facelandmarks.utils.Result`, each containing
      the result of face detection and landmarks extracted from the input
      image.

@@ -313,7 +313,7 @@ def detect_landmarks(data, top=0, min_quality=0.):

  Returns:

    list: A list of named tuples of type :py:class:`Result`, each containing
    list: A list of named tuples of type :py:class:`bob.ip.facelandmarks.utils.Result`, each containing
      the result of face detection and landmarks extracted from the input
      image.

@@ -335,7 +335,7 @@ def draw_landmarks(data, results):
      dimensions, corresponding to a either a gray-scale or color image loaded
      with Bob.

    results (list): A list of named tuples of type :py:class:`Result`, each
    results (list): A list of named tuples of type :py:class:`bob.ip.facelandmarks.utils.Result`, each
      containing the result of face detection and landmarks extracted from the
      input image.

@@ -395,7 +395,7 @@ def save_landmarks(results, fname):

  Parameters:

    results (list): A list of named tuples of type :py:class:`Result`, each
    results (list): A list of named tuples of type :py:class:`bob.ip.facelandmarks.utils.Result`, each
      containing the result of face detection and landmarks extracted from the
      input image.

+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ import bob.io.video
import bob.ip.color

import bob.ip.facelandmarks as menpo
from bob.ip.facelandmarks.utils import detect_landmarks, draw_landmarks, save_landmarks, Result
from bob.ip.facelandmarks.utils import detect_landmarks_on_boundingbox

from PIL import Image, ImageDraw
from bob.ip.draw import box, cross, plus