          return rotated_faces, rotated_image
          
      def handleImage(self, image, filename):
          faces = self.get_faces(image)
          rvals = []
          for idx, face in process_faces:
              # Draws landmarks for debug
              if self.arguments.debug_landmarks:
                  for (x, y) in face.landmarksAsXY():
 
</s> remove         for idx, face in faces:
            count = idx
             
 </s> add         for idx, face in process_faces: </s> remove         count = 0

 </s> add  </s> remove     def get_faces(self, image):
 </s> add     def get_faces(self, image, rotation=0): </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
        process_faces = [(idx, face) for idx, face in faces]

        # Run image rotator if requested and no faces found        
        if self.arguments.rotate_images.lower() == 'on' and len(process_faces) == 0:
            process_faces, image = self.imageRotator(image)

          return rotated_faces, rotated_image
          
      def handleImage(self, image, filename):
          faces = self.get_faces(image)
        process_faces = [(idx, face) for idx, face in faces]

        # Run image rotator if requested and no faces found        
        if self.arguments.rotate_images.lower() == 'on' and len(process_faces) == 0:
            process_faces, image = self.imageRotator(image)

          rvals = []
          for idx, face in process_faces:
              # Draws landmarks for debug
              if self.arguments.debug_landmarks:
                  for (x, y) in face.landmarksAsXY():
keep keep keep add 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