Image data processing method and device, computer device and storage medium

By calculating the illumination chromaticity difference sequence and signal-to-noise ratio of the image sequence, the liveness detection is completed automatically, solving the problem of low efficiency in traditional manual detection and achieving efficient and accurate liveness recognition.

CN115620406BActive Publication Date: 2026-01-27ZHAOLIAN CONSUMER FINANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211307577.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2026-01-27
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

Traditional liveness detection tasks rely on manual judgment, resulting in low detection efficiency.

Method used

By obtaining the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence of the object image sequence, the illumination chromaticity difference sequence and the image signal-to-noise ratio sequence are calculated, and the signal-to-noise ratio formula is used for liveness detection.

Benefits of technology

It improves the efficiency and accuracy of liveness detection, reduces human intervention, and increases detection speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115620406B_ABST
    Figure CN115620406B_ABST
Patent Text Reader

Abstract

The application relates to an image data processing method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: acquiring a real illumination chrominance difference sequence and an expected illumination chrominance difference sequence corresponding to an object image sequence; the expected illumination chrominance difference sequence is obtained by inputting each frame of image in the object image sequence into an illumination chrominance expectation model; based on the difference between the corresponding illumination chrominance differences of each group of adjacent images in the object image sequence in the real illumination chrominance difference sequence and the expected illumination chrominance difference sequence, an illumination chrominance difference difference sequence corresponding to the object image sequence is obtained; based on the expected illumination chrominance difference sequence and the illumination chrominance difference difference sequence, an image signal-to-noise ratio sequence corresponding to the object image sequence is obtained; and the image signal-to-noise ratio sequence is used for living body detection of the object image sequence. The method can improve the efficiency of living body detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image technology, and in particular to an image data processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of image technology, the task of liveness detection has emerged. Liveness detection refers to determining whether an object in an image sequence is a living or non-living object.

[0003] In traditional methods, liveness detection is usually performed by inspectors who manually determine whether an object in an image sequence is alive or not. However, this manual method is time-consuming and labor-intensive, resulting in low detection efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide an image data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency of liveness detection in response to the above-mentioned technical problems.

[0005] This application provides an image data processing method. The method includes:

[0006] Obtain the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence; the illumination chromaticity difference sequence includes the illumination chromaticity difference corresponding to multiple sets of adjacent images in the object image sequence. The illumination chromaticity difference is obtained based on the difference between the illumination chromaticity of each frame image in the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame image of the object image sequence into the illumination chromaticity expectation model.

[0007] Based on the difference between the illumination chromaticity differences of each group of adjacent images in the object image sequence in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the illumination chromaticity difference sequence corresponding to the object image sequence is obtained;

[0008] Based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence, the image signal-to-noise ratio sequence corresponding to the object image sequence is obtained; the image signal-to-noise ratio sequence is used to perform liveness detection on the object image sequence.

[0009] This application also provides an image data processing apparatus. The apparatus includes:

[0010] The illumination chromaticity difference acquisition module is used to acquire the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The illumination chromaticity difference sequence includes the illumination chromaticity difference corresponding to multiple sets of adjacent images in the object image sequence. The illumination chromaticity difference is obtained based on the difference between the illumination chromaticity of each frame image in the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame image in the object image sequence into the illumination chromaticity expectation model.

[0011] The illumination chromaticity difference determination module is used to obtain the illumination chromaticity difference sequence corresponding to the object image sequence based on the difference between the illumination chromaticity differences of each group of adjacent images in the object image sequence in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence.

[0012] The image signal-to-noise ratio sequence determination module is used to obtain the image signal-to-noise ratio sequence corresponding to the object image sequence based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence; the image signal-to-noise ratio sequence is used to perform liveness detection on the object image sequence.

[0013] A computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described image data processing method.

[0014] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described image data processing method.

[0015] A computer program product includes a computer program that, when executed by a processor, implements the steps of the image data processing method described above.

[0016] The aforementioned image data processing method, apparatus, computer equipment, storage medium, and computer program product acquire the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The actual illumination chromaticity difference between adjacent images reflects the illumination chromaticity difference of the object in the object image sequence under different lighting conditions, while the expected illumination chromaticity difference reflects the illumination chromaticity difference that adjacent images should correspond to when the object in the object image sequence is a living body. Based on the differences between the actual illumination chromaticity difference and the expected illumination chromaticity difference corresponding to each group of adjacent images in the object image sequence, an illumination chromaticity difference difference sequence corresponding to the object image sequence is obtained. The expected illumination chromaticity difference is the illumination chromaticity difference sequence that the object image sequence should correspond to when the object in the object image sequence is a living body, equivalent to the original signal in the signal-to-noise ratio formula. The true illumination chromaticity difference sequence is the actual illumination chromaticity difference sequence corresponding to the object image sequence. Since the objects in the object image sequence may be non-living objects such as faces or animals, there is a significant difference between the light reflection effect of non-living objects and the expected light reflection effect of living objects. Conversely, when the objects in the object image sequence are living, the difference between the actual light reflection effect of living objects and the expected light reflection effect of living objects is smaller. Therefore, the illumination chromaticity difference sequence can be used to characterize the difference between the actual light reflection effect of objects in the object image sequence and the expected light reflection effect of living objects, which is equivalent to the noise in the signal-to-noise ratio (SNR) formula. The image SNR sequence is obtained based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference sequence. Using the calculated image SNR sequence for liveness detection of the object image sequence can effectively improve the efficiency of liveness detection while ensuring its accuracy. Attached Figure Description

[0017] Figure 1 This is an application environment diagram of an image data processing method in one embodiment;

[0018] Figure 2 This is a flowchart illustrating an image data processing method in one embodiment;

[0019] Figure 3 This is a flowchart illustrating an image data processing method in another embodiment;

[0020] Figure 4 This is a flowchart illustrating an image data processing method in another embodiment;

[0021] Figure 5 This is a flowchart illustrating an image data processing method in another embodiment;

[0022] Figure 6 This is a schematic diagram of the illumination chromaticity difference corresponding to a real human sample in one embodiment;

[0023] Figure 7 This is a schematic diagram of the illumination chromaticity difference corresponding to the attack sample in one embodiment;

[0024] Figure 8 This is a structural block diagram of an image data processing device in one embodiment;

[0025] Figure 9 This is a structural block diagram of an image data processing apparatus in another embodiment;

[0026] Figure 10 This is a diagram of the internal structure of a computer device in one embodiment.

[0027] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0029] The image data processing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart TVs, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0030] Both the terminal and the server can be used independently to execute the image data processing method provided in the embodiments of this application.

[0031] For example, the terminal acquires the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The illumination chromaticity difference sequence includes the illumination chromaticity differences corresponding to multiple sets of adjacent images in the object image sequence. The illumination chromaticity differences are obtained based on the differences in illumination chromaticity between each frame in the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame in the object image sequence into an illumination chromaticity prediction model. Based on the differences in illumination chromaticity differences between each set of adjacent images in the object image sequence in the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the terminal obtains the image signal-to-noise ratio (SNR) sequence corresponding to the object image sequence. The image SNR sequence is used for liveness detection of the object image sequence.

[0032] The terminal and server can also be used in conjunction to execute the image data processing method provided in the embodiments of this application.

[0033] For example, a terminal sends an image data processing request to a server, carrying a sequence identifier for the target image sequence. The server uses this sequence identifier to obtain the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the target image sequence. The illumination chromaticity difference sequence includes the illumination chromaticity differences corresponding to multiple sets of adjacent images in the target image sequence. These differences are derived from the differences in illumination chromaticity between frames within the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame of the target image sequence into an illumination chromaticity prediction model. Based on the differences in illumination chromaticity differences between the actual and expected illumination chromaticity difference sequences for each set of adjacent images in the target image sequence, the server obtains the illumination chromaticity difference difference sequence corresponding to the target image sequence. Based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence, the server obtains the image signal-to-noise ratio (SNR) sequence corresponding to the target image sequence. The image SNR sequence is used for liveness detection of the target image sequence. The server can send the liveness detection results to the terminal, which can then display the results.

