Face authenticity detection method and device, electronic equipment and storage medium

By combining multi-dimensional feature extraction and feature enhancement with attention pooling layers, a face authenticity detection model is constructed, which solves the problem of face forgery detection and improves the security and recognition accuracy of financial transactions.

CN118918642APending Publication Date: 2024-11-08PING AN TECH (SHENZHEN) CO LTD

Patent Information

Application Number
CN202411061150.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively detect and prevent facial spoofing, leading to increased security risks and fraudulent activities in financial business scenarios.

Method used

A face authenticity detection model is constructed using a multi-dimensional feature extraction and feature enhancement method, combined with an attention pooling layer and an Xception network. The model uses texture enhancement feature maps, local enhancement feature maps, and global feature matrices to determine the authenticity of faces.

Benefits of technology

It improves the accuracy of recognizing fake faces, reduces security risks, enhances the security and anti-counterfeiting capabilities of financial services, and prevents fraudulent activities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918642A_ABST
    Figure CN118918642A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a face authenticity detection method and device, electronic equipment and a storage medium, and belongs to the technical field of financial science and technology. The method comprises the following steps: acquiring a to-be-detected face image; performing multi-dimensional feature extraction on the face image to obtain a face texture feature, a face local feature and a face global feature; performing feature enhancement on the facial texture features and the facial local features to respectively obtain a texture enhancement feature map and a local enhancement feature map; inputting the texture enhancement feature map and the local enhancement feature map into an attention pooling layer to obtain a texture feature matrix; inputting the facial global features into an attention pooling layer to obtain a global feature matrix; and inputting the texture feature matrix and the global feature matrix into a trained classifier to obtain an authenticity detection result of the face image. Based on this, the embodiment of the present application can effectively detect a counterfeit face, realize accurate judgment and identification of face authenticity in a financial service scene, and improve the security of financial services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology (Fi ntech) technology, and in particular to a method and device for detecting authenticity of a face, an electronic device and a storage medium. Background Art

[0002] With the rapid development of digital image processing technology, the problem of face fraud has become increasingly serious. Face fraud not only poses a threat to personal privacy and security, but may also lead to social chaos.

[0003] With the popularity of applications such as smartphones, social media, and virtual reality, people are increasingly relying on facial recognition systems to verify their identities and protect their personal information. In financial business scenarios, such as identity authentication, transaction review, and risk assessment, facial recognition technology is often required. However, criminals can use various means to create fake faces to obtain unauthorized permissions or defraud personal sensitive information. For example, using face-changing technology to generate fake faces, these videos may cause huge losses and harm to financial institutions and users. Therefore, how to effectively detect face fraud has become a technical problem that needs to be solved in financial business scenarios. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a face authenticity detection method and device, electronic device and storage medium, which can improve the recognition accuracy of counterfeit faces, effectively detect counterfeit faces, thereby preventing face counterfeiting, especially in financial business scenarios, to achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of counterfeit face recognition, and effectively reduce the security risks caused by face counterfeiting, prevent fraud caused by counterfeit faces, thereby further improving the security of financial services.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for detecting the authenticity of a face, the method comprising:

[0006] Obtain the face image to be detected;

[0007] Performing multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features;

[0008] Performing feature enhancement on the facial texture features and the facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively;

[0009] Inputting the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix;

[0010] Inputting the facial global features into the attention pooling layer to obtain a global feature matrix;

[0011] The texture feature matrix and the global feature matrix are input into a trained classifier to obtain a result of authenticity detection of the face image.

[0012] In some embodiments, the face authenticity detection model is applied, and the face authenticity detection model includes a facial feature extraction module, a texture enhancement module, a local enhancement module, the attention pooling layer and the classifier. The facial feature extraction module is constructed based on the Xcept i on network, and the facial feature extraction module includes a first network layer, a second network layer and a third network layer connected in sequence. The first network layer is connected to the attention pooling layer through the texture enhancement module, the second network layer is connected to the attention pooling layer through the local enhancement module, the output of the third network layer is connected to the attention pooling layer, and the output of the attention pooling layer is connected to the classifier.

[0013] In some embodiments, the multi-dimensional feature extraction of the face image to obtain facial texture features, facial local features and facial global features includes:

[0014] Inputting the face image into the first network layer to extract texture features to obtain the facial texture features;

[0015] Inputting the facial texture features into the second network layer to extract local features to obtain the facial local features;

[0016] The local facial features are input into the third network layer to extract global features to obtain the global facial features.

[0017] In some embodiments, the step of performing feature enhancement on the facial texture feature and the facial local feature to obtain a texture enhancement feature map and a local enhancement feature map, respectively, includes:

[0018] Inputting the facial texture features into the texture enhancement module for texture enhancement to obtain a texture enhancement feature map;

[0019] The local facial features are input into the local enhancement module for local enhancement to obtain a local enhancement feature map.

[0020] In some embodiments, the texture enhancement module has an average pooling layer, and the step of inputting the facial texture features into the texture enhancement module for texture enhancement to obtain a texture enhancement feature map comprises:

[0021] Inputting the facial texture features into the average pooling layer to obtain non-texture features;

[0022] The texture enhancement feature map is obtained by subtracting the non-texture feature from the facial texture feature.

