Face recognition method and device

Through the combination of dual-agent generation network and dual-agent-prioritized guided discrimination network, the accuracy and stability of the face recognition system in complex application scenarios are solved, and the rapid and accurate recognition of multi-faceted faces under non-restrictive conditions is achieved .

CN119068527APending Publication Date: 2024-12-03ZHEJIANG TUXUN TECH CO LTD

Patent Information

Application Number
CN202411136569.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Existing facial recognition systems are difficult to ensure accuracy and stability in complex application scenarios, especially under non-limiting conditions, the ambient light is unstable, the personnel posture is changing, and the impact of occlusions, which makes it difficult to ensure image quality and affect real-time. Accuracy and reliability of detection and warning.

Method used

The dual-agent generation network and the dual-agent-prioritized discrimination network are used to detect the face images in the video stream, perform posture correction and identity judgment, and use the corrected sub-network and the restoration network to process the images to generate the corrected positive face. Images, combined with preset front face image tags, determine the authenticity of face posture and identity.

Benefits of technology

It realizes the accuracy and reliability of multi-face recognition in complex scenarios, can quickly and accurately identify multi-faces in video streams, and improves the stability and accuracy of the face recognition system under non-restrictive conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068527A_ABST
    Figure CN119068527A_ABST
Patent Text Reader

Abstract

The invention discloses a face recognition method and device, and the method comprises the steps: detecting a face in a video stream, and obtaining a first face image; inputting the first face image into a double-agent generation network to obtain a second face image; the second face image is a corrected front face image; and at least inputting the second face image and a preset front face image label into the double-agent-prior guidance discrimination network to judge whether the face posture and the face identity in the second face image are true or false. According to the invention, multiple faces in the video stream can be quickly and accurately recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of face recognition, and in particular to a face recognition method and device. Background Art

[0002] In recent years, the rapid development of deep learning and computer vision has promoted the explosive progress of face recognition technology. At present, face recognition technology has been widely used in our work and life, such as identity authentication, access control and attendance, mobile payment, etc. In these application fields, the accuracy and reliability of existing face recognition systems have reached a very high level.

[0003] The application fields mentioned above are all restrictive. The factors that affect face collection, detection and recognition are strictly restricted. These factors can be divided into three categories: internal factors, external factors and other factors. Internal factors are related to the face itself, mainly including the face's posture, orientation, expression, age change, hairstyle, whether to wear glasses, whether to wear a mask, etc.; external factors are related to the physical environment and the face collection system, mainly including too strong or too weak ambient light, electromagnetic interference, resolution, equipment imaging quality, imaging size, etc. Other factors refer to whether the user will actively cooperate with the collection, detection and recognition of the face. The user's cooperation will directly improve the quality of internal and external factors. However, the real physical environment is complex and changeable, and is often full of uncertainty. Under non-restrictive conditions, the quality of various factors is difficult to guarantee, which leads to huge challenges for existing face recognition systems when dealing with complex application scenarios. In these scenarios, the image content may be lost, mutated and non-standard, which seriously affects the accuracy and stability of the face recognition system and makes it difficult to achieve satisfactory results.

[0004] Taking the real-time detection and early warning face recognition system in the factory workshop surveillance camera as an example, this complex application scenario with non-restrictive characteristics has put forward higher requirements for face recognition technology. In the factory workshop, the ambient lighting conditions are unstable, the activities of personnel are frequent and the postures are changeable, and they may also be affected by various obstructions and interference factors. These factors may make it difficult for the face recognition system to accurately capture and analyze facial images, which in turn affects the accuracy and reliability of real-time detection and early warning. Therefore, in complex application scenarios with non-restrictive characteristics, it is crucial to realize the recognition of multiple faces. Summary of the invention

[0005] The embodiments of the present application provide a face recognition method and device to solve the problem of poor accuracy and reliability in multi-face recognition in complex scenarios.

[0006] In view of this, the first aspect of the present application provides a face recognition method, comprising:

[0007] Detecting a face in a video stream and obtaining a first face image;

[0008] Inputting the first face image into a dual-agent generation network to obtain a second face image; the second face image is a corrected frontal face image;

[0009] At least the second face image and the preset frontal face image label are input into the dual-proxy-prior guided discriminant network to judge the authenticity of the face posture and face identity in the second face image.

[0010] Optionally, detecting a face in a video stream and acquiring a first face image includes:

[0011] A preset face detection algorithm model is used to detect faces in a video stream to obtain a first face image; the face detection algorithm model is composed of three cascaded CNN networks; and a FaceNet recognizer is used to recognize faces.

[0012] Optionally, the dual-agent generation network includes at least a correction subnetwork;

[0013] The step of inputting the first face image into a dual-agent generation network to obtain a second face image comprises:

[0014] Inputting the first face image into a posture normalization model, obtaining a frontal face key point heat map and a deflection key point heat map of the face in the first face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, wherein the 3D model of a frontal posture is a frontal face key point heat map;

[0015] The frontal face key point heat map and the deflection key point heat map are input into the correction sub-network to obtain the second face image after the posture correction is performed on the face in the first face image.

[0016] Optionally, the dual-agent generation network includes a complex atomic network and a correction sub-network;

[0017] The step of inputting the first face image into a dual-agent generation network to obtain a second face image comprises:

[0018] Inputting the first face image into a complex atom network to obtain a third face image, wherein the third face image is a face image after the first face image is sharpened;

[0019] Inputting the third face image into a posture normalization model, obtaining a frontal face key point heat map and a deflection key point heat map of the face in the third face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, wherein the 3D model of a frontal posture is a frontal face key point heat map;

[0020] The frontal face key point heat map and the deflection key point heat map are input into the correction sub-network to obtain the second face image after the posture correction is performed on the face in the third face image.

[0021] Optionally, the step of inputting at least the second facial image and a preset frontal facial image label into the dual-proxy-prior guided discriminant network to judge the authenticity of facial posture and facial identity in the second facial image includes:

[0022] Inputting at least the second face image, the frontal face key point heat map and the preset frontal face image label into a dual proxy-prior guided discriminant network to determine whether the face posture in the second face image is true or false;

[0023] At least the second face image, a preset face identity feature map and a preset frontal face image label are input into a dual-proxy-prior guided discriminant network to determine the identity of the face in the second face image.

[0024] Optionally, the face restoration loss function of the complex atomic network is defined as:

[0025]

[0026] Among them, P1 represents the real high-quality image set, represents the predicted high-quality image set, i represents the i-th image, i≤n.

[0027] Optionally, the training of the correction subnet utilizes a correction loss function:

[0028]

[0029] Among them, P2 represents the real high-quality and positive pose image set, represents the set of predicted high-quality and positive pose images, i represents the i-th image, i≤n.

[0030] Optionally, the method further includes:

[0031] The face detection algorithm model is trained using image frames of the video stream as training samples to obtain a trained face detection algorithm model.

[0032] Optionally, the method further includes:

[0033] CASIA-Webface is used as a training data set to train the face recognition model composed of the dual-agent generation network and the dual-agent-priori guided discriminant network to obtain the trained face recognition model.

[0034] In an embodiment of the present application, a face recognition method and device is also provided, including:

[0035] A face detection unit, used to detect a face in a video stream and obtain a first face image;

[0036] A correction unit, used for inputting the first face image into a dual-agent generation network to obtain a second face image; the second face image is a corrected frontal face image;

[0037] The identity recognition unit is used to input at least the second face image and the preset frontal face image label into the dual-proxy-prior guided discriminant network to determine the authenticity of the face posture and face identity in the second face image.

[0038] The present application detects faces in a video stream to obtain a first face image; inputs the first face image into a dual-proxy generation network to obtain a second face image; the second face image is a corrected frontal face image; at least the second face image and a preset frontal face image label are input into the dual-proxy-prior guided discriminant network to determine the authenticity of the face posture and face identity in the second face image. The present application can quickly and accurately identify multiple faces in a video stream. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of a flow chart of an embodiment of a face recognition method of the present application;

[0040] Figure 2 This is a flow chart of another embodiment of a face recognition method of the present application;

[0041] Figure 3 A schematic diagram of a flow chart of another embodiment of a face recognition method of the present application;

[0042] Figure 4 A schematic diagram of the architecture of an embodiment of the face recognition model of the present application;

[0043] Figure 5 Schematic diagram of the applicant's face posture before and after correction;

[0044] Figure 6 A schematic diagram of the application for identifying multiple faces in a video stream;

[0045] Figure 7 The figure is a structural schematic diagram of a face recognition device. DETAILED DESCRIPTION

[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] Figure 1 This is a flow chart of an embodiment of a face recognition method of the present application. Figure 1 As shown, Figure 1 Included:

[0048] S101, detecting a face in a video stream and obtaining a first face image;

[0049] It should be noted that the present embodiment can detect facial images in a video stream, the video stream may include a single or multiple faces, the video stream used may be a surveillance video stream or a streaming video, the video may be a high-quality, high-definition video, or a lower-quality, lower-definition video. Specifically, the facial image in the video may be a video with a certain deflection angle, or a frontal face video.

[0050] The first face image may be an image containing only a face image frame obtained by using a face detection algorithm. In this embodiment, a preset face recognition model may be used to extract the face image.

[0051] S102, inputting the first face image into a dual-agent generation network to obtain a second face image; the second face image is a corrected frontal face image;

[0052] This embodiment aims to have a high resolution for facial images with a certain deflection angle or for frontal facial images. Therefore, this embodiment can use a pair of proxy generation networks to correct facial images with a certain deflection angle in the image to obtain a frontal facial image.

[0053] S103: input at least the second facial image and the preset frontal facial image label into the dual-proxy-prior guided discriminant network to judge the authenticity of the facial posture and facial identity in the second facial image.

[0054] The preset frontal face image labels are identity labels of different faces, and the identity labels can be used as inputs of the dual proxy-prior guided discriminant network. This embodiment is to identify the identity and posture of the corrected face image, that is, the second face image is also used as the input of the dual proxy-prior guided discriminant network.

[0055] In this embodiment, the dual-proxy-prior guided discriminant network is used to determine the identity and posture of the input second face image based on the existing face identity and frontal face posture labels, thereby completing the identity recognition of multiple faces in the video stream.

[0056] The present application detects faces in a video stream to obtain a first face image; inputs the first face image into a dual-proxy generation network to obtain a second face image; the second face image is a corrected frontal face image; at least the second face image and a preset frontal face image label are input into the dual-proxy-prior guided discriminant network to determine the authenticity of the face posture and face identity in the second face image. The present application can quickly and accurately identify multiple faces in a video stream.

[0057] The present application also includes another embodiment of a face recognition method, such as Figure 2 As shown, Figure 2 Included:

[0058] S201. Use a preset face detection algorithm model to detect faces in a video stream and obtain a first face image; the face detection algorithm model is composed of three cascaded CNN networks; and a FaceNet recognizer is used to recognize faces.

[0059] In one embodiment, the face detection model uses the MTCNN algorithm model, which is composed of three cascaded CNN networks: P-Net, R-Net, and O-Net, with high accuracy and capable of detecting multiple faces at one time. Face recognition uses the FaceNet recognizer.

[0060] In one embodiment, the image frames of the video stream may be used as training samples to train the face detection algorithm model to obtain a trained face detection algorithm model.

[0061] Specifically, the training samples for training the MTCNN face detection algorithm model can adopt face images detected by the detector from the video. Through the image sample acquisition method, more face image samples can be quickly acquired.

[0062] like Figure 6 As shown in the figure, the face detection algorithm model can be used to quickly and accurately identify multiple faces in the video stream. Figure 6The algorithm in this embodiment can detect and recognize multiple faces, where the red frame represents the detected face area and the accompanying green number represents the predicted identity ID of the face.

[0063] The face detection model used in this embodiment is only an exemplary solution. In fact, other face recognition models can also be used, and the appropriate face recognition model can be selected according to different scenarios. Similarly, the FaceNet recognizer used in this embodiment is only an exemplary solution. In fact, other face recognizers can also be used.

[0064] S202, inputting the first face image into a posture normalization model, and obtaining a frontal face key point heat map and a deflection key point heat map of the face in the first face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, and the 3D model of a frontal posture is the frontal face key point heat map;

[0065] In one embodiment, a posture normalization model can be used to perform posture normalization on facial images recognized from a video stream. The posture normalization model can restore a 3D model and a 3D model of a frontal posture for any given 2D facial image, and generate Gaussian heat maps of arbitrary facial key points and Gaussian heat maps of frontal facial key points (i.e., deflection key point heat maps and frontal face key point heat maps), which are used as inputs to the correction subnet to train the correction subnet.

[0066] S203: Input the frontal face key point heat map and the deflection key point heat map into the correction sub-network to obtain the second face image after posture correction is performed on the face in the first face image.

[0067] In this embodiment, the correction subnet includes an encoder E2 and a decoder F2, as shown in FIG. Figure 4 The structure of the correction subnet in the architecture diagram of the face recognition model shown in the figure, the input of the correction subnet is a face image with incorrect posture, a frontal face key point heat map and a deflected key point heat map after being processed by the posture normalization model, and the output of the correction subnet is a frontal face image.

[0068] The training of the correction subnet uses the correction loss function, which is:

[0069]

[0070] Among them, P2 represents the real high-quality and positive pose image set, represents the set of predicted high-quality and positive pose images, i represents the i-th image, i≤n.

[0071] S204, inputting at least the second facial image, the frontal facial key point heat map, and the preset frontal facial image label into a dual-proxy-prior guided discriminant network to determine whether the facial posture in the second facial image is true or false;

[0072] In this embodiment, the dual-proxy-prior guided discrimination network may include a posture discrimination subnet and an identity discrimination subnet. The posture discrimination subnet has two input ends, one end is the frontal face posture key point heat map and the high-quality second face image generated by the dual-proxy generation network, and the other end is the frontal face posture key point heat map and the high-quality frontal face image label given in advance, so as to judge the authenticity of the posture.

[0073] 205. Input at least the second facial image, a preset facial identity feature map, and a preset frontal facial image label into a dual-proxy-prior guided discriminant network to determine the identity of the face in the second facial image.

[0074] The input of the identity discrimination subnet also has two ends. One end is the face identity feature map and the high-quality second face image generated by the dual-agent generation network, and the other end is the face identity feature map and a pre-given high-quality frontal face image label to determine the authenticity of the identity.

[0075] This embodiment can be used to determine the identity and posture of a face in a face image in a high-quality video stream, and can obtain relatively accurate multi-face recognition results without complex subnets, and can also reduce the complexity of the network of the face recognition model architecture.

[0076] The present application also includes another embodiment of a face recognition method, such as Figure 3 As shown, Figure 3 Included:

[0077] S301, using a preset face detection algorithm model to detect faces in a video stream and obtain a first face image; the face detection algorithm model is composed of three cascaded CNN networks; and a FaceNet recognizer is used to recognize faces.

[0078] In one embodiment, the face detection model may use the MTCNN algorithm model, which is composed of three cascaded CNN networks, has high accuracy, and can detect multiple faces at one time. Face recognition uses the FaceNet recognizer.

[0079] S302, inputting the first facial image into a complex atomic network to obtain a third facial image, wherein the third facial image is a facial image after the first facial image is sharpened;

[0080] It should be noted that this embodiment can perform multi-face recognition on any video stream. It sets a complex subnet to solve the problem of face quality. High-quality and high-definition face images are obtained through the complex subnet, and the high-quality face images are input into the correction subnet, and then the face images with deflection angles are corrected.

[0081] The input of its complex subnet is a low-quality face affected by noise, blur, low resolution, poor lighting and other factors, and the output is a high-quality face with denoised, clear, high resolution and lighting normalization.

[0082] like Figure 4 As shown in Figure 1, the complex atomic network consists of two parts, namely the encoder E1 (Encoder) and the decoder F1 (Decoder). The input of the encoder is a low-quality face image, and the output is the original features extracted from the low-quality face image. The input of the decoder is the extracted original features, and the output is a processed high-quality face image.

[0083] The face restoration loss function of the complex atomic network is defined as:

[0084]

[0085] Among them, P1 represents the real high-quality image set, represents the predicted high-quality image set, i represents the i-th image, i≤n.

[0086] S303, inputting the third face image into a posture normalization model, and obtaining a frontal face key point heat map and a deflection key point heat map of the face in the third face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, and the 3D model of a frontal posture is the frontal face key point heat map;

[0087] In one embodiment, a posture normalization model can be used to perform posture normalization on high-quality facial images output from the complex subnet. The posture normalization model can restore a 3D model and a 3D model of a frontal posture for any given 2D facial image, and generate Gaussian heat maps of arbitrary facial key points and Gaussian heat maps of frontal facial key points (i.e., deflected key point heat maps and frontal face key point heat maps), which are used as inputs to the correction subnet to train the correction subnet.

[0088] 304. Input the frontal face key point heat map and the deflection key point heat map into the correction subnetwork to obtain the second face image after posture correction is performed on the face in the third face image.

[0089] In this embodiment, the correction subnet includes an encoder E2 and a decoder F2, as shown in FIG. Figure 4The structure of the correction subnet in the architecture diagram of the face recognition model shown in the figure, the input of the correction subnet is the high-quality face image with incorrect posture output by the complex subnet, the frontal face key point heat map and the deflection key point heat map processed by the posture normalization model, and the output of the correction subnet is the frontal face image.

[0090] The training of the correction subnet uses the correction loss function, which is:

[0091]

[0092] Among them, P2 represents the real high-quality and positive pose image set, represents the set of predicted high-quality and positive pose images, i represents the i-th image, i≤n.

[0093] 305. Input at least the second facial image, the frontal facial key point heat map, and the preset frontal facial image label into a dual-proxy-prior guided discriminant network to determine whether the facial posture in the second facial image is true or false;

[0094] In this embodiment, the dual-proxy-prior guided discrimination network may include a posture discrimination subnet and an identity discrimination subnet. The posture discrimination subnet has two input ends, one end is the frontal face posture key point heat map and the high-quality second face image generated by the dual-proxy generation network, and the other end is the frontal face posture key point heat map and the high-quality frontal face image label given in advance, so as to judge the authenticity of the posture.

[0095] 306. Input at least the second facial image, the preset facial identity feature map, and the preset frontal facial image label into a dual-proxy-prior guided discriminant network to determine the identity of the face in the second facial image.

[0096] The input of the identity discrimination subnet also has two ends. One end is the face identity feature map and the high-quality second face image generated by the dual-agent generation network, and the other end is the face identity feature map and a pre-given high-quality frontal face image label to determine the authenticity of the identity.

[0097] In one embodiment, the method further comprises:

[0098] CASIA-Webface is used as a training data set to train the face recognition model composed of the dual-agent generation network and the dual-agent-prior guided discriminant network, and AFLW-GT and AFLW-2000-3D are used as test data sets to obtain a trained face recognition model.

[0099] like Figure 5 This is a schematic diagram of the applicant's face posture before and after correction. Figure 5The first line in the figure is the original image, and the second line is the face restoration and correction result. This embodiment can better recognize the face image when the face deflection angle is less than 45 degrees.

[0100] This embodiment proposes a comprehensive face restoration method, namely, an arbitrary face restoration model, to address the low-quality problem of face images under unrestricted conditions, such as deflection, illumination, blur, noise and other problems. This method can solve all factors affecting low face quality at one time, thereby restoring high-quality face images; and for face images with deflection angles extracted from video streams, this embodiment of the application can also perform posture correction on the face to complete fast and accurate recognition, that is, this embodiment can use low-quality and incorrect posture images as input and high-quality and posture-corrected images as output. The dual-agent-prior-guided discriminant network takes the image predicted by the generative network as input, compares it with the real label, determines its authenticity, and guides the generator to generate images that meet the requirements.

[0101] In the embodiment of the present application, a face recognition method and device is also provided. Figure 7 As shown, including:

[0102] A face detection unit 701 is used to detect faces in a video stream and obtain a first face image;

[0103] A correction unit 702 is used to input the first face image into a dual-agent generation network to obtain a second face image; the second face image is a corrected frontal face image;

[0104] The identity recognition unit 703 is used to input at least the second face image and the preset frontal face image label into the dual-proxy-prior guided discriminant network to determine the authenticity of the face posture and face identity in the second face image.

[0105] In one embodiment, the face detection unit 701 is specifically used to detect faces in a video stream using a preset face detection algorithm model to obtain a first face image; the face detection algorithm model is composed of three cascaded CNN networks; and a FaceNet recognizer is used to recognize faces.

[0106] In one embodiment, the correction unit 702 is specifically used for inputting the first face image into the dual-agent generation network to obtain the second face image, including:

[0107] Inputting the first face image into a posture normalization model, obtaining a frontal face key point heat map and a deflection key point heat map of the face in the first face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, wherein the 3D model of a frontal posture is a frontal face key point heat map;

[0108] The frontal face key point heat map and the deflection key point heat map are input into the correction sub-network to obtain the second face image after the posture correction is performed on the face in the first face image.

[0109] In one embodiment, the correction unit 702 may also be used to input the first facial image into a complex atom network to obtain a third facial image, where the third facial image is a facial image after the first facial image is sharpened;

[0110] Inputting the third face image into a posture normalization model, obtaining a frontal face key point heat map and a deflection key point heat map of the face in the third face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, wherein the 3D model of a frontal posture is a frontal face key point heat map;

[0111] The frontal face key point heat map and the deflection key point heat map are input into the correction sub-network to obtain the second face image after the posture correction is performed on the face in the third face image.

[0112] In one embodiment, the identity recognition unit 703 is specifically used to input at least the second face image, the frontal key point heat map and the preset frontal face image label into the dual proxy-prior guided discriminant network to determine the authenticity of the face posture in the second face image;

[0113] At least the second face image, a preset face identity feature map and a preset frontal face image label are input into a dual-proxy-prior guided discriminant network to determine the identity of the face in the second face image.

[0114] The embodiment of the present application obtains a first face image by detecting a face in a video stream; the first face image is input into a dual-proxy generation network to obtain a second face image; the second face image is a corrected frontal face image; at least the second face image and a preset frontal face image label are input into the dual-proxy-prior guided discriminant network to judge the authenticity of the face posture and face identity in the second face image. The present application can quickly and accurately identify multiple faces in a video stream.

[0115] The terms "first", "second", "third", "fourth", etc. 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 sequential order. 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.

[0116] 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.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed systems, 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 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0118] The units described 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.

[0119] 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.

[0120] 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 a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.

[0121] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A face recognition method, characterized in that: include: Detecting a face in a video stream and obtaining a first face image; Inputting the first face image into a dual-agent generation network to obtain a second face image; the second face image is a corrected frontal face image; At least the second face image and the preset frontal face image label are input into the dual-proxy-prior guided discriminant network to judge the authenticity of the face posture and face identity in the second face image.

2. According to the face recognition method of claim 1, the step of detecting a face in a video stream and obtaining a first face image comprises: Using a preset face detection algorithm model to detect faces in the video stream, and obtaining a first face image; The face detection algorithm model is composed of three cascaded CNN networks; the FaceNet recognizer is used to recognize faces.

3. The face recognition method according to claim 1, wherein the dual-agent generation network comprises at least a correction subnetwork; The step of inputting the first face image into a dual-agent generation network to obtain a second face image comprises: Inputting the first face image into a posture normalization model to obtain a frontal face key point heat map and a deflection key point heat map of the face in the first face image; The posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, and the 3D model of a frontal posture is a heat map of key points of the front face; The frontal face key point heat map and the deflection key point heat map are input into the correction sub-network to obtain the second face image after the posture correction is performed on the face in the first face image.

4. The face recognition method according to claim 1, wherein the dual-agent generation network comprises a complex atomic network and a correction sub-network; The step of inputting the first face image into a dual-agent generation network to obtain a second face image comprises: Inputting the first face image into a complex atom network to obtain a third face image, wherein the third face image is a face image after the first face image is sharpened; Inputting the third face image into a posture normalization model, obtaining a frontal face key point heat map and a deflection key point heat map of the face in the third face image; the posture normalization model is used to restore the 2D face image into a 3D model and a 3D model of a frontal posture, wherein the 3D model of a frontal posture is a frontal face key point heat map; The frontal face key point heat map and the deflection key point heat map are input into the correction sub-network to obtain the second face image after the posture correction is performed on the face in the third face image.

5. The face recognition method according to claim 3 or 4, wherein at least the second face image and the preset frontal face image label are input into the dual proxy-prior guided discriminant network to judge the authenticity of the face posture and face identity in the second face image, comprising: Inputting at least the second face image, the frontal face key point heat map and the preset frontal face image label into a dual proxy-prior guided discriminant network to determine whether the face posture in the second face image is true or false; At least the second face image, a preset face identity feature map and a preset frontal face image label are input into a dual-proxy-prior guided discriminant network to determine the identity of the face in the second face image.

6. According to the face recognition method of claim 4, the face restoration loss function of the complex atomic network is defined as: in, P1 represents the real high-quality image set, represents the predicted high-quality image set, i represents the i-th image, i≤n.

7. According to the face recognition method of claim 4, the training of the correction subnet uses the correction loss function: in, P2 represents the real high-quality and positive pose image set, represents the set of predicted high-quality and positive pose images, i represents the i-th image, i≤n.

8. The face recognition method according to claim 2, further comprising: The face detection algorithm model is trained using image frames of the video stream as training samples to obtain a trained face detection algorithm model.

9. The face recognition method according to claim 1, further comprising: CASIA-Webface is used as a training data set to train the face recognition model composed of the dual-agent generation network and the dual-agent-priori guided discriminant network to obtain the trained face recognition model.

10. A face recognition method and device, comprising: A face detection unit, used to detect a face in a video stream and obtain a first face image; A correction unit, used for inputting the first face image into a dual-agent generation network to obtain a second face image; the second face image is a corrected frontal face image; The identity recognition unit is used to input at least the second face image and the preset frontal face image label into the dual-proxy-prior guided discriminant network to determine the authenticity of the face posture and face identity in the second face image.

Citation Information

Patent Citations

  • Face recognition method in pedestrians

    CN110110650A

  • Multi-pose face recognition method based on face frontage

    CN112418041A

  • Face recognition algorithm and face recognition device adaptive to illumination interference environment

    CN112818938A

  • Monitoring method and device, equipment and storage medium

    CN114049593A

  • Face feature encoder training method, face verification method and related equipment

    CN116740483A

Cited By

  • Sperm library identity verification system and method based on face recognition

    CN120014681A

  • Sperm bank identity verification system and method based on face recognition

    CN120014681B