FFLD2Detector

class menpodetect.ffld2.FFLD2Detector(model)[source]

Bases: object

A generic ffld2 detector.

Wraps an ffld2 object detector inside the menpodetect framework and provides a clean interface to expose the ffld2 arguments.

__call__(image, greyscale=True, image_diagonal=None, group_prefix='ffld2', padding=6, interval=5, threshold=0.5, overlap=0.3)[source]

Perform a detection using the cached ffdl2 detector.

The detections will also be attached to the image as landmarks.

Parameters:
  • image (menpo.image.Image) – A Menpo image to detect. The bounding boxes of the detected objects will be attached to this image.
  • greyscale (bool, optional) – Whether to convert the image to greyscale or not.
  • image_diagonal (int, optional) – The total size of the diagonal of the image that should be used for detection. This is useful for scaling images up and down for detection.
  • group_prefix (str, optional) – The prefix string to be appended to each each landmark group that is stored on the image. Each detection will be stored as group_prefix_# where # is a count starting from 0.
  • padding (int, optional) – Amount of zero padding in HOG cells
  • interval (int, optional) – Number of levels per octave in the HOG pyramid
  • threshold (double, optional) – Minimum detection threshold. Detections with a score less than this value are not returned. Values can be negative.
  • overlap (double, optional) – Minimum overlap in in latent positive search and non-maxima suppression. As discussed in the Face Detection Without Bells and Whistles paper, a sensible value for overlap is 0.3
Returns:

bounding_boxes (list of menpo.shape.PointDirectedGraph) – The detected objects.