[0023] In some embodiments, the local enhancement module is an attention module, and the step of inputting the local facial features into the local enhancement module for local enhancement to obtain a local enhancement feature map includes:

[0024] Inputting the local facial features into the attention module to obtain a multi-attention feature map;

[0025] Based on the corresponding association between the multi-attention feature map and the local facial features, the local enhanced feature map is obtained.

[0026] In some embodiments, the step of inputting the texture enhancement feature map and the local enhancement feature map into an attention pooling layer to obtain a texture feature matrix includes:

[0027] Performing bilinear interpolation on the texture enhancement feature map and the local enhancement feature map through the attention pooling layer to obtain an intermediate feature map;

[0028] The intermediate feature map is uniformly pooled through the attention pooling layer to obtain the texture feature matrix.

[0029] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a face authenticity detection device, the device comprising:

[0030] The first module is used to obtain a face image to be detected;

[0031] The second module is used to extract multi-dimensional features from the face image to obtain facial texture features, facial local features and facial global features;

[0032] The third module is used to perform feature enhancement on the facial texture features and the facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively;

[0033] The fourth module is used to input the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix;

[0034] A fifth module is used to input the facial global features into the attention pooling layer to obtain a global feature matrix;

[0035] The sixth module is used to input the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image.

[0036] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0037] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0038] The method and device, electronic device and storage medium for detecting the authenticity of a face proposed in the present application obtain a face image to be detected; perform multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; perform feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; input the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; input the facial global features into the attention pooling layer to obtain a global feature matrix; input the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image. By extracting and enhancing the multi-dimensional features of the face image, the detailed features of the face image can be captured more comprehensively, thereby improving the accuracy of authenticity detection. Combining the facial texture features, facial local features and facial global features obtained by multi-dimensional feature extraction can better describe the features of the face, which is helpful to distinguish between real faces and forged faces. The combination of the texture enhancement feature map and the local enhancement feature map helps to reduce the impact of environmental interference on facial features and improve the stability and anti-interference ability of the system. By introducing the attention pooling layer, more attention can be paid to important texture features and local features, the distinguishability of features can be improved, and it is helpful to accurately judge the authenticity of face images. Combining the feature information of the texture feature matrix and the global feature matrix, the entire face image can be understood more comprehensively, thereby improving the effect of authenticity detection. The comprehensive use of multiple features and attention mechanisms can improve the robustness and generalization ability of the system, so that it can effectively perform face authenticity detection in different scenarios. The comprehensive use of multi-dimensional features, feature enhancement and attention mechanisms can improve the accuracy, robustness and generalization ability of the face authenticity detection system, thereby better meeting the actual face authenticity detection requirements. Based on this, the embodiment of the present application can improve the recognition accuracy of fake faces, effectively detect fake faces, thereby preventing face fraud, especially in financial business scenarios, to achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the safety hazards caused by face fraud, prevent fraud caused by fake faces, thereby further improving the security of financial services. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a flow chart of a method for detecting authenticity of a face provided in an embodiment of the present application;

[0040] Figure 2 It is a structural diagram of a face authenticity detection model provided in an embodiment of the present application;

[0041] Figure 3 yes Figure 1 Flow chart of step S102 in FIG.

[0042] Figure 4 yes Figure 1 Flow chart of step S103 in FIG.

[0043] Figure 5 yes Figure 4 Flow chart of step S401 in FIG.

[0044] Figure 6 yes Figure 4 Flow chart of step S402 in FIG.

[0045] Figure 7 yes Figure 1 Flow chart of step S104 in FIG.

[0046] Figure 8 It is a structural schematic diagram of a face authenticity detection device provided in an embodiment of the present application;

[0047] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0051] First, some nouns involved in this application are analyzed:

[0052] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0053] Xception network: is a deep learning model that is particularly suitable for image recognition tasks. It is based on the Inception series of networks and has made some innovations to improve the performance of the model. The core innovation of the Xception network structure is to use deep separable convolution to replace the traditional convolution operation. This operation can significantly reduce the number of parameters and computational requirements of the model, making the model more efficient and energy-saving while maintaining or improving the feature extraction ability.

[0054] Attention Pooling Layer: It is a neural network structure that is usually used to strengthen the model's attention to different parts of the input data. When processing sequence data or image data, the attention mechanism can help the model dynamically learn to pay attention to the importance of different parts of the input, thereby improving the model's representation ability and performance.

[0055] Average Pooling Layer: It is a pooling operation commonly used in deep learning. It is used to reduce the spatial dimension of the feature map, thereby reducing the computational complexity of the model and increasing the translation invariance of the model.

[0056] With the rapid development of digital image processing technology, the problem of face fraud has become increasingly serious. Face fraud not only poses a threat to personal privacy and security, but may also lead to social chaos.

[0057] With the popularity of applications such as smartphones, social media, and virtual reality, people are increasingly relying on facial recognition systems to verify their identities and protect their personal information. In financial business scenarios, such as identity authentication, transaction review, and risk assessment, facial recognition technology is often required. However, criminals can use various means to create fake faces to obtain unauthorized permissions or defraud personal sensitive information. For example, using face-changing technology to generate fake faces, these videos may cause huge losses and harm to financial institutions and users. Therefore, how to effectively detect face fraud has become a technical problem that needs to be solved in financial business scenarios.

