Face recognition method based on artificial intelligence

By using the TC feature extractor and feature diffusion allocator in face recognition, combined with the multi-head attention mechanism, the connection feature map and attention map are generated, which solves the problem of high false positive and false negative rates in multi-angle/multi-pose face recognition. problem, achieving higher recognition accuracy.

CN118711228AInactive Publication Date: 2024-09-27HAIKOU QIONGZHI INTELLIGENT TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410749290.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing face recognition algorithms have high false positive and false negative rates in multi-angle/multi-pose face recognition, and are greatly affected by angle deflection, resulting in low recognition accuracy.

Method used

An artificial intelligence-based method is used to perform step-by-step feature extraction through multiple TC feature extractors set in series. It combines the feature diffusion allocator and the multi-head attention mechanism to generate connection feature maps and attention maps, and fuse feature information to identify face identities. .

Benefits of technology

It significantly reduces the false positive rate and false negative rate of multi-angle/multi-pose face recognition, which is 12.63% and 8.79% lower than the existing technology, improving the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711228A
    Figure CN118711228A
Patent Text Reader

Abstract

The invention discloses a face recognition method based on artificial intelligence, and belongs to the technical field of face recognition. The recognition method comprises the following steps: acquiring a to-be-recognized face image; performing step-by-step feature extraction processing on the face image by using a feature diffusion distributor and a plurality of TC feature extractors which are arranged in series to obtain a plurality of joined feature maps; performing vectorization processing on the at least one connection feature map to obtain an attention map; and identifying the identity information of the face in the face image based on the connection feature map and the attention map. A multi-domain interactive perception mechanism is set in the TC feature extractor to learn an incidence relation and an affine relation between homogeneous image features in different receptive fields, a good deep structured feature extraction capability is provided for face images in various poses, and more feature information which does not change along with the change of the poses can be reserved in an attention map. Therefore, the model can better avoid the interference of unstable features, and the false alarm rate and the missing report rate are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of face recognition, and in particular, relates to a face recognition method based on artificial intelligence. Background Art

[0002] Existing face recognition algorithms require that the angle of the face to be identified is relatively consistent with the angle of the face in the sample library (the relative deflection angle between the two is small) to obtain a relatively accurate recognition result. Limited by external factors such as the actual deployment site, in many cases, the face in the image to be identified often has a large relative deflection from the face angle in the sample library, resulting in high false alarm and missed alarm rates during face recognition. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a face recognition method based on artificial intelligence to reduce the false alarm rate and missed alarm rate in multi-angle / multi-posture face recognition.

[0004] In order to achieve the above object, the solution adopted by the present invention is: a face recognition method based on artificial intelligence, comprising the following steps:

[0005] Acquire a face image to be identified; perform step-by-step feature extraction processing on the acquired face image to obtain multiple connection feature maps; perform vectorization processing on at least one of the connection feature maps to obtain an attention map; and identify the identity information of the face in the face image based on the connection feature map and the attention map.

[0006] Furthermore, the acquired face image is subjected to step-by-step feature extraction processing, including: performing step-by-step feature extraction processing on the face image using a plurality of TC feature extractors arranged in series.

[0007] Furthermore, the calculation method inside the TC feature extractor is:

[0008] Φ1=κ1(f1(α1))

[0009] Φ2=κ2(f2(α1))

[0010] Φ3=κ3(f3(α1))

[0011] Φ4=γ1(h1((Φ2-Φ1)Δα2))

[0012] β1=ψ((γ2(h2(α1+Φ3)))ΔΦ1ΔΦ2)

[0013] β2=κ4(f4(Φ3Δ(Φ4+β1)))

[0014] Among them, α1 and α2 are respectively used as the diameter-one feature map and the diameter-two feature map of the input TC feature extractor, f1, f2, f3 and f4 all represent convolution operation layers, the convolution kernel sizes used by f1, f2 and f3 are different, κ1, κ2, κ3 and κ4 all represent the activation processing of the feature map using a type-one function as the activation function, Δ represents the element-wise product operation, h1 and h2 both represent deformable convolution operations, γ1 and γ2 both represent the activation processing of the feature map using a type-two function as the activation function, ψ represents the activation processing of the feature map using a type-three function as the activation function, β1 is the first connection feature map generated and output by the TC feature extractor, and the first connection feature map is processed as the diameter-two feature map input to the next-level TC feature extractor, β2 is the second connection feature map generated and output by the TC feature extractor, and the second connection feature map is processed as the diameter-one feature map input to the next-level TC feature extractor.

