In an embodiment, the second extraction module 804 is further configured to input the extended facial image into a second recognition model; and extract background feature data of the extended facial image through a convolution layer of the second recognition model. The second recognition module 805 is further configured to classify the target image through a fully connected layer of the second recognition model according to the extracted background feature data to obtain a second confidence level of the target image being a live facial image.
In an embodiment, the model training module 807 is further configured to obtain an image sample set, where the image sample set includes a live facial image and a non-live facial image; obtain an extended facial image in a corresponding image sample along an extended facial region of each image sample in the image sample set to obtain a second training sample; and train the second recognition model according to the second training sample.
In an embodiment, the model training module 807 is further configured to obtain an initialized second recognition model; determine a second training label corresponding to the second training sample; input the second training sample into the second recognition model to obtain a second recognition result; and adjust model parameters of the second recognition model according to a difference between the second recognition result and the second training label, and continue training until satisfaction of a training stop condition.
In an embodiment, the obtaining module 801 is further configured to enter an image acquisition state; and select 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.