• 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.

    Returns

    Tensors of the corresponding image region for each detected face.

    Parameters

    • imageTensor: any

      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<tf.Tensor3D[]>