Face spoofing detection method and device, equipment, storage medium and computer program product
By performing noise extraction and feature encoding on face videos, and using the statistical properties of noise videos to perform face fraud detection, the cumbersome detection problems in the prior art are solved, and efficient recognition of face images with greater diversity is achieved.
Patent Information
- Application Number
- CN202410935530.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-15
AI Technical Summary
When facing a diverse face image, existing face deception detection technology needs to continuously add new feature textures, resulting in cumbersome detection and inefficient efficiency.
By extracting noise from the face video to be tested, the noise video is obtained, and feature extraction and encoding of the noise video is obtained to obtain a global feature vector. Face deception detection is performed based on this vector, and the noise video using real faces has specific statistical properties. , the noise of false faces is discontinuous or inconsistent, achieving rapid recognition.
No texture features need to be obtained, the face deception detection process is simplified, the detection efficiency of face images with greater diversity is improved, and a simpler and more effective face deception detection is achieved.
Smart Images

Figure CN118968581A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biometric information recognition technology, and in particular to a face spoofing detection method, device, equipment, storage medium and computer program product. Background Art
[0002] As an important biometric technology, face recognition technology has been widely used in various fields, such as mobile phone unlocking, security monitoring, payment systems, etc. With the popularization of technology, people's demand for system security and anti-fraud behavior is also increasing. However, face recognition systems are at risk of being deceived by synthetic faces or other means used by attackers, namely face spoofing. This deception may threaten the security of the system, leak the user's privacy information, and may even cause serious economic losses. In order to prevent face spoofing, researchers and engineers have been working hard to study and develop various face spoofing detection technologies.
[0003] Currently, texture-based methods are generally used to detect faces by extracting texture features of face images based on the principle that real face texture is continuous while the texture of forged face images is discontinuous. However, since texture features need to determine feature textures and obtain detection results based on special texture comparison, new feature textures need to be continuously added to face images with large diversity in order to perform face spoofing detection, which leads to the problem of cumbersome face spoofing detection.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a face spoofing detection method, device, equipment, storage medium and computer program product, aiming to solve the technical problem that when the existing technology faces a large diversity of face images, it is necessary to continuously add new feature textures to perform face spoofing detection, resulting in cumbersome face spoofing detection.
[0006] To achieve the above objectives, the present application proposes a face spoofing detection method, the method comprising:
[0007] Perform noise extraction on the face video to be tested, and obtain a noise video based on the noise extraction result;
[0008] Extracting features from the noise video, and encoding the extraction results to obtain a global feature vector;
[0009] Perform face spoofing detection on the face video to be tested based on the global feature vector.
[0010] In one embodiment, the step of extracting features from the noise video and encoding the extraction results to obtain a global feature vector includes:
[0011] Randomly extracting local blocks of the noise video, and training a preset model through the local blocks;
[0012] The noise video is densely sampled, and encoded according to the sampling result and the training result to obtain a global feature vector.
[0013] In one embodiment, the step of training the preset model through the local block includes:
[0014] vectorizing the local block;
[0015] Filtering the vectorization result by using a preset filter to obtain a feature vector of the local block;
[0016] The preset model is trained according to the feature vector.
[0017] In one embodiment, the step of extracting noise from the face video to be tested includes:
[0018] Extract frames from the face video to be detected to obtain a set of face images to be detected;
[0019] Noise extraction is performed based on the face image set to be tested to obtain a noise image set.
[0020] In one embodiment, the step of performing noise extraction based on the face image set to be tested to obtain a noise image set includes:
[0021] De-noising the face image set to be tested to obtain a de-noised image set;
[0022] A noisy image set is obtained based on the face image set to be tested and the denoised image set.
[0023] In one embodiment, the step of performing noise extraction on the face video to be tested and obtaining a noisy video based on the noise extraction result includes:
[0024] Perform color space conversion on the face video to be detected according to the preset channel;
[0025] Noise extraction is performed on the conversion result, and a noise video is obtained based on the noise extraction result.
[0026] In addition, to achieve the above purpose, the present application also proposes a face spoofing detection device, the device comprising:
[0027] A noise extraction module is used to extract noise from the face video to be tested, and obtain a noisy video based on the noise extraction result;
[0028] A feature extraction module, used for extracting features from the noise video and encoding the extraction results to obtain a global feature vector;
[0029] A detection module is used to perform face spoofing detection on the face video to be tested based on the global feature vector.
[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a face spoofing detection device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the face spoofing detection method as described above.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the face spoofing detection method described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the face spoofing detection method described above.
[0033] The present application proposes a face spoofing detection method, characterized in that the method includes: performing noise extraction on a face video to be tested, and obtaining a noise video based on the noise extraction result; performing feature extraction on the noise video, and encoding the extraction result to obtain a global feature vector; and performing face spoofing detection on the face video to be tested based on the global feature vector. The present application can extract noise from the face video to be tested, obtain a noise video based on the noise extraction result, obtain a global feature vector based on the noise video, and perform face spoofing detection on the face video based on the global feature vector. The noise video of a real face usually has specific statistical properties, while the noise of a fake face is discontinuous or inconsistent, so as to recognize the face image. Compared with the existing method, when facing a face video with greater diversity, there is no need to continuously add new feature textures. It only needs to extract the noise video of the face video to perform spoofing detection on the face video, thereby achieving a simpler and more effective face spoofing detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 A flowchart of a first embodiment of a face spoofing detection method proposed in an embodiment of the present application;
[0037] Figure 2 A flowchart of a second embodiment of the face spoofing detection method proposed in an embodiment of the present application;
[0038] Figure 3 This is the training result diagram of support vector machine in different color spaces;
[0039] Figure 4 A diagram of a face spoofing detection device provided in an embodiment of the present application;
[0040] Figure 5 A structural schematic diagram of a face spoofing detection device suitable for implementing an embodiment of the present application.
[0041] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0045] Understandably, as an important biometric technology, face recognition technology has been widely used in various fields, such as mobile phone unlocking, security monitoring, payment systems, etc. With the popularization of technology, people's demand for system security and anti-fraud behavior is also increasing. However, face recognition systems face the risk of being deceived by synthetic faces or other means used by attackers, that is, face spoofing. This deception may lead to threats to the security of the system, leakage of users' privacy information, and even serious economic losses. In order to prevent face spoofing, researchers and engineers have been working hard to study and develop various face spoofing detection technologies.
[0046] Existing texture-based methods generally use the principle that the texture of real faces is continuous while the texture of forged face images is often discontinuous to extract texture features of face images for face detection. However, since texture features mainly focus on local details of the face, their generalization performance may be limited for face images with greater diversity, resulting in the problem of low efficiency in face spoofing detection.
[0047] Therefore, in order to solve the technical problem that the generalization performance of the prior art is limited to a certain extent when facing face images with a large diversity, resulting in low efficiency of face spoofing detection, this embodiment proposes a face spoofing detection method, the method comprising: performing noise extraction on the face video to be tested, and obtaining a noise video based on the noise extraction result; performing feature extraction on the noise video, and encoding the extraction result to obtain a global feature vector; and performing face spoofing detection on the face video to be tested based on the global feature vector. Since the present application can perform noise extraction on the face video to be tested, obtain a noise video based on the noise extraction result, and obtain a global feature vector based on the noise video, and based on the global feature, the noise video of the real face usually has specific statistical properties, while the noise of the fake face will be inconsistent, so as to identify the face image, compared with the existing method, there is no need to obtain texture features, and a simpler and more effective face spoofing detection is achieved.
[0048] For ease of understanding, the following combination Figures 1 to 5 The face spoofing detection method provided in the embodiment of the present application and the face spoofing detection method, apparatus, device, storage medium and computer program product provided in the following embodiments are introduced in detail.
[0049] It should be noted that the execution subject of this embodiment can be a computing service device with face spoofing detection, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a face spoofing detection device as an example to illustrate this embodiment and the following embodiments.
[0050] The present invention provides a method for detecting face spoofing. Figure 1 , Figure 1 This is a flowchart of the first embodiment of the face spoofing detection method proposed in the embodiments of the present application.
[0051] like Figure 1 As shown, the method includes:
[0052] Step S10: extracting noise from the face video to be tested, and obtaining a noisy video based on the noise extraction result.
[0053] It should be noted that the above-mentioned face video to be detected can be a face video uploaded by a user for detection or a face video taken by the device's own camera. This embodiment does not limit this. However, considering the flexibility of face spoofing detection, this embodiment uses an uploaded face video for illustration. The above-mentioned noise video can be a video generated by a noise set of the above-mentioned face video. In a specific implementation, when the above-mentioned face spoofing detection device receives a face video to be detected uploaded by a user, it performs noise extraction on the face video to be detected, and obtains a noise video based on the result of the noise extraction.
[0054] In addition, it should be noted that in real face images, noise usually has specific statistical properties, while in fake face images, since they are generated through digital synthesis or other false means, the noise is often unreal or inconsistent. Noise characteristics can be used to distinguish real faces from deceptive faces.
[0055] Furthermore, in order to obtain the above-mentioned noisy video, the step of extracting noise from the face video to be tested includes:
[0056] Step S11: extract frames from the face video to be detected to obtain a set of face images to be detected.
[0057] It should be noted that frame extraction can be the action of selectively extracting independent frames from a video according to a certain time interval or specific conditions, and converting continuous video data into a static image sequence. The above-mentioned frame extraction can be time interval frame extraction, content-based frame extraction, motion detection frame extraction, etc. This embodiment uses time interval frame extraction for illustration, but does not limit this embodiment. The above-mentioned set of face images to be detected can be a set of a series of face images obtained by frame extraction and used for face detection, recognition or other related analysis.
[0058] In a specific implementation, when the face spoofing detection device receives a face video to be detected uploaded by a user, it extracts frames from the face video to be detected at a preset time interval to obtain a set of face images to be detected.
[0059] Step S12: performing noise extraction based on the face image set to be tested to obtain a noise image set.
[0060] It should be noted that the above-mentioned noise image set may be a set of a series of images containing noise components in the original face image after noise extraction processing.
[0061] It is understandable that the above-mentioned noise extraction can be achieved through a variety of methods, such as filtering method, wavelet transform, frequency domain analysis, etc., which are not limited in this embodiment, but considering the simplicity of operation, this embodiment adopts filtering to obtain the above-mentioned noise image set. In a specific implementation, when the above-mentioned face detection device obtains a set of face images to be detected, each image in the set is subjected to noise extraction by filtering to obtain a noise image of each image, and each of the above-mentioned noise images is merged into a noise image set.
[0062] Furthermore, in order to obtain the above-mentioned noisy image set, step S12 includes:
[0063] Step S121: denoising the face image set to be tested to obtain a denoised image set.
[0064] It should be noted that the above denoising may refer to the process of reducing or removing unnecessary noise in an image using an algorithm or technology, which may be achieved through a variety of methods. This embodiment uses Gaussian filtering to achieve denoising, but this is not limited to this embodiment. The above denoised image set may be a set of a series of images that contain the original face image but have reduced or eliminated noise content after denoising.
[0065] It is important to understand that Gaussian filtering is an image processing technique that uses a Gaussian function (also known as a normal distribution function) as a convolution kernel to perform a convolution operation on an image in order to smooth the image and remove noise. Gaussian filtering is a linear filtering method that processes each pixel in an image by weighted averaging, where the weight is determined by the distance between the pixel and the center point according to the Gaussian distribution.
[0066] In a specific implementation, when the above-mentioned face detection device obtains a set of face images to be detected, each image in the set is subjected to denoising by Gaussian filtering to obtain a denoised image of each image, and each of the above-mentioned denoised images is merged into a denoised image set.
[0067] Step S122: obtaining a noise image set based on the face image set to be tested and the denoised image set.
[0068] It should be understood that by comparing the above-mentioned face image to be tested and the image after denoising, the difference parts therein can be extracted to generate an image set containing only noise components.
[0069] In a specific implementation, when the above-mentioned face spoofing detection device obtains the denoised image set and the face image set to be tested, it subtracts the denoised image corresponding to the face image to be tested from the face image to be tested to obtain the noise image. The noise extraction formula is:
[0070] N = XX * G;
[0071] Wherein, X represents the face image to be tested, G represents the Gaussian filter formula, X*G represents the denoised image, and N represents the extracted noise information. The obtained noise images are merged into a noise image set.
[0072] Step S20: extracting features from the noise video, and encoding the extraction results to obtain a global feature vector.
[0073] It should be noted that the above-mentioned feature extraction can be a process of identifying and extracting the most representative information from the original data. In video analysis, feature extraction usually involves the extraction of visual characteristics such as color, texture, shape, motion, etc., which is not limited in this embodiment. The above-mentioned encoding can be a process of converting the extracted features into a format that is more suitable for computer processing and storage. The above-mentioned encoding can be linear or non-linear, which is not limited in this embodiment, and is used to reduce the dimension of the data while retaining the most important information. The above-mentioned global feature vector can be a vector containing the overall characteristics of the video, which is used to merge multiple features of the video into a point in a high-dimensional space to represent the overall attributes of the video content.
[0074] In a specific implementation, when the above-mentioned face spoofing detection device obtains the above-mentioned noise image set, it will first generate a noise video based on the set, perform feature extraction based on the noise video, and encode and generate a global feature vector based on the above-mentioned feature extraction result.
[0075] Step S30: performing face spoofing detection on the face video to be tested based on the global feature vector.
[0076] It should be noted that the above-mentioned detection can be performed through a trained machine learning model. The above-mentioned machine learning model can be an algorithm in a computer system, which can learn from data and make predictions or decisions based on the learned knowledge. The model learns through training data sets in order to perform specific tasks on new, unseen data. The above-mentioned learning models include: linear models, support vector machines, naive Bayes classifiers, etc. This embodiment uses a support vector machine for illustration, but does not specifically limit this embodiment.
[0077] In addition, it should be noted that before performing the above-mentioned face spoofing detection, it is necessary to collect a large number of real face videos and deceptive face videos (such as synthetic faces, masks, photos, etc.), and extract global feature vectors from these videos. Then, these feature vectors are used to train the machine learning model and select features based on the training results.
[0078] In a specific implementation, after the face spoofing detection device obtains the global feature vector, the obtained global feature vector is input into the trained support vector machine so that the support vector machine can recognize and determine whether the face in the video is a real face.
[0079] This embodiment proposes a face spoofing detection method, the method comprising: performing noise extraction on a face video to be tested, obtaining a noise video based on the noise extraction result; performing feature extraction on the noise video, encoding the extraction result, obtaining a global feature vector; and performing face spoofing detection on the face video to be tested based on the global feature vector. This embodiment can extract noise from the face video to be tested, obtain a noise video based on the noise extraction result, obtain a global feature vector based on the noise video, and perform face spoofing detection on the face video based on the global feature vector. The face image is recognized by using the fact that the noise video of a real face usually has specific statistical properties, while the noise of a fake face is often discontinuous or inconsistent. Compared with the existing method, when facing a face video with greater diversity, there is no need to continuously add new feature textures. It only needs to extract the noise video of the face video to perform spoofing detection on the face video, thereby achieving simpler and more effective face spoofing detection.
[0080] Based on the first embodiment, in the second embodiment, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be described in detail later. Figure 2 , Figure 2 This is a flow chart of the second embodiment of the face spoofing detection method proposed in the embodiment of the present application, step S10 also includes steps S101-S102:
[0081] Step S101: performing color space conversion on the face video to be detected according to a preset channel;
[0082] It should be noted that the color space refers to a mathematical model used to describe color. It defines how color is represented mathematically and how to convert color from one coordinate system to another. Different color spaces use different color models to represent color. Each model has its specific application scenarios and advantages. Common color spaces include: Red-Green-Blue (RGB) color space, Hue-Saturation-Value (HSV) and brightness component, blue chromaticity component, red chromaticity component (Luminance-Blue-differenceChrominance-Red-difference Chrominance, YCbCr), etc. This embodiment does not limit this. However, based on experimental analysis, reference Figure 3 , Figure 3 The following are the training results of the support vector machine in different color spaces, where the ordinates are the error rate (Equal Error Rate, EER) and the half total error rate (Half Total Error Rate, HTER), and the abscissa is the size of the random subspace (D). Figure 3 As shown, in the process of training the above-mentioned support vector machine, the EER and HTER of the above-mentioned YCbCr in random subspaces of different sizes for face spoofing detection are lower than those of RGB and HSV, and when considering the application of color space combination, the combination of RGB and YCbCr is better than the combination of HSV and YCbCr and RGB and HSV in most cases, but it is still not as good as the effect of using YCbCr alone. Furthermore, when the three color spaces are combined at the same time, the EER and HTER are both reduced to 0. Although the combination of RGB, HSV, and YCbCr performs best, its performance is not significantly different from that when only YCbCr is used. Taking into account the dimensionality and computational complexity, it is more efficient to use YCbCr alone. This embodiment uses YCbCr for illustration, but does not make specific restrictions. In addition, it should be understood that the face video obtained by the shooting device is generally an RGB space video.
[0083] Step S102: extracting noise from the conversion result, and obtaining a noise video based on the noise extraction result.
[0084] In a specific implementation, when the face spoofing detection device receives a face video to be detected uploaded by a user, it converts the face video to be detected from RGB space to YCbCr space, performs noise extraction on the conversion result, and obtains a noisy video based on the extraction result.
[0085] In addition, in order to extract features from the above-mentioned noisy video, this embodiment uses random projection to extract features. Random projection is a linear transformation technology that maps high-dimensional data to a lower-dimensional space by performing random linear transformation on the original data.
[0086] refer to Figure 2 , step S20 comprises:
[0087] Step S21: randomly extracting local blocks of the noise video, and training a preset model through the local blocks.
[0088] It should be understood that the above-mentioned local blocks can be small areas extracted from video frames, which contain noise components in the video. The above-mentioned preset model can be a pre-designed machine learning model for identifying and classifying noise. This embodiment uses a Gaussian mixture model for illustration, but it is not a limitation of this embodiment. In a specific implementation, when the above-mentioned face spoofing detection device obtains a noisy video, it randomly extracts local blocks of a preset size and a preset number, and trains a Gaussian mixture model (GMM) according to each of the above-mentioned extracted local blocks.
[0089] Furthermore, in order to obtain, the step of training the preset model of the local block includes:
[0090] Step S211: vectorize the local block.
[0091] It should be understood that the above-mentioned vectorization may refer to a process of converting pixel values in an image into a one-dimensional array, with the purpose of vectorizing the parts on each color channel of the color space where the above-mentioned local block is located.
[0092] Step S212: filtering the vectorization result through a preset filter to obtain a feature vector of the local block.
[0093] It should be understood that the above-mentioned preset filter may refer to a filter pre-defined in image processing, such as a Gaussian filter, a median filter, a sharpening filter, etc. These filters can adjust their parameters as needed to achieve different filtering effects. In this embodiment, the preset filter is used to randomly filter the quantization result to obtain a random feature vector.
[0094] Step S213: training a preset model according to the feature vector.
[0095] For ease of understanding, the following examples are given but are not intended to limit this embodiment. It should be noted that the face spoofing detection method proposed in this embodiment has 6 parameters, namely the number of color channels (n), the size of the sampling block (s), the number of sample blocks extracted from each training sample (S), the size of the random subspace (D), the size of the filter convolution kernel l, and the number of Gaussian components in the trained GMM (k). When the above-mentioned face spoofing detection device detects a noisy video, it will obtain noisy videos of 9 color channels (denoted as C∈{R,G,B,H,S,V,Y,Cb,Cr}), randomly extract S three-dimensional local blocks (local block size L=s×s×s), and for each local block, each channel c (c∈C) is vectorized to obtain a vectorized result: x ci ∈R L (1≤i≤S). In order to avoid the extracted random features being either all positive or all negative, we set x ci Normalize to zero mean x':
[0096] x'=xci-mean(xci)
[0097] Where mean(x ci ) is the average of the vectorized results.
[0098] Then, we create a random subspace: W = [w1,w2,w3,...,w D ]∈R L×D , and the random projection onto the vectorized result is:
[0099]
[0100] n represents the number of color channels. For example, when we use RGB space, n = 3. Therefore, the random feature is expressed as Then, the random features of multiple channels are sequentially connected into a vector, namely the feature vector f i ∈R nL (i=1,...,n).
[0101] The same process is also applicable to YCbCr and HSV space. Finally, the features of all M training videos are stored in the feature matrix F1 = [f1,f2,f3,...,f MS ]∈R nL×MS In order to prepare for the next step, M is a preset parameter.
[0102] After extracting random features, we use the principle that trained GMM can generate samples similar to the original data to train the GMM model. In this step, we need to fit a GMM containing K components on the training feature set through the expectation maximization algorithm. The parameter set of GMM is θ, θ = {μ k ,σ k ,π k}(k=1,2....K), where μ k , σ k , π k are the variance, mean and weight of the kth Gaussian component respectively. These parameters jointly determine the distribution of the data.
[0103] Step S22: densely sample the noise video, and encode it according to the sampling result and the training result to obtain a global feature vector.
[0104] It should be understood that the dense sampling can be dense sampling in a noisy video, that is, extracting an image sample from the video every short time interval (such as a few frames) to ensure that the key information in the video is fully captured. The training result can be the parameters obtained by the GMM training.
[0105] In a specific implementation, the face spoofing detection densely samples the preset positions of the noise video to obtain the features of different color channels of the noise video in the color space, and concatenates them into a feature matrix, and encodes the feature vector according to the matrix and the parameters obtained by the training to obtain a global feature vector.
[0106] For ease of understanding, the following examples are given but are not intended to limit this embodiment. When a noisy video is received, dense sampling is performed at each valid position in a given video, with a size of X×Y×Z (border filling is not considered during sampling), where X, Y, and Z are configurable constants, and the total number of sampling blocks N
[0107]
[0108] Subsequently, random features are extracted from multiple selected channels and concatenated into a matrix
[0109] F2=[f1',f2',f3',...,f N ']∈R nL×N .
[0110] Then, we define a variable To represent each local feature f i The weight relative to the k-th Gaussian component is defined as follows:
[0111]
[0112] Among them, N k is the probability density function of the kth Gaussian distribution component.
[0113] Afterwards, the soft-assigned weights are used for FV encoding to calculate and They represent the first-order and second-order gradients of the local features to the k-th Gaussian component. The specific formula is as follows:
[0114]
[0115] Finally, all the calculated and Spliced together to form a global feature vector
[0116]
[0117] In addition, it should be understood that after obtaining the above-mentioned global feature vector, the global feature vector can also be normalized to enhance the stability of the face spoofing detection.
[0118] It should be noted that the above examples are only used to understand the present embodiment and do not constitute a limitation on the face spoofing detection method of the present embodiment. More simple transformations based on this technical concept are all within the protection scope of the present embodiment.
[0119] This embodiment also provides a face spoofing detection device, please refer to Figure 4 , Figure 4 A diagram of a face spoofing detection device provided in an embodiment of the present application, wherein the face spoofing detection device comprises:
[0120] A noise extraction module 10 is used to extract noise from the face video to be tested, and obtain a noise video based on the noise extraction result;
[0121] A feature extraction module 20 is used to extract features from the noise video and encode the extraction results to obtain a global feature vector;
[0122] The detection module 30 is used to perform face spoofing detection on the face video to be tested based on the global feature vector.
[0123] The face spoofing detection device provided in this embodiment adopts the face spoofing detection method in the above embodiment, which can solve the technical problem that the generalization performance of the prior art is limited to a certain extent when facing face images with large diversity, resulting in low efficiency of face spoofing detection. Compared with the prior art, the beneficial effects of the face spoofing detection device provided in this embodiment are the same as the beneficial effects of the face spoofing detection method provided in the above embodiment, and other technical features in the face spoofing detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0124] The present embodiment provides a face spoofing detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the face spoofing detection method in the above-mentioned embodiment one.
[0125] Reference below Figure 5 , Figure 5 The face spoofing detection device in the embodiment of the present application is a schematic diagram of the structure. The face spoofing detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The face spoofing detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0126] like Figure 5As shown, the face spoofing detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the face spoofing detection device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the face spoofing detection device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a face spoofing detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0127] In particular, according to the present embodiment, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present embodiment includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present embodiment are executed.
[0128] The face spoofing detection device provided in this embodiment adopts the face spoofing detection method in the above embodiment, which can solve the technical problem that the generalization performance of the prior art is limited to a certain extent when facing face images with large diversity, resulting in low efficiency of face spoofing detection. Compared with the prior art, the beneficial effects of the face spoofing detection device provided in this embodiment are the same as the beneficial effects of the face spoofing detection method provided in the above embodiment, and other technical features in the face spoofing detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0129] It should be understood that the various parts disclosed in this embodiment can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0130] The above is only a specific implementation of this embodiment, but the protection scope of this embodiment is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this embodiment, which should be included in the protection scope of this embodiment. Therefore, the protection scope of this embodiment should be based on the protection scope of the claims.
[0131] This embodiment provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the face spoofing detection method in the above embodiment.
[0132] The computer-readable storage medium provided in this embodiment may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including, but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0133] The above-mentioned computer-readable storage medium may be included in the face spoofing detection device; or it may exist independently without being assembled into the face spoofing detection device.
[0134] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the face spoofing detection device, the face spoofing detection device performs face spoofing detection.
[0135] The computer program code for performing the operations of the present embodiment may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0136] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present embodiment. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] The modules involved in the description of this embodiment may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0138] The readable storage medium provided in this embodiment is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned face spoofing detection method, and can solve the technical problem that the generalization performance of the prior art is limited to a certain extent when facing face images with a large diversity, resulting in low efficiency of face spoofing detection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment are the same as the beneficial effects of the face spoofing detection method provided in the above-mentioned embodiment, and will not be repeated here.
[0139] This embodiment also provides a computer program product, including a computer program, which implements the steps of the above-mentioned face spoofing detection method when executed by a processor.
[0140] The computer program product provided in this embodiment can solve the technical problem that the generalization performance of the prior art is limited to a certain extent when facing face images with large diversity, resulting in low efficiency of face spoofing detection. Compared with the prior art, the beneficial effects of the computer program product provided in this embodiment are the same as the beneficial effects of the face spoofing detection method provided in the above embodiment, and will not be repeated here.
[0141] The above descriptions are only some embodiments, and are not intended to limit the patent scope of this embodiment. All equivalent structural changes made using the contents of the specification and drawings of this application under the technical concept of this application, or directly / indirectly applied in other related technical fields are included in the patent protection scope of this application.
Claims
1. A face spoofing detection method, characterized in that: The method comprises: Perform noise extraction on the face video to be tested, and obtain a noise video based on the noise extraction result; Extracting features from the noise video, and encoding the extraction results to obtain a global feature vector; Perform face spoofing detection on the face video to be tested based on the global feature vector.
2. The method according to claim 1, characterized in that The step of extracting features from the noise video and encoding the extraction results to obtain a global feature vector comprises: Randomly extracting local blocks of the noise video, and training a preset model through the local blocks; The noise video is densely sampled, and encoded according to the sampling result and the training result to obtain a global feature vector.
3. The method according to claim 2, characterized in that The step of training the preset model through the local block comprises: vectorizing the local block; Filtering the vectorization result by using a preset filter to obtain a feature vector of the local block; The preset model is trained according to the feature vector.
4. The method according to claim 1, characterized in that The step of extracting noise from the face video to be tested comprises: Extract frames from the face video to be detected to obtain a set of face images to be detected; Noise extraction is performed based on the face image set to be tested to obtain a noise image set.
5. The method according to claim 4, characterized in that The step of extracting noise based on the face image set to be tested to obtain a noise image set comprises: De-noising the face image set to be tested to obtain a de-noised image set; A noisy image set is obtained based on the face image set to be tested and the denoised image set.
6. The method according to any one of claims 1 to 5, characterized in that: The step of extracting noise from the face video to be tested and obtaining a noisy video based on the noise extraction result comprises: Perform color space conversion on the face video to be detected according to the preset channel; Noise extraction is performed on the conversion result, and a noise video is obtained based on the noise extraction result.
7. A face spoofing detection device, characterized in that: The device comprises: A noise extraction module is used to extract noise from the face video to be tested, and obtain a noisy video based on the noise extraction result; A feature extraction module, used for extracting features from the noise video and encoding the extraction results to obtain a global feature vector; A detection module is used to perform face spoofing detection on the face video to be tested based on the global feature vector.
8. A face spoofing detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the face spoofing detection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the face spoofing detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the face spoofing detection method according to any one of claims 1 to 6 are implemented.
