          image = self.images.rotate_image(image, face.r, reverse=True)
          return image
  
  
  class OptionalActions(object):
      """ Process the optional actions for convert """
  
      def __init__(self, args, input_images):
          self.args = args
          self.input_images = input_images
 
</s> remove         image = self.images.rotate_image(image, face.r, reverse=True)
 </s> add  </s> remove     def rotate_image(self, image, rotation, reverse=False):
        """ Rotate the image forwards or backwards """
        if rotation == 0:
            return image
        if not reverse:
            self.rotation_height, self.rotation_width = image.shape[:2]
            image, _ = rotate_image_by_angle(image, rotation)
        else:
            image, _ = rotate_image_by_angle(
                image,
                rotation * -1,
                rotated_width=self.rotation_width,
                rotated_height=self.rotation_height)
        return image
 </s> add         try:
            with open(self.location, self.serializer.roptions) as align:
                data = self.serializer.unmarshal(align.read()) </s> remove class Images():
    """ Holds the full frames/images """
    def __init__(self, arguments):
 </s> add class Alignments():
    """ Holds processes pertaining to the alignments file """
    def __init__(self, arguments, is_extract):
        self.is_extract = is_extract </s> remove class Convert(object):
 </s> add class Convert(): </s> remove         self.rotation_angles = self.get_rotation_angles()
        self.already_processed = self.get_already_processed()
        self.input_images = self.get_input_images()
        self.images_found = len(self.input_images)
 </s> add         self.serializer = self.get_serializer()
        self.location = self.get_location()
        self.have_alignments_file = os.path.exists(self.location)
        self.data = self.load()
class OptionalActions():
          image = self.images.rotate_image(image, face.r, reverse=True)
          return image
  
  
class OptionalActions():
      """ Process the optional actions for convert """
  
      def __init__(self, args, input_images):
          self.args = args
          self.input_images = input_images
keep keep keep keep replace keep keep keep keep keep
 Extraction - Speed improvements (#522) (#523)

* Extraction - Speed improvements (#522)

* Initial Plugin restructure

* Detectors to plugins. Detector speed improvements

* Re-implement dlib aligner, remove models, FAN to TF. Parallel processing

* Update manual, update convert, implement parallel/serial switching

* linting + fix cuda check (setup.py). requirements update keras 2.2.4

* Add extract size option. Fix dlib hog init

* GUI: Increase tooltip width

* Update alignment tool to support new DetectedFace

* Add skip existing faces option

* Fix sort tool to new plugin structure

* remove old align plugin

* fix convert -skip faces bug

* Fix convert skipping no faces frames

* Convert - draw onto transparent layer

* Fix blur threshold bug

* fix skip_faces convert bug

* Fix training 
scripts/convert.py