  def detect_faces(frame, model="hog"):
      fd = FaceLandmarksExtractor.extract (frame, True if model == "cnn" else False )
      for face in fd:
          x, y, right, bottom, landmarks = face[0][0], face[0][1], face[0][2], face[0][3], face[1]
          yield DetectedFace(frame[y: bottom, x: right], x, right - x, y, bottom - y, landmarksXY=landmarks)
  
  class DetectedFace(object):
      def __init__(self, image=None, x=None, w=None, y=None, h=None, landmarksXY=None):
          self.image = image
          self.x = x
 
</s> remove def detect_faces(frame, model="hog"):
 </s> add def detect_faces(frame, rotation=0, model="hog"): </s> remove     def __init__(self, image=None, x=None, w=None, y=None, h=None, landmarksXY=None):
 </s> add     def __init__(self, image=None, r=None, x=None, w=None, y=None, h=None, landmarksXY=None):
        yield DetectedFace(frame[y: bottom, x: right], rotation, x, right - x, y, bottom - y, landmarksXY=landmarks)
  def detect_faces(frame, model="hog"):
      fd = FaceLandmarksExtractor.extract (frame, True if model == "cnn" else False )
      for face in fd:
          x, y, right, bottom, landmarks = face[0][0], face[0][1], face[0][2], face[0][3], face[1]
        yield DetectedFace(frame[y: bottom, x: right], rotation, x, right - x, y, bottom - y, landmarksXY=landmarks)
  
  class DetectedFace(object):
      def __init__(self, image=None, x=None, w=None, y=None, h=None, landmarksXY=None):
          self.image = image
          self.x = x
keep keep keep keep replace keep keep keep keep keep
 Add image rotation for detecting more faces and dealing with awkward angles (#253)

* Image rotator for extract and convert ready for testing

* Revert "Image rotator for extract and convert ready for testing"

This reverts commit bbeb19ef26d2392b0f5f954dd202137a70444d4e.

Error in extract code

* add image rotation support to detect more faces

* Update convert.py

Amended to do a single check for for rotation rather than checking twice. Performance gain is likely to be marginal to non-existent, but can't hurt.

* Update convert.py

remove type

* cli.py: Only output message on verbose. Convert.py: Only check for rotation amount once

* Changed command line flag to take arguments to ease future development

* Realigning for upstream/Master

* Minor fix 
lib/faces_detect.py