[0058] Based on this, the embodiment of the present application provides a method and device for detecting the authenticity of a face, an electronic device and a storage medium, obtaining a face image to be detected; performing multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; performing feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; inputting the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; inputting the facial global features into the attention pooling layer to obtain a global feature matrix; inputting the texture feature matrix and the global feature matrix into a trained classifier to obtain the authenticity detection result of the face image. By extracting and enhancing the multi-dimensional features of the face image, the detailed features of the face image can be more comprehensively captured, thereby improving the accuracy of the authenticity detection. Combining the facial texture features, facial local features and facial global features obtained by the multi-dimensional feature extraction can better describe the features of the face, which is helpful to distinguish between real faces and forged faces. The combination of the texture enhancement feature map and the local enhancement feature map helps to reduce the impact of environmental interference on facial features and improve the stability and anti-interference ability of the system. By introducing the attention pooling layer, more attention can be paid to important texture features and local features, the distinguishability of features can be improved, and it is helpful to accurately judge the authenticity of face images. Combining the feature information of the texture feature matrix and the global feature matrix, the entire face image can be understood more comprehensively, thereby improving the effect of authenticity detection. The comprehensive use of multiple features and attention mechanisms can improve the robustness and generalization ability of the system, so that it can effectively perform face authenticity detection in different scenarios. The comprehensive use of multi-dimensional features, feature enhancement and attention mechanisms can improve the accuracy, robustness and generalization ability of the face authenticity detection system, thereby better meeting the actual face authenticity detection requirements. Based on this, the embodiment of the present application can improve the recognition accuracy of fake faces, effectively detect fake faces, thereby preventing face fraud, especially in financial business scenarios, to achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the safety hazards caused by face fraud, prevent fraud caused by fake faces, thereby further improving the security of financial services.

[0059] The face authenticity detection method and device, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the face authenticity detection method in the embodiments of the present application is described.

[0060] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0061] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0062] The face authenticity detection method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The face authenticity detection method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the face authenticity detection method, etc., but is not limited to the above forms.

[0063] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0064] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0065] Figure 1 is an optional flow chart of the face authenticity detection method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0066] Step S101, obtaining a face image to be detected;

[0067] Step S102, performing multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features;

[0068] Step S103, performing feature enhancement on facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively;

[0069] Step S104, inputting the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix;

[0070] Step S105, inputting the global facial features into the attention pooling layer to obtain a global feature matrix;

[0071] Step S106, inputting the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image.

[0072] In step S101 of some embodiments, a face image to be detected is obtained. The face image to be detected can be obtained through a camera or a mobile device with a camera. In financial business scenarios, such as identity authentication, transaction review, risk assessment, etc., face recognition is often required to verify the identity of the customer. In the financial client interface, the customer can perform face authenticity detection by turning on the camera.

[0073] In step S102 of some embodiments, multi-dimensional feature extraction is performed on the face image to obtain facial texture features, local facial features and global facial features. Facial texture features are used to characterize the details and texture information of the face image, for example, facial details and skin texture. Local facial features are used to characterize the local information of the face image, for example, local features around key points of the face, such as corners and edges of the eyes, nose, mouth, and ears. Global facial features are used to characterize the global information of the face image, for example, coordinate information of key points of the face, such as the size, position, and proportion of the eyes, nose, mouth, and ears, and for example, shape features of the face contour, such as roundness, aspect ratio, etc. The facial texture features, local facial features and global facial features obtained by multi-dimensional feature extraction can more completely describe the features of the face image, so as to facilitate the construction of a more complete feature matrix, thereby improving the accuracy of authenticity detection of face images.

[0074] In step S103 of some embodiments, feature enhancement is performed on facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map, respectively. By performing texture enhancement on facial texture features to obtain a texture enhancement feature map, and by performing local enhancement on facial local features to obtain a local enhancement feature map, facial details are supplemented, the accuracy of face detection is further improved, and the security of financial services is further improved.

[0075] In step S104 of some embodiments, the texture enhancement feature map and the local enhancement feature map are input into the attention pooling layer to obtain a texture feature matrix. In the attention pooling layer, the texture enhancement feature map and the local enhancement feature map are feature fused to obtain a texture feature matrix. The texture enhancement feature map and the local enhancement feature map are both enhanced image data. The attention pooling layer can better utilize the information of the two features by weighted summation or other fusion methods, and the obtained texture feature matrix can more accurately describe the texture features of the face image.

[0076] In step S105 of some embodiments, the global features of the face are input into the attention pooling layer to obtain a global feature matrix. The extracted global features are used as input to the attention pooling layer. The attention pooling layer can learn the importance of features at different positions, generate a weighted global feature representation, and output it in the form of a global feature matrix.

[0077] In step S106 of some embodiments, the texture feature matrix and the global feature matrix are input into a trained classifier to obtain the authenticity detection result of the face image. The texture feature matrix and the global feature matrix represent the texture information and the global feature information of the face image respectively. The texture feature matrix and the global feature matrix are input into a classifier, such as a binary classifier, to distinguish between a real face image and a forged face image. The classifier can be a model based on deep learning, such as a convolutional neural network (CNN) or other classification models. During the training phase of the classifier, the classifier is trained to learn the feature differences between a real face and a forged face through a large amount of data of real face images and forged face images. This can be done by supervised learning, so that the classifier can accurately distinguish between true and false face images. In the prediction phase, the texture feature matrix and the global feature matrix of the new face image are input into the trained classifier, and the classifier will output a probability value or a category label, indicating whether the face image is real or forged. When the classifier outputs the result, the authenticity of the face image can be judged according to the probability value or the category label. If the classifier determines that a face image is authentic or forged with high confidence, subsequent actions can be taken accordingly, such as further verification, access denial, etc. This method can effectively detect the authenticity of face images, thereby helping to improve the security and accuracy of face recognition.

