In an embodiment, the training the second recognition model according to the second training sample includes: obtaining an initialized second recognition model; determining a second training label corresponding to the second training sample; inputting the second training sample into the second recognition model to obtain a second recognition result; and adjusting model parameters of the second recognition model according to a difference between the second recognition result and the second training label, and continuing training until satisfaction of a training stop condition.
In an embodiment, the obtaining a target image includes: entering an image acquisition state; and selecting an acquired image frame as a target image in the image acquisition state, where a facial region of the selected image frame matches a preset facial region in an acquisition field of vision.
In an embodiment, the obtaining, according to the first confidence level and the second confidence level, a recognition result indicating that the target image is a live facial image includes: integrating the first confidence level and the second confidence level to obtain a confidence level of the target image being a live facial image; and determining, in a case that the confidence level reaches a preset confidence level threshold, that the target image is a live facial image.