A living body detection method and device
Illumination deviation is determined by image features and illumination standard information, and liveness detection is performed directly. This solves the problem of low accuracy in liveness detection under poor lighting conditions, and achieves efficient liveness detection under different lighting conditions, reducing the dependence on illumination restoration models and model coupling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2022-03-28
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, inconsistent lighting conditions lead to low accuracy in liveness detection under poor lighting conditions, and there is a problem of coupling between the output results of the lighting restoration model and the liveness detection model.
Illumination deviation information is determined by image features and illumination standard information, and the correlation between illumination information and liveness detection is established. Liveness detection is then performed directly, reducing illumination preprocessing steps. Illumination deviation analysis is performed using Fourier spectrograms and illumination supervision signals to update the liveness detection model.
Improve the accuracy of liveness detection under different lighting conditions, reduce the dependence on the lighting recovery model, avoid coupling of model output results, and improve data availability and detection pass rate.
Smart Images

Figure CN114764949B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method and apparatus for liveness detection. Background Technology
[0002] Facial recognition systems not only enhance park security but also improve gate throughput efficiency. These systems require a liveness detection module. Illumination is a critical factor reducing liveness detection accuracy because lighting distribution is often inconsistent across different locations and times. During liveness detection, objects may be backlit or dimly lit. Typically, an illumination restoration model is used to restore the facial illumination or deblur the original image of the object to eliminate the effects of illumination, resulting in a processed image. This processed image is then used by the liveness detection model to perform liveness detection to obtain the result. Directly performing liveness detection on the original image would severely impact accuracy due to the significant influence of illumination. Summary of the Invention
[0003] This application provides a method and apparatus for detecting live organisms, which at least solves the above-mentioned technical problems existing in the prior art.
[0004] According to a first aspect of the embodiments of this application, a liveness detection method is provided, the method comprising: obtaining an image to be tested; performing illumination prediction on the image to be tested based on image features corresponding to the image to be tested to determine illumination prediction information; analyzing illumination standard information corresponding to the image to be tested and the illumination prediction information to determine illumination deviation information; and performing liveness detection on the image to be tested based on the illumination deviation information to determine a liveness detection result.
[0005] In one possible implementation, illumination prediction is performed on the image to be tested based on the image features corresponding to the image to be tested, and illumination prediction information is determined, including: determining the image features corresponding to the detected image through a liveness detection model; predicting illumination information based on the image features to obtain predicted energy distribution information; and determining illumination prediction information based on the predicted energy distribution information.
[0006] In one possible implementation, the step of analyzing the illumination standard information and the illumination prediction information corresponding to the image under test to determine the illumination deviation information includes: determining standard energy distribution information based on the Fourier spectrum corresponding to the image under test; determining illumination standard information based on the standard energy distribution information; and comparing the illumination standard information and the illumination prediction information corresponding to the image under test to determine the illumination deviation information.
[0007] In one embodiment, the step of predicting illumination information from the image features to obtain predicted energy distribution information includes: determining an illumination supervision signal corresponding to the image to be tested; and processing the image features based on the illumination supervision signal to obtain predicted energy distribution information.
[0008] In one possible implementation, determining the illumination supervision signal corresponding to the image under test includes: performing key point detection on the image under test to obtain key point information; determining the illumination region corresponding to the image under test based on the key point information; determining the regional illumination intensity corresponding to each illumination region; and determining the illumination supervision signal based on the regional illumination intensity.
[0009] In one embodiment, processing the image features based on the illumination supervision signal to obtain predicted energy distribution information includes: determining attention information corresponding to the image features based on the illumination supervision signal; and encoding the image features and the attention information to obtain the predicted energy distribution information.
[0010] In one possible implementation, determining the standard energy distribution information based on the Fourier spectrum corresponding to the image to be tested includes: performing a Fourier transform on the image to be tested to obtain a Fourier spectrum; and determining the standard energy distribution information based on the Fourier spectrum.
[0011] In one embodiment, the step of performing liveness detection on the image to be tested based on the illumination deviation information and determining the liveness detection result includes: inputting the illumination deviation information and the image to be tested into a liveness detection model; and outputting a liveness detection result corresponding to the image to be tested through the liveness detection model.
[0012] In one embodiment, the method further includes: obtaining training samples; training a liveness detection model using the training samples to determine illumination deviation training information; training the liveness detection model using the training samples to obtain liveness deviation training information; and updating the liveness detection model based on the illumination deviation training information and the liveness deviation training information to obtain an updated liveness detection model.
[0013] According to a second aspect of the embodiments of this application, a liveness detection device is provided. The device includes: an acquisition module for acquiring a test image; a prediction module for performing illumination prediction on the test image based on image features corresponding to the test image to determine illumination prediction information; an analysis module for analyzing illumination standard information corresponding to the test image and the illumination prediction information to determine illumination deviation information; and a detection module for performing liveness detection on the test image according to the illumination deviation information to determine a liveness detection result.
[0014] In one embodiment, the prediction module includes: determining image features corresponding to the detected image using a liveness detection model; predicting illumination information from the image features to obtain predicted energy distribution information; and determining illumination prediction information based on the predicted energy distribution information.
[0015] In one embodiment, the analysis module includes: determining standard energy distribution information based on the Fourier spectrum corresponding to the image under test; determining illumination standard information based on the standard energy distribution information; and comparing the illumination standard information corresponding to the image under test with the illumination prediction information to determine illumination deviation information.
[0016] In one embodiment, the prediction module includes: determining an illumination supervision signal corresponding to the image to be tested; and processing the image features based on the illumination supervision signal to obtain predicted energy distribution information.
[0017] In one possible implementation, the prediction module includes: performing key point detection on the image to be tested to obtain key point information; determining the illumination region corresponding to the image to be tested based on the key point information; determining the regional illumination intensity corresponding to each illumination region; and determining the illumination supervision signal based on the regional illumination intensity.
[0018] In one embodiment, the prediction module includes: determining attention information corresponding to image features based on the illumination supervision signal; and encoding the image features and the attention information to obtain the predicted energy distribution information.
[0019] In one embodiment, the analysis module includes: performing a Fourier transform on the image to be tested to obtain a Fourier spectrum; and determining the standard energy distribution information based on the Fourier spectrum.
[0020] In one embodiment, the detection module includes: inputting the illumination deviation information and the image to be tested into a liveness detection model; and outputting a liveness detection result corresponding to the image to be tested through the liveness detection model.
[0021] In one embodiment, the apparatus further includes: a training module for obtaining training samples; training a liveness detection model using the training samples to determine illumination deviation training information; training the liveness detection model using the training samples to obtain liveness deviation training information; and updating the liveness detection model based on the illumination deviation training information and the liveness deviation training information to obtain an updated liveness detection model.
[0022] According to a third aspect of this application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in this application.
[0023] According to a fourth aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this application.
[0024] The liveness detection method and apparatus provided in this application utilize image features and illumination standard information to obtain illumination deviation information. By establishing a correlation between illumination information and liveness detection through illumination deviation information and the image under test, the corresponding illumination deviation information can be determined for the image under test under different illumination conditions. Liveness detection is then performed based on the illumination deviation information, eliminating the need for preprocessing to remove the influence of illumination on the image under test. This effectively solves the problem of low liveness detection accuracy for images under test that have not had their illumination effects removed under severe illumination.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0026] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which:
[0027] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0028] Figure 1 A schematic diagram illustrating the implementation flow of a liveness detection method according to an embodiment of this application is shown;
[0029] Figure 2 A schematic diagram of model training for a liveness detection method according to an embodiment of this application is shown;
[0030] Figure 3 This paper shows a schematic diagram of the implementation module of a liveness detection device according to an embodiment of the present application;
[0031] Figure 4 A schematic diagram of the composition structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0032] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] Figure 1 A schematic diagram illustrating the implementation flow of a liveness detection method according to an embodiment of this application is shown.
[0034] See Figure 1 According to a first aspect of the embodiments of this application, a liveness detection method is provided, the method comprising: operation 101, obtaining an image to be tested; operation 102, performing illumination prediction on the image to be tested based on image features corresponding to the image to be tested, and determining illumination prediction information; operation 103, analyzing the illumination standard information and illumination prediction information corresponding to the image to be tested, and determining illumination deviation information; and operation 104, performing liveness detection on the image to be tested based on the illumination deviation information, and determining the liveness detection result.
[0035] The proposed liveness detection method utilizes image features and standard illumination information to obtain illumination deviation information. By establishing a correlation between illumination information and liveness detection through this deviation information and the image under test, the corresponding illumination deviation information can be determined for images under different illumination conditions. Liveness detection is then performed based on this illumination deviation information, eliminating the need for preprocessing to remove illumination effects from the image under test. This effectively solves the problem of low liveness detection accuracy for images under poor illumination where illumination effects have not been removed. Furthermore, since this method does not require preprocessing to remove illumination effects from the image under test using an illumination restoration model, it eliminates the need to train an illumination processing model. This reduces the dependence on illumination processing for liveness detection and avoids the coupling problem between the illumination restoration model and the liveness detection model due to overlapping training data, thus improving data usability.
[0036] This method can be applied to liveness detection devices, which can be integrated into facial recognition systems. In one application scenario, the facial recognition system can be deployed at various turnstile entrances and exits within a park. When a user enters the park through a turnstile, the image acquisition module of the facial recognition system captures an image of the user, obtaining a test image containing the user's face. Liveness detection is then performed using the illumination deviation information of the test image and the liveness detection data to determine if the user is alive. If the user is determined to be alive and facial recognition passes, the user is allowed to pass through the turnstile.
[0037] In operations 101 and 102 of this method, the image to be tested contains a target object, and the image features are specifically feature maps related to the target object, which is a face. The image features can be obtained through feature extraction using a model, such as a liveness detection model. Illumination prediction is performed using the image features. An energy geometric model of the face and illumination can be established using the image features, thereby determining the illumination prediction information corresponding to the image to be tested.
[0038] In operation 103 of this method, the illumination standard information can be determined by analyzing the image under test using traditional algorithms, serving as a reference for illumination prediction information. The illumination standard information obtained by this method can be represented using any of the following methods: spectral information, numerical information, or textual information. The corresponding illumination prediction information can also be represented using any of the following methods: spectral information, numerical information, or textual information. Illumination prediction information and illumination standard information can be represented using the same method, such as using vectors. Subsequently, the illumination prediction information and illumination standard information can be analyzed, such as comparing the deviations between them to determine the illumination deviation information. The illumination deviation information can be represented using numerical information, etc.
[0039] In operation 104 of this method, liveness detection can be performed using the image features of the image under test based on illumination deviation information, thereby determining the liveness detection result. The liveness detection result indicates whether the target object corresponding to the image under test is alive or not. Liveness detection can be determined using a liveness detection model. Since both liveness detection and illumination deviation information correspond to the image features of the image under test, this method can directly perform liveness detection on the image under test without requiring illumination processing, thus reducing the dependence of liveness detection on the illumination processing module. Reasons for non-liveness include, but are not limited to, paper attacks, screen attacks, video attacks, and 3D mask attacks.
[0040] In one possible implementation, operation 102 involves performing illumination prediction on the image to be tested based on the image features corresponding to the image to be tested, and determining illumination prediction information, including: first, determining the image features corresponding to the detected image through a liveness detection model; then, predicting illumination information on the image features to obtain predicted energy distribution information; and finally, determining the illumination prediction information based on the predicted energy distribution information.
[0041] Illumination prediction information can be characterized by the predicted energy distribution information corresponding to the image under test. This method uses a liveness detection model to extract features from the image under test, obtaining the corresponding image features. That is, illumination prediction information can be determined through the liveness detection model, without the need for a separate illumination processing module. The energy distribution is predicted using the illumination features corresponding to the image features to obtain the high-frequency and low-frequency information corresponding to the face in the image features, thereby determining the illumination prediction information.
[0042] In one embodiment, predicting illumination information from image features to obtain predicted energy distribution information includes: first, determining an illumination supervision signal corresponding to the image to be tested; and then, processing the image features based on the illumination supervision signal to obtain predicted energy distribution information.
[0043] Illumination supervision signals can be characterized by illumination intensity. Specifically, in the process of illumination prediction based on image features, illumination intensity analysis can be performed on the target object (i.e., a face) in the image to determine the illumination intensity corresponding to the target object. The corresponding illumination vector is then extracted based on the illumination intensity, and an energy geometric model between image features and illumination intensity is established using this vector. By encoding the image features and the illumination vector, predicted energy distribution information is obtained. In this method, illumination intensity can be used as an illumination supervision signal to supervise the encoding of the energy geometric model. That is, illumination intensity is used as prior information for illumination prediction to improve the accuracy of model training and prediction, thereby increasing training efficiency.
[0044] In one possible implementation, determining the illumination supervision signal corresponding to the image under test includes: first, performing key point detection on the image under test to obtain key point information; then, determining the illumination area corresponding to the image under test based on the key point information; and finally, determining the regional illumination intensity corresponding to each illumination area, and determining the illumination supervision signal based on the regional illumination intensity.
[0045] In real-world scenarios, the illumination distribution varies across different locations on a face. This method uses illumination intensity to characterize the regional illumination intensity of each illuminated area on the face of the target object in the test image. To determine regional illumination intensity, this method first aligns the target object's face with a keypoint model. Based on the model, it determines various keypoints on the target object's face. For example, four keypoints are pre-set around the brow bone to determine the corresponding illumination area, and five keypoints are pre-set under the nose to determine the illumination area corresponding to the philtrum. The target object's face is then divided into regions using these keypoints, thus defining each region. Illumination analysis is then performed on each region to determine its corresponding regional illumination intensity. In one specific implementation scenario, the face region is divided into 5×5 illumination regions using a keypoint model. To accurately obtain the illumination intensity of each illumination region on the face, the image to be tested is first converted to YUV format. Since the Y signal contains more facial illumination information, the Y signal channel map is divided according to the defined illumination regions. The average illumination value of each illumination region is obtained using the Y signal channel map, and the average illumination value of each region is the regional illumination intensity. Vector transformation of the illumination intensity of each region yields a 25-dimensional illumination feature vector, which serves as the illumination supervision signal.
[0046] In one embodiment, processing image features based on illumination supervision signals to obtain predicted energy distribution information includes: first, determining attention information corresponding to the image features based on the illumination supervision signals; and then, encoding the image features and attention information to obtain predicted energy distribution information.
[0047] Corresponding to the illumination supervision signal, the image features of this method can specifically be multi-scale feature maps of the target object's face. In establishing the energy geometry model of face and illumination, the illumination supervision signal is used as the illumination attention information. Illumination attention information is added to different scales of the multi-scale feature map, encoding the image features and attention information to obtain illumination prediction information and corresponding illumination deviation information. During training, the illumination deviation information is used to update the liveness detection model, enabling the liveness detection model to establish a model relationship between illumination and liveness detection during feature extraction. This reduces the influence of illumination on the liveness detection model during feature extraction, improves the effectiveness of feature extraction, effectively solves the problem of reduced liveness detection accuracy under poor lighting conditions, and improves the pass rate of liveness detection under different lighting conditions.
[0048] In one possible implementation, operation 103 involves analyzing the illumination standard information and illumination prediction information corresponding to the image under test to determine illumination deviation information, including: first, determining standard energy distribution information based on the Fourier spectrum corresponding to the image under test; then, determining illumination standard information based on the standard energy distribution information; and finally, comparing the illumination standard information and illumination prediction information corresponding to the image under test to determine illumination deviation information.
[0049] Illumination standard information can be determined using Fourier spectrograms. Since Fourier spectrograms can extract high-frequency and low-frequency information about the face, and different frequency domain information has different energy values (low-frequency information has higher energy values), Fourier spectrograms can, under certain conditions, represent the standard energy distribution information of the entire face. This method can determine illumination standard information using the standard energy distribution information obtained from Fourier spectrograms. After obtaining the illumination standard information and the illumination prediction information, comparing the two yields the illumination deviation information. Specifically, this method can perform Fourier regression to determine the illumination loss value between the standard energy distribution information and the predicted energy distribution information; this illumination loss value is the illumination deviation information. During the training of the liveness detection model, the illumination loss value obtained during training can be used to update the liveness detection model. Correspondingly, when the liveness detection model is used to predict the image under test, the illumination loss value can provide a basis for the liveness detection model's liveness detection.
[0050] In one possible implementation, determining standard energy distribution information based on the Fourier spectrum corresponding to the image under test includes: first, performing a Fourier transform on the image under test to obtain a Fourier spectrum; and then, determining standard energy distribution information based on the Fourier spectrum.
[0051] Fourier spectrograms can be obtained by performing a Fourier transform on the image under test. After obtaining the Fourier spectrogram, high-frequency and low-frequency information of the face is extracted from the Fourier spectrogram to obtain standard energy distribution information.
[0052] In one possible implementation, operation 104 involves performing liveness detection on the image to be tested based on illumination deviation information and determining the liveness detection result. This includes: first, inputting the illumination deviation information and the image to be tested into a liveness detection model; and then, outputting the liveness detection result corresponding to the image to be tested through the liveness detection model.
[0053] In the case of using a trained liveness detection model for prediction, the image to be tested is first input into the liveness detection model. The model extracts features from the face in the image to obtain image features. Simultaneously, the model identifies key points containing various locations of the face in the image, uses these key points to divide the illumination region, calculates the regional illumination intensity of each region, vectorizes the regional illumination intensity to obtain the regional illumination vector, and uses a trained energy geometry model to encode the image features based on the regional illumination vector to obtain illumination prediction information. Furthermore, illumination standard information is extracted from the Fourier spectrum of the image to be tested. Fourier regression is performed based on the illumination prediction information and the illumination standard information to obtain a loss value representing illumination deviation information. The liveness detection model performs liveness detection based on the loss value and the corresponding image features of the image to be tested, outputting the corresponding liveness detection result, which indicates whether the target object in the image is alive or not.
[0054] In one embodiment, the method further includes: first, obtaining training samples; then, training the liveness detection model using the training samples to determine illumination deviation training information; next, training the liveness detection model using the training samples to obtain liveness deviation training information; and then, updating the liveness detection model based on the illumination deviation training information and the liveness deviation training information to obtain an updated liveness detection model.
[0055] Figure 2 A schematic diagram of model training for a liveness detection method according to an embodiment of this application is shown.
[0056] See Figure 2 The training method for the liveness detection model in this application embodiment is as follows:
[0057] First, training samples are obtained, which may contain different faces. These training samples are then input into a liveness detection model, and a standard energy distribution is determined by performing a Fourier transform on them. The liveness detection model extracts features from the training samples to obtain training features. Furthermore, the model divides the face into illuminated regions based on key points, determining the illumination intensity of the training region corresponding to each region, and then determining the training illumination vector corresponding to the face based on the illumination intensity of each region. Using the training illumination vector as an illumination supervision signal, illumination attention modules are added to the training features at different scales to determine the predicted energy distribution. Fourier spectrum regression is performed based on the standard and predicted energy distributions to determine the corresponding illumination loss value, i.e., illumination bias training information. This loss value is used to update the model parameters. Simultaneously, liveness detection is performed based on the training features to obtain the corresponding liveness detection training results and liveness detection loss value, i.e., liveness bias training information. The liveness detection loss value is used to update the model parameters. After multiple rounds of training, a well-trained liveness detection model is obtained. Since this method can directly perform liveness detection on the image under test, there is no need to train an illumination restoration model for illumination restoration of the image under test during the model training process, nor is it necessary to preprocess the training data to eliminate the influence of illumination, thus reducing the workload of data processing.
[0058] Figure 3 A schematic diagram of the implementation module of a liveness detection device according to an embodiment of this application is shown.
[0059] See Figure 3 According to a second aspect of the embodiments of this application, a liveness detection device is provided, the device comprising: an acquisition module 301 for acquiring an image to be tested; a prediction module 302 for performing illumination prediction on the image to be tested based on image features corresponding to the image to be tested, and determining illumination prediction information; an analysis module 303 for analyzing illumination standard information and illumination prediction information corresponding to the image to be tested, and determining illumination deviation information; and a detection module 304 for performing liveness detection on the image to be tested based on the illumination deviation information, and determining the liveness detection result.
[0060] In one embodiment, the prediction module 302 includes: determining image features corresponding to the detected image through a liveness detection model; predicting illumination information from the image features to obtain predicted energy distribution information; and determining illumination prediction information based on the predicted energy distribution information.
[0061] In one embodiment, the analysis module 303 includes: determining standard energy distribution information based on the Fourier spectrum corresponding to the image to be tested; determining illumination standard information based on the standard energy distribution information; and comparing the illumination standard information corresponding to the image to be tested with the illumination prediction information to determine illumination deviation information.
[0062] In one embodiment, the prediction module 302 includes: determining an illumination supervision signal corresponding to the image to be tested; and processing image features based on the illumination supervision signal to obtain predicted energy distribution information.
[0063] In one embodiment, the prediction module 302 includes: performing key point detection on the image to be tested to obtain key point information; determining the illumination area corresponding to the image to be tested based on the key point information; determining the regional illumination intensity corresponding to each illumination area; and determining an illumination supervision signal based on the regional illumination intensity.
[0064] In one embodiment, the prediction module 302 includes: determining attention information corresponding to image features based on the illumination supervision signal; and encoding the image features and attention information to obtain predicted energy distribution information.
[0065] In one embodiment, the analysis module 303 includes: performing a Fourier transform on the image to be tested to obtain a Fourier spectrum; and determining standard energy distribution information based on the Fourier spectrum.
[0066] In one embodiment, the detection module 304 includes: inputting illumination deviation information and the image to be tested into a liveness detection model; and outputting a liveness detection result corresponding to the image to be tested through the liveness detection model.
[0067] In one embodiment, the apparatus further includes: a training module 305, used to obtain training samples; train the liveness detection model using the training samples to determine illumination deviation training information; train the liveness detection model using the training samples to obtain liveness deviation training information; and update the liveness detection model based on the illumination deviation training information and the liveness deviation training information to obtain an updated liveness detection model.
[0068] According to embodiments of this application, this application also provides an electronic device and a readable storage medium.
[0069] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0070] like Figure 4 As shown, device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 402 or a computer program loaded from storage unit 408 into random access memory (RAM) 403. RAM 403 may also store various programs and data required for the operation of device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0071] Multiple components in device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of monitors, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0072] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as a liveness detection method. For example, in some embodiments, a liveness detection method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of a liveness detection method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform a liveness detection method by any other suitable means (e.g., by means of firmware).
[0073] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0074] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0075] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0076] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0077] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0078] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0079] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0080] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0081] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting liveness, the method comprising: Obtain the image to be tested; Based on the image features corresponding to the image to be tested, the illumination information is predicted using the image features to obtain the predicted energy distribution information; Illumination prediction information is determined based on the predicted energy distribution information; The illumination standard information and the illumination prediction information corresponding to the image under test are analyzed to determine the illumination deviation information. Liveness detection is performed on the image under test based on the illumination deviation information to determine the liveness detection result.
2. The method according to claim 1, further comprising, after obtaining the image to be tested: The image features corresponding to the detected image are determined using a liveness detection model.
3. The method according to claim 1, wherein analyzing the illumination standard information and the illumination prediction information corresponding to the image to be tested to determine the illumination deviation information includes: Standard energy distribution information is determined based on the Fourier spectrum corresponding to the image to be tested; The illumination standard information is determined based on the standard energy distribution information. The illumination standard information corresponding to the image under test is compared with the illumination prediction information to determine the illumination deviation information.
4. The method according to claim 2, wherein predicting the illumination information of the image features to obtain predicted energy distribution information includes: Determine the illumination monitoring signal corresponding to the image under test; The image features are processed based on the illumination supervision signal to obtain predicted energy distribution information.
5. The method according to claim 4, wherein determining the illumination monitoring signal corresponding to the image to be tested comprises: Key point detection is performed on the image to be tested to obtain key point information; The illumination area corresponding to the image to be tested is determined based on the key point information; Determine the regional illumination intensity corresponding to each illumination area, and determine the illumination supervision signal based on the regional illumination intensity.
6. The method according to claim 4, wherein processing the image features based on the illumination supervision signal to obtain predicted energy distribution information includes: Based on the illumination supervision signal, determine the attention information corresponding to the image features; The predicted energy distribution information is obtained by encoding the image features and the attention information.
7. The method according to claim 3, wherein determining the standard energy distribution information based on the Fourier spectrum corresponding to the image to be tested includes: Perform a Fourier transform on the image to be tested to obtain a Fourier spectrum. The standard energy distribution information is determined based on the Fourier spectrum.
8. The method according to claim 2, wherein performing liveness detection on the image to be tested based on the illumination deviation information and determining the liveness detection result includes: The illumination deviation information and the image to be tested are input into the liveness detection model; The liveness detection model outputs the liveness detection result corresponding to the image to be tested.
9. The method according to claim 1, further comprising: Obtain training samples; The liveness detection model was trained using training samples to determine illumination bias training information. The liveness detection model is trained using the training samples to obtain liveness bias training information; The liveness detection model is updated based on the illumination deviation training information and the liveness deviation training information to obtain the updated liveness detection model.
10. A liveness detection device, the device comprising: The acquisition module is used to acquire the image to be tested; The prediction module is used to predict illumination information based on the image features corresponding to the image to be tested, and obtain predicted energy distribution information; and determine illumination prediction information based on the predicted energy distribution information. The analysis module is used to analyze the illumination standard information and illumination prediction information corresponding to the image under test to determine the illumination deviation information; The detection module is used to perform liveness detection on the image to be tested based on the illumination deviation information, and to determine the liveness detection result.