[0078] It is understandable that the face authenticity detection method of the present invention can be applied to a face authenticity detection model, which is a deep learning model. Figure 2 As shown, the face authenticity detection model includes a facial feature extraction module, a texture enhancement module, a local enhancement module, an attention pooling layer and a classifier. The facial feature extraction module is constructed based on the Xcept i on network. The facial feature extraction module includes a first network layer, a second network layer and a third network layer connected in sequence. The first network layer is connected to the attention pooling layer through the texture enhancement module, the second network layer is connected to the attention pooling layer through the local enhancement module, the output of the third network layer is connected to the attention pooling layer, and the output of the attention pooling layer is connected to the classifier. It should be noted that the Xcept i on network improves the efficiency and performance of the model by introducing optimizations such as deep separable convolution, which makes it have certain advantages in the task of face authenticity detection.

[0079] Steps S101 to S106 shown in the embodiment of the present application are to obtain a face image to be detected; perform multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; perform feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; input the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; input the facial global features into the attention pooling layer to obtain a global feature matrix; input the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image. By extracting and enhancing multi-dimensional features of the face image, the detailed features of the face image can be captured more comprehensively, thereby improving the accuracy of authenticity detection. Combining the facial texture features, facial local features and facial global features obtained by multi-dimensional feature extraction can better describe the features of the face, which helps to distinguish between real faces and fake faces. The combination of texture enhancement feature maps and local enhancement feature maps helps to reduce the impact of environmental interference on facial features and improve the stability and anti-interference ability of the system. By introducing the attention pooling layer, more attention can be paid to important texture features and local features, the distinguishability of features can be improved, and it is helpful to accurately judge the authenticity of face images. Combining the feature information of the texture feature matrix and the global feature matrix, the entire face image can be understood more comprehensively, thereby improving the effect of authenticity detection. The comprehensive use of multiple features and attention mechanisms can improve the robustness and generalization ability of the system, so that it can effectively perform face authenticity detection in different scenarios. The comprehensive use of multi-dimensional features, feature enhancement and attention mechanisms can improve the accuracy, robustness and generalization ability of the face authenticity detection system, thereby better meeting the actual face authenticity detection requirements. Based on this, the embodiment of the present application can improve the recognition accuracy of fake faces, effectively detect fake faces, thereby preventing face fraud, especially in financial business scenarios, to achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the safety hazards caused by face fraud, prevent fraud caused by fake faces, thereby further improving the security of financial services.

[0080] See also Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S303:

[0081] Step S301, inputting the face image into the first network layer to extract texture features to obtain facial texture features;

[0082] Step S302, inputting the facial texture features into the second network layer to extract local features to obtain facial local features;

[0083] Step S303: input the local facial features into the third network layer for global feature extraction to obtain global facial features.

[0084] In some embodiments, Figure 2 As shown, in the facial feature extraction stage, the facial image is input into the facial feature extraction module, wherein the facial feature extraction module is divided into three network layers, namely the first network layer 1, the second network layer 2 and the third network layer 3 connected in sequence, and each network layer outputs features of different dimensions. Network layer 1 outputs facial texture features, network layer 2 outputs facial local features, and network layer 3 outputs facial global features. Then the facial features of each dimension are processed. Among them, the facial feature module is based on the xcept i on network. Facial texture features are used to characterize the details and texture information of the facial image, such as facial details and skin texture. Facial local features are used to characterize the local information of the facial image, such as the local features around the key points of the face, such as the corners and edges of the eyes, nose, mouth, and ears. Facial global features are used to characterize the global information of the facial image, such as the coordinate information of the key points of the face, such as the size, position, and proportion of the eyes, nose, mouth, and ears, and for example, the shape features of the facial contour, such as roundness, aspect ratio, etc. The facial texture features, local facial features, and global facial features obtained through multi-dimensional feature extraction can more completely describe the features of facial images, so as to build a more complete feature matrix, thereby improving the accuracy of facial image authenticity detection. In financial business scenarios, it can achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the security risks caused by fake faces, prevent fraud caused by fake faces, and further improve the security of financial services.

[0085] See also Figure 4 In some embodiments, step S103 may include but is not limited to steps S401 to S402:

[0086] Step S401, inputting facial texture features into a texture enhancement module for texture enhancement to obtain a texture enhancement feature map;

[0087] Step S402: input the local facial features into a local enhancement module for local enhancement to obtain a local enhancement feature map.

[0088] In some embodiments, in the face feature processing, the multi-dimensional face features obtained in the previous stage are processed. Figure 2As shown, the facial texture features output by network layer 1 are input into the texture enhancement module to obtain a texture enhancement feature map. The facial local features output by network layer 2 are input into the local enhancement module to obtain a local enhancement feature map. By performing texture enhancement on the facial texture features to obtain a texture enhancement feature map; and by performing local enhancement on the facial local features to obtain a local enhancement feature map, the facial details are supplemented, the accuracy of face detection is further improved, and the security of financial services is further improved.

