Input Image
In order to use many of the Trueface AI inference functions (face detection, face recognition, etc), you must first preprocess your image. Once you have preprocessed your image, you are ready to start calling the various Trueface AI inference functions.
You can set the image using an OpenCV cv::Mat by passing the image buffer as follows:
1 cv_img = cv2.imread(img_path)
2 res, image = sdk.preprocess_image(cv_img, cv_img.shape[1], cv_img.shape[0], tfsdk.COLORCODE.bgr)