          count = 0
  
          faces = self.get_faces(image)
          rvals = []
          for idx, face in faces:
              count = idx
               
              # Draws landmarks for debug
              if self.arguments.debug_landmarks:
                  for (x, y) in face.landmarksAsXY():
                      cv2.circle(image, (x, y), 2, (0, 0, 255), -1)
                      
 
</s> remove         count = 0

 </s> add  </s> remove         faces = detect_faces(image, self.arguments.detector)
 </s> add         faces = detect_faces(image, rotation, self.arguments.detector) </s> remove                     image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                    # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
 </s> add                     # Check for image rotations and rotate before mapping face
                    if face.r != 0:
                        image = rotate_image(image, face.r)
                        image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                        # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
                        image = rotate_image(image, face.r * -1)
                    else:
                        image = converter.patch_image(image, face, 64 if "128" not in self.arguments.trainer else 128)
                        # TODO: This switch between 64 and 128 is a hack for now. We should have a separate cli option for size
        for idx, face in process_faces:
          count = 0
  
          faces = self.get_faces(image)
          rvals = []
        for idx, face in process_faces:
        for idx, face in process_faces:
        for idx, face in process_faces:
              # Draws landmarks for debug
              if self.arguments.debug_landmarks:
                  for (x, y) in face.landmarksAsXY():
                      cv2.circle(image, (x, y), 2, (0, 0, 255), -1)
                      
keep keep keep keep replace replace 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 
scripts/extract.py