[0034] In one embodiment, such as Figure 2 As shown, an image data processing method is provided. Taking the application of this method to a computer device as an example, the computer device can be a terminal or a server. The method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. The image data processing method includes the following steps:

[0035] Step S202: Obtain the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence; the illumination chromaticity difference sequence includes the illumination chromaticity difference corresponding to multiple sets of adjacent images in the object image sequence. The illumination chromaticity difference is obtained based on the difference between the illumination chromaticity of each frame image in the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame image in the object image sequence into the illumination chromaticity expectation model.

[0036] The object image sequence refers to the image sequence used for liveness detection. Each frame in the image sequence is an object image acquired under its corresponding lighting information. The lighting information corresponding to different object images can be the same or different. The object image sequence includes at least one frame of object image acquired under white lighting information. For example, when the object to be detected in the image sequence is a face, the terminal screen emits light of different colors, and the terminal acquires face images under different lighting conditions to obtain face images under different lighting information. The face images in the sequence constitute the object image sequence, which includes at least one frame of object image acquired under white lighting.

[0037] Illumination chromaticity refers to the numerical value that characterizes the hue information of a frame of an image. It is obtained by fusing the hue values ​​of each pixel in a frame. Since every color is contained in a color wheel, the corresponding angle on the color wheel is the hue value. A true illumination chromaticity sequence is a sequence composed of the illumination chromaticities corresponding to each frame of an object image sequence. A true illumination chromaticity difference sequence is a sequence composed of the differences in the true illumination chromaticities between adjacent images in an object image sequence.

[0038] The illumination chromaticity prediction model is a model that predicts the illumination chromaticity of each frame of an image under different lighting conditions when the object in the image sequence is a living object. The training samples for the illumination chromaticity prediction model consist of object images of multiple living objects under different lighting conditions, the true illumination chromaticity of each frame of the object image, and object images of each living object under white light. The model obtains any frame of the object image corresponding to any living object and the object image under white light corresponding to that living object. These two images are then input into the illumination chromaticity prediction model, which outputs the corresponding predicted illumination chromaticity. The model parameters are adjusted based on the difference between the predicted illumination chromaticity and the true illumination chromaticity of this frame. The process of obtaining any frame of the object image corresponding to any living object and the object image under white light corresponding to that living object is repeated until the convergence condition is met, at which point the illumination chromaticity prediction model training is complete. The input data for the illumination chromaticity prediction model consists of any frame of an image from the object image sequence and a frame of an image under white light. The model's output data is the expected illumination chromaticity corresponding to that frame of image. For example, when the input data is a frame of an image under green light and a frame of an image under white light, the model's output is the expected illumination chromaticity corresponding to the image under green light. Expected illumination chromaticity refers to the illumination chromaticity that each frame of an image should correspond to under different lighting conditions when the object in the object image sequence is a living object. The expected illumination chromaticity difference sequence is a sequence composed of the differences in the expected illumination chromaticity between adjacent images in the object image sequence.

[0039] For example, a computer device can acquire the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence locally or from other devices. Based on the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, it can determine whether the object in the object image sequence is a living or non-living object.

[0040] Step S204: Based on the difference between the illumination chromaticity differences of each group of adjacent images in the object image sequence in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the illumination chromaticity difference sequence corresponding to the object image sequence is obtained.

[0041] Among them, the illumination chromaticity difference sequence refers to the sequence composed of the difference between the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence.

[0042] For example, the computer device calculates the difference between the real illumination chromaticity difference and the expected illumination chromaticity difference corresponding to each group of adjacent images in the object image sequence based on the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, and obtains the illumination chromaticity difference difference corresponding to each group of adjacent images. The illumination chromaticity difference differences are arranged in the order of the images to obtain the illumination chromaticity difference difference sequence corresponding to the object image sequence.

[0043] In one embodiment, the computer device calculates the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference corresponding to adjacent images as the illumination chromaticity difference difference between adjacent images, and arranges the illumination chromaticity difference differences corresponding to each group of adjacent images in the image order to obtain the illumination chromaticity difference difference sequence corresponding to the object image sequence.

[0044] In one embodiment, the computer device calculates the area based on adjacent illumination chromaticity differences in the illumination chromaticity difference sequence, and obtains the illumination chromaticity difference sequence corresponding to the object image sequence based on the actual area and the expected area corresponding to the actual illumination chromaticity difference and the expected illumination chromaticity difference, respectively.

[0045] Step S206: Based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence, obtain the image signal-to-noise ratio sequence corresponding to the object image sequence; the image signal-to-noise ratio sequence is used to perform liveness detection on the object image sequence.

[0046] The image signal-to-noise ratio (SNR) sequence refers to the SNR sequence defined by the expected illumination chromaticity sequence and the illumination chromaticity difference sequence. It characterizes the closeness between the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The smaller the SNR of each image in the image SNR sequence, the higher the probability that the object in the object image sequence is a live object; conversely, the higher the SNR of each image in the image SNR sequence, the lower the probability that the object in the object image sequence is a live object. Liveness detection refers to detecting whether an object in an object image sequence is a live or inanimate object. A live object is a real person or animal, while an inanimate object is an image containing a person or animal, such as a photo of a human face or an animal photo.

[0047] For example, a computer device calculates an image signal-to-noise ratio (SNR) sequence corresponding to an object image sequence based on an expected illumination chromaticity difference sequence and an illumination chromaticity difference difference sequence. The computer device then uses this SNR sequence to perform liveness detection, determining whether an object in the object image sequence is alive or not.

[0048] In one embodiment, a computer device calculates the ratio of the expected illumination chromaticity difference to the illumination chromaticity difference difference among the same set of adjacent images, and obtains the image signal-to-noise ratio (SNR) of this set of adjacent images based on the ratio of the expected illumination chromaticity difference to the illumination chromaticity difference difference among the same set of adjacent images. For example, the absolute value of the ratio of the expected illumination chromaticity difference to the illumination chromaticity difference difference among the same set of adjacent images can be used as the image SNR of this set of adjacent images; the ratio of the expected illumination chromaticity difference to the illumination chromaticity difference difference among the same set of adjacent images can be calculated, and the logarithm of the absolute value of the ratio can be used to obtain the image SNR of this set of adjacent images; and so on. The image SNR of other sets of adjacent images is calculated using the same method to obtain the image SNR of each set of adjacent images. The image SNR of each set of adjacent images is then arranged in image order to obtain the image SNR sequence corresponding to the object image sequence.

