High-simulation face detection system and method, electronic device and storage medium
By introducing a weight custom module into the high-simulation face detection system, a customized weight matrix is generated, which solves the problem of limited accuracy of high-simulation face detection in the existing technology, and achieves higher detection accuracy and targeting.
Patent Information
- Application Number
- CN202410947024.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-07-15
AI Technical Summary
When faced with different forged features, the existing high-simulation face detection methods are limited in detection accuracy, making it difficult to effectively identify the authenticity of face pictures or videos.
A high-simulation face detection system is proposed, including a weight custom module and a face detector. The weight customization module generates a customized weight matrix through the face feature perception branch and the general detection information branch, which is used to adjust the weight of the layer to be adjusted in the face detector, thereby improving the pertinence and accuracy of the detection.
Through the use of customized weight matrix, the accurate recognition rate of face detectors for detecting the authenticity of faces in face images is improved, and the ability to recognize different forged features is enhanced.
Smart Images

Figure CN118942135B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a high-simulation face detection system and method, electronic equipment and storage medium. Background Art
[0002] In recent years, the rapid development of high-simulation face production technology has made it possible to forge other people's identities. Criminals use high-simulation faces to spread false news in cyberspace and bypass facial security system checks in security scenarios, which has great potential negative impacts. Therefore, in order to prevent the malicious use of high-simulation faces to the greatest extent and maintain social security and stability, effective and accurate high-simulation face detection methods are needed to identify the authenticity of face images or videos.
[0003] So far, researchers have developed both handcrafted feature-based and deep learning-based face detectors. On the one hand, classic handcrafted descriptors (e.g., local binary patterns (LBP)) exploit local relations as discriminative features, which are robust for describing detailed invariant information, such as color texture and moiré. On the other hand, convolutional neural networks (CNNs) have strong capabilities for face detection due to stacked convolution operations with nonlinear activations. Recent deep learning-based face detection methods are usually built on a backbone network based on image classification tasks. However, the forgery features of different faces vary with the forged faces and the forgery type, which limits the accuracy of face detection. Summary of the invention
[0004] In view of this, the present disclosure proposes a highly simulated face detection solution.
[0005] According to one aspect of the present disclosure, a high-simulation face detection system is provided, comprising:
[0006] A high-simulation face detection system, characterized in that the high-simulation face detection system comprises: a weight customization module and a face detector;
[0007] The weight customization module is used to obtain a customized weight matrix corresponding to the face image to be detected according to the face image to be detected, and the weights in the customized weight matrix are the weights corresponding to the layer to be adjusted in the face detector;
[0008] The face detector is used to detect the face image to be detected based on a customized weight matrix to obtain a detection result, and the detection result indicates the authenticity of the face in the face image to be detected.
[0009] In a possible implementation, the weight customization module includes: a facial feature perception branch, a general detection information branch, and a weight integration module;
[0010] The general detection information branch is used to determine a general weight matrix according to the general detection information;
[0011] The facial feature sensing branch is used to obtain a first weight matrix according to the face image to be detected, and the first weight matrix is used to determine the weights for face authenticity detection for the face and the forgery type in the image from the general weight matrix;
[0012] The weight integration module is used to perform a fusion operation on the first weight matrix and the general weight matrix to obtain the customized weight matrix.
[0013] In a possible implementation, the customized weight matrix includes a plurality of layer weight matrices, and the layer weight matrices correspond to the layers to be adjusted of the face detector;
[0014] The face detector is further used for:
[0015] Use the layer weight matrix to replace the weight matrix in the corresponding layer to be adjusted to obtain a customized layer;
[0016] Based on each of the customized layers and other layers, the face to be detected is detected to obtain the detection result.
[0017] In a possible implementation manner, the layer to be adjusted is a feature extraction layer.
[0018] In a possible implementation, the weight integration module is further used to: multiply the first weight matrix by corresponding elements of the general weight matrix to obtain the customized weight matrix.
[0019] In a possible implementation, the parameters of the general information detection branch include: the general detection information, the general information detection branch includes a first super network, and the training method of the high-simulation face detection system includes: obtaining a sample first weight matrix according to a face image sample; determining a sample general weight matrix according to the general detection information; fusing the sample first weight matrix with the sample general weight matrix to obtain a sample customized weight matrix, the sample customized weight matrix includes multiple sample layer weight matrices; using the sample layer weight matrix to replace the weight matrix in the corresponding first layer to be adjusted to obtain a first customized layer; based on each of the first customized layers and other layers, detecting the face image sample to obtain a first detection result; based on the difference between the first detection result and the true value, adjusting the parameters of the face detector, the parameters of the face feature perception branch, the parameters of the first super network, and the general detection information until the stopping condition is met and the training is stopped.
[0020] In one possible implementation, the facial feature perception branch includes a facial feature extractor and a second hypernetwork, and based on the difference between the first detection result and the true value, the parameters of the facial feature perception branch are adjusted, including: based on the difference between the first detection result and the true value, the parameters of the facial feature extractor and the second hypernetwork are adjusted.
[0021] According to another aspect of the present disclosure, a highly realistic face detection method is provided, the method comprising: obtaining a customized weight matrix corresponding to a face image to be detected based on the face image to be detected. Based on the customized weight matrix, the face to be detected is detected to obtain a detection result, the detection result indicating the authenticity of the face in the face image to be detected.
[0022] In a possible implementation, the method of obtaining a customized weight matrix corresponding to the face image to be detected based on the face image to be detected includes: determining a general weight matrix based on general detection information; obtaining a first weight matrix based on the face image to be detected, the first weight matrix being used to determine weights for face authenticity detection for faces and forgery types in the image from the general weight matrix; and fusing the first weight matrix with the general weight matrix to obtain the customized weight matrix.
[0023] In one possible implementation, the customized weight matrix includes multiple layer weight matrices, and the layer weight matrices correspond to the layers to be adjusted of the face detector; based on the customized weight matrix, the face to be detected is detected to obtain the detection result, including: using the layer weight matrix to replace the weight matrix in the corresponding layer to be adjusted to obtain the customized layer; based on each of the customized layers and other layers, the face to be detected is detected to obtain the detection result.
[0024] In a possible implementation manner, the layer to be adjusted is a feature extraction layer.
[0025] In a possible implementation, the first weight matrix is fused with the general weight matrix to obtain the customized weight matrix, including: multiplying the first weight matrix with corresponding elements of the general weight matrix to obtain the customized weight matrix.
[0026] In a possible implementation, the method is applied to a high-simulation face detection system, the high-simulation face detection system includes: a face feature perception branch, a general detection information branch, a weight integration module, and a face detector, the general detection information branch includes a first super network, and the parameters of the general detection information branch include general detection information. The training method of the high-simulation face detection system includes: obtaining a sample first weight matrix according to a face image sample; determining a sample general weight matrix according to the general detection information; fusing the sample first weight matrix with the sample general weight matrix to obtain a sample customized weight matrix, the sample customized weight matrix includes multiple sample layer weight matrices; using the sample layer weight matrix to replace the weight matrix in the corresponding first to-be-adjusted layer to obtain a first customized layer; based on each of the first customized layers and other layers, detecting the face image sample to obtain a first detection result; based on the difference between the first detection result and the true value, adjusting the parameters of the face detector, the parameters of the face feature perception branch, the parameters of the first super network, and the general detection information until the stop condition is met and the training is stopped.
[0027] In one possible implementation, the facial feature perception branch includes a facial feature extractor and a second hypernetwork, and based on the difference between the first detection result and the true value, the parameters of the facial feature perception branch are adjusted, including: based on the difference between the first detection result and the true value, the parameters of the facial feature extractor and the second hypernetwork are adjusted.
[0028] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0029] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0030] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0031] In the disclosed embodiment, the weight customization module can determine the weight corresponding to the layer to be adjusted based on the face image to be detected. The determined weights are determined based on the characteristics of the face to be detected and the type of forgery. In this way, the layer to be adjusted in the face detector can be adjusted according to the characteristics of the face to be detected. This makes the face detector more targeted every time it detects the face in the image. This improves the accuracy of determining the authenticity of the face in the face image to be detected.
[0032] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0034] Figure 1 A schematic diagram of the structure of a high-simulation face detection system provided in an embodiment of the present disclosure.
[0035] Figure 2 A flowchart of a highly realistic face detection method provided in an embodiment of the present disclosure.
[0036] Figure 3 A schematic diagram of the structure of an electronic device for high-simulation face detection provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0037] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0038] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0039] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0040] Figure 1 This is a schematic diagram of the structure of a high-simulation face detection system provided by an embodiment of the present disclosure. Figure 1As shown, the system 20 includes: a weight customization module 21 and a face detector 22; the weight customization module 21 is used to obtain a customized weight matrix corresponding to the face image to be detected according to the face image to be detected, and the weights in the customized weight matrix are the weights corresponding to the layer to be adjusted in the face detector 22; the face detector 22 is used to detect the face image to be detected based on the customized weight matrix to obtain a detection result, and the detection result indicates the authenticity of the face in the face image to be detected.
[0041] The face image to be detected may be an image containing the face to be detected. The face image to be detected may be an RGB image or a grayscale image. The face to be detected may be a real face or a highly simulated face.
[0042] The face detector 22 may include a neural network. The face detector 22 may include multiple layers, for example, a feature extraction layer, a prediction layer, a linear classification layer, etc. Each layer may include one or more sub-layers.
[0043] The layer to be adjusted may include one or more layers, and / or one or more sub-layers of the face detector 22. For example, the layer to be adjusted may be all feature extraction layers. For another example, the layer to be adjusted may be part of the feature extraction layer and the linear classification layer. The customized weight matrix may include a plurality of weights, which are weights corresponding to the layer to be adjusted and determined by the weight customization module 21 according to the face image to be detected. These weights may be the weights contained in each layer in the face detector. For example, these weights may be the weights for processing each part of the image and extracting the image feature vector in the feature extraction layer. For another example, these weights may be the connection weights between the latter neuron and the previous neuron in the fully connected layer.
[0044] Whether it is a real face or a highly simulated face, each has its own characteristics. Especially in the scenario of detecting the authenticity of the face in the image, the possibility that the characteristics and forgery types of the face to be detected are exactly the same is extremely low. In the disclosed embodiment, the weight customization module can determine the weight corresponding to the layer to be adjusted based on the face image to be detected. These weights are determined based on the characteristics and forgery types of the face to be detected. In this way, the layer to be adjusted in the face detector can be adjusted according to the characteristics of the face to be detected. This makes the face detector more targeted every time it detects the face in the image. The accuracy of determining the authenticity of the face in the face image to be detected is improved.
[0045] In one possible implementation, the weight customization module includes: a facial feature perception branch, a general detection information branch, and a weight integration module; the general detection information branch is used to determine a general weight matrix based on general detection information; the facial feature perception branch is used to obtain a first weight matrix based on the face image to be detected, and the first weight matrix is used to determine the weights for face authenticity detection for faces and forgery types in the image from the general weight matrix; the weight integration module is used to fuse the first weight matrix with the general weight matrix to obtain the customized weight matrix.
[0046] The general detection information may be a feature vector obtained after training the general detection information branch with a high-simulation face training set. The general detection information is built into the general detection information branch. The general detection information may be a feature vector extracted from a face image for operations such as face recognition and face classification. The general detection information branch includes a first super network. The first super network is used to determine a general weight matrix based on the general detection information. The weights in the general weight matrix are all the weights of the layer to be adjusted in the face detector. The weights of the general weight matrix are not targeted at different face images to be detected, and can be applied as general weights to each face image to be detected to extract the face feature vector comprehensively and without emphasis.
[0047] The faces in the facial images to be detected are different. For example: the textures are different; the contours, shapes and structures of the facial features are different, etc. Moreover, the forgery types of the faces in the highly simulated facial images are also different. For example: all or part of the facial features of the highly simulated face are replaced. Another example: part of the facial features of the highly simulated face are superimposed or fused. Another example: the contour of the highly simulated face is replaced. Another example: the skin texture of the highly simulated face is replaced. The above are only examples, and the embodiments of the present disclosure do not limit the forgery types. For the sake of ease of description, the simulated facial features are named forgery features, and the forgery features may be different due to different forged faces and forgery types.
[0048] The facial feature perception branch includes a facial feature extractor and a second super network. The facial feature extractor extracts a facial feature vector from the face image to be detected. The facial feature vector is different from the general detection information. The second super network determines a first weight matrix based on the facial feature vector. The weights in the first weight matrix are weight matrices determined based on the facial features of the face to be detected and the forgery type of the face to be detected. The first weight matrix helps the layer to be adjusted to process the forged features.
[0049] In one example, the facial feature perception branch may include multiple second super networks. A single second super network may correspond to a single layer or sublayer in the layer to be adjusted. The first weight matrix determined by the single second super network may be applied to a single layer or a single sublayer in the layer to be adjusted.
[0050] In the disclosed embodiment, the first weight matrix and the general weight matrix may be fused to obtain a customized weight matrix. The customized weight matrix may be a weight matrix obtained by filtering the general weight matrix with the first weight matrix. Alternatively, the customized weight matrix may be a first weight matrix processing the general weights so that some weights in the general weight matrix are conducive to extracting facial feature vectors that characterize forged features.
[0051] In the disclosed embodiment, the general detection information branch determines a general weight matrix applicable to each face image to be detected, and the face feature perception branch determines a first weight matrix that is targeted at processing the face image to be detected. The weight integration module fuses the first weight matrix and the general weight matrix to obtain a customized weight matrix. The customized weight matrix can be used for the layer to be adjusted in the face detector, so that the face detector can perform targeted detection of the forged features (facial characteristics, forgery type) of the face to be detected. The accuracy of the face detector in distinguishing the authenticity of faces is improved.
[0052] In one possible implementation, the customized weight matrix includes multiple layer weight matrices, and the layer weight matrices correspond to the layers to be adjusted of the face detector; the face detector is further used to: use the layer weight matrix to replace the weight matrix in the corresponding layer to be adjusted to obtain a customized layer; based on each of the customized layers and other layers, detect the face to be detected to obtain the detection result.
[0053] As previously described, a customized weight matrix may include weights for a layer or sublayer of a face detector. A single layer or sublayer may correspond to a layer weight matrix. A customized weight matrix may include multiple layer weight matrices. A single layer weight matrix may include all weights for a single layer or a single sublayer.
[0054] Exemplarily, a single layer weight matrix may be used to replace the weights in a corresponding single layer or a single sub-layer.
[0055] Exemplarily, a single layer weight matrix and the weights in the corresponding single layer or single sublayer may be calculated, and the calculated weights may be used to replace the original weights in the single layer or single sublayer.
[0056] For the convenience of description, the replaced layer or sublayer is named as a customized layer. The above is only an example, and the embodiment of the present disclosure does not limit the specific form of the replacement operation.
[0057] In the disclosed embodiment, the layer weight matrix is used to replace the weight matrix in the corresponding layer to be adjusted to obtain a customized layer. In this way, the face detector includes a customized layer, which is customized for the face image to be detected, so it is more targeted for detecting the authenticity of the face in the face image to be detected.
[0058] In a possible implementation manner, the layer to be adjusted is a feature extraction layer.
[0059] The face detector can perform feature extraction, prediction processing, classification and other operations on the face image to be detected, and finally identify the authenticity of the face in the face image to be detected. The above-mentioned processing has basically the same processing principles for different images to be detected. The core reason affecting the detection accuracy is whether the face feature vector extracted from the face image to be detected can accurately reflect the forged features. The forged features of the face images to be detected are not the same. Therefore, the accuracy of identifying highly simulated faces can be effectively improved by extracting the face feature vector from the face image to be detected in a targeted manner.
[0060] In the disclosed embodiment, the layer to be adjusted is the feature extraction layer, and the weight of the feature extraction layer can be customized in a focused manner, which reduces the workload of the weight customization module and reduces the processing overhead. Moreover, the accuracy of extracting the facial feature vector representing the forged features can be improved, thereby improving the accuracy of identifying highly simulated faces.
[0061] In a possible implementation, the weight integration module is further used to: multiply the first weight matrix by corresponding elements of the general weight matrix to obtain the customized weight matrix.
[0062] There are many methods for fusion. In order to screen out the facial feature vectors that can accurately extract the characteristics of forged features from the universal weight matrix, the elements in the first weight matrix can be calculated with the elements in the universal weight matrix. There may be a large difference in the order of magnitude of the corresponding elements of the universal weight matrix and the first weight matrix. This difference in order of magnitude may drown out the information carried by the first weight matrix or the universal weight matrix, causing excessive loss of information in the customized weight matrix. In order to better preserve the information in the customized weight matrix, the first weight matrix can be multiplied by the corresponding elements of the universal weight matrix to determine the customized weight matrix. Among them, the first weight matrix and the universal weight matrix have the same shape, and the elements in the same row and column positions in the two matrices correspond to each other. The first weight matrix or the universal weight matrix can be of any shape, and the shape of the first weight matrix or the universal weight matrix can be designed according to the needs of the layer to be adjusted in the actual scenario, thereby improving the applicability of the method.
[0063] In the embodiment of the present disclosure, the fusion operation can be to multiply the corresponding elements of the first weight matrix and the general weight matrix, thereby increasing the amount of information carried in the customized weight matrix, and the facial feature vector extracted from the face image to be detected can more accurately characterize the forgery features.
[0064] In a possible implementation, the parameters of the general information detection branch include: the general detection information, the general information detection branch includes a first super network, and the training method of the high-simulation face detection system includes: obtaining a sample first weight matrix according to a face image sample; determining a sample general weight matrix according to the general detection information; fusing the sample first weight matrix with the sample general weight matrix to obtain a sample customized weight matrix, the sample customized weight matrix includes multiple sample layer weight matrices; using the sample layer weight matrix to replace the weight matrix in the corresponding first layer to be adjusted to obtain a first customized layer; based on each of the first customized layers and other layers, detecting the face image sample to obtain a first detection result; based on the difference between the first detection result and the true value, adjusting the parameters of the face detector, the parameters of the face feature perception branch, the parameters of the first super network, and the general detection information until the stopping condition is met and the training is stopped.
[0065] The general detection information can be used as a type of parameter of the general information detection branch and built into the general information detection branch. The general information detection branch includes a first super network. The first super network can use the general information detection branch to determine a general weight matrix.
[0066] The facial feature perception branch can determine the sample first weight matrix based on the facial image sample. The general information detection branch can obtain the sample general weight matrix based on the general detection information. The weight integration module can fuse the sample first weight matrix and the sample general weight matrix to obtain a sample customized weight matrix. The weights in the sample customized weight matrix can be used to replace the weights in the layer to be adjusted in the face detector to obtain a customized layer. In order to distinguish the training process from the use process of the system, the layer to be adjusted in the training process is named the first layer to be adjusted; the customized layer is named the first customized layer.
[0067] All or part of the layers in the face detector are customized. If part of the layers in the face detector are customized, the layers that are not customized are named as other layers. Therefore, the face image sample can be detected based on the first customized layer and the other layers to obtain a first detection result. The first detection result is the judgment result of the current system on the authenticity of the face in the face image sample. The face image sample can correspond to a true value, which indicates the correct result of the authenticity of the face in the face image sample. The first detection result is not necessarily correct. According to the difference between the first detection result and the true value, the loss function can be used to adjust the parameters of the face detector, the parameters of the face feature perception branch, the parameters of the first super network, and the general detection information. The loss function can use a binary cross entropy loss function. The stopping condition can be that the accuracy of the first detection result is not less than a preset accuracy threshold. The stopping condition can be that the number of training times is not less than a preset number threshold.
[0068] Therefore, after each round of training, the general detection information will be updated, so that the updated general detection information is more helpful in determining the general weight matrix for comprehensively extracting facial feature vectors. In this way, after the system is trained, the general detection information can be directly fixed in the general detection information branch, which improves the accuracy of determining the customized weight matrix. At the same time, after each round of training, the parameters of each part of the high-simulation face detection system will be updated so that the first detection result in the next round of training is closer to the true value.
[0069] In one possible implementation, the facial feature perception branch includes a facial feature extractor and a second hypernetwork, and based on the difference between the first detection result and the true value, the parameters of the facial feature perception branch are adjusted, including: based on the difference between the first detection result and the true value, the parameters of the facial feature extractor and the second hypernetwork are adjusted.
[0070] In the disclosed embodiment, the facial feature perception branch may include a second super network of a facial feature extractor. The facial feature extractor may be a deep neural network, which may be used to extract facial feature vectors from facial image samples (face images to be detected). The second super network is used to determine the weights of the layer to be adjusted (the first layer to be adjusted) according to the facial feature vectors for the facial features of the face to be detected and the forgery type of the face to be detected. During the training process of the high-simulation face detection system, the parameters of the second super network and the parameters of the facial feature extractor may be adjusted to improve the accuracy of the determined first weight matrix, thereby improving the processing capability of the layer to be adjusted for the forged features of each face image to be detected.
[0071] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0072] Figure 2 The following is a flow chart of a highly simulated face detection method provided by an embodiment of the present disclosure. Figure 2 As shown, the method includes:
[0073] S11, according to the face image to be detected, obtaining a customized weight matrix corresponding to the face image to be detected.
[0074] S12, based on the customized weight matrix, detecting the face to be detected to obtain a detection result, wherein the detection result indicates the authenticity of the face in the face image to be detected.
[0075] In a possible implementation, the method of obtaining a customized weight matrix corresponding to the face image to be detected based on the face image to be detected includes: determining a general weight matrix based on general detection information; obtaining a first weight matrix based on the face image to be detected, the first weight matrix being used to determine weights for face authenticity detection for faces and forgery types in the image from the general weight matrix; and fusing the first weight matrix with the general weight matrix to obtain the customized weight matrix.
[0076] In one possible implementation, the customized weight matrix includes multiple layer weight matrices, and the layer weight matrices correspond to the layers to be adjusted of the face detector; based on the customized weight matrix, the face to be detected is detected to obtain the detection result, including: using the layer weight matrix to replace the weight matrix in the corresponding layer to be adjusted to obtain the customized layer; based on each of the customized layers and other layers, the face to be detected is detected to obtain the detection result.
[0077] In a possible implementation manner, the layer to be adjusted is a feature extraction layer.
[0078] In a possible implementation, the first weight matrix is fused with the general weight matrix to obtain the customized weight matrix, including: multiplying the first weight matrix with corresponding elements of the general weight matrix to obtain the customized weight matrix.
[0079] In a possible implementation, the method is applied to a high-simulation face detection system, the high-simulation face detection system includes: a face feature perception branch, a general detection information branch, a weight integration module, and a face detector, the general detection information branch includes a first super network, and the parameters of the general detection information branch include general detection information. The training method of the high-simulation face detection system includes: obtaining a sample first weight matrix according to a face image sample; determining a sample general weight matrix according to the general detection information; fusing the sample first weight matrix with the sample general weight matrix to obtain a sample customized weight matrix, the sample customized weight matrix includes multiple sample layer weight matrices; using the sample layer weight matrix to replace the weight matrix in the corresponding first to-be-adjusted layer to obtain a first customized layer; based on each of the first customized layers and other layers, detecting the face image sample to obtain a first detection result; based on the difference between the first detection result and the true value, adjusting the parameters of the face detector, the parameters of the face feature perception branch, the parameters of the first super network, and the general detection information until the stop condition is met and the training is stopped.
[0080] In one possible implementation, the facial feature perception branch includes a facial feature extractor and a second hypernetwork, and based on the difference between the first detection result and the true value, the parameters of the facial feature perception branch are adjusted, including: based on the difference between the first detection result and the true value, the parameters of the facial feature extractor and the second hypernetwork are adjusted.
[0081] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0082] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0083] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0084] Figure 3 The electronic device 1900 is a schematic diagram of the structure of an electronic device for high-simulation face detection provided by an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server or a terminal device. Figure 3, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0085] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0086] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0087] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0088] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0089] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0090] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0091] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0092] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0093] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0094] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse 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 the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0095] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A highly realistic face detection system, characterized in that: The high-simulation face detection system comprises: a weight customization module and a face detector; The weight customization module is used to obtain a customized weight matrix corresponding to the face image to be detected according to the face image to be detected, and the weights in the customized weight matrix are the weights corresponding to the layer to be adjusted in the face detector; The face detector is used to detect the face image to be detected based on a customized weight matrix to obtain a detection result, wherein the detection result indicates the authenticity of the face in the face image to be detected; The weight customization module includes: facial feature perception branch, general detection information branch, and weight integration module; The general detection information branch is used to determine a general weight matrix according to the general detection information; The facial feature sensing branch is used to obtain a first weight matrix according to the face image to be detected, and the first weight matrix is used to determine the weights for face authenticity detection for the face and the forgery type in the image from the general weight matrix; The weight integration module is used to perform a fusion operation on the first weight matrix and the general weight matrix to obtain the customized weight matrix; The customized weight matrix includes a plurality of layer weight matrices, and the layer weight matrices correspond to the layers to be adjusted of the face detector; The face detector is further used for: Use the layer weight matrix to replace the weight matrix in the corresponding layer to be adjusted to obtain a customized layer; Based on each of the customized layers and other layers, the face to be detected is detected to obtain the detection result.
2. The system according to claim 1, characterized in that The layer to be adjusted is a feature extraction layer.
3. The system according to claim 1, characterized in that The weight integration module is further used for: The first weight matrix is multiplied by corresponding elements of the general weight matrix to obtain the customized weight matrix.
4. The system according to claim 1, characterized in that The parameters of the general detection information branch include: the general detection information, the general detection information branch includes a first super network, and the training method of the high-simulation face detection system includes: According to the face image samples, a first weight matrix of the samples is obtained; Determining a sample universal weight matrix according to the universal detection information; Performing a fusion operation on the sample first weight matrix and the sample general weight matrix to obtain a sample customized weight matrix, wherein the sample customized weight matrix includes a plurality of sample layer weight matrices; Use the sample layer weight matrix to replace the corresponding weight matrix in the first layer to be adjusted to obtain the first customized layer; Based on the first customized layers and other layers, the face image sample is detected to obtain a first detection result; Based on the difference between the first detection result and the true value, the parameters of the face detector, the parameters of the face feature perception branch, the parameters of the first super network, and the general detection information are adjusted until the stopping condition is met and the training is stopped.
5. The system according to claim 4, characterized in that The facial feature perception branch includes a facial feature extractor and a second super network, and based on the difference between the first detection result and the true value, adjusting the parameters of the facial feature perception branch includes: Based on the difference between the first detection result and the true value, the parameters of the facial feature extractor and the second super network are adjusted.
6. A highly realistic face detection method, characterized in that: include: According to the face image to be detected, a customized weight matrix corresponding to the face image to be detected is obtained; Based on the customized weight matrix, the face to be detected is detected to obtain a detection result, wherein the detection result indicates the authenticity of the face in the face image to be detected; The step of obtaining a customized weight moment corresponding to the face image to be detected according to the face image to be detected includes: Determine a universal weight matrix based on universal detection information; According to the face image to be detected, a first weight matrix is obtained, wherein the first weight matrix is used to determine the weights for performing face authenticity detection on faces and forgery types in the image from the general weight matrix; The first weight matrix is fused with the general weight matrix to obtain the customized weight matrix; The customized weight matrix includes a plurality of layer weight matrices, and the layer weight matrices correspond to the layers to be adjusted of the face detector; The detecting the face to be detected based on the customized weight matrix to obtain the detection result includes: Use the layer weight matrix to replace the weight matrix in the corresponding layer to be adjusted to obtain a customized layer; Based on each of the customized layers and other layers, the face to be detected is detected to obtain the detection result.
7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the system described in any one of claims 1 to 5 when executing the instructions stored in the memory.
8. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the system according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Face recognition method and device and storage medium
CN112232117A
Face authenticity detection method, device and equipment and computer readable storage medium
CN116266412A