batch_align
- lib.align.aligned_utils.batch_align(images: list[npt.NDArray[ImageDTypeT]], image_ids: npt.NDArray[np.int32], matrices: npt.NDArray[np.float32], size: int, fast_upscale: bool = True) npt.NDArray[ImageDTypeT]
Obtain a batch of aligned faces from the given images for the given matrices
- Parameters:
images (list[npt.NDArray[ImageDTypeT]]) – The full size images to obtain aligned faces from, either UINT8 or Float32 and 3 or 4 channels. All images must be the same dtype and have the same number of channels
image_ids (npt.NDArray[np.int32]) – The image id of each image in
image_idsfor each matrix inmatricesmatrices (npt.NDArray[np.float32]) – The adjustment matrices for taking the image patch from the frame for plugin input
size (int) – The size of the returned aligned faces
fast_upscale (bool) –
Trueto use cv2.INTER_LINEAR for upscale,Falseto use cv2.INTER_CUBIC. Default:True
- Return type:
Batch of aligned face patches of the same dtype as the input images