      input_dir = None
      output_dir = None
  
      images_found = 0
      faces_detected = 0
      verify_output = False
  
      def __init__(self, subparser, command, description='default'):
          self.create_parser(subparser, command, description)
          self.parse_arguments(description, subparser, command)
 
</s> remove     def __init__(self, image, x, w, y, h, landmarks):
 </s> add     def __init__(self, image=None, x=None, w=None, y=None, h=None, landmarks=None, landmarksXY=None): </s> remove         for face in detect_faces(image, self.arguments.detector):
 </s> add         faces = self.faces_detected[filename]
        for rawface in faces:
            face = DetectedFace(**rawface) </s> remove     
    def get_faces(self, image):
 </s> add     def have_face(self, filename):
        return filename in self.faces_detected

    def get_faces_alignments(self, filename): </s> remove         self.faces_detected = 0
 </s> add 
    num_faces_detected = 0
    faces_detected = dict()
      input_dir = None
      output_dir = None
  
      images_found = 0
    num_faces_detected = 0
    faces_detected = dict()
      verify_output = False
  
      def __init__(self, subparser, command, description='default'):
          self.create_parser(subparser, command, description)
          self.parse_arguments(description, subparser, command)
keep keep keep keep replace keep keep keep keep keep
 Added serializers.

This speeds up convert speed x4 on my machine. 
lib/cli.py