Function extractFaceTensors

  • Extracts the tensors of the image regions containing the detected faces. Useful if you want to compute the face descriptors for the face images. Using this method is faster then extracting a canvas for each face and converting them to tensors individually.

    Parameters

    • imageTensor: Tensor4D | Tensor3D

      The image tensor that face detection has been performed on.

    • detections: (Rect | FaceDetection)[]

      The face detection results or face bounding boxes for that image.

    Returns Promise<Tensor3D[]>

    Tensors of the corresponding image region for each detected face.