[0015] Furthermore, the first connection feature map is down-sampled and used as the input to the next-level TC feature extractor as the second feature map, and the second connection feature map is down-sampled and used as the input to the next-level TC feature extractor as the first feature map.

[0016] Furthermore, a feature diffusion distributor is provided at the front end of the first TC feature extractor, and the face image is processed by the feature diffusion distributor to obtain a first distribution feature map and a second distribution feature map. The first distribution feature map is used as a diameter-one feature map input to the first TC feature extractor, and the second distribution feature map is used as a diameter-two feature map input to the first TC feature extractor.

[0017] Furthermore, the facial image processing process inside the feature diffusion allocator includes the following steps:

[0018] The face image to be recognized is subjected to a first convolution and a first activation process in sequence to obtain a first diffusion feature map; the first diffusion feature map is subjected to a second convolution process to obtain a second diffusion feature map; the second diffusion feature map is subjected to a second activation process and then added to the first diffusion feature map to obtain the first distribution feature map; the second diffusion feature map is multiplied by the first diffusion feature map to obtain a third diffusion feature map, and then the third diffusion feature map is subjected to a third activation process to obtain the second distribution feature map.

[0019] Furthermore, all first connection feature maps and second connection feature maps are vectorized to obtain attention maps.

[0020] Furthermore, all the first connection feature maps and the second connection feature maps are vectorized to obtain an attention map, including:

[0021] The first connection feature map and the second connection feature map generated by the same TC feature extractor are added together to obtain multiple first perceptual feature maps; each of the first perceptual feature maps is globally pooled and activated in the spatial direction to generate multiple second perceptual feature maps; all the second perceptual feature maps are spliced ​​together, and then processed and activated by the perceptual convolution layer to generate the attention map.

[0022] Further, identifying identity information of a face in the face image based on the connection feature map and the attention map includes:

[0023] After performing global pooling operations on the first connection feature map and the second connection feature map output by the last TC feature extractor in the spatial direction, a first connection vector and a second connection vector are obtained respectively; the attention map, the first connection vector and the second connection vector are fused to obtain an acquisition vector; according to preset conditions, a matching vector corresponding to the acquisition vector is retrieved from a target database, and the identity information of the face in the face image to be identified is determined according to the identity information of the matching vector.

[0024] Further, the attention map, the first connection vector and the second connection vector are fused to obtain a collection vector, including:

[0025] The first connection vector is sequentially processed by the first fully connected layer and the first function activation to obtain a first intermediate vector, and the second connection vector is sequentially processed by the second fully connected layer and the second function activation to obtain a second intermediate vector; the first intermediate vector is added to the second intermediate vector to obtain a third intermediate vector; the attention map is weighted to the third intermediate vector to obtain the acquisition vector.

[0026] The beneficial effects of the present invention are:

[0027] (1) In recent years, various feature extraction mechanisms based on the improvement of transformer architecture have achieved surprising achievements in the field of computer vision, proving that the transformer architecture has great application value in the field of image processing; therefore, according to the characteristics and difficulties of multi-pose / multi-angle face recognition tasks, the present invention improves the multi-head attention mechanism and combines it with the convolutional network to creatively design the TC feature extractor. First, multi-head feature encoding is performed through f1, f2 and f3, and then the subsequent multi-domain interactive perception mechanism is used to learn the correlation and affine relationship between homogeneous image features under different receptive fields. Finally, the learning results are retained in the feature maps β1 and β2 for output. The TC feature extractor has a good deep structured feature extraction capability for face images under various poses (or perspectives). The comparison experiment of the present invention with other face recognition models shows that the false alarm rate of the present invention for multi-pose face recognition is at least 12.63% lower than that of the prior art, and the false alarm rate is at least 8.79% lower than that of the prior art, which has made great progress.

[0028] (2) The present invention creatively designs a simple and reliable feature diffusion allocator to extract shallow feature information of facial images. Compared with the conventional single convolutional layer, the feature diffusion allocator can provide better multi-dimensional image feature information to the subsequent TC feature extractor without increasing the amount of calculation, thereby better compensating for the shortcomings of the convolutional network in global perception.