[0089] See also Figure 5 In some embodiments, step S401 may include but is not limited to steps S501 to S502:

[0090] Step S501, inputting facial texture features into an average pooling layer to obtain non-texture features;

[0091] Step S502: subtract non-texture features from facial texture features to obtain a texture enhancement feature map.

[0092] In some embodiments, the texture enhancement module of the embodiment of the present application adds an average pooling layer, and the input facial texture features are passed through the average pooling layer to obtain feature information other than texture, that is, non-texture features. Then, these non-texture features are subtracted from the input facial texture features to obtain a texture enhanced feature map. By performing texture enhancement on the facial texture features and obtaining a texture enhanced feature map, facial details are supplemented, the accuracy of face detection is further improved, and the security of financial services is further improved.

[0093] See also Figure 6 In some embodiments, step S402 may include but is not limited to steps S601 to S602:

[0094] Step S601, inputting local facial features into an attention module to obtain a multi-attention feature map;

[0095] Step S602, based on the multi-attention feature map and the local facial features, a corresponding association is performed to obtain a local enhanced feature map.

[0096] In some embodiments, the local enhancement module may be an attention module, and the local features of the face are input into the attention module to obtain a multi-attention feature map, and the local enhancement feature map is obtained based on the corresponding association between the multi-attention feature map and the local features of the face. By locally enhancing the local features of the face to obtain the local enhancement feature map, the face details are supplemented, the accuracy of face detection is further improved, and the security of financial services is further improved.

[0097] See also Figure 7In some embodiments, step S104 may include but is not limited to steps S701 to S702:

[0098] Step S701, performing bilinear interpolation on the texture enhancement feature map and the local enhancement feature map through the attention pooling layer to obtain an intermediate feature map;

[0099] Step S702, uniformly pooling the intermediate feature maps through the attention pooling layer to obtain a texture feature matrix.

[0100] In some embodiments, the attention pooling layer uses bilinear interpolation to combine the texture enhancement feature map and the local enhancement feature map. Figure 1 The texture features of the face image are input into the attention pooling layer for bilinear interpolation to obtain the intermediate feature map, and then the intermediate feature map is uniformly pooled to obtain the texture feature matrix. In the attention pooling layer, the texture enhancement feature map and the local enhancement feature map are feature fused to obtain the texture feature matrix. The texture enhancement feature map and the local enhancement feature map are both enhanced image data. The attention pooling layer can better utilize the information of the two features through weighted summation or other fusion methods. The obtained texture feature matrix can more accurately describe the texture features of the face image. In addition, for deeper features, the global facial features can be input into the attention pooling layer for further processing to obtain the global feature matrix. Subsequently, the texture feature matrix and the global feature matrix are input into the trained classifier to obtain the authenticity detection result of the face image, which can further improve the detection accuracy and improve the security of financial services.

[0101] The following is a further description of the face authenticity detection method of the present application in conjunction with the accompanying drawings and specific embodiments. The specific steps are as follows:

[0102] like Figure 2 As shown, the main process of the face authenticity detection method of the present application is roughly divided into three steps, the first is face feature extraction, then feature processing, and finally face authenticity judgment.

[0103] Facial feature extraction. In this stage, the image is input into the facial feature extraction module, which is divided into three network layers, each of which outputs features of different dimensions. Network layer 1 outputs facial texture features, network layer 2 outputs facial local features, and network layer 3 outputs facial global features. Then the facial features of each dimension are processed. Among them, the facial feature extraction module is based on the xcept ion network.

[0104] Face feature processing. Process the multi-dimensional face features obtained in the previous stage. Figure 1As shown, the facial texture features output by network layer 1 are input into the texture enhancement module to obtain a texture enhancement feature map. The local facial features output by network layer 2 are input into the local enhancement module to obtain a local enhancement feature map. The features output by network layer 3 are global facial features, and the three processed features are input into the attention pooling layer. Among them, the texture enhancement feature map and the local enhancement feature map are input into the attention pooling layer to obtain a texture feature matrix. The global facial features are input into the attention pooling layer to obtain a global feature matrix. Then the texture feature matrix and the global feature matrix are simultaneously input into the classifier to distinguish true from false.

[0105] Details added. The texture enhancement module mainly adds an average pooling layer. After the input features pass through the average pooling layer, feature information other than texture can be obtained. Then these features are subtracted from the input features to obtain texture features. The local enhancement module is essentially an attention module. By inputting local facial features into it, multiple attention feature maps can be obtained, corresponding to multiple local features of the face. The attention pooling layer uses bilinear interpolation. Texture enhancement feature maps and local enhancement features Figure 1 When the texture information and global feature information of the face image are inputted, the feature maps are bilinearly interpolated and then uniformly pooled to obtain the texture feature matrix. As for the deeper features, the global features of the face are inputted for further processing to obtain the global feature matrix. The texture feature matrix and the global feature matrix are inputted into the trained classifier to obtain the authenticity detection result of the face image. The texture feature matrix and the global feature matrix represent the texture information and the global feature information of the face image respectively. The texture feature matrix and the global feature matrix are inputted into the classifier, such as a binary classifier, to distinguish between real face images and forged face images. The classifier can be a model based on deep learning, such as a convolutional neural network (CNN) or other classification models. During the training phase of the classifier, the classifier is trained to learn the feature differences between real faces and forged faces through a large amount of data of real face images and forged face images. This can be done through supervised learning, so that the classifier can accurately distinguish between real and fake face images. In the prediction stage, the texture feature matrix and global feature matrix of the new face image are input into the trained classifier, and the classifier will output a probability value or category label to indicate whether the face image is real or fake. When the classifier outputs the result, the authenticity of the face image can be judged based on the probability value or category label. If the classifier judges the authenticity of a face image as real or fake with high confidence, subsequent actions can be taken accordingly, such as further verification, access denial, etc. In this way, the authenticity of face images can be effectively detected, thereby helping to improve the security and accuracy of face recognition.