[0049] In one embodiment, a computer device calculates the expected area based on adjacent expected chromaticity differences in the expected illumination chromaticity difference sequence, obtaining an expected area sequence. The corresponding image signal-to-noise ratio (SNR) is obtained based on the ratio between the expected area in the expected area sequence and the corresponding illumination chromaticity difference. For example, the ratio between the expected area in the expected area sequence and the corresponding illumination chromaticity difference is used as the image SNR for this set of adjacent images; the ratio between the expected area in the expected area sequence and the corresponding illumination chromaticity difference is calculated, and the logarithm of the ratio is taken to obtain the corresponding image SNR; and so on. The ratios between each other expected area and its corresponding illumination chromaticity difference are calculated using the same method to obtain other individual image SNRs. These image SNRs are then arranged in image order to obtain the image SNR sequence corresponding to the object image sequence. In the aforementioned image data processing method, by obtaining the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence, the true illumination chromaticity difference between adjacent images can reflect the illumination chromaticity difference of the object in the object image sequence under different lighting conditions. The expected illumination chromaticity difference between adjacent images can reflect the illumination chromaticity difference that adjacent images should correspond to when the object in the object image sequence is a living body. Based on the differences between the true illumination chromaticity difference and the expected illumination chromaticity difference corresponding to each group of adjacent images in the object image sequence, the illumination chromaticity difference sequence corresponding to the object image sequence is obtained. The expected illumination chromaticity difference is the illumination chromaticity difference sequence that the object image sequence should correspond to when the object in the object image sequence is a living body, which is equivalent to the original signal in the signal-to-noise ratio formula. The true illumination chromaticity difference sequence is the actual illumination chromaticity difference sequence corresponding to the object image sequence. Since the objects in the object image sequence may be non-living objects such as faces in videos, facial photos, or animal photos, there is a significant difference between the light reflection effect of non-living objects and the expected light reflection effect of living objects. Conversely, when the objects in the object image sequence are living objects, the difference between the actual light reflection effect of living objects and the expected light reflection effect of living objects is smaller. Therefore, the illumination chromaticity difference sequence can be used to characterize the difference between the actual light reflection effect of objects in the object image sequence and the expected light reflection effect of living objects, which is equivalent to the noise in the signal-to-noise ratio (SNR) formula. The image SNR sequence is obtained based on the expected illumination chromaticity difference and the illumination chromaticity difference sequence. Using the calculated image SNR sequence for liveness detection of the object image sequence can effectively improve the efficiency of liveness detection while ensuring its accuracy.

[0050] In one embodiment, such as Figure 3 As shown, based on the differences in illumination chromaticity differences between adjacent images in the object image sequence and the corresponding illumination chromaticity difference sequences in the real and expected illumination chromaticity difference sequences, an illumination chromaticity difference sequence corresponding to the object image sequence is obtained, including:

[0051] Step S302: Based on the difference between the illumination chromaticity difference of the same group of adjacent images in the object image sequence and the corresponding illumination chromaticity difference sequence in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the illumination chromaticity difference difference of each group of adjacent images is obtained, and an illumination chromaticity difference difference sequence is formed.

[0052] For example, the computer device calculates the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference corresponding to the same group of adjacent images in the object image sequence as the illumination chromaticity difference difference corresponding to this group of adjacent images. For example, it calculates the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference corresponding to the same group of adjacent images, and uses the absolute value of the difference as the illumination chromaticity difference difference; it calculates the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference corresponding to the same group of adjacent images, and uses the sum of the absolute value of the difference and a preset value as the illumination chromaticity difference difference; and so on. The illumination chromaticity difference differences corresponding to other groups of adjacent images are calculated in the same way, and the illumination chromaticity difference differences corresponding to each group of adjacent images are arranged in image order to obtain the illumination chromaticity difference difference sequence corresponding to the object image sequence.

[0053] In the above embodiments, the computer device directly obtains the illumination chromaticity difference between adjacent images based on the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference, thereby obtaining the illumination chromaticity difference sequence corresponding to the object image sequence. The illumination chromaticity difference sequence defined by the difference can intuitively reflect the similarity between the actual illumination chromaticity difference sequence and the preset illumination chromaticity difference sequence, that is, the similarity between the actual light reflection effect of the object in the object image sequence and the expected light reflection effect of the living object, thus ensuring the reliability of the image signal-to-noise ratio. Simultaneously, the illumination chromaticity difference sequence defined by the difference can improve the computational efficiency of the image signal-to-noise ratio, thereby improving the detection efficiency of liveness detection.

[0054] In one embodiment, such as Figure 4 As shown, based on the differences in illumination chromaticity differences between adjacent images in the object image sequence and the corresponding illumination chromaticity difference sequences in the real and expected illumination chromaticity difference sequences, an illumination chromaticity difference sequence corresponding to the object image sequence is obtained, including:

[0055] Step S402: Calculate the true area based on the adjacent true light chromaticity differences in the true light chromaticity difference sequence, and obtain the true area sequence based on each true area.

[0056] Step S404: Calculate the expected area based on the adjacent expected chromaticity differences in the expected chromaticity difference sequence, and obtain the expected area sequence based on each expected area.

[0057] Step S406: Based on the difference between the real area sequence and the expected area sequence, obtain the illumination color difference sequence.

[0058] In this system, each group of adjacent images is used as the x-axis. For example, when the object image sequence contains four frames, ABCD, the x-axis coordinate of the first group of adjacent images AB is 1, the x-axis coordinate of the second group of adjacent images BC is 2, and the x-axis coordinate of the third group of adjacent images CD is 3. The illumination chromaticity difference corresponding to each group of adjacent images is used as the y-axis. The true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence are represented by two broken lines in the coordinate system. The true area is the area enclosed by each segment of the broken line corresponding to the true illumination chromaticity difference sequence and the x-axis, obtained by translating the broken line corresponding to the true illumination chromaticity difference sequence above the x-axis. The expected area is the area enclosed by each segment of the broken line corresponding to the expected illumination chromaticity difference sequence and the x-axis, obtained by translating the broken line corresponding to the expected illumination chromaticity difference sequence above the x-axis. For example, when the translated chromaticity differences between adjacent illuminations are 'a' and 'b', the region enclosed by the broken line segments corresponding to these adjacent chromaticity differences and the x-axis forms a right trapezoid. This right trapezoid is the region enclosed by x = a, x = b, the x-axis, and the broken line segments corresponding to these adjacent chromaticity differences. A true area is calculated based on the true chromaticity differences between two adjacent sets of images, and a expected area is calculated based on the expected chromaticity differences between two adjacent sets of images. The true area sequence is a sequence composed of individual true areas. The expected area sequence is a sequence composed of individual expected areas.

[0059] For example, the computer device adjusts the actual and expected illumination color difference sequences based on the minimum illumination color difference in the actual and expected illumination color difference sequences. It then calculates the area of ​​the region enclosed by the x-axis and the line segments corresponding to adjacent actual illumination color differences in the adjusted actual illumination color difference sequence to obtain each actual area. These actual areas are then arranged in image order to obtain an actual area sequence. Similarly, the device calculates the area of ​​the region enclosed by the x-axis and the line segments corresponding to adjacent expected illumination color differences in the adjusted expected illumination color difference sequence to obtain each expected area. These expected areas are then arranged in image order to obtain an expected area sequence. Based on the true area sequence and the expected area sequence, the difference between the true area and the expected area corresponding to the same set of adjacent illumination chromaticity differences is calculated to obtain the illumination chromaticity difference difference corresponding to this set of adjacent illumination chromaticity differences. The difference between the true area and the expected area corresponding to other sets of adjacent illumination chromaticity differences is calculated using the same method to obtain the illumination chromaticity difference difference corresponding to other sets of adjacent illumination chromaticity differences. The illumination chromaticity difference differences are sorted according to the image order to obtain the illumination chromaticity difference difference sequence corresponding to the object image sequence. For example, the absolute value of the difference between the actual area and the expected area corresponding to the same group of adjacent illumination chromaticity differences in the object image sequence is taken as the illumination chromaticity difference difference. The illumination chromaticity difference differences corresponding to each group of adjacent illumination chromaticity differences are arranged in the image order to obtain the illumination chromaticity difference difference sequence; the difference between the actual area and the expected area corresponding to the same group of adjacent illumination chromaticity differences in the object image sequence is calculated, and the sum of the absolute value of the difference and the preset value is taken as the illumination chromaticity difference difference. The illumination chromaticity difference differences corresponding to each group of adjacent illumination chromaticity differences are arranged in the image order to obtain the illumination chromaticity difference difference sequence; and so on.

