                           self.serializer.file_extension)
          elif extension != ".fsa":
              raise FaceswapError("{} is not a valid alignments file".format(filename))
          location = os.path.join(str(folder), filename)
          logger.verbose("Alignments filepath: '%s'", location)
          return location
  
      # << I/O >> #
  
 
</s> remove         if extension in (".json", ".p", ".yaml", ".yml"):
 </s> add         if extension in (".json", ".p", ".pickle", ".yaml", ".yml"): </s> remove     elif extension == ".p":
 </s> add     elif extension in (".p", ".pickle"): </s> remove         logger.info("Old location: '%s', New location: '%s'", old_location, new_location)

        load_serializer = get_serializer_from_filename(old_location)
        data = load_serializer.load(old_location)
        self.serializer.save(new_location, data)
 </s> add         if os.path.exists(old_location):
            if os.path.exists(new_location):
                logger.info("Using existing updated alignments file found at '%s'. If you do not "
                            "wish to use this existing file then you should delete or rename it.",
                            new_location)
            else:
                logger.info("Old location: '%s', New location: '%s'", old_location, new_location)
                load_serializer = get_serializer_from_filename(old_location)
                data = load_serializer.load(old_location)
                self.serializer.save(new_location, data) </s> remove     def _load_detector(detector, rotation, min_size, configfile):
 </s> add     def _load_align(aligner, configfile, normalize_method):
        """ Set global arguments and load aligner plugin """
        aligner_name = aligner.replace("-", "_").lower()
        logger.debug("Loading Aligner: '%s'", aligner_name)
        aligner = PluginLoader.get_aligner(aligner_name)(configfile=configfile,
                                                         normalize_method=normalize_method)
        return aligner

    @staticmethod
    def _load_detect(detector, rotation, min_size, configfile):
        if not os.path.exists(location):
            # Test for old format alignments files and reformat if they exist
            # This will be executed if an alignments file has not been explicitly provided
            # therefore it will not have been picked up in the extension test
            self.test_for_legacy(location)
                           self.serializer.file_extension)
          elif extension != ".fsa":
              raise FaceswapError("{} is not a valid alignments file".format(filename))
          location = os.path.join(str(folder), filename)
        if not os.path.exists(location):
            # Test for old format alignments files and reformat if they exist
            # This will be executed if an alignments file has not been explicitly provided
            # therefore it will not have been picked up in the extension test
            self.test_for_legacy(location)
          logger.verbose("Alignments filepath: '%s'", location)
          return location
  
      # << I/O >> #
  
keep keep keep add keep keep keep keep keep
 Smart Mask - Extract code review

- Lint simple_tests.py
- Only reformat alignments file if it exists otherwise change filename
- Update legacy alignments to new format at all stages
- faces_detect.Mask.from_dict - logging format fix
- convert.py fix otf for new pipeline
- cli.py - Add note that masks not used. Revert convert masks
- faces_detect.py - Revert non-extract code
- Add .p and .pickle extensions for serializer
- plugins/extract revert some changes
- scripts/fsmedia - Revert code changes
- Pipeline - cleanup
- Consistant alpha channel stripping (fixes single-process)
- Store landmarks as numpy array
- Code attribution
- Normalize feed face and reference face to 0.0 - 1.0 in convert
- Lock in mask VRAM sized
- Add documentation to plugin_loader
- Update alignments tool to work with new format 
lib/alignments.py