[0106] Based on this, the face authenticity detection method of the present application introduces three multi-dimensional features, namely facial texture features, facial local features and facial global features, on the basis of deep learning detection, to further improve the recognition accuracy of fake faces, and effectively detect fake faces, thereby preventing face fraud. Especially in financial business scenarios, it can achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the security risks caused by face fraud, prevent fraud caused by fake faces, and further improve the security of financial business.

[0107] See also Figure 8 The embodiment of the present application also provides a face authenticity detection device, which can implement the above-mentioned face authenticity detection method, and the device includes:

[0108] The first module 810 is used to obtain a face image to be detected;

[0109] The second module 820 is used to extract multi-dimensional features from the face image to obtain facial texture features, facial local features and facial global features;

[0110] The third module 830 is used to enhance the facial texture features and the facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively;

[0111] The fourth module 840 is used to input the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix;

[0112] The fifth module 850 is used to input the global facial features into the attention pooling layer to obtain a global feature matrix;

[0113] The sixth module 860 is used to input the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image.

[0114] In some embodiments of the present application, the first module 810 obtains a facial image to be detected; the second module 820 performs multi-dimensional feature extraction on the facial image to obtain facial texture features, facial local features and facial global features; the third module 830 performs feature enhancement on the facial texture features and facial local features to obtain a texture enhanced feature map and a local enhanced feature map, respectively; the fourth module 840 inputs the texture enhanced feature map and the local enhanced feature map into the attention pooling layer to obtain a texture feature matrix; the fifth module 850 inputs the facial global features into the attention pooling layer to obtain a global feature matrix; the sixth module 860 inputs the texture feature matrix and the global feature matrix into a trained classifier to obtain an authenticity detection result of the facial image.

[0115] In some embodiments of the present application, a face image to be detected is obtained. The face image to be detected can be obtained through a camera or a mobile device with a camera. In financial business scenarios, such as identity authentication, transaction review, risk assessment, etc., face recognition is often required to verify the identity of the customer. In the financial client interface, the customer can perform face authenticity detection by turning on the camera.

[0116] In some embodiments of the present application, multi-dimensional feature extraction is performed on a facial image to obtain facial texture features, local facial features, and global facial features. Facial texture features are used to characterize the details and texture information of a facial image, for example, facial details and skin texture. Local facial features are used to characterize local information of a facial image, for example, local features around key facial points, such as corners and edges of eyes, nose, mouth, and ears. Global facial features are used to characterize global information of a facial image, for example, coordinate information of key facial points, such as the size, position, and proportion of eyes, nose, mouth, and ears, and for example, shape features of a facial contour, such as roundness, aspect ratio, and the like. The facial texture features, local facial features, and global facial features obtained by multi-dimensional feature extraction can more completely describe the features of a facial image, so as to facilitate the construction of a more complete feature matrix, thereby improving the accuracy of authenticity detection of facial images.

[0117] In some embodiments of the present application, the facial texture features and the local facial features are feature enhanced to obtain a texture enhanced feature map and a local enhanced feature map, respectively. By performing texture enhancement on the facial texture features to obtain a texture enhanced feature map, and by performing local enhancement on the local facial features to obtain a local enhanced feature map, the facial details are supplemented, the accuracy of facial detection is further improved, and the security of financial services is further improved.

[0118] In some embodiments of the present application, the texture enhancement feature map and the local enhancement feature map are input into the attention pooling layer to obtain a texture feature matrix. In the attention pooling layer, the texture enhancement feature map and the local enhancement feature map are feature fused to obtain a texture feature matrix. The texture enhancement feature map and the local enhancement feature map are both enhanced image data. The attention pooling layer can better utilize the information of the two features by weighted summation or other fusion methods, and the obtained texture feature matrix can more accurately describe the texture features of the face image.

[0119] In some embodiments of the present application, the global features of the face are input into the attention pooling layer to obtain a global feature matrix. The extracted global features are used as input to the attention pooling layer. The attention pooling layer can learn the importance of features at different positions, generate a weighted global feature representation, and output it in the form of a global feature matrix.