[0060] In the above embodiments, the computer device determines the actual area sequence and the expected area sequence based on the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence. Based on the difference between the actual area sequence and the expected area sequence, it calculates the illumination chromaticity difference sequence corresponding to the object image sequence. Compared to the illumination chromaticity difference sequence defined based on the difference between the actual area and the expected area, the illumination chromaticity difference sequence intuitively reflects the similarity between the actual illumination chromaticity difference sequence and the preset illumination chromaticity difference sequence from the perspective of area. That is, the similarity between the actual light reflection effect of the object in the object image sequence and the expected light reflection effect of the living object.

[0061] In one embodiment, such as Figure 5 As shown, based on the differences in illumination chromaticity differences between adjacent images in the object image sequence and the corresponding illumination chromaticity difference sequences in the real and expected illumination chromaticity difference sequences, an illumination chromaticity difference sequence corresponding to the object image sequence is obtained, including:

[0062] Step S502: Calculate the overlapping area based on the actual area and the expected area corresponding to the color difference of adjacent illuminations, and obtain the overlapping area sequence based on each overlapping area.

[0063] Step S504: Based on the difference between the overlapping area sequence and the expected area sequence, the illumination chromaticity difference sequence is obtained.

[0064] The overlapping area refers to the area of ​​the overlapping region in the coordinate system corresponding to the actual area and the expected area corresponding to adjacent illumination chromaticity differences. It represents the cross-union ratio between the region in the coordinate system corresponding to the actual area and the region in the coordinate system corresponding to the expected area corresponding to adjacent illumination chromaticity differences. The cross-union ratio corresponding to the same set of adjacent illumination chromaticity differences is positively correlated with the image signal-to-noise ratio.

[0065] For example, a computer device acquires the actual area and expected area corresponding to the same set of adjacent illumination chromaticity differences in an object image sequence. Based on the regions corresponding to the actual area and expected area in the coordinate system, the overlapping area corresponding to adjacent illumination chromaticity differences is obtained. The overlapping area corresponding to other sets of adjacent illumination chromaticity differences is calculated using the same method. The overlapping areas corresponding to each set of adjacent illumination chromaticity differences are arranged in image order to obtain an overlapping area sequence. The difference between the overlapping area and expected area corresponding to each set of adjacent illumination chromaticity differences is calculated to obtain the illumination chromaticity difference difference corresponding to this set of adjacent illumination chromaticity differences. The difference between the overlapping area and expected area corresponding to each set of adjacent illumination chromaticity differences is calculated using the same method to obtain the illumination chromaticity difference differences corresponding to each set of adjacent illumination chromaticity differences. The illumination chromaticity difference differences corresponding to each set of adjacent illumination chromaticity differences are arranged in image order to obtain an illumination chromaticity difference difference sequence corresponding to the object image sequence. For example, the absolute value of the difference between the overlapping area and the expected area corresponding to the same group of adjacent illumination chromaticity differences in the object image sequence is taken as the illumination chromaticity difference difference. The illumination chromaticity difference differences corresponding to each group of adjacent illumination chromaticity differences are arranged in the image order to obtain the illumination chromaticity difference difference sequence; the difference between the overlapping area and the expected area corresponding to the same group of adjacent illumination chromaticity differences in the object image sequence is calculated, and the sum of the absolute value of the difference and the preset value is taken as the illumination chromaticity difference difference. The illumination chromaticity difference differences corresponding to each group of adjacent illumination chromaticity differences are arranged in the image order to obtain the illumination chromaticity difference difference sequence; and so on.

[0066] In one embodiment, a computer device can obtain the vertex coordinates of the corresponding regions in a coordinate system for the actual area and the expected area corresponding to the same set of adjacent illumination chromaticity differences in an object image sequence, and calculate the overlapping area based on the vertex coordinates corresponding to the actual area and the expected area.

[0067] In the above embodiments, the computer device determines the overlapping area corresponding to each group of adjacent illumination chromaticity differences based on the actual area and the expected area corresponding to each group of adjacent illumination chromaticity differences in the object image sequence. Based on the difference between the overlapping area and the expected area corresponding to each group of adjacent illumination chromaticity differences, an illumination chromaticity difference sequence is obtained. The illumination speed difference sequence defined based on the difference between the overlapping area and the expected area, compared to the illumination chromaticity difference sequence defined based on the difference between the actual area and the expected area, is applicable to situations where the amplitude of illumination chromaticity difference changes is similar or consistent, but the direction of change is opposite. For example, when the true illumination chromaticity difference sequence is {0.2, 0.4, 0.5} and the expected illumination chromaticity difference sequence is {0.4, 0.2, 0.5}, the change amplitude corresponding to the first group of adjacent true illumination chromaticity differences {0.2, 0.4} and the first group of adjacent expected illumination chromaticity differences {0.4, 0.2} is 0.2, but the direction of change is opposite. The actual area and the expected area calculated based on the first group of adjacent true illumination chromaticity differences and the first group of adjacent expected illumination chromaticity differences are the same, and therefore the difference between the actual area and the expected area is 0, corresponding to a chromaticity difference difference of 0. However, in reality, the direction of change of the chromaticity difference in the first group of adjacent true illumination chromaticity differences and the first group of adjacent expected illumination chromaticity differences is different, and the actual difference in the corresponding chromaticity difference is large. When using the overlap degree to define the illumination chromaticity difference difference sequence, there is still a certain difference between the overlapping area and the expected area, which can be applied to the case where the amplitude of the illumination chromaticity difference change is similar or consistent, but the direction of change is opposite. Compared to the illumination chromaticity difference defined based on the difference between the actual area sequence and the expected area sequence, defining the illumination chromaticity difference based on the difference between the overlapping area sequence and the expected area sequence can more effectively ensure the reliability of the image signal-to-noise ratio. At the same time, it can intuitively reflect the similarity between the actual illumination chromaticity difference sequence and the preset illumination chromaticity difference sequence from the perspective of overlap, that is, the similarity between the actual reflection effect of the object on the light in the object image sequence and the expected reflection effect of the living object on the light.

[0068] In one embodiment, the current illumination chromaticity difference sequence is either a true illumination chromaticity difference sequence or a expected illumination chromaticity difference sequence, and the current area is either a true area or an expected area. Calculating the current area based on adjacent current illumination chromaticity differences in the current illumination chromaticity difference sequence includes:

[0069] The translation distance is obtained based on the minimum illumination chromaticity difference between the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence; the current illumination chromaticity difference sequence is adjusted based on the translation distance to obtain the updated illumination chromaticity difference sequence; the current area is calculated based on the adjacent illumination chromaticity differences in the updated illumination chromaticity difference sequence.

[0070] Here, the current illumination chromaticity difference sequence refers to the illumination chromaticity difference sequence currently being processed. The current illumination chromaticity difference sequence can be either the actual illumination chromaticity difference sequence or the expected illumination chromaticity difference sequence. If the current illumination chromaticity difference sequence is the actual illumination chromaticity difference sequence, then the current area is the actual area. If the current illumination chromaticity difference sequence is the expected illumination chromaticity difference sequence, then the current area is the expected area.

[0071] The translation distance refers to the distance by which the broken line corresponding to the current illumination chromaticity difference sequence in the coordinate system is shifted in the positive y-axis direction. Updating the illumination chromaticity difference sequence refers to the illumination chromaticity difference sequence corresponding to the broken line segment obtained after shifting the broken line corresponding to the current illumination chromaticity difference sequence in the coordinate system in the positive y-axis direction based on the translation distance.

