          if faces_in_frame == 0:
              face = np.ones((size, size, 3), dtype="uint8")
          else:
              det_face = self._det_faces.current_faces[frame_idx][face_idx]
              det_face.load_aligned(self._globals.current_frame["image"], size=size, force=True)
              face = det_face.aligned_face.copy()
              det_face.aligned["image"] = None
  
          logger.trace("face shape: %s", face.shape)
          return face[..., 2::-1]
  
      def _update_tk_frame(self):
          """ Place the currently held frame into :attr:`_tk_frame`. """
 
</s> remove     def _generate_thumbnail(self, face):
        """ Generate the jpg thumbnail from the currently active frame for the detected face and
        assign to it's `thumbnail` attribute.

        Parameters
        ----------
        face: class:`~lib.faces_detect.DetectedFace`
            The detected face object to generate the thumbnail for
        """
        face.load_aligned(self._globals.current_frame["image"], 80, force=True)
        jpg = cv2.imencode(".jpg", face.aligned_face, [cv2.IMWRITE_JPEG_QUALITY, 60])[1]
        face.thumbnail = jpg
        face.aligned = dict()

 </s> add  </s> remove     @staticmethod
    def _resize_masks(target_size, masks):
 </s> add     @classmethod
    def _resize_masks(cls, target_size, masks): </s> remove     def set_output(self):
        """ Set the output folder path """
 </s> add         """ </s> remove         mask, raw_mask = self._adjustments["mask"].run(detected_face, predicted_mask)
 </s> add         if self._centering == "legacy":
            crop_offset = reference_face.pose.offset["face"] * -1
        else:
            crop_offset = np.array((0, 0))
        mask, raw_mask = self._adjustments["mask"].run(detected_face, crop_offset, predicted_mask)
            face = AlignedFace(det_face.landmarks_xy,
                               image=self._globals.current_frame["image"],
                               centering="face",
                               size=size).face
          if faces_in_frame == 0:
              face = np.ones((size, size, 3), dtype="uint8")
          else:
              det_face = self._det_faces.current_faces[frame_idx][face_idx]
            face = AlignedFace(det_face.landmarks_xy,
                               image=self._globals.current_frame["image"],
                               centering="face",
                               size=size).face
            face = AlignedFace(det_face.landmarks_xy,
                               image=self._globals.current_frame["image"],
                               centering="face",
                               size=size).face
            face = AlignedFace(det_face.landmarks_xy,
                               image=self._globals.current_frame["image"],
                               centering="face",
                               size=size).face
            face = AlignedFace(det_face.landmarks_xy,
                               image=self._globals.current_frame["image"],
                               centering="face",
                               size=size).face
          logger.trace("face shape: %s", face.shape)
          return face[..., 2::-1]
  
      def _update_tk_frame(self):
          """ Place the currently held frame into :attr:`_tk_frame`. """
keep keep keep keep replace replace replace 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/manual/frameviewer/control.py