[0120] In some embodiments of the present application, the texture feature matrix and the global feature matrix are input into a trained classifier to obtain the authenticity detection result of the face image. The texture feature matrix and the global feature matrix represent the texture information and the global feature information of the face image respectively. The texture feature matrix and the global feature matrix are input into a classifier, such as a binary classifier, to distinguish between a real face image and a forged face image. The classifier can be a model based on deep learning, such as a convolutional neural network (CNN) or other classification models. During the training phase, the classifier is trained to learn the feature differences between a real face and a forged face through a large amount of data of real face images and forged face images. This can be done by supervised learning, so that the classifier can accurately distinguish between true and false face images. In the prediction phase, the texture feature matrix and the global feature matrix of the new face image are input into the trained classifier, and the classifier will output a probability value or a category label, indicating whether the face image is real or forged. When the classifier outputs the result, the authenticity of the face image can be judged according to the probability value or the category label. If the classifier determines that a face image is authentic or forged with high confidence, subsequent actions can be taken accordingly, such as further verification, access denial, etc. This method can effectively detect the authenticity of face images, thereby helping to improve the security and accuracy of face recognition.

[0121] Based on this, in the face authenticity detection device of the embodiment of the present application, the first module 810 obtains the face image to be detected; the second module 820 performs multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; the third module 830 performs feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map, respectively; the fourth module 840 inputs the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; the fifth module 850 inputs the facial global features into the attention pooling layer to obtain a global feature matrix; the sixth module 860 inputs the texture feature matrix and the global feature matrix into the trained classifier to obtain an authenticity detection result of the face image. The present application obtains a face image to be detected; performs multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; performs feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; inputs the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; inputs the facial global features into the attention pooling layer to obtain a global feature matrix; inputs the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image. By extracting and enhancing multi-dimensional features of the face image, the detailed features of the face image can be captured more comprehensively, thereby improving the accuracy of authenticity detection. Combining the facial texture features, facial local features and facial global features obtained by multi-dimensional feature extraction can better describe the features of the face, which helps to distinguish between real faces and fake faces. The combination of texture enhancement feature maps and local enhancement feature maps helps to reduce the impact of environmental interference on facial features and improve the stability and anti-interference ability of the system. By introducing the attention pooling layer, more attention can be paid to important texture features and local features, the distinguishability of features can be improved, and it is helpful to accurately judge the authenticity of face images. Combining the feature information of the texture feature matrix and the global feature matrix, the entire face image can be understood more comprehensively, thereby improving the effect of authenticity detection. The comprehensive use of multiple features and attention mechanisms can improve the robustness and generalization ability of the system, so that it can effectively perform face authenticity detection in different scenarios. The comprehensive use of multi-dimensional features, feature enhancement and attention mechanisms can improve the accuracy, robustness and generalization ability of the face authenticity detection system, thereby better meeting the actual face authenticity detection requirements. Based on this, the embodiment of the present application can improve the recognition accuracy of fake faces, effectively detect fake faces, thereby preventing face fraud, especially in financial business scenarios, to achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the safety hazards caused by face fraud, prevent fraud caused by fake faces, thereby further improving the security of financial services.

[0122] The specific implementation of the face authenticity detection device is basically the same as the specific implementation of the above-mentioned face authenticity detection method, and will not be repeated here.

[0123] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned face authenticity detection method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0124] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0125] The processor 901 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0126] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 is called to execute the face authenticity detection method of the embodiment of this application, that is, by obtaining a face image to be detected; performing multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; performing feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; inputting the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; inputting the facial global features into the attention pooling layer to obtain a global feature matrix; inputting the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image. By extracting and enhancing multi-dimensional features of face images, the detailed features of face images can be captured more comprehensively, thereby improving the accuracy of authenticity detection. Combining facial texture features, local facial features and global facial features obtained by multi-dimensional feature extraction can better describe the features of the face and help distinguish real faces from fake faces. The combination of texture enhanced feature maps and local enhanced feature maps helps reduce the impact of environmental interference on facial features and improves the stability and anti-interference ability of the system. By introducing the attention pooling layer, more attention can be paid to important texture features and local features, the feature discrimination can be improved, and the authenticity of face images can be accurately judged. Combining the feature information of the texture feature matrix and the global feature matrix, the entire face image can be understood more comprehensively, thereby improving the effect of authenticity detection. The comprehensive use of multiple features and attention mechanisms can improve the robustness and generalization ability of the system, so that it can effectively perform face authenticity detection in different scenarios. The comprehensive use of multi-dimensional features, feature enhancement and attention mechanisms can improve the accuracy, robustness and generalization ability of face authenticity detection systems, thereby better meeting the actual requirements of face authenticity detection. Based on this, the embodiments of the present application can improve the recognition accuracy of fake faces and effectively detect fake faces, thereby preventing face fraud. Especially in financial business scenarios, it can achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the security risks caused by face fraud, prevent fraud caused by fake faces, and further improve the security of financial business.

[0127] The input / output interface 903 is used to implement information input and output.

[0128] The communication interface 904 is used to realize the communication interaction between this device and other devices. Communication can be realized through wired methods (such as USB, network cable, etc.) or wireless methods (such as mobile network, WI FI, Bluetooth, etc.).

[0129] The bus transmits information between various components of the device (eg, the processor 901 , the memory 902 , the input / output interface 903 , and the communication interface 904 ).

[0130] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus.

[0131] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned face authenticity detection method is implemented.

