IP Library Granted Patent US 12682685
Granted Patent B2
US 12682685 · App. 18/568,910 · Granted Jul 14, 2026

Liveness detection method and apparatus, and training method and apparatus for liveness detection system

Inventors: Jiezhi Yang (Chongqing, CN); Xunyi Zhou (Chongqing, CN); Dingheng Zeng (Chongqing, CN)
Assignee: MASHANG CONSUMER FINANCE CO., LTD.
G06V40/40G06T7/593G06V10/764G06V10/776G06V10/803G06V10/82G06V40/172G06T2207/10012G06T2207/10152G06T2207/20081G06T2207/20084G06T2207/20221G06T2207/30201
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12682685
App. No.
18/568,910
Granted
Jul 14, 2026
Kind
B2
Abstract

Disclosed in the present application are a liveness detection method and apparatus, a training method and apparatus for a liveness detection system, and an electronic device and a storage medium. The liveness detection method comprises: acquiring two target images, which are obtained by means of a first sensor and a second sensor respectively performing collection on the same face to be recognized; extracting target depth information from the two target images by using a deep generative network; and performing detection on the target depth information by using a liveness detection model, so as to obtain a liveness detection result of said face. The liveness detection model is obtained by means of training using depth information of sample data, the sample data comprises first sample images, which are collected by the first sensor under at least two types of illumination, and second sample images, which are collected by the second sensor under the at least two types of illumination, and each of the first sample images and each of the second sample images comprise spoofing faces of different materials. Target depth information is extracted from two images by means of a deep generative network, and liveness detection is performed on the target depth information by using a liveness detection model, so as to recognize spoofing faces of different materials under different types of illumination, such that the accuracy of recognition is higher.

Claims (55)

1 . A liveness detection method, comprising:

acquiring a first target image which is collected by a first sensor for a to-be-recognized face, and acquiring a second target image which is collected by a second sensor for the to-be-recognized face;

extracting target depth information from the first target image and the second target image by using a pre-trained deep generative network; and

obtaining a liveness detection result of the to-be-recognized face by detecting the target depth information by using a pre-trained liveness detection model, wherein the liveness detection model is obtained by training using depth information extracted from sample data, the sample data comprises first sample images collected by the first sensor, and second sample images collected by the second sensor in at least two lighting environments, and the first sample images and the second sample images all comprise spoofing faces of different materials;

wherein the method further comprises: training an initial generative network by inputting the first sample images and the second sample images into the initial generative network, to obtain the deep generative network, comprising: performing calculation by using a stereo matching algorithm based on the first sample images and the second sample images, to obtain initial depth information; and training the initial generative network by inputting the first sample images and the second sample images into the initial generative network and by using the initial depth information as supervised learning information, to obtain the deep generative network such that a difference between the depth information, which is extracted from the first sample images and the second sample images by using the deep generative network, and the initial depth information meets a preset difference condition;

extracting the depth information from the first sample images and the second sample images by using the deep generative network; and

training a neural network model by inputting the depth information into the neural network model, to obtain the liveness detection model.

2 . The liveness detection method of claim 1 , wherein extracting the target depth information from the first target image and the second target image by using the pre-trained deep generative network comprises:

obtaining a target fusion image by fusing the first target image and the second target image; and

inputting the target fusion image into the deep generative network, and obtaining the target depth information by processing the target fusion image in the deep generative network.

3 . The liveness detection method of claim 2 , wherein obtaining the target fusion image by fusing the first target image and the second target image comprises:

scaling down the first target image and the second target image in equal proportion, and obtaining the target fusion image by performing fusion on the first target image and the second target image that have been scaled down.

4 . The liveness detection method of claim 1 , wherein

the first sensor and the second sensor are a left-eye sensor and a right-eye sensor on a binocular stereo vision sensor respectively.

5 . The liveness detection method of claim 1 , wherein

the first target image and the second target image both are visible light images.

6 . The liveness detection method of claim 1 , wherein training the initial generative network by inputting the first sample images and the second sample images into the initial generative network, to obtain the deep generative network further comprises:

scaling down the first sample images and the second sample images in equal proportion, and obtain sample fusion images by performing fusion on the first sample images and the second sample images that have been scaled down; and

training the initial generative network by inputting the sample fusion images into the initial generative network, to obtain the deep generative network.

7 . The liveness detection method of claim 1 , wherein training the neural network model by inputting the depth information into the neural network model, to obtain the liveness detection model further comprises:

inputting the depth information into the neural network model to obtain a liveness detection score of a face sample, wherein the liveness detection score is a probability that the neural network model determines a classification label of the face sample as a pre-labeled target label;

