          save_thread = self.threaded_io("save")
          self.run_extraction(save_thread)
          self.alignments.save()
          Utils.finalize(self.images.images_found,
                         self.alignments.faces_count(),
                         self.verify_output)
  
      def threaded_io(self, task, io_args=None):
          """ Load images in a background thread """
          io_args = tuple() if io_args is None else (io_args, )
 
</s> remove         if self.alignments.src_format == "dfl":
            self.alignments.alignments = self.load_dfl()
            self.alignments.file = os.path.join(self.faces.folder,
                                                "alignments.json")
        self.alignments.save_alignments()
 </s> add         if self.alignments.file == "dfl":
            self.alignments.data = self.load_dfl()
            self.alignments.file = self.alignments.get_location(
                self.faces.folder,
                "alignments")
        self.alignments.save() </s> remove     mat_umeyama = umeyama(numpy.array(face.landmarks_as_xy()[17:]), landmarks_2D, True)[0:2]
 </s> add     """ Return the alignment Matrix """
    mat_umeyama = umeyama(np.array(face.landmarks_as_xy()[17:]),
                          LANDMARKS_2D,
                          True)[0:2]
 </s> remove     def get_location(self):
        """ Return the path to alignments file """
        if self.args.alignments_path:
            alignfile = self.args.alignments_path
        else:
            alignfile = os.path.join(
                str(self.args.input_dir),
                "alignments.{}".format(self.serializer.ext))
        print("Alignments filepath: %s" % alignfile)
        return alignfile

 </s> add  </s> remove         """ Load the alignments data if it exists or create empty dict """
 </s> add         """ Override  parent loader to handle skip existing on extract """ </s> remove         self.matrices = list()
 </s> add 
                       self.alignments.faces_count,
          save_thread = self.threaded_io("save")
          self.run_extraction(save_thread)
          self.alignments.save()
          Utils.finalize(self.images.images_found,
                       self.alignments.faces_count,
                         self.verify_output)
  
      def threaded_io(self, task, io_args=None):
          """ Load images in a background thread """
          io_args = tuple() if io_args is None else (io_args, )
keep keep keep keep replace keep keep keep keep keep
 Fix convert-adjust (#531)

* Add dimensions to alignments + refactor

* Add frame_dims + funcs to DetectFaces. Add alignments lib

* Convert Adjust working

* Refactor and tidy up 
scripts/extract.py