[0029] (3) The present invention uses the connection feature map generated in the feature extraction process to generate an attention map, and fuses the attention map, the first connection vector and the second connection vector at the end of the network to generate a collection vector. In this way, the attention map can uniformly and efficiently adjust the global features based on the detailed multi-level information in the middle, rather than dispersively and redundantly adjusting the feature maps at each level. Moreover, after adopting this structure, the process of generating the attention map from the connection feature map includes more of the model's deep abstract cognition of the face image, and the attention map can retain more feature information that does not change with the change of posture, so that the model can better avoid the interference of unstable features. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The figure is a schematic diagram of a process of generating a collection vector from a face image in one embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0032] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the embodiments of the present disclosure described herein.

[0033] The execution subject of this application can be an application, client, electronic device, etc. running on a browser. An application is a web app of a browser on a terminal. In addition, the electronic devices involved in this application may include but are not limited to mobile phones, personal digital assistants (PDAs), wireless handheld devices, tablet computers (Tablet Computers), personal computers (PCs), PDAs (Personal Digital Assistants), and other terminal devices.

[0034] Please refer to Figure 1 , this embodiment provides a face recognition method based on artificial intelligence, comprising the following steps:

[0035] S100, obtaining a face image to be recognized and obtaining a trained face recognition model. The face recognition model includes a feature diffusion distributor 1, a TC feature extractor 2, and an attention module 3, etc. The face recognition model is used to generate a collection vector after processing the face image.

[0036] S200, using a feature diffusion distributor 1 and five TC feature extractors 2 arranged in series to extract features of the face image step by step. Among them, the feature diffusion distributor obtains a first distribution feature map and a second distribution feature map after processing the face image, the first distribution feature map is used as the first feature map of the first TC feature extractor, and the second distribution feature map is used as the second feature map of the first TC feature extractor 2. Each TC feature extractor 2 takes two feature maps as input, and outputs a first connection feature map and a second connection feature map after calculation. The first connection feature map and the second connection feature map are usually equal in size. In the subsequent calculation process, the first connection feature map output by the previous TC feature extractor 2 is used as the second feature map of the next TC feature extractor 2 after downsampling, and the second connection feature map output by the previous TC feature extractor 2 is used as the first feature map of the next TC feature extractor after downsampling. Downsampling can be achieved by many existing methods. For example, in the present embodiment, all first connection feature maps and second connection feature maps are downsampled by using existing convolution operations (one connection feature map corresponds to one convolution operation for downsampling). The step sizes of these convolution operations are all 2, and the convolution kernel sizes are all 3*3. After the convolution operation, the height and width of the feature map are reduced, while the number of channels is increased.

[0037] S300, using the attention module 3 to perform vectorization processing on all the first connection feature maps and the second connection feature maps to obtain an attention map. The internal calculation process of the attention module 3 specifically includes the following steps:

[0038] The first connection feature map and the second connection feature map generated by the same TC feature extractor 2 are added together to obtain five first perceptual feature maps (the first connection feature map and the second connection feature map generated by one TC feature extractor 2 are added together to obtain one perceptual feature map).

[0039] Perform global maximum pooling processing and activation (for example, sigmoid function activation) on each first perceptual feature map in the spatial direction to generate five second perceptual feature maps, where the height and width of the second perceptual feature map are both 1.

[0040] All the second perceptual feature maps are concatenated, and then processed and activated by the perceptual convolution layer (for example, a sigmoid function can be used for activation) to generate an attention map. The perceptual convolution layer is an existing conventional convolution operation layer, and its convolution kernel size is 1*1.

[0041] S400, identifying the identity information of the face in the face image based on the connection feature map and the attention map. Specifically comprising the following steps:

[0042] After performing global average pooling operations on the first connection feature map and the second connection feature map output by the last TC feature extractor 2 in the spatial direction (the first connection feature map and the second connection feature map output by the last TC feature extractor 2 are no longer downsampled using a convolution operation with a step size of 2), the first connection vector and the second connection vector are obtained respectively.

[0043] The attention map, the first connection vector and the second connection vector are fused to obtain the acquisition vector.

[0044] According to the preset conditions, a matching vector corresponding to the acquisition vector is retrieved from the target database, and the identity information of the face in the face image to be identified is determined according to the identity information of the matching vector. As one implementation method, this embodiment calculates the L1 distance between the acquisition vector and all feature vectors in the target database. The feature vector that is closest to the acquisition vector and whose distance is less than a preset threshold is the retrieved matching vector corresponding to the acquisition vector. The feature vectors in the target database are all generated after feature extraction of the face image. These feature vectors carry identity information tags, and the identity of the matching vector is also the identity of the face in the face image to be identified.

[0045] As one of many implementation methods, the attention map, the first connection vector and the second connection vector are fused to obtain the acquisition vector, which can be implemented in the following manner:

[0046] The first connection vector is processed by the first fully connected layer and the first function activation (for example, the tanh function can be used for activation) to obtain the first intermediate vector, and the second connection vector is processed by the second fully connected layer and the second function activation (for example, the tanh function can be used for activation) to obtain the second intermediate vector. The number of input nodes of the first fully connected layer matches the length of the first connection vector, the number of input nodes of the second fully connected layer matches the length of the second connection vector, and the lengths of the first intermediate vector, the second intermediate vector and the attention map are all equal;

[0047] The first intermediate vector is added to the second intermediate vector to obtain a third intermediate vector;

[0048] The attention map is weighted to the third intermediate vector (the attention map is element-wise multiplied with the third intermediate vector) to obtain the acquisition vector.

[0049] As one of many implementations, the calculation method inside the TC feature extractor 2 can be performed according to the following mathematical formula:

[0050] Φ1=κ1(f1(α1))

[0051] Φ2=κ2(f2(α1))

[0052] Φ3=κ3(f3(α1))

[0053] Φ4=γ1(h1((Φ2-Φ1)Δα2))

[0054] β1=ψ((γ2(h2(α1+Φ3)))ΔΦ1ΔΦ2)

[0055] β2=κ4(f4(Φ3Δ(Φ4+β1)))

[0056] Among them, α1 and α2 are respectively used as the diameter 1 feature map and the diameter 2 feature map of the input TC feature extractor, α1 and α2 are usually of equal size, f1, f2, f3 and f4 all represent ordinary convolution operation layers with a stride of 1, the convolution kernel size of f1 is preferably 5*5, the convolution kernel size of f2 is preferably 7*7, the convolution kernel size of f3 is preferably 1*1, and the convolution kernel size of f4 is preferably 3*3, κ1, κ2, κ3 and κ4 all represent the activation processing of the feature map using a class of functions as the activation function, in this embodiment, the class of functions is ReLU, and κ1, κ2, κ3 generate φ1, φ2, φ3 feature maps after activation processing respectively. Δ represents the element-wise product operation, h1 and h2 both represent deformable convolution operations, and their convolution kernel sizes are both 3*3 and the stride is 1. Both γ1 and γ2 represent the activation processing of the feature map using the second type function as the activation function. In this embodiment, the second type function is the PReLU function. ψ represents the activation processing of the feature map using the third type function as the activation function. In this embodiment, the third type function is the logistics function. φ4 represents the feature map generated after the activation processing of γ1. β1 is the first connection feature map generated and output by the TC feature extractor. After processing, the first connection feature map is used as the diameter-two feature map input to the next-level TC feature extractor. β2 is the second connection feature map generated and output by the TC feature extractor. After processing, the second connection feature map is used as the diameter-one feature map input to the next-level TC feature extractor. In this embodiment, within the same TC feature extractor, the generated feature maps φ1, φ2, φ3, φ4, β1 and β2 are of equal size.

[0057] As one of many implementations, the facial image processing process inside the feature diffusion distributor 1 includes the following steps:

[0058] Performing a first convolution and a first activation process on the face image to be recognized in sequence to obtain a first diffusion feature map;

[0059] Performing a second convolution process on the first diffusion feature map to obtain a second diffusion feature map;

[0060] Performing a second activation process on the second diffusion characteristic map and then adding the first diffusion characteristic map to obtain a first distribution characteristic map;

[0061] The second diffusion characteristic map is multiplied by the first diffusion characteristic map (element-wise product) to obtain a third diffusion characteristic map, and then the third diffusion characteristic map is subjected to a third activation process to obtain a second distribution characteristic map.

[0062] Among them, the first convolution and the second convolution are both ordinary convolution operations. The convolution kernel size of the first convolution is 3*3 and the stride is 1, and the convolution kernel size of the second convolution is 1*1 and the stride is 1. The first activation and the second activation are both activated by the ReLU function, and the third activation is activated by the tanh function. The size of the first allocation feature map is equal to the size of the second allocation feature map.

[0063] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A face recognition method based on artificial intelligence, characterized by: The following steps are involved: Obtain a face image to be recognized; Performing feature extraction processing on the acquired face image step by step to obtain multiple connection feature maps; Performing vectorization processing on at least one of the connection feature maps to obtain an attention map; The identity information of the face in the face image is identified based on the connection feature map and the attention map.

2. The method according to claim 1, characterized in that: The acquired face image is subjected to step-by-step feature extraction processing, including: using a plurality of TC feature extractors arranged in series to perform step-by-step feature extraction processing on the face image.

3. The method according to claim 2, characterized in that: The calculation method inside the TC feature extractor is: Φ1=κ1(f1(α1)) Φ2=κ2(f2(α1)) Φ3=κ3(f3(α1)) Φ4=γ1(h1((Φ2-Φ1)Δα2)) β1=ψ((γ2(h2(α1+Φ3)))ΔΦ1ΔΦ2) β2=κ4(f4(Φ3Δ(Φ4+β1))) Among them, α1 and α2 are respectively used as the diameter-one feature map and the diameter-two feature map of the input TC feature extractor, f1, f2, f3 and f4 all represent convolution operation layers, the convolution kernel sizes used by f1, f2 and f3 are different, κ1, κ2, κ3 and κ4 all represent the activation processing of the feature map using a type-one function as the activation function, Δ represents the element-wise product operation, h1 and h2 both represent deformable convolution operations, γ1 and γ2 both represent the activation processing of the feature map using a type-two function as the activation function, ψ represents the activation processing of the feature map using a type-three function as the activation function, β1 is the first connection feature map generated and output by the TC feature extractor, and the first connection feature map is processed as the diameter-two feature map input to the next-level TC feature extractor, β2 is the second connection feature map generated and output by the TC feature extractor, and the second connection feature map is processed as the diameter-one feature map input to the next-level TC feature extractor.

4. The method according to claim 3, characterized in that: The first connection feature map is down-sampled and used as the input to the next-level TC feature extractor as the second feature map, and the second connection feature map is down-sampled and used as the input to the next-level TC feature extractor as the first feature map.

5. The method according to claim 3, characterized in that: the first A feature diffusion distributor is provided at the front end of the TC feature extractor. The face image is processed by the feature diffusion distributor to obtain a first distribution feature map and a second distribution feature map. The first distribution feature map is used as a diameter-one feature map input to the first TC feature extractor, and the second distribution feature map is used as a diameter-two feature map input to the first TC feature extractor.

6. The method according to claim 5, characterized in that: The process of processing the face image inside the feature diffusion allocator includes the following steps: Performing a first convolution and a first activation process on the face image to be recognized in sequence to obtain a first diffusion feature map; Performing a second convolution process on the first diffusion feature map to obtain a second diffusion feature map; performing a second activation process on the second diffusion characteristic map and adding the first diffusion characteristic map to obtain the first distribution characteristic map; The second diffusion characteristic map is multiplied by the first diffusion characteristic map to obtain a third diffusion characteristic map, and then the third diffusion characteristic map is subjected to a third activation process to obtain the second distribution characteristic map.

7. The method according to claim 4, characterized in that: All first connection feature maps and second connection feature maps are vectorized to obtain attention maps.

8. The method according to claim 7, characterized in that: All first connection feature maps and second connection feature maps are vectorized to obtain attention maps, including: respectively adding the first connection feature map and the second connection feature map generated by the same TC feature extractor to obtain a plurality of first perceptual feature maps; Performing global pooling processing on each of the first perceptual feature maps in a spatial direction and activating the same to generate a plurality of second perceptual feature maps; All the second perceptual feature maps are concatenated, and then processed and activated by the perceptual convolutional layer to generate the attention map.

9. The method according to claim 8, characterized in that: Identifying identity information of a face in the face image based on the connection feature map and the attention map includes: After performing a global pooling operation on the first connection feature map and the second connection feature map output by the last TC feature extractor in the spatial direction, a first connection vector and a second connection vector are obtained respectively; fusing the attention map, the first connection vector, and the second connection vector to obtain a collection vector; A matching vector corresponding to the acquisition vector is retrieved from a target database according to preset conditions, and identity information of a face in a face image to be identified is determined according to the identity information of the matching vector.

10. The method according to claim 9, characterized in that: The attention map, the first connection vector and the second connection vector are fused to obtain a collection vector, including: The first connection vector is sequentially processed by the first fully connected layer and the first function activation to obtain a first intermediate vector, and the second connection vector is sequentially processed by the second fully connected layer and the second function activation to obtain a second intermediate vector; The first intermediate vector is added to the second intermediate vector to obtain a third intermediate vector; The attention map is weighted to the third intermediate vector to obtain the acquisition vector.

Citation Information

Cited By

  • Campus safety intelligent monitoring system based on computer vision

    CN120673459A

  • Image duplicate checking method and device, storage medium and program product

    CN121191210A

  • Image duplicate detection method, device, storage medium and program product

    CN121191210B