      """ Sorts folders of faces based on input criteria """
      # pylint: disable=no-member
      def __init__(self, arguments):
          self._args = arguments
          self._alignments = self._get_alignments()
          self.changes = None
          self.serializer = None
          self._vgg_face = None
          # TODO set this as FacesLoader in init. Need to move all processes to use it
          self._loader = None
 
</s> remove     def _get_alignments(self):
        """ Obtain the alignments data and validate for methods which require it.

        Returns
        -------
        :class:`lib.align.Alignments`
            The alignments object pertaining to the data to be sorted. Returns ``None`` if an
            alignments file can't be found or is not required.
        """
        required_methods = ["face"]
        if self._args.sort_method not in required_methods:
            return None
        if self._args.alignments_path is None:
            path = os.path.join(self._args.input_dir, "alignments.fsa")
        else:
            path = self._args.alignments_path

        if not os.path.isfile(path):
            logger.warning("Alignments file not found at '%s'. Not using an alignments file will "
                           "lead to vastly inferior results.", path)
            logger.warning("It is highly recommended that you use an alignments file for sorting "
                           "by '%s'.", self._args.sort_method)
            return None

        return Alignments(*os.path.split(path))

 </s> add  </s> remove     """ Frames and faces checking tasks """
 </s> add     """ Frames and faces checking tasks.

    Parameters
    ---------
    alignments: :class:`tools.alignments.media.AlignmentsData`
        The loaded alignments corresponding to the frames to be annotated
    arguments: :class:`argparse.Namespace`
        The command line arguments that have called this job
    """ </s> remove         self.job = arguments.job
        self.type = None
        self.is_video = False  # Set when getting items
        self.output = arguments.output
        self.source_dir = self.get_source_dir(arguments)
        self.validate()
        self.items = self.get_items()
 </s> add         self._job = arguments.job
        self._type = None
        self._is_video = False  # Set when getting items
        self._output = arguments.output
        self._source_dir = self._get_source_dir(arguments)
        self._validate()
        self._items = self._get_items() </s> remove         self.faces = self.get_faces(arguments)
 </s> add 
      """ Sorts folders of faces based on input criteria """
      # pylint: disable=no-member
      def __init__(self, arguments):
          self._args = arguments

          self.changes = None
          self.serializer = None
          self._vgg_face = None
          # TODO set this as FacesLoader in init. Need to move all processes to use it
          self._loader = None
keep keep keep keep replace keep keep keep keep keep
 Update extracted faces to use PNG EXIF data (#1123)

Documentation
  - Update Usage.md, align.rst and image.rst
lib.image.py
  - read_image - Remove hash return, add metadata return
  - Remove read_image_hash functions
  - Add read_image_meta functios
  - Replace encode_image_with_hash with encode_image (to store metadata)
  - Add png meta reading and writing functions
  - Update Image Loaders/Savers to handle metadata rather than hashes
lib.training_data
  - Naming updates to remove references to hashes
lib.align.Alignments
  - Add versioning notes
  - Increment alignments version to 2.1
  - Deprecate hashing lookup functions
  - Replace filter_hashes with filter_faces
lib.align.detected_face
  - DetectedFace
    - Remove hash property
    - Add png header data serializing/deserializing functions
  - Mask
    - Add png header data serializing/deserializing functions
  - add update_legacy_png_header function to update png meta data
lib.cli.args - Deprecate alignments files for training
- plugins.train.trainer
  - Update alignments/mask code to read png header data
- scripts.convert
  - Aligned images folder - read data from png headers
- scripts.extract
  - Write png header information and no longer store hash of face
- tools.alignments
  - remove leftover-faces, merge and update-hashes jobs
  - Update jobs to use png meta data rather than hashes
- tools.manual
  - Update extract code to output png meta data and don't store hashes
  - Perform check on launch that tool is not pointing at a faces folder
tools.mask
  - Update to use png meta data
tools.sort
  - Update to use png meta data 
tools/sort/sort.py