[0072] For example, a computer device acquires the minimum illumination chromaticity difference in both the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, and calculates a translation distance based on this minimum illumination chromaticity difference. For instance, when the minimum illumination chromaticity difference is negative, the absolute value of the minimum illumination chromaticity difference is used as the translation distance; when the minimum illumination chromaticity difference is non-negative, the translation distance is set to 0; the absolute value of the minimum illumination chromaticity difference is used as the translation distance; and so on. Based on the translation distance, the current illumination chromaticity difference sequence is adjusted to obtain an updated illumination chromaticity difference sequence. For example, the sum of each current illumination chromaticity difference in the current illumination chromaticity difference sequence and its translation distance is calculated to obtain the updated illumination chromaticity difference corresponding to each current illumination chromaticity difference. These updated illumination chromaticity differences are then arranged in image order to obtain the updated illumination chromaticity difference sequence. Similarly, the sum of each current illumination chromaticity difference and its translation distance is calculated, and then the product of this sum and a preset multiple is calculated to obtain the updated illumination chromaticity difference corresponding to each current illumination chromaticity difference. These updated illumination chromaticity differences are then arranged in image order to obtain the updated illumination chromaticity difference sequence. And so on. Based on the updated illumination chromaticity difference sequence, the computer device calculates the area of ​​the region enclosed by the line segment corresponding to each adjacent illumination chromaticity difference in the updated illumination chromaticity difference sequence and the x-axis to obtain the current area. For example, when the updated illumination chromaticity difference sequence is {0.2, 0.4, 0.5}, there are two sets of adjacent current illumination chromaticity differences in the updated illumination chromaticity difference sequence. The broken line corresponding to the updated illumination chromaticity difference sequence contains two broken line segments, which means that the corresponding current area sequence includes two current areas. The current area sequence is {0.3, 0.45}.

[0073] In the above embodiments, the current illumination chromaticity difference sequence is shifted in the positive y-axis direction based on the minimum illumination chromaticity difference, ensuring that the corresponding polygonal line in the coordinate system is always above the x-axis. The area enclosed by each segment of the polygonal line and the x-axis can be calculated using the trapezoidal area formula. However, if a segment of the polygonal line corresponding to the current illumination chromaticity difference sequence crosses the x-axis, the area enclosed by this segment and the x-axis cannot be calculated using the trapezoidal area formula. Other methods are needed to calculate the area of ​​such areas, increasing the complexity of calculating the current area. Therefore, adjusting the current illumination chromaticity difference sequence based on the shift distance to obtain an updated illumination chromaticity difference sequence, and then calculating the current area based on the updated sequence, can improve the efficiency of calculating the current area, thereby improving the efficiency of liveness detection.

[0074] In one embodiment, the image data processing method further includes:

[0075] The object image sequence is input into the illumination chromaticity prediction model, and the illumination chromaticity prediction model outputs the expected illumination chromaticity corresponding to each frame of the object image sequence; based on the expected illumination chromaticity corresponding to each frame of the image, the expected illumination chromaticity difference sequence corresponding to the object image sequence is obtained.

[0076] For example, any frame of an image in the object image sequence and a frame of an image under white light are input into the illumination chromaticity prediction model. The illumination chromaticity prediction model extracts the light information corresponding to the image and the feature information of the object in the image. Based on the light information and the object feature information, the expected illumination chromaticity under the corresponding light information is obtained when the object in the image is a living object. Using the same method, the expected illumination chromaticity of each other frame of the object image sequence under the corresponding light information is obtained. The expected illumination chromaticity of each frame is arranged in image order to obtain the expected illumination chromaticity sequence. The difference between the expected illumination chromaticity of adjacent images is calculated to obtain the expected illumination chromaticity difference between adjacent images. The expected illumination chromaticity differences are arranged in image order to obtain the expected illumination chromaticity difference sequence corresponding to the object image sequence. For example, the difference between the expected illumination chromaticity of adjacent images is calculated as the expected illumination chromaticity difference between two adjacent frames; the difference between the expected illumination chromaticity of adjacent images is calculated, and the product of the difference and a preset value is used as the expected illumination chromaticity difference; and so on.

[0077] In the above embodiments, the object image sequence is input into the illumination chromaticity prediction model to obtain the expected illumination chromaticity sequence corresponding to the object image sequence. Then, based on the expected illumination chromaticity corresponding to each frame image, the expected illumination chromaticity difference sequence corresponding to the object image sequence is obtained. The illumination chromaticity prediction model obtains the expected illumination chromaticity corresponding to each frame image based on the light information and the feature information of the object in the image, which can ensure the reliability of the predicted illumination chromaticity sequence, thereby ensuring the accuracy of liveness detection.

[0078] In one embodiment, the image data processing method further includes:

[0079] The signal-to-noise ratio (SNR) of each image in the image SNR sequence is statistically analyzed to obtain the image SNR statistical value. If the image SNR statistical value is less than a preset threshold, the liveness detection result corresponding to the object image sequence is determined to be no liveness. If the image SNR statistical value is greater than or equal to the preset threshold, the liveness detection result corresponding to the object image sequence is determined to be liveness.

[0080] The image signal-to-noise ratio (SNR) statistic refers to the SNR of the object image sequence, which characterizes the probability that the object in the object image sequence is a living being. The image SNR statistic is positively correlated with the probability that the object in the object image sequence is a living being. The preset threshold can be set according to actual needs.

[0081] For example, a computer device statistically analyzes the signal-to-noise ratio (SNR) of each image in an image SNR sequence to obtain an image SNR statistical value. For instance, the average of the individual image SNRs can be used as the image SNR statistical value; the weighted average of the individual image SNRs can be used as the image SNR statistical value; and so on. The image SNR statistical value is compared with a preset threshold. If the image SNR statistical value is less than the preset threshold, the liveness detection result corresponding to the object image sequence is determined to be no liveness; if the image SNR statistical value is greater than or equal to the preset threshold, the liveness detection result corresponding to the object image sequence is determined to be liveness. In the above embodiment, the computer device statistically analyzes the SNR of each image in an image SNR sequence to obtain an image SNR statistical value. The image SNR statistical value can intuitively reflect the similarity between the actual illumination chromaticity sequence and the expected illumination chromaticity sequence corresponding to the object image sequence, that is, the probability that the object in the object image sequence is a live object. Directly comparing the image SNR statistical value with a preset threshold to obtain the liveness detection result can effectively improve the efficiency of liveness detection and ensure the accuracy of liveness detection.

[0082] In one embodiment, a computer device acquires an object image sequence and inputs it into a liveness detection system. The liveness detection system fuses the hue values ​​of each pixel in the same frame of the object image sequence to obtain the true illumination chromaticity of the image. The same method is used to calculate the true illumination chromaticity of other frames. These true illumination chromaticities are then arranged in image order to obtain a true illumination chromaticity sequence corresponding to the object image sequence. The true illumination chromaticity difference between each group of adjacent images in the object image sequence is calculated, and these differences are arranged in image order to obtain a true illumination chromaticity difference sequence. The liveness detection system inputs each frame of the object image sequence and a frame of image under white light into an illumination chromaticity prediction model to obtain the expected illumination chromaticity for each frame. These expected illumination chromaticities are then arranged in image order to obtain an expected illumination chromaticity sequence. Finally, the expected illumination chromaticity difference between each group of adjacent images in the object image sequence is calculated, and these differences are arranged in image order to obtain an expected illumination chromaticity difference sequence. Based on the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the liveness detection system can calculate the image signal-to-noise ratio sequence using the following three methods.

