Input Image =========== In order to use many of the Trueface AI inference functions (face detection, face recognition, etc), you must first set the image. The SDK is stateful meaning that once you set the image, it will persist until the next call to ``set_image`` is made. This means that you can set the image once then call various functions on that same image. Once you have set the image, you are ready to start calling the various Trueface AI inference functions. .. automethod:: tfsdk.SDK.set_image You can set the image using an OpenCV ``cv::Mat`` by passing the image buffer as follows: .. code-block:: python :linenos: cv_img = cv2.imread(img_path) res = sdk.set_image(cv_img, cv_img.shape[1], cv_img.shape[0], tfsdk.COLORCODE.bgr) .. autoclass:: tfsdk.COLORCODE :no-undoc-members: