Artificial intelligence fake face identification method, apparatus and device, and storage medium
Through a deep learning model based on the multi-head self-attention mechanism, the identification of face images is solved, and the difficulty of face recognition in traditional technology under complex conditions is achieved, achieving more efficient and accurate face identification.
Patent Information
- Application Number
- CN202411708608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional face recognition technology has difficulties in dealing with complex face changes, expressions, occlusions and different lighting conditions, and it is difficult to effectively distinguish between real faces and fake faces.
The image processing deep learning model based on the multi-head self-attention mechanism is adopted, and the recognized face images are processed through the pre-trained artificial intelligence fake face identification model, and the identification results of real faces and fake faces are output.
It realizes the capture and efficient processing of global image information, and improves the accuracy and efficiency of face identification.
Smart Images

Figure CN119559683A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of recognition technology, and in particular to an artificial intelligence forged face identification method, device, equipment and storage medium. Background Art
[0002] In recent years, with the development of generative artificial intelligence technology, especially the popularization of deep generative models, the quantity and quality of synthetic face images have greatly improved. The faces generated by generative artificial intelligence have shown excellent application effects in many fields, such as face payment, identity authentication login, face simulation prediction, etc. However, due to its highly realistic generation effect, it is difficult for people to distinguish it from real faces. This technology also brings a series of potential risks and impacts. For example, in scenarios such as telecommunications and financial fraud, this technology is often used by criminals, posing a serious threat to people's property safety.
[0003] Traditional face recognition technology mostly relies on convolutional neural networks. When processing images, it mainly extracts features of local areas through convolutional layers, and then gradually reduces the spatial size of the data through pooling layers to capture the hierarchical features of the image. However, it has certain limitations in capturing global information and still has some difficulties in dealing with complex facial changes, expressions, occlusions and different lighting conditions. Summary of the invention
[0004] The embodiments of the present invention provide an artificial intelligence forged face identification method, device, equipment and storage medium, which realize the capture and efficient processing of global image information, thereby improving the accuracy and efficiency of face identification.
[0005] In a first aspect, an embodiment of the present invention provides an artificial intelligence forged face identification method, comprising:
[0006] Obtain a face image to be recognized;
[0007] The facial image is input into a pre-trained artificial intelligence forged face identification model, and the identification result of the face in the facial image is output; wherein the artificial intelligence forged face identification model is trained by an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1,000 facial images labeled with real faces and 1,000 artificial intelligence forged faces; the identification result includes: the real face and the artificial intelligence forged face.
[0008] In a second aspect, an embodiment of the present invention further provides an artificial intelligence forged face identification device, the device comprising:
[0009] A data acquisition module, used to acquire a face image to be recognized;
[0010] An image identification module is used to input the facial image into a pre-trained artificial intelligence forged face identification model, and output the identification result of the face in the facial image; wherein the artificial intelligence forged face identification model is trained by an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1,000 facial images labeled with real faces and 1,000 artificial intelligence forged faces; the identification result includes: the real face and the artificial intelligence forged face.
[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0012] one or more processors;
[0013] a storage device for storing one or more programs,
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the artificial intelligence forged face identification method provided by the embodiment of the present disclosure.
[0015] In a fourth aspect, the embodiments of the present disclosure also provide a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to implement the artificial intelligence forged face identification method provided by the embodiments of the present disclosure.
[0016] In a fifth aspect, the embodiments of the present disclosure also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the artificial intelligence forged face identification method provided by the embodiments of the present disclosure.
[0017] The present invention discloses an artificial intelligence forged face identification method, device, equipment and storage medium, the method comprising: obtaining a face image to be identified; inputting the face image into a pre-trained artificial intelligence forged face identification model, and outputting the identification result of the face in the face image; wherein the artificial intelligence forged face identification model is obtained by training an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1,000 face images labeled with real faces and 1,000 artificial intelligence forged faces; the identification result includes: the real face and the artificial intelligence forged face. By using this method: the global information of the image is captured and efficiently processed, thereby improving the accuracy and efficiency of face identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0019] Figure 1 A flowchart of an artificial intelligence forged face identification method provided by an embodiment of the present disclosure;
[0020] Figure 2 A schematic diagram of the structure of an artificial intelligence forged face identification device provided by an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0025] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0029] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0030] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0031] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0032] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0033] Embodiment 1
[0034] Figure 1 A flowchart of an artificial intelligence forged face identification method provided in an embodiment of the present disclosure is applicable to providing a solution to the situation where traditional face recognition technology has certain limitations in capturing global information when processing images, and still has some difficult problems when processing complex facial changes, expressions, occlusions and different lighting conditions. The method can be executed by an artificial intelligence forged face identification method device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0035] like Figure 1 As shown, an artificial intelligence forged face identification method provided by the embodiment of the present disclosure may specifically include the following steps:
[0036] S110: Obtain a face image to be recognized.
[0037] In this embodiment, the face image may be a facial image of a person.
[0038] This step is used to obtain the face image to be recognized.
[0039] S120, inputting the face image into a pre-trained artificial intelligence forged face identification model, and outputting the identification result of the face in the face image.
[0040] Among them, the artificial intelligence fake face identification model is trained by an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence fake face identification model is 1,000 face images labeled with real faces and 1,000 artificial intelligence fake faces; the identification results include: real faces and artificial intelligence fake faces.
[0041] Specifically, the training dataset of the artificial intelligence fake face identification model uses the most advanced style generative adversarial network series generative model to generate a large number of high-quality and diverse face images. These face images should have different genders, ages, races, expressions and other characteristics to ensure that the trained identification model has good generalization ability. At the same time, in order to enhance the robustness of the model, various transformations are performed on the generated face images, such as rotation, scaling, cropping, etc. The dataset of real faces is obtained from actual scenes such as public datasets. In order to ensure the authenticity and reliability of the data, the collected data needs to be cleaned and labeled to remove low-quality, repeated or irrelevant images. The data preprocessing work includes preprocessing operations on the generated and real face images, including image size normalization, grayscale (selected according to needs), data enhancement, etc. These operations help reduce the complexity of model training and improve the convergence speed and identification performance of the model. In addition, the dataset needs to be divided into training sets and test sets to facilitate model evaluation and tuning during the training process.
[0042] Specifically, when performing face recognition, the image to be recognized can be input into the face recognition model to obtain the recognition result corresponding to the image to be recognized output by the face recognition model, that is, whether the image to be recognized is a real image or a forged image.
[0043] On the basis of the above embodiment, the artificial intelligence forged face identification model includes: a convolutional neural network, an encoding network, and a fully connected network. Inputting a face image into the pre-trained artificial intelligence forged face identification model, and outputting the identification result of the face in the face image includes the following steps:
[0044] a1) Input the face image into the convolutional neural network, and extract the geometric features of the face in the face image through the convolutional neural network.
[0045] b1) Inputting the geometric features into the encoding network, the encoding network is used to determine the facial unit consistency features of the face image.
[0046] c1) inputting the facial unit consistency feature into a fully connected network, and determining the identification result corresponding to the face image based on the facial unit consistency feature through the fully connected network.
[0047] In this embodiment, the convolutional neural network can be composed of multiple convolutional layers to obtain the geometric features of the face image. After obtaining the geometric features of the face image, the encoding network can encode the geometric features of the face image to obtain the facial unit consistency features of the face image. The fully connected network can integrate the facial unit consistency features of the face image through a shared fully connected layer to obtain the identification result corresponding to the face image.
[0048] Specifically, based on the above embodiment, the encoding network includes multiple cascaded encoders, and the process of each encoder is as follows:
[0049] a2) Obtaining facial unit importance weight vectors corresponding to each facial unit related area in the facial image, and performing feature enhancement on the features output by the previous encoder based on the facial unit importance weight vectors to obtain a first feature corresponding to the features output by the previous encoder.
[0050] b2) obtaining a second feature corresponding to the feature output by the previous encoder based on the feature output by the previous encoder; the second feature corresponding to the feature output by the previous encoder is used to characterize the correlation between the features of each channel in the feature output by the previous encoder.
[0051] c2) performing feature aggregation on the first feature and the second feature corresponding to the feature output by the previous encoder, and outputting the aggregated feature.
[0052] Among them, the input features of the first encoder of the encoding network are the geometric features of the face in the face image obtained by the basic feature extraction network; the output of the last encoder of the encoding network is the facial unit consistency feature of the face image.
[0053] In this embodiment, in the face image, each face unit may correspond to a face unit related area. The face unit importance weight vectors corresponding to the face unit related areas may be used to indicate the importance of the face unit related areas in the entire face image. After obtaining the face unit importance weight vectors corresponding to each face unit related area in the face image, based on the face unit importance weight vectors, feature enhancement is performed on the features output by the previous encoder to obtain the first feature corresponding to the features output by the previous encoder.
[0054] The input feature of the first encoder of the encoding network is the geometric feature of the acquired face image. The second feature corresponding to the feature output by the previous encoder is acquired based on the feature output by the previous encoder. The second feature corresponding to the feature output by the previous encoder can be used to characterize the correlation between the feature of each channel and the features of other channels in the feature output by the previous encoder. After acquiring the first feature and the second feature corresponding to the feature output by the previous encoder, the first feature and the second feature are aggregated through multiple convolutional layers, and the aggregated features are used as the output of the encoder. The output of the last encoder of the encoding network is the face unit consistency feature of the face image.
[0055] Specifically, based on the above embodiment, obtaining a second feature corresponding to a feature output by a previous encoder based on a feature output by a previous encoder includes the following steps:
[0056] b21) Take the features of each channel in the features output by the previous encoder as an image block and expand it to obtain an image block sequence.
[0057] b22) Input the image block sequence into the encoder based on the self-attention mechanism to obtain the output sequence of the encoder.
[0058] b23) Recombining the output sequences according to their corresponding channels to obtain a second feature with the same feature dimension as the previous encoder output.
[0059] In this embodiment, the image is first divided into small blocks, each of which is regarded as a sequence element, and position encoding is added to retain spatial information. Image segmentation is to divide the face image into small blocks of fixed size, and each small block will be used as an encoder based on the self-attention mechanism, that is, the input sequence element of the Vision Transformer. Since the Transformer model itself does not have the ability to process the order of sequence data, it is necessary to add position encoding to each small block. By adding position encoding, the model can capture the spatial dependencies in the image, which can reduce the computational complexity of the model while retaining the spatial structure information of the image. The size and step size of the blocks can be adjusted according to actual needs. Then, these sequence elements are fed into a network composed of multiple Transformer encoder layers. Each encoder layer contains a self-attention mechanism and a feedforward neural network. The former is used to capture the global dependencies between image blocks, is responsible for calculating the similarity between sequence elements and updating their representations, and the latter further extracts features. Finally, the output sequence is recombined according to the corresponding channels to obtain a second feature with the same feature dimension as the previous encoder output.
[0060] Based on the above embodiment, the training process of the artificial intelligence forged face identification model includes the following steps:
[0061] a3) obtaining facial images labeled with real faces and artificial intelligence-forged faces as training data sets;
[0062] b3) Divide the historical data set into a training set and a test set according to a split ratio of 8:2;
[0063] c3) Constructing an initial model for artificial intelligence fake face identification based on an image processing deep learning model with a multi-head self-attention mechanism;
[0064] d3) training the initial model of artificial intelligence forged face identification according to the training set to obtain the basic model of artificial intelligence forged face identification;
[0065] e3) Use the test set to perform performance testing on the basic model for artificial intelligence fake face identification;
[0066] f3) If the test results of the performance test meet the preset model test pass conditions, the artificial intelligence forged face identification basic model will be used as the final artificial intelligence forged face identification model, otherwise the artificial intelligence forged face identification initial model will be re-trained according to the training set.
[0067] On the basis of the above embodiment, after obtaining facial images labeled with real faces and artificial intelligence forged faces as training data sets, it also includes: assigning different weight coefficients to the facial images according to the difficulty of the facial images.
[0068] Specifically, in order to solve the problem that the confusion of sample difficulty during training may cause unsatisfactory training results, in this embodiment, different weights are assigned to different samples according to the difficulty of the samples. For samples that are difficult to identify, a larger weight is given so that the model pays more attention to these samples during training. A dynamic weight adjustment algorithm is designed to adjust the sample weight in real time according to the training status and performance indicators of the model. Strategies such as exponential decay and cosine decay can be used to make the weight adjustment smoother and more reasonable.
[0069] The present invention discloses an artificial intelligence forged face identification method, which comprises: obtaining a face image to be identified; inputting the face image into a pre-trained artificial intelligence forged face identification model, and outputting the identification result of the face in the face image; wherein the artificial intelligence forged face identification model is obtained by training an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1000 face images labeled with real faces and 1000 artificial intelligence forged faces; the identification results include: real faces and artificial intelligence forged faces. By using this method: the global information of the image is captured and efficiently processed, thereby improving the accuracy and efficiency of face identification.
[0070] Figure 2 The present invention also provides an artificial intelligence forged face identification method device structure diagram, such as Figure 2 As shown, a data acquisition module 210 and an image identification module 220.
[0071] The data acquisition module 210 is used to acquire a face image to be recognized;
[0072] The image identification module 220 is used to input the facial image into a pre-trained artificial intelligence forged face identification model, and output the identification result of the face in the facial image; wherein the artificial intelligence forged face identification model is trained by an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1,000 facial images labeled with real faces and 1,000 artificial intelligence forged faces; the identification result includes: the real face and the artificial intelligence forged face.
[0073] The technical solution provided by the embodiment of the present disclosure utilizes this method to achieve the capture and efficient processing of global image information, thereby improving the accuracy and efficiency of face identification.
[0074] Furthermore, the image identification module 220 may be used to:
[0075] The artificial intelligence forged face identification model includes: a convolutional neural network, an encoding network, and a fully connected network; correspondingly, the face image is input into the pre-trained artificial intelligence forged face identification model, and the identification result of the face in the face image is output, including:
[0076] Inputting the face image into the convolutional neural network, and extracting geometric features of the face in the face image through the convolutional neural network;
[0077] Inputting the geometric features into the encoding network, and determining the facial unit consistency features of the face image through the encoding network;
[0078] The facial unit consistency feature is input into the fully connected network, and the identification result corresponding to the face image is determined by the fully connected network based on the facial unit consistency feature.
[0079] Furthermore, the image identification module 220 may also be used to:
[0080] The encoding network includes multiple cascaded encoders, and the working process of each encoder is as follows:
[0081] Obtaining facial unit importance weight vectors corresponding to each facial unit-related region in the facial image, and performing feature enhancement on a feature output by a previous encoder based on the facial unit importance weight vectors to obtain a first feature corresponding to the feature output by the previous encoder;
[0082] Acquire a second feature corresponding to the feature output by the previous encoder based on the feature output by the previous encoder; the second feature corresponding to the feature output by the previous encoder is used to characterize the correlation between the features of each channel in the feature output by the previous encoder;
[0083] Feature aggregation is performed on the first feature and the second feature corresponding to the feature output by the previous encoder, and the aggregated feature is output.
[0084] Furthermore, the image identification module 220 may also be used to:
[0085] The input features of the first encoder of the encoding network are the geometric features of the face in the face image obtained by the basic feature extraction network; the output of the last encoder of the encoding network is the facial unit consistency feature of the face image.
[0086] Furthermore, the image identification module 220 may also be used to:
[0087] Taking the features of each channel in the features output by the previous encoder as an image block, and expanding them to obtain an image block sequence;
[0088] Inputting the image block sequence into an encoder based on a self-attention mechanism to obtain an output sequence of the encoder;
[0089] The output sequences are recombined according to their corresponding channels to obtain the second features with the same feature dimension as that output by the previous encoder.
[0090] Furthermore, the device can also be used for:
[0091] Acquire the face images annotated with the real face and the artificial intelligence forged face as a training data set;
[0092] Dividing the historical data set into a training set and a test set according to a split ratio of 8:2;
[0093] Construct an initial model for artificial intelligence fake face identification based on an image processing deep learning model with a multi-head self-attention mechanism;
[0094] The artificial intelligence forged face identification initial model is trained according to the training set to obtain the artificial intelligence forged face identification basic model;
[0095] Using the test set to perform performance testing on the artificial intelligence forged face identification basic model;
[0096] If the test result of the performance test meets the preset model test pass condition, the artificial intelligence forged face identification basic model will be used as the final artificial intelligence forged face identification model, otherwise the artificial intelligence forged face identification initial model will be re-trained according to the training set.
[0097] Furthermore, the device can also be used for:
[0098] After obtaining the face images annotated with the real face and the artificial intelligence forged face as a training data set, the method further includes:
[0099] Different weight coefficients are allocated to the facial images according to the difficulty of the facial images.
[0100] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.
[0101] Figure 3A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is given. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0102] like Figure 3 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0103] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0104] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as an artificial intelligence forged face identification method.
[0105] In some embodiments, the artificial intelligence forged face identification method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the artificial intelligence forged face identification method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the artificial intelligence forged face identification method by any other appropriate means (for example, by means of firmware).
[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0108] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0111] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0113] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An artificial intelligence forged face identification method, characterized in that: include: Obtain a face image to be recognized; The facial image is input into a pre-trained artificial intelligence forged face identification model, and the identification result of the face in the facial image is output; wherein the artificial intelligence forged face identification model is trained by an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1,000 facial images labeled with real faces and 1,000 artificial intelligence forged faces; the identification result includes: the real face and the artificial intelligence forged face.
2. The method according to claim 1, characterized in that The artificial intelligence forged face identification model includes: a convolutional neural network, an encoding network, and a fully connected network; correspondingly, the face image is input into the pre-trained artificial intelligence forged face identification model, and the identification result of the face in the face image is output, including: Inputting the face image into the convolutional neural network, and extracting geometric features of the face in the face image through the convolutional neural network; Inputting the geometric features into the encoding network, and determining the facial unit consistency features of the face image through the encoding network; The facial unit consistency feature is input into the fully connected network, and the identification result corresponding to the face image is determined by the fully connected network based on the facial unit consistency feature.
3. The method according to claim 2, characterized in that The encoding network includes multiple cascaded encoders, and the process of each encoder is as follows: Obtaining facial unit importance weight vectors corresponding to each facial unit-related region in the facial image, and performing feature enhancement on a feature output by a previous encoder based on the facial unit importance weight vectors to obtain a first feature corresponding to the feature output by the previous encoder; Acquire a second feature corresponding to the feature output by the previous encoder based on the feature output by the previous encoder; the second feature corresponding to the feature output by the previous encoder is used to characterize the correlation between the features of each channel in the feature output by the previous encoder; Feature aggregation is performed on the first feature and the second feature corresponding to the feature output by the previous encoder, and the aggregated feature is output.
4. The method according to claim 3, characterized in that The input features of the first encoder of the encoding network are the geometric features of the face in the face image obtained by the basic feature extraction network; the output of the last encoder of the encoding network is the facial unit consistency feature of the face image.
5. The method according to claim 3, characterized in that: The acquiring, based on the feature output by the previous encoder, a second feature corresponding to the feature output by the previous encoder, comprises: Taking the features of each channel in the features output by the previous encoder as an image block, and expanding them to obtain an image block sequence; Inputting the image block sequence into an encoder based on a self-attention mechanism to obtain an output sequence of the encoder; The output sequences are recombined according to their corresponding channels to obtain the second features with the same feature dimension as that output by the previous encoder.
6. The method according to claim 1, characterized in that The training process of the artificial intelligence forged face identification model includes: Acquire the face images annotated with the real face and the artificial intelligence forged face as a training data set; Dividing the historical data set into a training set and a test set according to a split ratio of 8:2; Construct an initial model for artificial intelligence fake face identification based on an image processing deep learning model with a multi-head self-attention mechanism; The artificial intelligence forged face identification initial model is trained according to the training set to obtain the artificial intelligence forged face identification basic model; Using the test set to perform performance testing on the artificial intelligence forged face identification basic model; If the test result of the performance test meets the preset model test pass condition, the artificial intelligence forged face identification basic model will be used as the final artificial intelligence forged face identification model, otherwise the artificial intelligence forged face identification initial model will be re-trained according to the training set.
7. The method according to claim 6, characterized in that After obtaining the face images annotated with the real face and the artificial intelligence forged face as a training data set, the method further includes: Different weight coefficients are allocated to the facial images according to the difficulty of the facial images.
8. An artificial intelligence forged face identification device, characterized in that: include: A data acquisition module, used to acquire a face image to be recognized; An image identification module is used to input the facial image into a pre-trained artificial intelligence forged face identification model, and output the identification result of the face in the facial image; wherein the artificial intelligence forged face identification model is trained by an image processing deep learning model based on a multi-head self-attention mechanism; the training data set of the artificial intelligence forged face identification model is 1,000 facial images labeled with real faces and 1,000 artificial intelligence forged faces; the identification result includes: the real face and the artificial intelligence forged face.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the artificial intelligence forged face identification method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the artificial intelligence forged face identification method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Face anti-counterfeiting identification method and device, equipment and storage medium
CN122244929A
A method, device, equipment and storage medium for facial recognition anti-counterfeiting.
CN122244929B