[0132] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0133] The face authenticity detection method, face authenticity detection device, electronic device and storage medium provided by the embodiment of the present application obtain a face image to be detected; perform multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; perform feature enhancement on the facial texture features and facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; input the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; input the facial global features into the attention pooling layer to obtain a global feature matrix; input the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image. By extracting and enhancing the multi-dimensional features of the face image, the detailed features of the face image can be captured more comprehensively, thereby improving the accuracy of authenticity detection. Combining the facial texture features, facial local features and facial global features obtained by multi-dimensional feature extraction can better describe the features of the face, which is helpful to distinguish between real faces and fake faces. The combination of texture enhancement feature maps and local enhancement feature maps helps to reduce the impact of environmental interference on facial features and improve the stability and anti-interference ability of the system. By introducing the attention pooling layer, more attention can be paid to important texture features and local features, the distinguishability of features can be improved, and it is helpful to accurately judge the authenticity of face images. Combining the feature information of the texture feature matrix and the global feature matrix, the entire face image can be understood more comprehensively, thereby improving the effect of authenticity detection. The comprehensive use of multiple features and attention mechanisms can improve the robustness and generalization ability of the system, so that it can effectively perform face authenticity detection in different scenarios. The comprehensive use of multi-dimensional features, feature enhancement and attention mechanisms can improve the accuracy, robustness and generalization ability of the face authenticity detection system, thereby better meeting the actual face authenticity detection requirements. Based on this, the embodiment of the present application can improve the recognition accuracy of fake faces, effectively detect fake faces, thereby preventing face fraud, especially in financial business scenarios, to achieve accurate judgment and identification of the authenticity of faces, greatly improve the anti-counterfeiting ability of fake face recognition, and effectively reduce the safety hazards caused by face fraud, prevent fraud caused by fake faces, thereby further improving the security of financial services.

[0134] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as a computer-readable program, a data structure, a program module or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer-readable programs, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0135] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0136] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0137] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0139] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0140] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0141] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0142] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0145] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for detecting the authenticity of a face, characterized in that: The method comprises: Obtain the face image to be detected; Performing multi-dimensional feature extraction on the face image to obtain facial texture features, facial local features and facial global features; Performing feature enhancement on the facial texture features and the facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; Inputting the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; Inputting the facial global features into the attention pooling layer to obtain a global feature matrix; The texture feature matrix and the global feature matrix are input into a trained classifier to obtain a result of authenticity detection of the face image.

2. The method according to claim 1, characterized in that The method is applied to a face authenticity detection model, which includes a facial feature extraction module, a texture enhancement module, a local enhancement module, the attention pooling layer and the classifier. The facial feature extraction module is constructed based on the Xception network, and the facial feature extraction module includes a first network layer, a second network layer and a third network layer connected in sequence. The first network layer is connected to the attention pooling layer through the texture enhancement module, the second network layer is connected to the attention pooling layer through the local enhancement module, the output of the third network layer is connected to the attention pooling layer, and the output of the attention pooling layer is connected to the classifier.

3. The method according to claim 2, characterized in that The multi-dimensional feature extraction of the face image to obtain facial texture features, facial local features and facial global features includes: Inputting the face image into the first network layer to extract texture features to obtain the facial texture features; Inputting the facial texture features into the second network layer to extract local features to obtain the facial local features; The local facial features are input into the third network layer to extract global features to obtain the global facial features.

4. The method according to claim 3, characterized in that The step of performing feature enhancement on the facial texture feature and the facial local feature to obtain a texture enhancement feature map and a local enhancement feature map respectively includes: Inputting the facial texture features into the texture enhancement module for texture enhancement to obtain a texture enhancement feature map; The local facial features are input into the local enhancement module for local enhancement to obtain a local enhancement feature map.

5. The method according to claim 4, characterized in that The texture enhancement module has an average pooling layer, and the facial texture features are input into the texture enhancement module for texture enhancement to obtain a texture enhancement feature map, including: Inputting the facial texture features into the average pooling layer to obtain non-texture features; The texture enhancement feature map is obtained by subtracting the non-texture feature from the facial texture feature.

6. The method according to claim 4, characterized in that The local enhancement module is an attention module, and the local facial features are input into the local enhancement module for local enhancement to obtain a local enhancement feature map, including: Inputting the local facial features into the attention module to obtain a multi-attention feature map; Based on the corresponding association between the multi-attention feature map and the local facial features, the local enhanced feature map is obtained.

7. The method according to claim 1, characterized in that The step of inputting the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix includes: Performing bilinear interpolation on the texture enhancement feature map and the local enhancement feature map through the attention pooling layer to obtain an intermediate feature map; The intermediate feature map is uniformly pooled through the attention pooling layer to obtain the texture feature matrix.

8. A face authenticity detection device, characterized in that: The device comprises: The first module is used to obtain a face image to be detected; The second module is used to extract multi-dimensional features from the face image to obtain facial texture features, facial local features and facial global features; The third module is used to perform feature enhancement on the facial texture features and the facial local features to obtain a texture enhancement feature map and a local enhancement feature map respectively; The fourth module is used to input the texture enhancement feature map and the local enhancement feature map into the attention pooling layer to obtain a texture feature matrix; A fifth module is used to input the facial global features into the attention pooling layer to obtain a global feature matrix; The sixth module is used to input the texture feature matrix and the global feature matrix into the trained classifier to obtain the authenticity detection result of the face image.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the face authenticity detection method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting authenticity of a face according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Face forgery detection method based on multi-region attention mechanism

    CN113011332A

Cited By

  • Image shooting method and device, electronic equipment, storage medium and program product

    CN119743669A