          
      def read_directory(self):
          self.images_found = len(self.input_dir)
          return self.input_dir
      
      def get_faces(self, image):
          faces_count = 0
          for face in detect_faces(image, self.arguments.detector):
              if self.filter is not None and not self.filter.check(face):
                  print('Skipping not recognized face!')
                  continue
 
</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         
 </s> add     def read_alignments(self):

        fn = os.path.join(self.arguments.input_dir,"alignments.{}".format(self.serializer.ext))
        if self.arguments.alignments_path is not None:
            fn = self.arguments.alignments_path

        try:
            print("Reading alignments from: {}".format(fn))
            with open(fn, self.serializer.roptions) as f:
                self.faces_detected = self.serializer.unmarshal(f.read())
        except Exception as e:
            print("{} not read!".format(fn))
            print(str(e))
            self.faces_detected = dict()

    def write_alignments(self):

        fn = os.path.join(self.output_dir,"alignments.{}".format(self.serializer.ext))
        if self.arguments.alignments_path is not None:
            fn = self.arguments.alignments_path
        try:
            print("Writing alignments to: {}".format(fn))
            with open(fn, self.serializer.woptions) as fh:
                fh.write(self.serializer.marshal(self.faces_detected))
        except Exception as e:
            print("{} not written!".format(fn))
            print(str(e))
            self.faces_detected = dict()
 </s> remove             self.faces_detected = self.faces_detected + 1
 </s> add             self.num_faces_detected += 1
    def have_face(self, filename):
        return filename in self.faces_detected

    def get_faces_alignments(self, filename):
          
      def read_directory(self):
          self.images_found = len(self.input_dir)
          return self.input_dir
    def have_face(self, filename):
        return filename in self.faces_detected

    def get_faces_alignments(self, filename):
    def have_face(self, filename):
        return filename in self.faces_detected

    def get_faces_alignments(self, filename):
          faces_count = 0
          for face in detect_faces(image, self.arguments.detector):
              if self.filter is not None and not self.filter.check(face):
                  print('Skipping not recognized face!')
                  continue
keep keep keep keep replace replace keep keep keep keep keep
 Added serializers.

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