              self._detected_faces[side] = self._to_detected_faces(alignments, side)
              self._alignments_version[side] = alignments.version
          logger.debug("alignments_versions: %s, detected_faces: %s, ", self._alignments_version,
                       {k: len(v) for k, v in self._detected_faces.items()})
  
      def _to_detected_faces(self, alignments, side):
          """ Convert alignments to DetectedFace objects.
  
 
</s> remove         self._hashes, self._training_sizes = self._get_image_hashes(image_list)
 </s> add         self._hashes, sizes = self._get_image_hashes(image_list)
 </s> remove         if self._alignments_version[side] == 1.0:
            centering = "legacy"
            size = self._training_sizes[side]
        else:
            centering = self._config["centering"]
            size = list(self._aligned_faces[side].values())[0].get_cropped_size(centering)
 </s> add         size = list(self._aligned_faces[side].values())[0].size </s> remove         cropped = np.zeros((batch.shape[0], size, size, batch.shape[3]), dtype=batch.dtype)

        for out, align, img in zip(cropped, aligned, batch):
            slices = align.get_cropped_slices(self._config["centering"])
            out[slices["out"][0], slices["out"][1], :] = img[slices["in"][0], slices["in"][1], :]
 </s> add         cropped = np.array([align.extract_face(img) for align, img in zip(aligned, batch)]) </s> remove             size = self._training_sizes[side]
            centering = "legacy" if self._alignments_version[side] == 1.0 else "head"
            logger.debug("side: %s, centering: %s", side, centering)
 </s> add  </s> remove from .aligned_face import AlignedFace, _EXTRACT_RATIOS, get_matrix_scaling, PoseEstimate, transform_image  # noqa
 </s> add from .aligned_face import AlignedFace, _EXTRACT_RATIOS, get_matrix_scaling, get_centered_size, PoseEstimate, transform_image  # noqa
        if 1.0 in self._alignments_version.values() and self._config["centering"] != "legacy":
            logger.debug("Updating alignments config to legacy for old facesets")
            self._config["centering"] = "legacy"

              self._detected_faces[side] = self._to_detected_faces(alignments, side)
              self._alignments_version[side] = alignments.version
        if 1.0 in self._alignments_version.values() and self._config["centering"] != "legacy":
            logger.debug("Updating alignments config to legacy for old facesets")
            self._config["centering"] = "legacy"

          logger.debug("alignments_versions: %s, detected_faces: %s, ", self._alignments_version,
                       {k: len(v) for k, v in self._detected_faces.items()})
  
      def _to_detected_faces(self, alignments, side):
          """ Convert alignments to DetectedFace objects.
  
keep add keep keep keep keep keep keep
 Bugfix - Warp to landmarks 
plugins/train/trainer/_base.py