  
          for idx, face in enumerate(faces):
              output = "{}_{}{}".format(frame_name, str(idx), extension)
              if self._arguments.large:
                  self._frames.save_image(self._faces_dir, output, face.aligned_face)
              else:
                  output = os.path.join(self._faces_dir, output)
                  f_hash = self._extracted_faces.save_face_with_hash(output,
                                                                     extension,
                                                                     face.aligned_face)
 
</s> remove                                                                    face.aligned_face)
 </s> add                                                                    face.aligned.face)
                if self._is_legacy:  # Generate the new thumbnail and store new face data for save
                    face.thumbnail = generate_thumbnail(face.aligned.face, size=96, quality=60)
                    self._alignments.data[filename]["faces"][idx] = face.to_alignment() </s> remove                 face.load_aligned(image, size=256, force=True)  # TODO user selectable size
                face.hash, b_image = encode_image_with_hash(face.aligned_face, extension)
 </s> add                 aligned = AlignedFace(face.landmarks_xy,
                                      image=image,
                                      centering="head",
                                      size=512)  # TODO user selectable size
                face.hash, b_image = encode_image_with_hash(aligned.face, extension) </s> remove             frame_name, extension = os.path.splitext(filename)
 </s> add             basename = os.path.basename(filename)
            frame_name, extension = os.path.splitext(basename) </s> remove             List of valid :class:`lib,faces_detect.DetectedFace` objects
 </s> add             List of valid :class:`lib,align.DetectedFace` objects
                self._frames.save_image(self._faces_dir, output, face.aligned.face)
  
          for idx, face in enumerate(faces):
              output = "{}_{}{}".format(frame_name, str(idx), extension)
              if self._arguments.large:
                self._frames.save_image(self._faces_dir, output, face.aligned.face)
              else:
                  output = os.path.join(self._faces_dir, output)
                  f_hash = self._extracted_faces.save_face_with_hash(output,
                                                                     extension,
                                                                     face.aligned_face)
keep keep keep keep replace keep keep keep keep keep
 Extract - Increase area and move centering (#1095)

* Extract
  - Implement aligner re-feeding
  - Add extract type to pipeline.ExtractMedia
  - Add pose annotation to debug
* Convert
  - implement centering
  - remove usage of feed and reference face properties
  - Remove distributed option from convert
  - Force update of alignments file on legacy receive
* Train
  - Resize preview image to model output size
  - Force legacy centering if centering does not exist in model's state file
  - Enable training on legacy face sets

* Alignments Tool
  - Update draw to include head/pose
  - Remove DFL drop + linting
  - Remove remove-frames job
  - remove align-eyes option
  - Update legacy masks to new extract type
  - Exit if attempting to merge version 1.0 alignments files with version 2.0 alignments files
  - Re-generate thumbnails on legacy upgrade
* Mask Tool
  - Update for new extract + bugfix full frame
* Manual Tool
  - Update to new extraction method
   - Disable legacy alignments,
   - extract box bugfix
   - extract faces - size to 512 and center on head
* Preview Tool
  - Display based on model centering
* Sort Tool
  - Use alignments for sort by face

* lib.aligner
  - Add Pose Class
  - Add AlignedFace Class
  - center _MEAN_FACE on x
  - Add meta information with versioning to alignments file
  - lib.aligner.get_align_matrix to use landmarks not face
  - Refactor aligned faces in lib.faces_detect
* lib.logger
  - larger file log padding
* lib.config
  - Fix global changeable_items
* lib.face_filter
  - Use new extracted face images
* lib.image
  - bump thumbnail default size to 96px 
tools/alignments/jobs.py