get_adjusted_center

lib.align.aligned_utils.get_adjusted_center(image_size: int, source_offset: np.ndarray, target_offset: np.ndarray, source_centering: CenteringType, y_offset: float) np.ndarray

Obtain the correct center of a face extracted image to translate between two different extract centerings.

Parameters:
  • image_size (int) – The size of the image at the given source_centering

  • source_offset (np.ndarray) – The pose offset to translate a base extracted face to source centering

  • target_offset (np.ndarray) – The pose offset to translate a base extracted face to target centering

  • source_centering (CenteringType) – The centering of the source image

  • y_offset (float) – Amount to additionally offset the center of the image along the y-axis

Return type:

The center point of the image at the given size for the target centering