determining a detection error based on the liveness detection score; and

adjusting the neural network model based on the detection error to obtain the liveness detection model, such that the detection error of the liveness detection model meets a preset error condition.

8 . A training method for a liveness detection system, wherein the liveness detection system comprises a deep generative network and a liveness detection model; and the training method comprises:

acquiring first sample images collected by a first sensor for face samples, and second sample images collected by a second sensor for the face samples in at least two lighting environments, wherein the face samples comprise spoofing faces of different materials;

training the initial generative network by inputting the first sample images and the second sample images into an initial generative network, to obtain the deep generative network, comprising: obtaining initial depth information by calculation using a stereo matching algorithm based on the first sample images and the second sample images; and training the initial generative network by inputting the first sample images and the second sample images into the initial generative network and by using the initial depth information as supervised learning information, to obtain the deep generative network, such that a difference between the depth information, which is extracted from the first sample images and the second sample images by using the deep generative network, and the initial depth information meets a preset difference condition;

extracting depth information of the face samples from the first sample images and the second sample images by using the deep generative network; and

training the neural network model by inputting the depth information of the face samples into a neural network model, to obtain the liveness detection model.

9 . The training method of claim 8 , wherein

the first sample images and the second sample images are all visible light images.

10 . The training method of claim 8 , wherein training the initial generative network by inputting the first sample images and the second sample images into the initial generative network, to obtain the deep generative network comprises:

obtaining sample fusion images by fusing the first sample images and the second sample images; and

training the initial generative network by inputting the sample fusion images into the initial generative network, to obtain the deep generative network.

11 . The training method of claim 10 , wherein obtaining the sample fusion images by fusing the first sample images and the second sample images comprises:

scaling down the first sample images and the second sample images in equal proportion, and obtaining the sample fusion images by performing fusion on the first sample images and the second sample images that have been scaled down.

12 . The training method of claim 8 , wherein training the neural network model by inputting the depth information of the face samples into the neural network model, to obtain the liveness detection model further comprises:

inputting the depth information of the face samples into the neural network model to obtain liveness detection scores of the face samples, wherein the liveness detection score is a probability that the neural network model determines a classification label of the face sample as a pre-labeled target label;

determining a detection error based on the liveness detection score; and

adjusting the neural network model based on the detection error, and when the detection error meets a preset error condition, determining the current neural network model as the liveness detection model.

13 . A liveness detection apparatus, comprising:

one or more processors; and

a memory for storing instructions;

wherein the one or more processors are configured to execute the instructions in the memory to perform operations of:

acquiring a first target image which is collected by a first sensor for a to-be-recognized face, and acquiring a second target image which is collected by a second sensor for the to-be-recognized face;

extracting target depth information from the first target image and the second target image by using a pre-trained deep generative network; and

detecting the target depth information by using a pre-trained liveness detection model, to obtain a liveness detection result of the to-be-recognized face, wherein the liveness detection model is obtained by training using depth information extracted from sample data, the sample data comprises first sample images collected by the first sensor, and second sample images collected by the second sensor in at least two lighting environments, and the first sample images and the second sample images all comprise spoofing faces of different materials;

the one or more processors are further configured to execute the instructions in the memory to perform operations of:

training an initial generative network by inputting the first sample images and the second sample images into the initial generative network, to obtain the deep generative network, comprising: performing calculation by using a stereo matching algorithm based on the first sample images and the second sample images, to obtain initial depth information; and training the initial generative network by inputting the first sample images and the second sample images into the initial generative network and by using the initial depth information as supervised learning information, to obtain the deep generative network such that a difference between the depth information, which is extracted from the first sample images and the second sample images by using the deep generative network, and the initial depth information meets a preset difference condition;

extracting the depth information from the first sample images and the second sample images by using the deep generative network; and

training a neural network model by inputting the depth information into the neural network model, to obtain the liveness detection model.

14 . The liveness detection apparatus of claim 13 , wherein extracting the target depth information from the first target image and the second target image by using the pre-trained deep generative network comprises:

obtaining a target fusion image by fusing the first target image and the second target image; and

inputting the target fusion image into the deep generative network, and obtaining the target depth information by processing the target fusion image in the deep generative network.

15 . The liveness detection apparatus of claim 14 , wherein obtaining the target fusion image by fusing the first target image and the second target image comprises:

scaling down the first target image and the second target image in equal proportion, and obtaining the target fusion image by performing fusion on the first target image and the second target image that have been scaled down.