Living body detection method and device and computer equipment
By acquiring and processing the rPPG signals and noise signals of the target object in the video, generating spatiotemporal and spatial characteristic images and performing live detection, the problem of lack of live detection methods in the prior art is solved, and accurate live detection of objects watching teaching videos is achieved.
Patent Information
- Application Number
- CN202411752728.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-21
AI Technical Summary
There is a lack of a method for performing live detection of objects viewing teaching videos in the prior art.
By obtaining the original rPPG signal corresponding to the area of interest of the target object in the image to be detected and the original noise signal corresponding to the background area, the differential pulse wave signal of the target object is determined, and the signals are converted based on the sliding window method to generate spatiotemporal and spatial characteristic images, and finally input these images into the living body detection model to determine whether the target object is a living body.
It realizes that the target object is tested in vivo during the process of watching videos or images, improves the accuracy of the detection results, and is suitable for a wide range of application scenarios.
Smart Images

Figure CN119672815A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device and computer equipment for detecting living things. Background Art
[0002] With the development of artificial intelligence technology, liveness detection technology has become an important means of identity authentication and is widely used in various fields. Taking online learning as an example, in order to ensure the quality of online education, it is particularly important to detect whether the object watching the teaching video is alive or not.
[0003] However, the related art does not provide a solution for performing liveness detection on an object watching a teaching video. Summary of the invention
[0004] Based on this, it is necessary to provide a liveness detection method, device and computer equipment to address the above technical problems, which can perform liveness detection on objects watching teaching videos.
[0005] In a first aspect, an embodiment of the present application provides a living body detection method, the method comprising:
[0006] Acquire an original rPPG signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each of the images to be detected;
[0007] Determining a plurality of difference pulse wave signals corresponding to the target object according to each original rPPG signal and each original noise signal;
[0008] Based on the sliding window method, each difference pulse wave signal is converted and processed to obtain multiple spatiotemporal characteristic images of the target object;
[0009] Each spatiotemporal feature image is input into the living body detection model to determine whether the target object is alive.
[0010] In one embodiment, obtaining an original rPPG signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each of the images to be detected includes:
[0011] Acquire a region of interest of a target object in each image to be detected and a background region in each image to be detected;
[0012] Channel processing is performed according to the pixel points in each region of interest to determine the original rPPG signal corresponding to each region of interest; and channel processing is performed according to the pixel points in each background region to determine the original noise signal corresponding to each background region.
[0013] In one embodiment, obtaining the region of interest of the target object in each image to be detected and the background region in each image to be detected includes:
[0014] Perform feature point positioning processing on each image to be detected to obtain multiple feature points of interest in each image to be detected;
[0015] For any image to be detected, a reference area and a corresponding background area of a target object in the image to be detected are determined according to a plurality of feature points of interest in the image to be detected;
[0016] The color space conversion process is performed according to the reference area to obtain the corresponding region of interest.
[0017] In one embodiment, channel processing is performed according to the pixel points in each region of interest to determine the original rPPG signal corresponding to each region of interest, including:
[0018] For any region of interest, performing channel separation processing on pixel points in the region of interest to obtain a plurality of first channel information corresponding to the region of interest;
[0019] The information of each first channel is averaged to obtain the original rPPG signal corresponding to the region of interest.
[0020] In one embodiment, channel processing is performed according to the pixels in each background area to determine the original noise signal corresponding to each background area, including:
[0021] For any background area, performing channel separation processing on the pixel points in the background area to obtain a plurality of second channel information corresponding to the background area;
[0022] The information of each second channel is averaged respectively to obtain the original noise signal corresponding to the background area.
[0023] In one embodiment, determining a plurality of difference pulse wave signals corresponding to the target object according to each original rPPG signal and each original noise signal includes:
[0024] constructing an orthogonal chromaticity signal of interest according to each original rPPG signal, and determining a corresponding heart rate signal of interest according to the orthogonal chromaticity signal of interest; and constructing a background orthogonal chromaticity signal according to each original noise signal, and determining a candidate noise signal according to the background orthogonal chromaticity signal;
[0025] Filtering each heart rate signal of interest to obtain a corresponding pulse wave signal of interest; and filtering each candidate noise signal to obtain a corresponding target noise signal;
[0026] Based on each target noise signal, each pulse wave signal of interest is denoised to obtain a plurality of difference pulse wave signals of the target object.
[0027] In one embodiment, based on the sliding window method, each difference pulse wave signal is converted and processed to obtain multiple spatiotemporal characteristic images of the target object, including:
[0028] acquiring at least one group of difference pulse wave signals from each difference pulse wave signal according to the first sliding window and the first sliding step size;
[0029] For each group of difference pulse wave signals, a plurality of groups of difference pulse wave sub-signals are obtained from the current group of difference pulse wave signals according to the second sliding window and the second sliding step size; the current group of difference pulse wave signals is any group of difference pulse wave signals;
[0030] A numerical matrix is constructed according to multiple groups of differential pulse wave sub-signals, and the corresponding spatiotemporal feature image is obtained by grayscale mapping the numerical matrix.
[0031] In a second aspect, an embodiment of the present application provides a living body detection device, the device comprising:
[0032] An acquisition module is used to acquire an original rPPG signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each image to be detected;
[0033] A determination module, used to determine a plurality of difference pulse wave signals corresponding to the target object according to each original rPPG signal and each original noise signal;
[0034] A conversion processing module, used for converting each difference pulse wave signal based on a sliding window method to obtain multiple spatiotemporal characteristic images of the target object;
[0035] The detection module is used to input each spatiotemporal feature image into the living body detection model to determine whether the target object is alive.
[0036] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any one of the embodiments of the first aspect when executing the computer program.
[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment in the above-mentioned first aspect are implemented.
[0038] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any embodiment of the first aspect above.
[0039] The embodiments of the present application provide a method, apparatus and computer device for liveness detection, including: obtaining original rPPG signals corresponding to the region of interest of a target object in multiple images to be detected and original noise signals corresponding to the background region in each image to be detected, determining multiple difference pulse wave signals corresponding to the target object according to each original rPPG signal and each original noise signal, converting and processing each difference pulse wave signal based on a sliding window method to obtain multiple spatiotemporal feature images of the target object, and inputting each spatiotemporal feature image into a liveness detection model to determine whether the target object is live; the above method can detect whether the target object is live when the target object is watching a video or an image, and is applicable to a wide range of scenarios; at the same time, the above method can obtain the accurate pulse wave signal of the target object, that is, the difference pulse wave signal, according to the noise signal corresponding to the background region in the image to be detected, and on this basis, converting and processing each difference pulse wave signal by a sliding window method to obtain multiple spatiotemporal feature images, on this basis, can provide reliable dependent information for the next step of liveness detection, thereby improving the accuracy of the liveness detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A diagram showing an application environment of a living body detection method in an embodiment;
[0041] Figure 2 is an application environment diagram of a living body detection method in another embodiment;
[0042] Figure 3 A diagram showing an actual application scenario of a living body detection method in an embodiment;
[0043] Figure 4 is a schematic diagram of a flow chart of a liveness detection method in an embodiment;
[0044] Figure 5 is a schematic flow chart of a liveness detection method in another embodiment;
[0045] Figure 6 is a schematic flow chart of a liveness detection method in another embodiment;
[0046] Figure 7 is a schematic diagram of an image to be detected with feature points marked thereon in one embodiment;
[0047] Figure 8 for Figure 7 In the embodiment, a blank map with feature points and reference areas is marked;
[0048] Fig. 9 for Figure 7 In the embodiment, a blank map with feature points and background areas is marked;
[0049] Fig.10 is a schematic flow chart of a liveness detection method in another embodiment;
[0050] Fig.11 is a schematic flow chart of a liveness detection method in another embodiment;
[0051] Fig.12 is a schematic flow chart of a liveness detection method in another embodiment;
[0052] Fig.13 is a fluctuation diagram of a difference pulse wave signal changing with time in one embodiment;
[0053] Fig.14 is a structural block diagram of a living body detection device in one embodiment;
[0054] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] In the field of artificial intelligence, liveness detection technology has become an important means of identity authentication and is widely used in various fields. Taking online learning as an example, in order to ensure the quality of online education, it is particularly important to detect whether the object watching the teaching video is alive or not. However, the related art does not provide a solution that can perform liveness detection on the object watching the teaching video. Based on this, the embodiment of the present application provides a liveness detection method that can perform liveness detection on the object watching the teaching video.
[0057] The living body detection method provided in the embodiment of the present application can be applied to Figure 1 The liveness detection system shown in the figure may include an electronic device having an image acquisition device and a computer device, wherein the image acquisition device is used to acquire images when a user watches a video through the electronic device. Optionally, the electronic device and the computer device may be connected by communication, and the communication method may be Wi-Fi, mobile network or Bluetooth connection.
[0058] In addition, the above method can also be applied to Figure 2The liveness detection system shown in the figure may include a computer device, an electronic device and at least one image acquisition device, wherein the position of the user when the user watches the screen through the electronic device is within the monitoring range of each image acquisition device. In this case, each image acquisition device may be connected to the computer device for communication, and the communication method may be Wi-Fi, mobile network or Bluetooth connection, etc. Optionally, the above-mentioned computer device and electronic device may be a personal computer, a laptop computer, a desktop computer, a tablet computer, an iPad, a smart TV, a smart phone, a smart bracelet, a smart door lock and other devices. As long as the computer device has a data processing function and the electronic device has a video display function, the specific form of the computer device and the electronic device is not limited in this embodiment of the application. Optionally, the above-mentioned image acquisition device may be, but is not limited to, a camera, a webcam and other devices ( Figure 2 It is illustrated by taking an image acquisition device which is a camera as an example).
[0059] In practical applications, the above liveness detection method is not limited to scenarios where users watch videos online. It is applicable to any scenario where users watch images or videos through electronic devices, such as unlocking mobile phones, access control systems, online payments, etc. Figure 3 The figure shows a user listening to a class in an online learning scenario. According to the arrangement of desks in a traditional classroom, the user can usually be set to be 0.4 to 1 m away from the electronic device screen when normally listening to a class. The light source is a mixture of natural light and fluorescent light, and the light intensity in the classroom is set to be between 100 and 400 Lux. The following embodiment of the present application uses a computer device as the execution subject of the liveness detection method to introduce the specific process of the liveness detection method.
[0060] like Figure 4 FIG. 1 is a flow chart of a liveness detection method provided in an embodiment of the present application, and the method can be implemented by the following steps:
[0061] S100, obtaining an original remote photoplethysmogram (rPPG) signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each image to be detected.
[0062] In practical applications, when the target object views an image or video through an electronic device in the liveness detection system, at least one image acquisition device in the liveness detection system can acquire multiple original images in real time. Optionally, the multiple original images can be images acquired at multiple consecutive time points.
[0063] Typically, the target object watches the image or video with its head facing the screen of the electronic device. Therefore, in an embodiment of the present application, for any original image, the computer device can use the oriented gradient histogram method to perform facial detection on the original image. When a facial area is detected in the original image, the original image can be determined as the image to be detected.
[0064] Among them, in addition to the facial area of the target object, the image to be detected also includes a background area outside the facial area. In the embodiment of the present application, during the process of the target object viewing the image or video, the target object can be silent or active during the image detection process, and the embodiment of the present application does not limit this; wherein, when the target object is silent during the image detection process, it can also be understood that the user uses a human face painting photo, a human face sculpture model, etc. to view the image or video. At the same time, the above-mentioned target object is the user's head.
[0065] It should be noted that the area of the target object's region of interest (i.e., ROI area) may be less than or equal to the area of the target object's face area in the image to be detected. In an embodiment of the present application, the number of images to be detected, the number of regions of interest, and the number of background areas are all the same, wherein, in the same image to be detected, the corresponding background area may be located at any position around the corresponding region of interest, but the region of interest does not overlap with the background area.
[0066] Specifically, the computer device can pre-train an algorithm model, and then input multiple images to be detected and the identification of the region of interest into the algorithm model, and the algorithm model outputs the original rPPG signal corresponding to the region of interest of the target object in each image to be detected. At the same time, the computer device can input multiple images to be detected and the identification of the background region into the algorithm model, and the algorithm model outputs the original noise signal corresponding to the background region of the target object in each image to be detected.
[0067] In addition, the computer device can perform feature extraction processing, analysis processing, positioning processing, matching processing and / or conversion processing on each image to be detected, and obtain the original rPPG signal corresponding to the area of interest of the target object in each image to be detected and the original noise signal corresponding to the background area in each image to be detected according to the processing operation results.
[0068] S200: Determine a plurality of difference pulse wave signals corresponding to a target object according to each original rPPG signal and each original noise signal.
[0069] In practical applications, for the original rPPG signal corresponding to the region of interest in each image to be detected and the original noise signal corresponding to the background region, the computer device can perform analysis processing, arithmetic operation processing and / or matching processing on the original rPPG signal and the original noise signal, and determine a difference pulse wave (Blood Volume Pulse, BVP) signal corresponding to the target object based on the processing operation results.
[0070] The number of difference pulse wave signals is the same as the number of original rPPG signals and the number of original noise signals. In order to highlight the pulsation information characteristics of the target object, the difference pulse wave signal of the target object is used in the embodiment of the present application.
[0071] S300, based on the sliding window method, convert and process each difference pulse wave signal to obtain multiple spatiotemporal characteristic images of the target object.
[0072] Among them, the computer device can pre-train a signal conversion model, and then input each difference pulse wave signal into the signal conversion model. The signal conversion model uses a sliding window method to convert each difference pulse wave signal and then outputs multiple spatiotemporal feature images of the target object.
[0073] Optionally, the signal conversion model can be implemented by at least one of a convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, a residual neural network model, a recurrent neural network model, etc. It should be noted that the pulse wave signal only exists in the face of a living body, and does not exist in any non-living body (such as a three-dimensional mask, printed material, a human face hanging picture, a human face sculpture model, etc.) face.
[0074] S400: Input each spatiotemporal feature image into a living body detection model to determine whether the target object is a living body.
[0075] Furthermore, the computer device can input the acquired multiple spatiotemporal feature images of the target object into the liveness detection model, and the liveness detection model performs liveness detection processing on the multiple spatiotemporal feature images of the target object and outputs the result of whether the target object is alive. In practical applications, it is possible to distinguish whether the target object viewing the image or video is a live face or a prosthetic face based on whether the target object is alive, or perform facial authentication on the target object viewing the image or video, so as to prevent cheating in viewing the image or video by means of superimposing a face photo on an electronic device or playing a face video on an electronic screen.
[0076] The liveness detection model may also be implemented by at least one of a convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, a residual neural network model, a recurrent neural network model, etc. Optionally, the result of whether the target object is alive may be whether the target object is alive or not.
[0077] In practical applications, the liveness detection model can be a hierarchical visual self-attention mechanism (SwinTransformer, Swin-T) network model, wherein the number of fully connected layer nodes classified in the liveness detection model is equal to the number of liveness detection categories (i.e., live or non-live) 2. It should be noted here that the liveness detection model is pre-trained, and the training set in the training process is a spatiotemporal feature image set. Therefore, in the embodiment of the present application, the liveness detection model can also be called a difference pulse wave signal extraction algorithm based on the sliding window method (Signal Difference in the Sliding Window, SDSW) liveness detection model; in the embodiment of the present application, the spatiotemporal feature image set is used as the input for training the liveness detection model, which can reduce the complexity of model training and improve detection accuracy compared to the input face image.
[0078] It should be noted here that in the process of training the liveness detection model, cross entropy can be selected as the loss function to measure the difference between the spatiotemporal feature image and the label. In the embodiment of the present application, the above loss function can be expressed by the following formula (1):
[0079] Loss = [p real (x i )log(q real (x i ))+p fake (x i )log(q fake (x i ))] (1)
[0080] Among them, p real (x i ) represents the probability that the i-th sample in the training set is alive, q real (x i ) represents the probability that the i-th sample is predicted to be alive, p fake (x i ) represents the probability that the i-th sample is non-living, q fake (x i ) represents the probability that the i-th sample is predicted to be non-living.
[0081] The technical solution in the embodiment of the present application obtains the original rPPG signal corresponding to the region of interest of the target object in multiple images to be detected and the original noise signal corresponding to the background area in each image to be detected, determines multiple difference pulse wave signals corresponding to the target object according to each original rPPG signal and each original noise signal, converts and processes each difference pulse wave signal based on the sliding window method to obtain multiple spatiotemporal feature images of the target object, and inputs each spatiotemporal feature image into the liveness detection model to determine whether the target object is alive; the above method can detect whether the target object is alive during the process of the target object watching a video or an image, and is applicable to a wide range of scenarios; at the same time, the above method can obtain the accurate pulse wave signal of the target object, that is, the difference pulse wave signal, according to the noise signal corresponding to the background area in the image to be detected, and on this basis, converts and processes each difference pulse wave signal through the sliding window method to obtain multiple spatiotemporal feature images, on this basis, can provide reliable dependent information for the next step of realizing liveness detection, and improve the accuracy of the liveness detection result.
[0082] The following is a description of the process of obtaining the original rPPG signal corresponding to the region of interest of the target object in the plurality of images to be detected and the original noise signal corresponding to the background region in each of the images to be detected. Figure 5 As shown, the steps in S100 above can be implemented in the following manner:
[0083] S110, acquiring a region of interest of a target object in each image to be detected and a background region in each image to be detected.
[0084] Specifically, the computer device can perform texture recognition processing, cropping processing, color recognition processing and other operations on each image to be detected, and obtain the region of interest of the target object in each image to be detected and the background region in each image to be detected based on the processing operation results.
[0085] S120, performing channel processing according to the pixel points in each region of interest to determine the original rPPG signal corresponding to each region of interest; and performing channel processing according to the pixel points in each background region to determine the original noise signal corresponding to each background region.
[0086] In practical applications, the computer device can perform separation processing, conversion processing and other operations on the pixel points in the region of interest in each image to be detected to obtain the original rPPG signal corresponding to each region of interest, and perform separation processing, conversion processing and other operations on the pixel points in the background region in each image to be detected to obtain the original noise signal corresponding to each background region.
[0087] In addition, the computer device can also pre-train a channel processing model, and then input the region of interest in each image to be detected into the channel processing model, perform channel processing on the pixels in each region of interest, and output the original rPPG signal corresponding to each region of interest; at the same time, the background area in each image to be detected can be input into the channel processing model, and the pixel points in each background area can be channel processed and the original noise signal corresponding to each background area can be output.
[0088] In one embodiment, if Figure 6 As shown, the step of obtaining the region of interest of the target object in each image to be detected and the background region in each image to be detected in the above S110 may include the following steps:
[0089] S111 , performing feature point positioning processing on each image to be detected to obtain a plurality of feature points of interest in each image to be detected.
[0090] In an embodiment of the present application, the above-mentioned region of interest may be a part of the face of the target object. Specifically, the computer device may use a feature point positioning algorithm to perform feature point positioning processing on the facial region of the target object in each image to be detected, and obtain a plurality of feature points of interest in each image to be detected. Optionally, the above-mentioned feature point positioning algorithm may be implemented by at least one of a scale-invariant feature transformation algorithm, a feature detection algorithm, an accelerated robust feature algorithm, a corner point detection algorithm, etc. In an embodiment of the present application, the above-mentioned feature point positioning algorithm may be a gradient enhanced decision tree algorithm.
[0091] It should be noted here that the number of interesting feature points obtained in different images to be detected may be the same or different; all interesting feature points obtained in each image to be detected may reflect the structure and shape of the facial area of the target object in the image to be detected.
[0092] S112: For any image to be detected, determine a reference area and a corresponding background area of the target object in the image to be detected according to a plurality of feature points of interest in the image to be detected.
[0093] Specifically, for any image to be detected, the computer device can pre-train an algorithm model, and then input multiple feature points of interest in the image to be detected into the algorithm model, and the algorithm model outputs a reference area and a corresponding background area of the target object in the image to be detected.
[0094] In addition, the computer device can perform trigonometric function processing, coordinate conversion processing and other operations on multiple feature points of interest in the image to be detected, and obtain a reference area and a corresponding background area of the target object in the image to be detected based on the processing operation results.
[0095] like Figure 7FIG. 1 is a diagram showing an image to be detected. After the feature point positioning processing is performed on the image to be detected, a plurality of feature points of interest are mapped in a blank image of the same size as the image to be detected. Figure 8 and 9 As shown (the numbers of different feature points of interest are marked in the figure), where: Figure 8 The AB region in can be a reference region in the image to be detected. Fig. 9 The CD area in may be a background area in the image to be detected.
[0096] S113: Perform color space conversion processing according to the reference area to obtain a corresponding region of interest.
[0097] In the embodiments of the present application, the region of interest, the reference region and the background region can all be understood as corresponding region images in the image to be detected. For the convenience of description, they are directly referred to as the region of interest, the reference region and the background region.
[0098] In practical applications, the computer device may first use a skin segmentation algorithm to filter out non-skin areas from the reference area to obtain an area to be processed. Specifically, the computer device may also use an image color space conversion algorithm to perform color space conversion processing on the area to be processed to obtain a corresponding region of interest. In an embodiment of the present application, the computer device may perform color space conversion processing on the area to be processed to convert the reference area into a YCbCr color space, and determine the pixel points whose YCrCb corresponding to each pixel point obtained after the conversion meets the preset skin condition as skin color pixel points, that is, the pixel points that do not meet the preset skin condition are determined as non-skin color pixel points, and generate a corresponding region of interest based on all skin color pixel points.
[0099] The preset skin condition is composed of the constraints of YCbCr, and the preset skin condition may be, but is not limited to, Y greater than 80, Cb greater than 77 and less than 127, and Cr greater than 133 and less than 173.
[0100] The technical solution in the embodiment of the present application obtains the region of interest of the target object in each image to be detected and the background region in each image to be detected, performs channel processing according to the pixels in each region of interest, determines the original rPPG signal corresponding to each region of interest, and performs channel processing according to the pixels in each background region to determine the original noise signal corresponding to each background region; the above method can adopt a non-contact detection method to directly detect the light absorption change caused by the blood volume change on the human skin surface to determine the rPPG signal corresponding to the region of interest and the noise signal corresponding to the background region, and on this basis, the noise signal corresponding to the background region can be used as an interference signal to provide basic information for further denoising the rPPG signal corresponding to the region of interest.
[0101] The following is a description of the process of determining the original rPPG signal corresponding to each region of interest by performing channel processing based on the pixel points in each region of interest. Fig.10 As shown, the step of performing channel processing according to the pixel points in each region of interest in the above S120 to determine the original rPPG signal corresponding to each region of interest may include:
[0102] S121. For any region of interest, perform channel separation processing on pixel points in the region of interest to obtain a plurality of first channel information corresponding to the region of interest.
[0103] In the embodiment of the present application, the channel separation process can be understood as a process of extracting information of the three RGB channels in the region of interest.
[0104] In practical applications, for any region of interest, the computer device can call a channel separation tool to perform channel separation processing on the pixel points in the region of interest in the image to be detected to obtain multiple first channel information corresponding to the region of interest; the multiple first channel information corresponding to the region of interest includes RGB three-channel information. Among them, each first channel information corresponding to the region of interest may include the first channel information corresponding to each pixel point in the region of interest.
[0105] S122, respectively calculate the average of each first channel information to obtain the original rPPG signal corresponding to the region of interest.
[0106] Furthermore, the R channel information, the G channel information and the B channel information in the first channel information can be averaged to obtain the original rPPG signal corresponding to the region of interest, including Fr i , Fg i , Fb i (i represents the number of the image to be detected).
[0107] Meanwhile, in another embodiment, the step of performing channel processing according to the pixels in each background area in S120 to determine the original noise signal corresponding to each background area may include the following steps:
[0108] S123: For any background area, perform channel separation processing on the pixels in the background area to obtain a plurality of second channel information corresponding to the background area.
[0109] In practical applications, for any background area, the computer device can call a channel separation tool to perform channel separation processing on the pixel points in the background area in the image to be detected to obtain multiple second channel information corresponding to the background area; the second channel information also includes RGB three-channel information.
[0110] S124, respectively calculate the average of each second channel information to obtain the original noise signal corresponding to the background area.
[0111] Optionally, the R channel information, the G channel information and the B channel information in each second channel information may be averaged to obtain the original noise signal corresponding to the background area, including Br i , Bg i , Bb i .
[0112] It should be noted here that the execution order of the above steps S121 and S122 and the execution order of steps S123 and S124 can be interchanged and are not fixed.
[0113] The technical solution in the embodiments of the present application can obtain the original rPPG signal corresponding to the region of interest and the original noise signal corresponding to the background region in each image to be detected; the above method does not need to adopt a contact method, and can directly detect the light absorption change caused by the blood volume change on the human skin surface to determine the rPPG signal corresponding to the region of interest and the noise signal corresponding to the background region through the image processing process, and on this basis, the noise signal corresponding to the background region can be used as an interference signal to provide basic information for further denoising the rPPG signal corresponding to the region of interest.
[0114] The following is an explanation of the process of determining a plurality of difference pulse wave signals corresponding to the target object based on each original rPPG signal and each original noise signal. Fig.11 As shown, the steps in S200 above can be implemented in the following manner:
[0115] S210, constructing an orthogonal chromaticity signal of interest according to each original rPPG signal, and determining a corresponding heart rate signal of interest according to the orthogonal chromaticity signal of interest; and, constructing a background orthogonal chromaticity signal according to each original noise signal, and determining a candidate noise signal according to the background orthogonal chromaticity signal.
[0116] Specifically, the computer device can call the chromaticity signal construction tool to construct an orthogonal chromaticity signal of interest for each original rPPG signal; in the embodiment of the present application, the computer device can construct an orthogonal chromaticity signal of interest (including two orthogonal chromaticity signals) according to each original rPPG signal in the manner of formula (2). and );
[0117]
[0118] Further, an arithmetic operation can be performed on the orthogonal chromaticity signal of interest to obtain a corresponding heart rate signal of interest; in the embodiment of the present application, the computer device can process the orthogonal chromaticity signal of interest in accordance with formula (3) to obtain the corresponding heart rate signal of interest
[0119]
[0120] Among them, each original rPPG signal can construct a set of orthogonal chromaticity signals, that is, an orthogonal chromaticity signal of interest.
[0121] Similarly, the computer device can call the chrominance signal construction tool to construct a background orthogonal chrominance signal for each original noise signal; in the embodiment of the present application, the computer device can construct a background orthogonal chrominance signal (including two orthogonal chrominance signals) according to each original noise signal in the manner of formula (4). and );
[0122]
[0123] Furthermore, an arithmetic operation can be performed on the background orthogonal chrominance signal to obtain a corresponding candidate noise signal. In the embodiment of the present application, the computer device can process the background orthogonal chrominance signal in accordance with formula (5) to obtain a corresponding candidate noise signal.
[0124]
[0125] S220, filtering each heart rate signal of interest to obtain a corresponding pulse wave signal of interest; and filtering each candidate noise signal to obtain a corresponding target noise signal.
[0126] Specifically, the computer device can use a filtering algorithm to filter each heart rate signal of interest to obtain a corresponding pulse wave signal of interest BVP facei , and use the filtering algorithm to filter each candidate noise signal to obtain the corresponding target noise signal BVP bgi .
[0127] Optionally, the above-mentioned filtering algorithm may be an algorithm based on deep learning, or may be a high-pass filtering method, a low-pass filtering method, etc. However, in the embodiment of the present application, the above-mentioned filtering algorithm may be a band-pass filtering method.
[0128] S230 , based on each target noise signal, perform denoising processing on each pulse wave signal of interest to obtain a plurality of difference pulse wave signals of the target object.
[0129] In an embodiment of the present application, a background area corresponds to a target noise signal, and a region of interest corresponds to an interested pulse wave signal; the target noise signal corresponding to the background area in the same image to be detected corresponds one to one with the interested pulse wave signal corresponding to the region of interest in the image to be detected.
[0130] In practical applications, for any pulse wave signal BVP of interest facei The computer device can use the pulse wave signal BVP of interest facei Subtract the corresponding target noise signal BVP bgi Get the target object's differential pulse wave signal BVP diffi , namely BVP diffi =BVP facei -BVP bgi It should be noted here that there is a one-to-one correspondence between the target noise signal, the pulse wave signal of interest and the difference pulse wave signal.
[0131] The technical solution in the embodiment of the present application can use the background noise signal as a comparison to obtain a more accurate pulse wave signal, that is, a difference pulse wave signal, and can provide reference information for further improving the accuracy of the liveness detection results.
[0132] In some scenarios, the differential pulse wave signal can be converted into changes in time and space based on the sliding window method. The conversion process is described below. Fig.12 As shown, the step of converting each difference pulse wave signal according to a preset sliding window to obtain the spatiotemporal characteristic image of the target object in the above S300 can be implemented in the following manner:
[0133] S310. Acquire at least one group of difference pulse wave signals from the difference pulse wave signals according to the first sliding window and the first sliding step size.
[0134] Specifically, the computer device can sequentially obtain at least one group of difference pulse wave signals from each difference pulse wave signal according to the first sliding window and the first sliding step; the number of each group of difference pulse wave signals is equal to the length of the first sliding window. Optionally, the length of the first sliding window can be less than or equal to the time length corresponding to each difference pulse wave signal.
[0135] For example, Fig.13 The figure shows a waveform diagram of each difference pulse wave signal changing with time. The first sliding window is moved to the right according to the first sliding step, and a group of difference pulse wave signals is obtained each time it is moved.
[0136] S320: For each group of difference pulse wave signals, obtain multiple groups of difference pulse wave sub-signals from the current group of difference pulse wave signals according to the second sliding window and the second sliding step size, wherein the current group of difference pulse wave signals is any group of difference pulse wave signals.
[0137] Based on each group of difference pulse wave signals obtained in the previous steps, the computer device can sequentially obtain multiple groups of difference pulse wave sub-signals from the current group of difference pulse wave signals according to the second sliding window and the second sliding step; the number of each group of difference pulse wave sub-signals is equal to the length of the second sliding window.
[0138] It should be noted here that each group of difference pulse wave sub-signals can be understood as a plurality of difference pulse wave signals corresponding to the second sliding window in the current group of difference pulse wave signals.
[0139] S330, constructing a numerical matrix according to the multiple groups of difference pulse wave sub-signals, and performing grayscale mapping processing on the numerical matrix to obtain a corresponding spatiotemporal feature image.
[0140] Further, each group of difference pulse wave sub-signals can be used as a row element to construct a matrix, that is, a numerical matrix, and the numerical matrix is subjected to grayscale mapping to obtain the corresponding spatiotemporal feature image. In the embodiment of the present application, the above numerical matrix can be expressed as a Toeplitz matrix I. In the embodiment of the present application, the length of the second sliding window can be equal to 1 / 2 of the length of the first sliding window, so that the constructed numerical matrix is a square matrix.
[0141] In one implementation, a computer device may pre-train a grayscale mapping model, and then input a numerical matrix into the grayscale mapping model, and the grayscale mapping model performs grayscale mapping processing on the numerical matrix to obtain a spatiotemporal feature image.
[0142] For example, if each group of difference pulse wave signals includes K difference pulse wave signals in sequence, the K difference pulse wave signals are expressed as (BVP diff1 ,BVP diff2 ,...,BVP diffi ,...,BVP diffK ), the second window length is K / 2, the second sliding step is 1, then the first K / 2 difference pulse wave signals are obtained from the K difference pulse wave signals as the first group of difference pulse wave sub-signals, and then the second difference pulse wave signal to the ((K / 2)+1)th difference pulse wave signal is moved back by 1 position as the second group of difference pulse wave sub-signals, and K / 2 groups of difference pulse wave sub-signals are obtained by analogy, and each group of difference pulse wave sub-signals is used as a row element of the numerical matrix to obtain the numerical matrix which can be expressed by formula (6) as follows:
[0143]
[0144] The technical solution in the embodiment of the present application is to obtain at least one group of difference pulse wave signals from each difference pulse wave signal according to the first sliding window and the first sliding step, and for each group of difference pulse wave signals, obtain multiple groups of difference pulse wave sub-signals from the current group of difference pulse wave signals according to the second sliding window and the second sliding step, and construct a numerical matrix according to the multiple groups of difference pulse wave sub-signals, and perform grayscale mapping processing on the numerical matrix to obtain a corresponding spatiotemporal feature image; the above method can convert the difference pulse wave signal of the target object into changes in time and space, and present it in the form of a two-dimensional image to obtain a spatiotemporal feature image, so that the characteristics of the difference pulse wave signal are more intuitive and clear, which is convenient for observing and understanding the overall trend, periodic changes and various detailed information of the difference pulse wave signal, so as to provide effective information for further living body detection.
[0145] In one embodiment, the present application also provides a liveness detection method, which is applied to a computer device. The method includes the following process:
[0146] (1) performing feature point positioning processing on each image to be detected to obtain a plurality of feature points of interest in each image to be detected;
[0147] (2) for any image to be detected, determining a reference area and a corresponding background area of a target object in the image to be detected according to a plurality of feature points of interest in the image to be detected;
[0148] (3) Performing color space conversion processing according to the reference area to obtain the corresponding region of interest;
[0149] (4) For any region of interest, performing channel separation processing on pixel points in the region of interest to obtain a plurality of first channel information corresponding to the region of interest;
[0150] (5) averaging the information of each first channel to obtain the original rPPG signal corresponding to the region of interest; and
[0151] (6) For any background area, performing channel separation processing on the pixels in the background area to obtain a plurality of second channel information corresponding to the background area;
[0152] (7) averaging the second channel information respectively to obtain the original noise signal corresponding to the background area;
[0153] (8) constructing an orthogonal chromaticity signal of interest according to each original rPPG signal, and determining a corresponding heart rate signal of interest according to the orthogonal chromaticity signal of interest; and constructing a background orthogonal chromaticity signal according to each original noise signal, and determining a candidate noise signal according to the background orthogonal chromaticity signal;
[0154] (9) filtering each heart rate signal of interest to obtain a corresponding pulse wave signal of interest; and filtering each candidate noise signal to obtain a corresponding target noise signal;
[0155] (10) performing denoising processing on each pulse wave signal of interest based on each target noise signal to obtain a plurality of difference pulse wave signals of the target object;
[0156] (11) acquiring at least one group of difference pulse wave signals from each difference pulse wave signal according to the first sliding window and the first sliding step size;
[0157] (12) for each group of difference pulse wave signals, obtaining a plurality of groups of difference pulse wave sub-signals from the current group of difference pulse wave signals according to the second sliding window and the second sliding step; the current group of difference pulse wave signals is any group of difference pulse wave signals;
[0158] (13) constructing a numerical matrix according to the multiple groups of differential pulse wave sub-signals, and performing grayscale mapping processing on the numerical matrix to obtain a corresponding spatiotemporal feature image;
[0159] (14) Input each spatiotemporal feature image into a living body detection model to determine whether the target object is alive.
[0160] The execution process of the above (1) to (14) can be specifically referred to the description of the above embodiment. The implementation principles and technical effects are similar and will not be repeated here.
[0161] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0162] Based on the same inventive concept, the embodiment of the present application also provides a liveness detection device for implementing the liveness detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the liveness detection device provided below can refer to the limitations of the liveness detection method above, and will not be repeated here.
[0163] In one embodiment, Fig.14This is a schematic diagram of the structure of a liveness detection device in one embodiment of the present application. The liveness detection device provided in the embodiment of the present application can be applied to computer equipment. Fig.14 As shown, the liveness detection device of the embodiment of the present application may include: an acquisition module 11, a determination module 12, a conversion processing module 13 and a detection module 14, wherein:
[0164] An acquisition module 11 is used to acquire an original rPPG signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each image to be detected;
[0165] A determination module 12, configured to determine a plurality of difference pulse wave signals corresponding to the target object according to each original rPPG signal and each original noise signal;
[0166] A conversion processing module 13 is used to convert each difference pulse wave signal based on a sliding window method to obtain multiple spatiotemporal characteristic images of the target object;
[0167] The detection module 14 is used to input each spatiotemporal feature image into a living body detection model to determine whether the target object is a living body.
[0168] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0169] In one embodiment, the acquisition module 11 includes: an acquisition unit and a determination unit, wherein:
[0170] An acquisition unit, used for acquiring a region of interest of a target object in each image to be detected and a background region in each image to be detected;
[0171] The determination unit is used to perform channel processing according to the pixel points in each region of interest to determine the original rPPG signal corresponding to each region of interest; and perform channel processing according to the pixel points in each background region to determine the original noise signal corresponding to each background region.
[0172] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0173] In one embodiment, the acquisition unit is specifically used for:
[0174] Perform feature point positioning processing on each image to be detected to obtain multiple feature points of interest in each image to be detected;
[0175] For any image to be detected, a reference area and a corresponding background area of a target object in the image to be detected are determined according to a plurality of feature points of interest in the image to be detected;
[0176] The color space conversion process is performed according to the reference area to obtain the corresponding region of interest.
[0177] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0178] In one embodiment, the determining unit includes: an original channel separation subunit and an original acquisition subunit:
[0179] The original channel separation subunit is used for performing channel separation processing on the pixel points in any region of interest to obtain a plurality of first channel information corresponding to the region of interest;
[0180] The original acquisition subunit is used to average the information of each first channel respectively to obtain the original rPPG signal corresponding to the region of interest.
[0181] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0182] In one embodiment, the determining unit includes: a second channel separation subunit and a second acquisition subunit:
[0183] A second channel separation subunit is used for performing channel separation processing on the pixels in any background area to obtain a plurality of second channel information corresponding to the background area;
[0184] The second acquisition subunit is used to calculate the average of each second channel information respectively to obtain the original noise signal corresponding to the background area.
[0185] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0186] In one embodiment, the determination module 12 includes: a heart rate signal determination unit, a filtering processing unit and a denoising processing unit, wherein:
[0187] a heart rate signal determination unit, configured to construct an orthogonal chromaticity signal of interest according to each original rPPG signal, and determine a corresponding heart rate signal of interest according to the orthogonal chromaticity signal of interest; and to construct a background orthogonal chromaticity signal according to each original noise signal, and determine a candidate noise signal according to the background orthogonal chromaticity signal;
[0188] A filtering processing unit, configured to filter each heart rate signal of interest to obtain a corresponding pulse wave signal of interest; and filter each candidate noise signal to obtain a corresponding target noise signal;
[0189] The denoising processing unit is used to perform denoising processing on each pulse wave signal of interest based on each target noise signal to obtain a plurality of difference pulse wave signals of the target object.
[0190] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0191] In one embodiment, the conversion processing module 13 is specifically used for:
[0192] acquiring at least one group of difference pulse wave signals from each difference pulse wave signal according to the first sliding window and the first sliding step size;
[0193] For each group of difference pulse wave signals, a plurality of groups of difference pulse wave sub-signals are obtained from the current group of difference pulse wave signals according to the second sliding window and the second sliding step size; the current group of difference pulse wave signals is any group of difference pulse wave signals;
[0194] A numerical matrix is constructed according to multiple groups of differential pulse wave sub-signals, and the corresponding spatiotemporal feature image is obtained by grayscale mapping the numerical matrix.
[0195] The liveness detection device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned liveness detection method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0196] For the specific definition of the liveness detection device, please refer to the definition of the liveness detection method above, which will not be repeated here. Each module in the above-mentioned liveness detection device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0197] In one embodiment, a computer device is also provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.15As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide processing power. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store backup data of the logical disk. The network interface of the computer device is used to communicate with an external endpoint through a network connection. When the computer program is executed by the processor, a method for detecting a living body is implemented.
[0198] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0199] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned living body detection method embodiment of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0200] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the above-mentioned liveness detection method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0201] In one embodiment, a computer program product is also provided, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned liveness detection method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0202] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database 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 may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.
[0204] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for detecting a living body, characterized in that: The method comprises: Acquire an original rPPG signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each of the images to be detected; Determining a plurality of difference pulse wave signals corresponding to the target object according to each of the original rPPG signals and each of the original noise signals; Based on the sliding window method, each of the difference pulse wave signals is converted and processed to obtain a plurality of spatiotemporal characteristic images of the target object; Each of the spatiotemporal feature images is input into a living body detection model to determine whether the target object is a living body.
2. The method according to claim 1, characterized in that: The obtaining of the original rPPG signal corresponding to the region of interest of the target object in the plurality of images to be detected and the original noise signal corresponding to the background region in each of the images to be detected includes: Acquire the region of interest of the target object in each of the images to be detected and the background region in each of the images to be detected; Channel processing is performed according to the pixel points in each of the regions of interest to determine the original rPPG signal corresponding to each of the regions of interest; and channel processing is performed according to the pixel points in each of the background regions to determine the original noise signal corresponding to each of the background regions.
3. The method according to claim 2, characterized in that The step of acquiring the region of interest of the target object in each of the images to be detected and the background region in each of the images to be detected includes: Performing feature point positioning processing on each of the images to be detected to obtain a plurality of feature points of interest in each of the images to be detected; For any image to be detected, determining a reference area and a corresponding background area of the target object in the image to be detected according to a plurality of feature points of interest in the image to be detected; A color space conversion process is performed according to the reference region to obtain a corresponding region of interest.
4. The method according to claim 2 or 3, characterized in that: The performing channel processing according to the pixel points in each of the regions of interest to determine the original rPPG signal corresponding to each of the regions of interest includes: For any region of interest, performing channel separation processing on pixel points in the region of interest to obtain a plurality of first channel information corresponding to the region of interest; The first channel information is averaged respectively to obtain the original rPPG signal corresponding to the region of interest.
5. The method according to claim 2 or 3, characterized in that: The performing channel processing according to the pixel points in each of the background areas to determine the original noise signal corresponding to each of the background areas includes: For any background area, performing channel separation processing on pixel points in the background area to obtain a plurality of second channel information corresponding to the background area; The second channel information is averaged respectively to obtain the original noise signal corresponding to the background area.
6. The method according to any one of claims 1 to 3, characterized in that The step of determining a plurality of difference pulse wave signals corresponding to the target object according to each of the original rPPG signals and each of the original noise signals comprises: constructing an orthogonal chromaticity signal of interest according to each of the original rPPG signals, and determining a corresponding heart rate signal of interest according to the orthogonal chromaticity signal of interest; and constructing a background orthogonal chromaticity signal according to each of the original noise signals, and determining a candidate noise signal according to the background orthogonal chromaticity signal; Filtering each of the heart rate signals of interest to obtain a corresponding pulse wave signal of interest; and filtering each of the candidate noise signals to obtain a corresponding target noise signal; Based on each of the target noise signals, each of the pulse wave signals of interest is subjected to denoising processing to obtain a plurality of difference pulse wave signals of the target object.
7. The method according to any one of claims 1 to 3, characterized in that The method of converting each of the difference pulse wave signals based on the sliding window method to obtain a plurality of spatiotemporal characteristic images of the target object includes: Acquire at least one group of difference pulse wave signals from each of the difference pulse wave signals according to the first sliding window and the first sliding step size; For each group of difference pulse wave signals, a plurality of groups of difference pulse wave sub-signals are obtained from the current group of difference pulse wave signals according to the second sliding window and the second sliding step size; the current group of difference pulse wave signals is any group of difference pulse wave signals; A numerical matrix is constructed according to the plurality of groups of difference pulse wave sub-signals, and a grayscale mapping process is performed on the numerical matrix to obtain a corresponding spatiotemporal characteristic image.
8. A living body detection device, characterized in that: The device comprises: An acquisition module, used to acquire an original rPPG signal corresponding to a region of interest of a target object in a plurality of images to be detected and an original noise signal corresponding to a background region in each of the images to be detected; a determination module, configured to determine a plurality of difference pulse wave signals corresponding to the target object according to each of the original rPPG signals and each of the original noise signals; A conversion processing module, used for converting each of the difference pulse wave signals according to a preset sliding window to obtain a plurality of spatiotemporal characteristic images of the target object; The detection module is used to input each of the spatiotemporal feature images into a living body detection model to determine whether the target object is a living body.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.