[0083] Option 1: Calculate the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference for each group of adjacent images in the object image sequence. Use the same method to calculate the illumination chromaticity difference for each other group of adjacent images. Arrange the illumination chromaticity difference differences for each group of adjacent images in image order to obtain the illumination chromaticity difference sequence for the object image sequence. Calculate the ratio of the expected illumination chromaticity difference to the actual illumination chromaticity difference for each group of adjacent images. Based on this ratio, obtain the image signal-to-noise ratio (SNR) for each group of adjacent images. Calculate the image SNR for each other group of adjacent images using the same method. Arrange the image SNR for each group of adjacent images in image order to obtain the image SNR sequence for the object image sequence.

[0084] Option 2: Based on the minimum illumination chromaticity difference in the real and expected illumination chromaticity difference sequences, adjust both sequences. Calculate the area of ​​the region enclosed by the x-axis for each adjacent true illumination chromaticity difference in the adjusted sequence, thus obtaining the real area sequence. Similarly, calculate the area of ​​the region enclosed by the x-axis for each adjacent expected illumination chromaticity difference in the adjusted sequence, thus obtaining the expected area sequence. Based on the real and expected area sequences, calculate the difference between the real and expected areas for the same set of adjacent illumination chromaticity differences, obtaining the illumination chromaticity difference difference for this set of adjacent illumination chromaticity differences. Calculate the difference between the real and expected areas for other sets of adjacent illumination chromaticity differences using the same method, obtaining the illumination chromaticity difference difference for each of the other sets of adjacent illumination chromaticity differences, thus obtaining the illumination chromaticity difference difference sequence for the object image sequence. Calculate the ratio between the expected area and the difference in chromaticity of adjacent illumination differences within the same set of adjacent illumination chromaticity differences to obtain the image signal-to-noise ratio (SNR) for that set of adjacent illumination chromaticity differences. Calculate the image SNR for each of the other sets of adjacent illumination chromaticity differences using the same method. Arrange the image SNRs in order of the images to obtain the image SNR sequence corresponding to the object image sequence.

[0085] Option 3: Based on the minimum illumination chromaticity difference in the real and expected illumination chromaticity difference sequences, adjust both sequences. Calculate the area of ​​the region enclosed by the line segments corresponding to adjacent real illumination chromaticity differences and the x-axis in the adjusted sequence. Arrange these real areas in image order to obtain a real area sequence. Similarly, calculate the area of ​​the region enclosed by the line segments corresponding to adjacent expected illumination chromaticity differences and the x-axis in the adjusted sequence. Arrange these expected areas in image order to obtain a expected area sequence. Obtain the real and expected areas corresponding to the same group of adjacent illumination chromaticity differences in the object image sequence. Based on the regions corresponding to the real and expected areas in the coordinate system, obtain the overlapping area corresponding to adjacent illumination chromaticity differences. Calculate the overlapping area corresponding to other groups of adjacent illumination chromaticity differences using the same method. Arrange the overlapping areas corresponding to each group of adjacent illumination chromaticity differences in image order to obtain an overlapping area sequence. Calculate the difference between the overlapping area and the expected area corresponding to each of the same set of adjacent illumination chromaticity differences to obtain the illumination chromaticity difference for this set of adjacent illumination chromaticity differences. Calculate the difference between the overlapping area and the expected area corresponding to each of the other sets of adjacent illumination chromaticity differences using the same method to obtain the illumination chromaticity difference for each of the other sets of adjacent illumination chromaticity differences. Arrange the illumination chromaticity difference sequences corresponding to each set of adjacent illumination chromaticity differences in image order to obtain the illumination chromaticity difference sequence corresponding to the object image sequence. Calculate the ratio between the expected area and the illumination chromaticity difference for each set of adjacent illumination chromaticity differences to obtain the image signal-to-noise ratio (SNR) for this set of adjacent illumination chromaticity differences. Calculate the image SNR corresponding to each of the other sets of adjacent illumination chromaticity differences using the same method. Arrange the image SNR sequences corresponding to each set of adjacent illumination chromaticity differences in image order to obtain the image SNR sequence corresponding to the object image sequence.

[0086] The signal-to-noise ratio (SNR) of each image in the image SNR sequence is statistically analyzed to obtain the image SNR statistics. These statistics are then compared to a preset threshold to obtain the liveness detection result. If the SNR statistics are less than the preset threshold, the corresponding liveness detection result for the object image sequence is determined to be no liveness; if the SNR statistics are greater than or equal to the preset threshold, the corresponding liveness detection result for the object image sequence is determined to be liveness. Finally, the liveness detection system outputs the liveness detection result for the object image sequence.

[0087] In one specific embodiment, the image data processing method can be used for liveness detection in face recognition.

[0088] Image data processing methods include the following steps:

[0089] 1. Obtain the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence.

[0090] A computer device acquires a sequence of face images, determines the true illumination chromaticity of each frame in the sequence, and arranges these true illumination chromaticity values ​​in image order to obtain a true illumination chromaticity sequence. The face image sequence is then input into an illumination chromaticity prediction model to obtain the expected illumination chromaticity values ​​for each frame. These expected illumination chromaticity values ​​are then arranged in image order to obtain an expected illumination chromaticity sequence. The true illumination chromaticity differences between adjacent groups of images in the face image sequence are calculated, and these differences are arranged in image order to obtain a true illumination chromaticity difference sequence. Finally, the expected illumination chromaticity differences between adjacent groups of images in the face image sequence are calculated, and these differences are arranged in image order to obtain an expected illumination chromaticity difference sequence.

[0091] 2. Determine the sequence of color difference due to illumination.

[0092] Option 1: Calculate the difference between the actual illumination chromaticity difference and the expected illumination chromaticity difference between adjacent images in the same group in the face image sequence as the illumination chromaticity difference difference for this group of adjacent images. Calculate the illumination chromaticity difference difference for other groups of adjacent images in the same way. Arrange the illumination chromaticity difference differences for each group of adjacent images in the order of the images to obtain the illumination chromaticity difference difference sequence for the face image sequence.

[0093] Option 2: Based on the minimum illumination chromaticity difference in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, adjust the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence. Calculate the area of ​​the region enclosed by the line segments corresponding to adjacent real illumination chromaticity differences and the x-axis in the adjusted real illumination chromaticity difference sequence to obtain each real area. Arrange the real areas in the image order to obtain the real area sequence. Calculate the area of ​​the region enclosed by the line segments corresponding to adjacent expected illumination chromaticity differences and the x-axis in the adjusted expected illumination chromaticity difference sequence to obtain each expected area. Arrange the expected areas in the image order to obtain the expected area sequence. Based on the true area sequence and the expected area sequence, the difference between the true area and the expected area corresponding to the same set of adjacent illumination chromaticity differences is calculated to obtain the illumination chromaticity difference corresponding to this set of adjacent illumination chromaticity differences. The difference between the true area and the expected area corresponding to other sets of adjacent illumination chromaticity differences is calculated using the same method to obtain the illumination chromaticity difference corresponding to other sets of adjacent illumination chromaticity differences. The illumination chromaticity difference corresponding to each set of adjacent illumination chromaticity differences is arranged in the image order to obtain the illumination chromaticity difference sequence corresponding to the face image sequence.

[0094] Option 3: Based on the minimum illumination chromaticity difference in the real and expected illumination chromaticity difference sequences, adjust both sequences. Calculate the area of ​​the region enclosed by the line segments corresponding to adjacent real illumination chromaticity differences and the x-axis in the adjusted sequence. Arrange these real areas in image order to obtain a real area sequence. Similarly, calculate the area of ​​the region enclosed by the line segments corresponding to adjacent expected illumination chromaticity differences and the x-axis in the adjusted sequence. Arrange these expected areas in image order to obtain a expected area sequence. Obtain the real and expected areas corresponding to the same group of adjacent illumination chromaticity differences in the face image sequence. Based on the regions corresponding to the real and expected areas in the coordinate system, obtain the overlapping area corresponding to adjacent illumination chromaticity differences. Calculate the overlapping area corresponding to other groups of adjacent illumination chromaticity differences using the same method. Arrange the overlapping areas corresponding to each group of adjacent illumination chromaticity differences in image order to obtain an overlapping area sequence. Calculate the difference between the overlapping area and the expected area corresponding to each of the same set of adjacent illumination chromaticity differences to obtain the illumination chromaticity difference difference corresponding to this set of adjacent illumination chromaticity differences. Calculate the difference between the overlapping area and the expected area corresponding to each of the other sets of adjacent illumination chromaticity differences using the same method to obtain the illumination chromaticity difference difference corresponding to each of the other sets of adjacent illumination chromaticity differences. Arrange the illumination chromaticity difference differences corresponding to each set of adjacent illumination chromaticity differences in the order of the images to obtain the illumination chromaticity difference difference sequence corresponding to the face image sequence.

[0095] 3. Calculate the image signal-to-noise ratio

[0096] For Scheme 1 in Step 2, calculate the ratio of the expected illumination chromaticity difference to the illumination chromaticity difference difference for the same group of adjacent images, and take the logarithm of the comparison value to obtain the image signal-to-noise ratio (SNR) for this group of adjacent images. Calculate the image SNR for other groups of adjacent images using the same method, and then arrange the image SNRs of each group of adjacent images in order to obtain the image SNR sequence corresponding to the face image sequence.

[0097] For Schemes 2 and 3 in step 2, calculate the ratio between the expected area and the difference in chromaticity of adjacent illumination differences within the same group. Take the logarithm of the ratio to obtain the image signal-to-noise ratio (SNR) for this group of adjacent illumination chromaticity differences. Calculate the image SNR for each of the other groups of adjacent illumination chromaticity differences using the same method. Arrange the image SNRs in the order of the images to obtain the image SNR sequence corresponding to the face image sequence.

[0098] The mean SNR of each image in the image SNR sequence is calculated to obtain the SNR statistical value corresponding to the face image sequence. The image SNR statistical value reflects the similarity between the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence. The image SNR statistical value is compared with a preset threshold. When the image SNR statistical value is greater than or equal to the preset threshold, the liveness detection result is determined to be a real face; when the image SNR statistical value is less than the preset threshold, the liveness detection result is determined to be no real face. For example, when the preset threshold is set to 0.9, such as... Figure 6 As shown, the true illumination chromaticity difference sequence corresponding to the face image sequence is {0.84, 0.28, 0.80}, and the corresponding expected illumination chromaticity difference sequence is {0.77, 0.35, 0.82}. Based on the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the image signal-to-noise ratio (image signal-to-noise ratio statistical value) corresponding to the face image sequence is calculated to be 10.51. At this point, the face image sequence is considered to be a face image sequence corresponding to a real person (live) sample, and the liveness detection result is that there is a real person's face. Figure 7 As shown, the true illumination chromaticity difference sequence corresponding to the face image sequence is {0.16, 0.32, 0.89}, and the corresponding expected illumination chromaticity difference sequence is {0.21, 0.72, 0.62}. Based on the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the signal-to-noise ratio of the face image sequence is calculated to be 4.95. At this point, the face image sequence is considered to be the face image sequence corresponding to the attack (non-live) sample, and the liveness detection result is no real face.

[0099] In the above embodiments, the computer device acquires a sequence of face images and determines the corresponding true illumination chromaticity difference sequence. The illumination chromaticity prediction model, based on the light information corresponding to each frame of the image and the feature information of the face in the image, obtains the expected illumination chromaticity for each frame of the image, ensuring the reliability of the predicted illumination chromaticity sequence and thus guaranteeing the accuracy of liveness detection. Based on the difference between the true illumination chromaticity difference and the expected illumination chromaticity difference corresponding to each group of adjacent images in the face image sequence, the illumination chromaticity difference difference sequence corresponding to the face image sequence is obtained. Based on the expected illumination chromaticity difference and the illumination chromaticity difference difference sequence, an image signal-to-noise ratio (SNR) sequence is obtained, effectively ensuring the reliability of the image SNR and intuitively reflecting the similarity between the true illumination chromaticity difference sequence and the preset illumination chromaticity difference sequence. Based on the mean SNR of each image in the image SNR sequence, the statistical value of the image SNR corresponding to the face image sequence is obtained. The statistical value of the image SNR can intuitively reflect the similarity between the real illumination chromaticity sequence and the expected illumination chromaticity sequence corresponding to the face image sequence, that is, the probability that the face in the face image sequence is a real face. Directly comparing the calculated statistical value of the image SNR with a preset threshold to obtain the liveness detection result can effectively improve the efficiency of liveness detection and ensure the accuracy of liveness detection.

[0100] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0101] Based on the same inventive concept, this application also provides an image data processing apparatus for implementing the image data processing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more image data processing apparatus embodiments provided below can be found in the limitations of the image data processing method described above, and will not be repeated here.

[0102] In one embodiment, such as Figure 8 As shown, an image data processing apparatus is provided, including: an illumination chromaticity difference acquisition module 802, an illumination chromaticity difference determination module 808, and an image signal-to-noise ratio sequence determination module 806, wherein:

[0103] The illumination chromaticity difference acquisition module 802 is used to acquire the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The illumination chromaticity difference sequence includes the illumination chromaticity difference corresponding to multiple sets of adjacent images in the object image sequence. The illumination chromaticity difference is obtained based on the difference between the illumination chromaticity of each frame image in the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame image in the object image sequence into the illumination chromaticity expectation model.

[0104] The illumination chromaticity difference determination module 804 is used to obtain the illumination chromaticity difference sequence corresponding to the object image sequence based on the difference between the illumination chromaticity differences of each group of adjacent images in the object image sequence in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence.

[0105] The image signal-to-noise ratio sequence determination module 806 is used to obtain the image signal-to-noise ratio sequence corresponding to the object image sequence based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence; the image signal-to-noise ratio sequence is used to perform liveness detection on the object image sequence.

[0106] The aforementioned image data processing device acquires the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The actual illumination chromaticity difference between adjacent images reflects the illumination chromaticity difference of the object in the object image sequence under different lighting conditions, while the expected illumination chromaticity difference reflects the illumination chromaticity difference that adjacent images should correspond to when the object in the object image sequence is a living body. Based on the differences between the actual illumination chromaticity difference and the expected illumination chromaticity difference corresponding to each group of adjacent images in the object image sequence, an illumination chromaticity difference difference sequence corresponding to the object image sequence is obtained. The expected illumination chromaticity difference is the illumination chromaticity difference sequence that the object image sequence should correspond to when the object in the object image sequence is a living body, equivalent to the original signal in the signal-to-noise ratio formula. The true illumination chromaticity difference sequence is the actual illumination chromaticity difference sequence corresponding to the object image sequence. Since the objects in the object image sequence may be non-living objects such as faces in videos, facial photos, or animal photos, there is a significant difference between the light reflection effect of non-living objects and the expected light reflection effect of living objects. Conversely, when the objects in the object image sequence are living objects, the difference between the actual light reflection effect of living objects and the expected light reflection effect of living objects is smaller. Therefore, the illumination chromaticity difference sequence can be used to characterize the difference between the actual light reflection effect of objects in the object image sequence and the expected light reflection effect of living objects, which is equivalent to the noise in the signal-to-noise ratio (SNR) formula. The image SNR sequence is obtained based on the expected illumination chromaticity difference and the illumination chromaticity difference sequence. Using the calculated image SNR sequence for liveness detection of the object image sequence can effectively improve the efficiency of liveness detection while ensuring its accuracy.

[0107] In one embodiment, the illumination chromaticity difference determination module 804 is further configured to:

[0108] Based on the difference between the illumination chromaticity difference of the same group of adjacent images in the object image sequence and the corresponding illumination chromaticity difference sequence in the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence, the illumination chromaticity difference difference corresponding to each group of adjacent images is obtained, and an illumination chromaticity difference difference sequence is formed.

[0109] In one embodiment, the illumination chromaticity difference determination module 804 is further configured to:

[0110] The true area is calculated based on the adjacent true light chromaticity differences in the true light chromaticity difference sequence, and the true area sequence is obtained based on each true area; the expected area is calculated based on the adjacent expected light chromaticity differences in the expected light chromaticity difference sequence, and the expected area sequence is obtained based on each expected area; the light chromaticity difference difference sequence is obtained based on the difference between the true area sequence and the expected area sequence.

[0111] In one embodiment, the illumination chromaticity difference determination module 804 is further configured to:

[0112] The overlapping area is calculated based on the actual area and the expected area corresponding to the chromaticity difference of adjacent illuminations, and an overlapping area sequence is obtained based on each overlapping area; the chromaticity difference sequence is obtained based on the difference between the overlapping area sequence and the expected area sequence.

[0113] In one embodiment, the illumination chromaticity difference determination module 804 is further configured to:

[0114] The translation distance is obtained based on the minimum illumination chromaticity difference between the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence; the current illumination chromaticity difference sequence is adjusted based on the translation distance to obtain the updated illumination chromaticity difference sequence; the current area is calculated based on the adjacent illumination chromaticity differences in the updated illumination chromaticity difference sequence.

[0115] In one embodiment, such as Figure 9 As shown, the image data processing device also includes:

[0116] The expected illumination chromaticity determination module 902 is used to input the object image sequence into the illumination chromaticity expectation model, and the illumination chromaticity expectation model outputs the expected illumination chromaticity corresponding to each frame of the object image sequence; based on the expected illumination chromaticity corresponding to each frame of the image, the expected illumination chromaticity difference sequence corresponding to the object image sequence is obtained.

[0117] The liveness detection result determination module 904 is used to statistically analyze the signal-to-noise ratio of each image in the image signal-to-noise ratio sequence to obtain the image signal-to-noise ratio statistical value; when the image signal-to-noise ratio statistical value is less than a preset threshold, the liveness detection result corresponding to the object image sequence is determined to be no liveness; when the image signal-to-noise ratio statistical value is greater than or equal to the preset threshold, the liveness detection result corresponding to the object image sequence is determined to be liveness.

[0118] Each module in the aforementioned image data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0119] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as object image sequences, actual illumination chromaticity difference sequences, expected illumination chromaticity difference sequences, illumination chromaticity difference difference sequences, and image signal-to-noise ratio sequences. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an image data processing method.

[0120] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an image data processing method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0121] Those skilled in the art will understand that Figure 10 , 11The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0122] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0123] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0124] In one embodiment, a computer program product or computer program is provided, the computer product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above-described method embodiments.

[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0126] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An image data processing method, characterized in that, The method includes: Obtain the true illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence; the illumination chromaticity difference sequence includes the illumination chromaticity difference corresponding to multiple sets of adjacent images in the object image sequence, the illumination chromaticity difference is obtained based on the difference between the illumination chromaticity of each frame image in the same set of adjacent images, and the expected illumination chromaticity difference sequence is obtained by inputting each frame image of the object image sequence into the illumination chromaticity expectation model; The true area is calculated based on the adjacent true chromaticity differences in the true chromaticity difference sequence, and the true area sequence is obtained based on each true area. Calculate the expected area based on the adjacent expected chromaticity differences in the expected chromaticity difference sequence, and obtain the expected area sequence based on each expected area; Based on the difference between the actual area sequence and the expected area sequence, an illumination chromaticity difference sequence is obtained; Based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence, an image signal-to-noise ratio sequence corresponding to the object image sequence is obtained; the image signal-to-noise ratio sequence is used to perform liveness detection on the object image sequence.

2. The method according to claim 1, characterized in that, The step of calculating the true area based on adjacent true illumination chromaticity differences in the true illumination chromaticity difference sequence, and obtaining a true area sequence based on each true area, includes: The overlapping area is calculated based on the actual area and the expected area corresponding to the color difference of adjacent illuminations, and the overlapping area sequence is obtained based on each overlapping area. The step of obtaining the illumination chromaticity difference sequence based on the difference between the actual area sequence and the expected area sequence includes: The illumination chromaticity difference sequence is obtained based on the difference between the overlapping area sequence and the expected area sequence.

3. The method according to claim 1, characterized in that, The current illumination chromaticity difference sequence is either the actual illumination chromaticity difference sequence or the expected illumination chromaticity difference sequence, and the current area is either the actual area or the expected area. The current area is calculated based on adjacent current illumination chromaticity differences in the current illumination chromaticity difference sequence, including: The translation distance is obtained based on the minimum illumination chromaticity difference between the actual illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence; Based on the translation distance, the current illumination chromaticity difference sequence is adjusted to obtain an updated illumination chromaticity difference sequence; The current area is calculated based on the adjacent chromaticity differences in the updated chromaticity difference sequence.

4. The method according to claim 1, characterized in that, The method further includes: The object image sequence is input into the illumination chromaticity prediction model, and the illumination chromaticity prediction model outputs the expected illumination chromaticity corresponding to each frame of the object image sequence. Based on the expected illumination chromaticity corresponding to each frame of the image, the expected illumination chromaticity difference sequence corresponding to the object image sequence is obtained.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The signal-to-noise ratio of each image in the image signal-to-noise ratio sequence is statistically analyzed to obtain the image signal-to-noise ratio statistical value; If the image signal-to-noise ratio statistical value is less than a preset threshold, then the liveness detection result corresponding to the object image sequence is determined to be no liveness. If the image signal-to-noise ratio statistical value is greater than or equal to a preset threshold, then the liveness detection result corresponding to the object image sequence is determined to be that there is a live body.

6. The method according to claim 1, characterized in that, The object image sequence is an image sequence used for liveness detection tasks.

7. The method according to claim 1, characterized in that, The process of obtaining the true area sequence based on each true area includes: Arrange the actual areas according to the image order to obtain the actual area sequence; The process of obtaining the expected area sequence based on each expected area includes: Arrange the expected areas according to the image order to obtain the expected area sequence.

8. An image data processing apparatus, characterized in that, The device includes: The illumination chromaticity difference acquisition module is used to acquire the real illumination chromaticity difference sequence and the expected illumination chromaticity difference sequence corresponding to the object image sequence. The illumination chromaticity difference sequence includes the illumination chromaticity differences corresponding to multiple sets of adjacent images in the object image sequence. The illumination chromaticity difference is obtained based on the difference between the illumination chromaticity of each frame image in the same set of adjacent images. The expected illumination chromaticity difference sequence is obtained by inputting each frame image in the object image sequence into the illumination chromaticity expectation model. The illumination chromaticity difference determination module is used to calculate the true area based on adjacent true illumination chromaticity differences in the true illumination chromaticity difference sequence, and obtain a true area sequence based on each true area; calculate the expected area based on adjacent expected illumination chromaticity differences in the expected illumination chromaticity difference sequence, and obtain an expected area sequence based on each expected area; and obtain an illumination chromaticity difference sequence based on the difference between the true area sequence and the expected area sequence. The image signal-to-noise ratio sequence determination module is used to obtain the image signal-to-noise ratio sequence corresponding to the object image sequence based on the expected illumination chromaticity difference sequence and the illumination chromaticity difference difference sequence; the image signal-to-noise ratio sequence is used to perform liveness detection on the object image sequence.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Facial recognition method and device, computer equipment and storage medium

    CN116311440A