Image feature extraction method, face recognition method, device, equipment and medium

By processing facial image features through a fully connected layer, extracting and removing noise features, the problem of difficult decoupling of facial features and feature overlap in existing technologies is solved, thereby improving the accuracy of facial recognition, especially for the recognition of young children, the elderly, and people with different skin colors.

CN115909462BActive Publication Date: 2025-12-16JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211575271.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2025-12-16
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

Existing facial recognition technologies face challenges in decoupling facial features, or there may be overlap between various attribute features, resulting in poor recognition performance, especially for young children, the elderly, and people of different skin colors.

Method used

By extracting features from the target image, the first fully connected layer is used to process the image features to obtain image attributes carrying category identifiers. Based on the target category identifier and image features, image noise features are obtained. Then, the second fully connected layer processes the effective image features to remove noise features, ensuring that the attribute features do not overlap as much as possible.

Benefits of technology

It improves the accuracy of facial recognition, especially for different age groups and skin tones, thus enhancing the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115909462B_ABST
    Figure CN115909462B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image feature extraction method, a face recognition method, a device, equipment and a medium, and relates to the technical field of face recognition. The method comprises: performing feature extraction on a target image obtained to obtain an image feature; processing the image feature through a first full connection layer to obtain image attributes of different categories, wherein the image attributes carry category identifiers used to distinguish attribute types; obtaining an image noise feature according to a target image attribute corresponding to a target category identifier and the image feature; obtaining an image effective feature of the target image according to the image noise feature and the image feature; and processing the image effective feature through a second full connection layer to obtain an effective attribute feature of the target image. The image feature extraction method makes the attribute features as little coincident as possible, which is conducive to improving the accuracy and other performances of subsequent tasks.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of face recognition, and particularly relates to an image feature extraction method, a face recognition method, an image feature extraction device, a face recognition device, an electronic device and a computer readable storage medium. BACKGROUND

[0002] Face recognition is a biometric technology for identity recognition based on face feature information, and has been widely applied in various fields. A series of related technologies for automatically detecting and tracking faces in images or video streams collected by cameras or cameras, and then performing face recognition on the detected faces, are usually also called portrait recognition or face recognition.

[0003] Face recognition needs to extract features, and then perform multi-layer neural network operation on the extracted features to obtain an operation result. This technology still faces some challenges, for example, existing face recognition technology has better recognition effect for adult groups, but has poor recognition effect for groups of young children or the elderly; the recognition effect is different for groups of people with different skin colors and different ages.

[0004] In related technologies, orthogonal depth feature decomposition algorithms or convolutional neural network layers are usually used to extract features to decouple face features. However, the orthogonal decomposition method has the problem of difficulty in decoupling. The convolutional neural network layer extraction method has the problem of a certain degree of overlap between various attribute features, which is not conducive to subsequent tasks and reduces the accuracy of subsequent tasks.

[0005] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0006] The present disclosure provides an image feature extraction method, a face recognition method, a device, an equipment and a medium, which at least partially solves the problem of difficulty in decoupling image features or overlap between various attribute features in related technologies, and reduces the accuracy of subsequent tasks.

[0007] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.

[0008] According to one aspect of the present disclosure, an image feature extraction method is provided, comprising: performing feature extraction on a target image to obtain image features; processing the image features through a first full connection layer to obtain image attributes of different categories, wherein the image attributes carry category identifiers for distinguishing attribute types; obtaining image noise features according to target image attributes corresponding to a target category identifier and the image features; obtaining image effective features of the target image according to the image noise features and the image features; and processing the image effective features through a second full connection layer to obtain effective attribute features of the target image.

[0009] In one embodiment of the present disclosure, the obtaining of the image noise features according to the target image attributes corresponding to the target category identifier and the image features comprises: obtaining image noise attribute weights of the target image attributes according to the target image attributes corresponding to the target category identifier and the image features.

[0010] The image noise features are obtained according to the image noise attribute weights, the image features and a target activation function.

[0011] In one embodiment of the present disclosure, the obtaining of the image noise attribute weights of the target image attributes according to the target image attributes corresponding to the target category identifier and the image features comprises: solving the image features gradient with respect to the target image attributes corresponding to the target category identifier to obtain the image noise attribute weights of the target image attributes.

[0012] In one embodiment of the present disclosure, the target category identifier at least includes a first target category identifier and a second target category identifier, and the obtaining of the image noise features according to the target image attributes corresponding to the target category identifier and the image features comprises: obtaining first image noise features according to the target image attributes of the first target category identifier and the image features; obtaining process image features according to the first image noise features and the image features; processing the process image features through a third full connection layer to obtain process image attributes; obtaining second image noise features according to the image features and the process image attributes corresponding to the second target category identifier; and obtaining the image effective features of the target image according to the second image noise features and the image features.

[0013] In one embodiment of the present disclosure, before the image feature is processed by the first full connection layer to obtain image attributes of different categories, the method further comprises: obtaining an image sample, and performing feature extraction on the image sample to obtain an image feature sample and an image attribute label; training a first full connection layer to be trained according to the image feature sample and the image attribute label; if a preset first training stop condition is met, the first full connection layer to be trained is obtained; if the first training stop condition is not met, the model parameters of the first full connection layer to be trained are adjusted until the first training stop condition is met.

[0014] In one embodiment of the present disclosure, before the image effective feature is processed by the second full connection layer to obtain the effective attribute feature of the target image, the method further comprises: processing the image feature sample by the first full connection layer to obtain image attribute samples of different categories, wherein the image attribute samples carry category identifiers for distinguishing attribute types; obtaining an image noise feature sample according to a target image attribute sample corresponding to a target category identifier and the image feature sample; obtaining an image effective feature sample and a label corresponding to the image effective feature sample according to the image noise feature sample and the image feature sample; training a second full connection layer to be trained according to the image effective feature sample and the label corresponding to the image effective feature sample; if a preset second training stop condition is met, the second full connection layer to be trained is obtained; if the second training stop condition is not met, the model parameters of the second full connection layer to be trained are adjusted until the second training stop condition is met.

[0015] In one embodiment of the present disclosure, the feature extraction on the obtained target image to obtain an image feature comprises: performing feature extraction on the target image by a feature extraction model, wherein the feature extraction model comprises at least one of a convolutional neural network model, a histogram of oriented gradients feature extraction model, and a Dlib image feature extraction model.

[0016] According to another aspect of the present disclosure, a face recognition method is provided, comprising: collecting a face image to be recognized; processing the face image to be recognized by the image feature extraction method described above to obtain an effective attribute feature of the face image to be recognized; and recognizing the face image to be recognized according to the effective attribute feature.

[0017] According to another aspect of the present disclosure, an image feature extraction device is provided, comprising: a feature extraction module configured to perform feature extraction on an acquired target image to obtain an image feature; an attribute prediction module configured to process the image feature through a first fully connected layer to obtain image attributes of different categories, wherein the image attributes carry category identifiers for distinguishing attribute types; a first calculation module configured to obtain an image noise feature according to a target image attribute corresponding to a target category identifier and the image feature; a second calculation module configured to obtain an image effective feature of the target image according to the image noise feature and the image feature; and a feature decoupling module configured to process the image effective feature through a second fully connected layer to obtain an effective attribute feature of the target image.

[0018] According to another aspect of the present disclosure, a face recognition method is provided, comprising: an image acquisition module configured to acquire a face image to be recognized; an attribute decoupling module configured to process the face image to be recognized by using the image feature extraction device to obtain an effective attribute feature of the face image to be recognized; and a face recognition module configured to recognize the face image to be recognized according to the effective attribute feature.

[0019] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the image feature extraction method or the face recognition method by executing the executable instructions.

[0020] According to another aspect of the present disclosure, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the image feature extraction method or the face recognition method.

[0021] According to another aspect of the present disclosure, a computer program product is provided, which comprises a computer program or computer instructions, and the computer program or the computer instructions are loaded and executed by a processor to make a computer implement the image feature extraction method or the face recognition method.

[0022] An image feature extraction method, a face recognition method, an apparatus, a device and a medium provided by an embodiment of the present disclosure perform feature extraction on a target image obtained to obtain image features; an image attribute carrying a class identifier used to distinguish attribute types is obtained by processing the image features through a first fully connected layer; an image noise feature is obtained according to a target image attribute corresponding to a target class identifier and the image features; an image effective feature of the target image is obtained according to the image noise feature and the image features, and an effective attribute feature of the target image is obtained by processing the image effective feature through a second fully connected layer, so as to remove the noise feature from the image features, and make the attribute features as little coincident as possible, which is conducive to improving the performance of subsequent tasks and improving the accuracy of subsequent tasks.

[0023] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0024] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure. It is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.

[0025] Figure 1 A flowchart of an image feature extraction method provided by an embodiment of the present disclosure is shown;

[0026] Figure 2 A flowchart of another image feature extraction method provided by an embodiment of the present disclosure is shown;

[0027] Figure 3 A flowchart of still another image feature extraction method provided by an embodiment of the present disclosure is shown;

[0028] Figure 4 A flowchart of a first fully connected layer training process provided by an embodiment of the present disclosure is shown;

[0029] Figure 5 A flowchart of a second fully connected layer training process provided by an embodiment of the present disclosure is shown;

[0030] Figure 6 A principle diagram of feature extraction in the field of face recognition provided by an embodiment of the present disclosure is shown;

[0031] Figure 7 A flowchart of a face recognition method provided by an embodiment of the present disclosure is shown;

[0032] Figure 8 A schematic diagram of an image feature extraction apparatus provided by an embodiment of the present disclosure is shown;

[0033] Figure 9 A schematic diagram of a face recognition device is shown according to an embodiment of the present disclosure.

[0034] Figure 10 A system architecture diagram for implementing image feature extraction is shown according to an embodiment of the present disclosure.

[0035] Figure 11 A structural block diagram of an electronic device is shown according to an embodiment of the present disclosure.

[0036] Figure 12 A schematic diagram of a computer program product is shown according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0037] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the implementations set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art. Features described in the description, examples, or claims that are not essential to the understanding of the application are not limitations of the application.

[0038] In addition, the drawings are to be considered in all respects as illustrative and not restrictive; identical reference numerals have been used, where possible, to denote identical or similar features, and thus repetition of the description thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities that do not necessarily have to correspond to physically or logically independent entities. These functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0039] In the related art, in order to solve the influence of face attributes such as age, gender, etc. on face results, the academic and industrial circles have carried out face recognition algorithm technology based on face attribute decoupling. In order to obtain attribute features in face images, such as age features, gender features, skin color features, etc., at present, orthogonal deep feature decomposition algorithms or convolutional neural network extraction methods are usually used to decouple face features.

[0040] The orthogonal deep feature decomposition algorithm decomposes the deep feature into an age component and an identity component, thereby effectively separating the age component and the identity component, achieving the goal of reducing age difference and improving cross-age face recognition accuracy. Although the orthogonal deep feature decomposition algorithm can make a certain attribute feature in a face image satisfy an orthogonal relationship with other attribute features, so that the decoupled attribute features do not exist any overlap with other features, that is, the independence of each feature is ensured to a certain extent, but this method cannot perform multi-dimensional orthogonal decomposition on face features, that is, when multiple attribute features in a face need to be decoupled at the same time, especially when the number of attributes is more, the decoupling is more difficult, and sometimes it is impossible to decouple.

[0041] Although the method of extracting features by using a convolutional neural network can simultaneously decouple multiple attribute features in a face image, the multiple attribute features decoupled by this method exist overlap to a certain extent, that is, a certain attribute feature decoupled contains other attribute features, which cannot guarantee the independence between different attribute features, is not conducive to the subsequent task, and reduces the accuracy of face recognition and other performances.

[0042] Based on this, the technical scheme provided by the embodiments of the present disclosure performs feature extraction on the obtained target image to obtain image features; processes the image features through a first fully connected layer to obtain image attributes carrying a class identifier for distinguishing attribute types; obtains image noise features according to the target image attributes corresponding to the target class identifier and the image features; obtains image effective features of the target image according to the image noise features and the image features, processes the image effective features through a second fully connected layer to obtain effective attribute features of the target image, so as to remove the noise features from the image features, so that the attribute features do not overlap as much as possible, which is conducive to improving the performance of the subsequent task and improving the accuracy of the subsequent task.

[0043] It should be noted that the technical scheme provided by the embodiments of the present disclosure can not only be used for face image feature extraction based on feature decoupling in face recognition technology, but also be used for image processing in other fields based on feature decoupling, and the present disclosure does not make specific limitations.

[0044] It should be noted that the embodiments of the present disclosure and the technical features in the embodiments can be combined with each other without conflict.

[0045] The present example embodiment will be described in detail below in combination with the accompanying drawings and embodiments.

[0046] First, the image feature extraction method provided in the embodiments of the present disclosure can be executed by any system with computing processing capability. In some embodiments, the image feature extraction method provided in the embodiments of the present disclosure can be executed by a terminal device; in other embodiments, the image feature extraction method provided in the embodiments of the present disclosure can be implemented by interaction between a terminal device and a server.

[0047] Figure 1 A flowchart of an image feature extraction method in the embodiments of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the image feature extraction method provided in the embodiments of the present disclosure includes the following steps: Figure 1

[0048] S102, performing feature extraction on the obtained target image to obtain image features.

[0049] The target image of the present embodiment can be obtained by a terminal device with image acquisition function. The terminal device transmits the acquired target image to a server for feature extraction of the target image, or directly performs feature extraction on the target image.

[0050] It should be noted that the target image can be a face image, an environment image or other images that need to be processed by feature decoupling.

[0051] In one embodiment, the target image is extracted by a feature extraction model. The feature extraction model includes at least one of a convolutional neural network model, a Histogram of Oriented Gridients (HOG) feature extraction model and a Dlib image feature extraction model.

[0052] For example, in the case of extracting the target image by the convolutional neural network model, a linear rectifier function Relu function can be used as the activation function. The convolutional neural network model can include an input layer and a plurality of convolutional layers, and a pooling layer is periodically inserted between consecutive convolutional layers. The convolutional layers have the same structure, and the pooling layers have the same structure. For example, the convolutional neural network model includes four convolutional layers and three pooling layers, and the pooling layers are inserted between adjacent convolutional layers.

[0053] S104, processing the image features by a first fully connected layer to obtain image attributes of different categories, wherein the image attributes carry category identifiers for distinguishing attribute types.

[0054] In one embodiment, the image features processed by the feature extraction model are input to the first fully connected layer. It should be noted that for the case of feature extraction by the convolutional neural network model, the output of the last convolutional layer and the output of the last pooling layer are input to the first fully connected layer.​

[0055] It should be noted that the image attributes obtained through the first fully connected layer include image attributes that need to be decoupled and removed, and also include image attributes that need to be retained after the decoupling operation.

[0056] In this embodiment, a category identifier is used to distinguish the types of image attributes. Generally, one category identifier corresponds to a group of image attributes. The category identifier can be identified by numbers, letters, characters, etc. For example, the number 1 is used to identify the age attribute, the number 2 is used to identify the gender attribute, etc. The specific form of the category identifier is not limited in the present disclosure.

[0057] S106, obtaining image noise features according to the target image attributes corresponding to the target category identifier and the image features.

[0058] It should be noted that the target category identifier is one or more of the category identifiers, and can only decouple one attribute feature or decouple multiple attribute features. The present disclosure does not make specific limitations.

[0059] The target image attribute is the target image attribute corresponding to the target category identifier among the image attributes obtained through the first fully connected layer.

[0060] In one embodiment, as shown in Figure 2 The image noise features are obtained in the following manner: S1062, according to the target image attributes corresponding to the target category identifier and the image features, the image noise attribute weight of the target image attribute can be obtained; S1064, according to the image noise attribute weight, the image features and the target activation function, the image noise features are calculated to facilitate the subsequent task of decoupling the image noise features.

[0061] For example, the target image attribute corresponding to the target category identifier is used to solve the gradient of the image features, and the image noise attribute weight of the target image attribute is calculated. It should be noted that in addition to using gradient solving to obtain the image noise attribute weight, other solving methods can also be used.

[0062] For example, the target activation function can be a linear rectification function (Relu), a Sigmoid function, or a tanh function. It should be noted that the result obtained by using the Relu activation function is more concise.

[0063] In one embodiment, the image noise features are obtained by multiplying the image features with the image noise attribute weight and activating the target activation function.

[0064] S108, obtaining the image effective features of the target image according to the image noise features and the image features.

[0065] In one embodiment, the image effective feature of the target image is obtained by directly subtracting the image noise feature from the image feature, so that the target image attribute and other effective features satisfy a certain orthogonal relationship.

[0066] It should be noted that other ways that can achieve the orthogonal relationship between the image noise feature and the image effective feature are also applicable.

[0067] S110, processing the image effective feature through the second full connection layer to obtain an effective attribute feature of the target image.

[0068] In one embodiment, the image effective feature is input into the second full connection layer, and supervised learning is performed using the label corresponding to the image effective feature, so as to improve the accuracy of feature extraction.

[0069] The image feature extraction method provided by the embodiments of the present disclosure extracts the image feature of the obtained target image, processes the image feature through the first full connection layer to obtain the image attribute carrying the category identifier for distinguishing the attribute type, obtains the image noise feature according to the target image attribute corresponding to the target category identifier and the image feature, obtains the image effective feature of the target image according to the image noise feature and the image feature, processes the image effective feature through the second full connection layer to obtain the effective attribute feature of the target image, removes the noise feature from the image feature, and makes the attribute features as much as possible not to coincide with each other, which is beneficial to improve the subsequent task, improve the accuracy and other performances of the subsequent task.

[0070] Figure 3 A flowchart of another image feature extraction method provided by the embodiments of the present disclosure is shown. As shown in Figure 3 The image feature extraction method provided by the embodiments of the present disclosure includes steps S302-S310 to realize the extraction operation of the image effective feature of the target image, wherein the target category identifier at least includes a first target category identifier and a second target category identifier,

[0071] S302, obtaining a first image noise feature according to the target image attribute of the first target category identifier and the image feature;

[0072] S304, obtaining a process image feature according to the first image noise feature and the image feature;

[0073] S306, processing the process image feature through the third full connection layer to obtain a process image attribute;

[0074] S308, obtaining a second image noise feature according to the image feature and the process image attribute corresponding to the second target category identifier;

[0075] S310, obtaining an image effective feature of the target image according to the second image noise feature and the image feature.

[0076] It should be noted that the first target category identifier and the second target category identifier are different category identifiers to distinguish different types of image attributes.

[0077] The number of target category identifiers can be determined according to actual conditions, and the present disclosure does not make specific limitations. For example, in some cases where the skin color attribute of face recognition is not significantly different, the age attribute and the gender attribute can be selected as decoupling objects; in some cases where the skin color attribute is significantly different, the age attribute, the gender attribute, and the skin color attribute can all be decoupling objects.

[0078] The first target category identifier and the second target category identifier of the embodiment are only relative concepts, and the target category identifier can also include multiple target category identifiers. In the decoupling process, the image attributes corresponding to the target category identifiers can be processed in sequence through the full connection layer to obtain corresponding image noise features.

[0079] The process image attribute obtained through the third full connection layer includes image attributes other than the first target image attribute corresponding to the first target category identifier, and carries a category identifier for distinguishing attribute types. The process image attribute carries the second target category identifier to process the process image attribute corresponding to the second target category identifier to obtain the second image noise feature. At this point, the image noise feature decoupling is complete, and then the image effective feature is obtained according to the second image noise feature.

[0080] It should be noted that the third full connection layer is obtained by training according to the process image feature and the process image attribute label. The third full connection layer can be a full connection layer in a convolutional neural network, and the training process of the third full connection layer is similar to the training process of the first full connection layer mentioned in the next embodiment. Details are not described here.

[0081] The image feature extraction method provided by the embodiment of the present disclosure distinguishes different attribute image attributes through target category representation, and then decouples multiple image attributes through the third full connection layer to complement and improve the accuracy of subsequent tasks as much as possible.

[0082] Figure 4 A flowchart of the training process of the first full connection layer provided by the embodiment of the present disclosure is shown. As shown in Figure 4 The image feature extraction method provided by the embodiment of the present disclosure includes steps S402 to S410 to complete the training of the first full connection layer. Specifically, before the image feature is processed through the first full connection layer in step S104 to obtain image attributes of different categories, the method further includes:

[0083] S402, acquire an image sample, and perform feature extraction on the image sample to obtain an image feature sample and an image attribute label;

[0084] S404, train the first full connection layer to be trained according to the image feature sample and the image attribute label;

[0085] S406, determine whether a preset first training stop condition is met; if the first training stop condition is met, perform step S408; if the first training stop condition is not met, perform step S410;

[0086] S408, obtain the first full connection layer trained;

[0087] S410, adjust a model parameter of the first full connection layer to be trained, and return to step S404 until the first training stop condition is met.

[0088] In some embodiments, the image sample can be a face picture in an agedb30 test set, a face picture in an RFW test set, a face picture in a Labeled Faces in the Wild (LFW) test set, or a test set constructed for feature decoupling technology, which is not limited in the present disclosure.

[0089] In an embodiment, the first full connection layer can be a full connection layer in a convolutional neural network, and a loss function required for training the first full connection layer can be a mean square error loss function, a root mean square error loss function, or a mean absolute error loss function.

[0090] It should be noted that the first training stop condition can be determined according to actual conditions, which is not limited in the present disclosure.

[0091] The present disclosure obtains image samples of different data sets, performs feature extraction to obtain image feature samples and image attribute labels corresponding to the image feature samples, and then trains the first full connection layer according to the image feature samples and the image attribute labels, so as to improve the accuracy of the first full connection layer.

[0092] Figure 5 A flow chart of a second full connection layer training process provided by an embodiment of the present disclosure is shown. As shown in Figure 5 The image feature extraction method provided by the embodiment of the present disclosure further includes steps S502 to S514 to complete the training of the second full connection layer. Specifically, before the step S110 processes the image effective feature through the second full connection layer to obtain the effective attribute feature of the target image, the method further includes:

[0093] S502, processing the image feature sample through the first full connection layer to obtain image attribute samples of different categories, wherein the image attribute sample carries a category identifier for distinguishing attribute types;

[0094] S504, obtaining image noise feature samples according to the target image attribute sample corresponding to the target category identifier and the image feature sample;

[0095] S506, obtaining image effective feature samples and labels corresponding to the image effective feature samples according to the image noise feature samples and the image feature samples;

[0096] S508, training the second full connection layer to be trained according to the image effective feature samples and the labels corresponding to the image effective feature samples;

[0097] S510, determining whether a preset second training stop condition is met, if the preset second training stop condition is met, performing step S512, and if the second training stop condition is not met, performing step S514;

[0098] S512, obtaining the second full connection layer trained;

[0099] S514, adjusting the model parameters of the second full connection layer to be trained, returning to step S508 until the second training stop condition is met.

[0100] In some embodiments, the second training stop condition can be the same as or different from the first training stop condition, and the value range of the second training stop condition can be determined according to actual conditions, which is not limited by the present disclosure.

[0101] After the training of the first full connection layer is completed, the present disclosure processes the image feature sample through the first full connection layer, and then obtains the image effective feature sample and the label corresponding to the image effective feature sample, so as to train the second full connection layer and ensure the model accuracy.

[0102] It should be noted that the specific implementation of the above preprocessing is only an example provided for describing the embodiments of the present disclosure, and should not be regarded as a limitation on the protection scope of the present disclosure.

[0103] Figure 6 A principle diagram of feature extraction in the face recognition field provided by the embodiments of the present disclosure is shown. As shown in the figure, Figure 6 The embodiment shows the case of decoupling an attribute feature, and the specific process is as follows: the image acquisition device collects a face image, the face image is input into a convolutional neural network 601, the convolutional neural network 601 processes the face image, and outputs a face feature f, the face feature f is input into a first full connection layer 602, the first full connection layer 602 processes the face feature, and outputs a face attribute Logits, wherein the face attribute Logit∈RN×1 N represents the number of categories of attributes.

[0104] The face attribute Logit corresponding to the attribute label is used to realize the face attribute loss supervision of the first full connection layer 602, that is, the attribute Logit is supervised and learned by using the corresponding attribute label.

[0105] In this case, the face attribute Logit corresponding to the attribute label is used to realize the face attribute loss supervision of the first full connection layer 602, that is, the attribute Logit is supervised and learned by using the corresponding attribute label. label The gradient of the face feature f is solved to obtain the corresponding gradient That is:

[0106]

[0107] The gradient That is, the weight of the attribute feature corresponding to the attribute label (that is, the image noise attribute weight mentioned in the disclosure is obtained in this way).

[0108] The product of the face feature is calculated, and then the Relu activation function is activated to obtain the image noise feature f1, that is:

[0109]

[0110] The image feature and the image noise feature are subtracted, that is, the image effective feature f2 of the face image is obtained, f2=f-f1 (formula three)

[0111] The image effective feature f2 is input into the second full connection layer 603 to obtain the effective attribute feature of the face image, and at the same time, the face other attribute loss supervision of the second full connection layer 603 is realized through the label corresponding to the face other attribute, and thus the image feature extraction based on the feature decoupling is completed.

[0112] It should be noted that if multiple attribute features in the face image need to be decoupled, multiple full connection layers can be connected to extract the face feature f.

[0113] Finally, the above technical solutions are experimentally verified, and the algorithm proposed in the patent is compared with the paper CVPR2021MTLFace in experimental performance. In the experimental comparison process, we control the backbone network backbone (for example, the convolutional neural network in the above), training data, and test data to be completely consistent. Compared with the MTLFace algorithm, the present disclosure improves the performance by 1.15% on the agedb30 test set (the verification set uses data with an age difference of 30); on the LabeledFaces in the Wild (LFW) test set, it improves by 0.3%. In addition, we also compared the algorithm of the patent with the paper CVPR2021 GAC in the experiment. From the experimental results, compared with the GAC algorithm, the present disclosure improves the average accuracy (Average Acc) on the RFW (The Racial Faces in-the-Wild) test set by 0.3%. The experimental results show that the image feature extraction method based on feature decoupling can achieve better feature decoupling, which is conducive to the performance improvement of related tasks such as face recognition.

[0114] Based on the same inventive concept, the present disclosure also provides a face recognition method, as described in the following embodiments. Since the principles of the method embodiments solve problems are similar to the above-mentioned method embodiments, the implementation of the method embodiments can be referred to the implementation of the above-mentioned method embodiments, and the repeated parts will not be repeated.

[0115] Figure 7 A flowchart of a face recognition method provided by an embodiment of the present disclosure is shown. As shown in Figure 7 The face recognition method provided by the embodiment of the present disclosure includes steps S702 to S704 to implement face recognition. Specifically, the method includes:

[0116] S702, collecting a face image to be recognized;

[0117] S704, processing the face image to be recognized using the image feature extraction method described above to obtain effective attribute features of the face image to be recognized;

[0118] S706, identifying the face image to be recognized according to the effective attribute features.

[0119] The face image to be recognized of the present embodiment can be collected by a terminal device with image acquisition function such as a camera, a mobile phone, etc.

[0120] The effective attribute feature of the to-be-identified face image can be obtained by processing the to-be-identified face image through the image feature extraction method, and at least one target face image is matched from the preset face image library based on the effective attribute feature, so that face recognition is realized, various face attributes are accurately recognized, and the recognition accuracy is improved.

[0121] Based on the same inventive concept, the embodiments of the present disclosure also provide an image feature extraction device and a face recognition device, as described in the following embodiments. Since the principles of the device embodiments for solving problems are similar to those of the above-mentioned method embodiments, the implementation of the device embodiments can be referred to the implementation of the above-mentioned method embodiments, and the repeated parts will not be described again.

[0122] Figure 8 An image feature extraction device according to an embodiment of the present disclosure is shown in the schematic diagram. As shown in the figure, Figure 8 The image feature extraction device of the present embodiment comprises a feature extraction module 801, an attribute prediction module 802, a first calculation module 803, a second calculation module 804 and a feature decoupling module 805, wherein,

[0123] The feature extraction module 801 is configured to perform feature extraction on the obtained target image to obtain image features.

[0124] The attribute prediction module 802 is configured to process the image features through a first fully connected layer to obtain image attributes of different categories, wherein the image attributes carry category identifiers for distinguishing attribute types.

[0125] The first calculation module 803 is configured to obtain image noise features according to the target image attributes corresponding to the target category identifiers and the image features.

[0126] The second calculation module 804 is configured to obtain image effective features of the target image according to the image noise features and the image features.

[0127] The feature decoupling module 805 is configured to process the image effective features through a second fully connected layer to obtain effective attribute features of the target image.

[0128] In one embodiment, the first calculation module 803 is configured to obtain image noise attribute weights of the target image attributes according to the target image attributes corresponding to the target category identifiers and the image features, and obtain the image noise features according to the image noise attribute weights, the image features and a target activation function.

[0129] In one embodiment, the first calculation module 803 is further configured to solve the image feature gradient corresponding to the target image attributes of the target category identifiers to calculate the image noise attribute weights of the target image attributes.

[0130] In one embodiment, the target category identifier comprises at least a first target category identifier and a second target category identifier, wherein the first computing module 803 is configured to obtain a first image noise feature according to the image attribute and the image feature of the first target category identifier, obtain a process image feature according to the first image noise feature and the image feature, obtain a process image attribute by processing the process image feature through a third fully connected layer, obtain a second image noise feature according to the image feature and the process image attribute corresponding to the second target category identifier, and obtain an image effective feature of the target image according to the second image noise feature and the image feature.

[0131] In one embodiment, the device further comprises a first model training module not shown in the drawings, configured to obtain an image sample and perform feature extraction on the image sample to obtain an image feature sample and an image attribute label before obtaining an image attribute of different categories by processing the image feature through a first fully connected layer, train the first fully connected layer to be trained according to the image feature sample and the image attribute label, obtain the first fully connected layer trained if a preset first training stop condition is met, and adjust the model parameters of the first fully connected layer to be trained until the first training stop condition is met if the first training stop condition is not met.

[0132] In one embodiment of the present disclosure, the device further comprises a second model training module not shown in the drawings, configured to obtain an image attribute sample of different categories by processing the image feature sample through the first fully connected layer before obtaining an effective attribute feature of the target image by processing the image effective feature through a second fully connected layer, wherein the image attribute sample carries a category identifier for distinguishing attribute types; obtain an image noise feature sample according to the target image attribute sample corresponding to the target category identifier and the image feature sample; obtain an image effective feature sample and a label corresponding to the image effective feature sample according to the image noise feature sample and the image feature sample; train the second fully connected layer to be trained according to the image effective feature sample and the label corresponding to the image effective feature sample; obtain the second fully connected layer trained if a preset second training stop condition is met; and adjust the model parameters of the second fully connected layer to be trained until the second training stop condition is met if the second training stop condition is not met.

[0133] In one embodiment, the feature extraction module 801 is configured to perform feature extraction on the target image through a feature extraction model, wherein the feature extraction model comprises at least one of a convolutional neural network model, a histogram of oriented gradients feature extraction model, and a Dlib image feature extraction model.

[0134] The image feature extraction device provided by the embodiment of the present disclosure extracts features of a target image to obtain image features, processes the image features through a first fully connected layer to obtain image attributes carrying a class identifier for distinguishing attribute types, obtains image noise features according to target image attributes and image features corresponding to a target class identifier, obtains image effective features of the target image according to the image noise features and the image features, processes the image effective features through a second fully connected layer to obtain effective attribute features of the target image, and removes noise features from the image features, so that the attribute features do not coincide with each other as much as possible, which is conducive to improving the performance of subsequent tasks and improving the accuracy of subsequent tasks.

[0135] Figure 9 A schematic diagram of a face recognition device is shown. Figure 9 As shown in the embodiment, the face recognition device comprises an image acquisition module 901, an attribute decoupling module 902, and a face recognition module 903, wherein

[0136] The image acquisition module 901 is configured to acquire a face image to be recognized.

[0137] The attribute decoupling module 902 is configured to process the face image to be recognized by using the image feature extraction device to obtain effective attribute features of the face image to be recognized.

[0138] The face recognition module 903 is configured to recognize the face image to be recognized according to the effective attribute features.

[0139] The face recognition device provided by the embodiment of the present disclosure can obtain effective attribute features of the face image to be recognized by processing the face image to be recognized by using the image feature extraction device, and can match at least one target face image from a pre-set face image library based on the effective attribute features, so as to realize face recognition and realize accurate recognition of various face attributes and improve recognition accuracy.

[0140] Those skilled in the art can understand that each aspect of the present disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the present disclosure can be specifically implemented as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software, which can be collectively referred to as "circuitry", "module" or "system".

[0141] Figure 10 An exemplary system architecture 1000 to which the image feature extraction method, the face recognition method, the image feature extraction device or the face recognition device of the embodiment of the present disclosure can be applied is shown.

[0142] As Figure 10As shown, the system architecture 1000 can include a terminal device 1010, a network 1020 and a server 1030.

[0143] The network 1020 is a medium for providing a communication link between the terminal device 1010 and the server 1030, and can be a wired network or a wireless network.

[0144] A user can use the terminal device 1010 to interact with the server 1030 through the network 1020 to receive or send messages.

[0145] The terminal device 1010 can be various electronic devices with image acquisition functions, including but not limited to smart phones, tablet computers, cameras, and the like.

[0146] The client of the application installed on the terminal device 1010 is the same, or the client of the same type of application based on different operating systems. Based on the difference of the terminal platform, the specific form of the client of the application can also be different, for example, the client of the application can be a mobile phone client, a PC client, etc.

[0147] For example, the terminal device 1010 is installed with an image acquisition system, through which the parameters for acquiring images can be set, and the images of the objects to be recognized can be acquired according to the set parameters.

[0148] The server 1030 can be a server providing various services, for example, a background management server providing support for the user's operation on the device using the terminal device 1010. The background management server can analyze and process the received request data (for example, the face image captured by the camera) to obtain the processing result (for example, the recognition result of face recognition).

[0149] Optionally, the server can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms.

[0150] Those skilled in the art can know that, Figure 10 The number of terminal devices, networks and servers in the system architecture 1000 is only illustrative, and according to actual needs, there can be any number of terminal devices, networks and servers. The embodiments of the present disclosure do not limit this.

[0151] The electronic device 1100 according to this embodiment of the present application will be described below with reference to Figure 11 .Figure 11 The electronic device 1100 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0152] like Figure 11 As shown, the electronic device 1100 is manifested in the form of a general-purpose computing device. The components of the electronic device 1100 may include, but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including storage unit 1120 and processing unit 1110).

[0153] The storage unit stores program code that can be executed by the processing unit 1110, causing the processing unit 1110 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 1110 can perform actions such as... Figure 1 The diagram shows the process of extracting features from the acquired target image to obtain image features; processing the image features through a first fully connected layer to obtain image attributes of different categories, wherein the image attributes carry category identifiers used to distinguish attribute types; obtaining image noise features based on the target image attributes and image features corresponding to the target category identifier; obtaining effective image features of the target image based on the image noise features and image features; and processing the effective image features through a second fully connected layer to obtain effective attribute features of the target image.

[0154] For example, the processing unit 1110 can also perform the following: Figure 7 The process involves acquiring a face image to be identified; processing the face image using the image feature extraction method described above to obtain effective attribute features of the face image; and then identifying the face image based on the effective attribute features.

[0155] Storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 11201 and / or cache memory 11202, and may further include a read-only memory (ROM) 11203.

[0156] Storage unit 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0157] Bus 1130 can be one or more of several types of bus structure including a memory bus or memory controller, a peripheral bus, a graphics bus, a processor or local bus using any of a variety of bus architectures.

[0158] Electronic device 1100 can also communicate with one or more external devices 1140 such as a keyboard or pointing device, a Bluetooth device, etc.; one or more devices 1141 that enable a user to interact with the system; and / or one or more devices 1142 that enable the electronic device 1100 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface 1150. Still yet, such communication can occur electronically over a network 1160 such as a local area network (LAN) and / or a wide area network (WAN) such as the Internet. As an example, the network 1160 can be a wired or wireless network that includes data telemetry techniques, e.g., radio frequency (RF), Bluetooth, infrared (IR) and / or other techniques. Figure 11 As shown, network adapter 1160 communicates with the other components of electronic device 1100 via bus 1130. It should be understood that although not shown, other hardware and / or software components could be used in conjunction with electronic device 1100. These include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0159] Those skilled in the art will readily understand that the example embodiments described herein can be implemented by software and / or by hardware coupled with software, as described above. Thus, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.

[0160] In the example embodiments of the present disclosure, a computer-readable storage medium is also provided, which can be a readable signal medium or a readable storage medium. Figure 12 A schematic diagram of a computer-readable storage medium provided in the embodiments of the present disclosure is shown in FIG. 12. As shown in FIG. 12, the computer-readable storage medium 1200 stores a program product capable of implementing the methods described above. In the example embodiments of the present disclosure, a computer program product is also provided, which includes computer programs or computer instructions loaded and executed by a processor to enable a computer to implement the steps of the methods disclosed in the above embodiments. Figure 12 A schematic diagram of a computer-readable storage medium provided in the embodiments of the present disclosure is shown in FIG. 12. As shown in FIG. 12, the computer-readable storage medium 1200 stores a program product capable of implementing the methods described above. In the example embodiments of the present disclosure, a computer program product is also provided, which includes computer programs or computer instructions loaded and executed by a processor to enable a computer to implement the steps of the methods disclosed in the above embodiments.

[0161] More specific examples of the computer-readable storage medium in the present disclosure can include but are not limited to an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0162] In the present disclosure, a computer readable storage medium can include a data signal carrying the readable program code in a baseband or in a carrier wave. Such a propagated data signal can take a wide variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A computer readable medium can also be any medium that can be read by a computer or a device that can be used to store, transmit or propagate the program over the internet.

[0163] Optionally, program code embodied on a computer readable storage medium can be transmitted by any data transmission techniques, including but not limited to radio frequency, wireless, cable, wire, optical fiber cable, or any suitable combination thereof.

[0164] In an implementation, the program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, and the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.

[0165] It should be noted that, although several modules or units for a device to perform actions are mentioned in the above detailed description, such division into modules or units is not mandatory. In fact, according to an embodiment of the present disclosure, features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, a feature or function of one module or unit described above can be further divided into multiple modules or units.

[0166] Moreover, although individual steps of the methods in the present disclosure are described in a particular order in the drawings, this is not required or implied, nor is it necessary to perform all of the steps shown to achieve the desired result. Additionally or alternatively, certain steps can be omitted, combined into a single step, performed in a different order, broken down into multiple steps, and / or the like.

[0167] Those skilled in the art will readily understand that the example embodiments described herein can be implemented by software and / or by hardware coupled with software, as described above. Thus, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.

[0168] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known use or custom in the art to which the present disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. An image feature extraction method, characterized in that, include: Feature extraction is performed on the acquired target image to obtain image features; The image features are processed by the first fully connected layer to obtain different categories of image attributes, wherein the image attributes carry a category identifier for distinguishing attribute types; Based on the target image attributes corresponding to the target category identifier and the image features, the image noise features are obtained; Based on the image noise features and the image features, the effective image features of the target image are obtained; The effective features of the image are processed by the second fully connected layer to obtain the effective attribute features of the target image.

2. The image feature extraction method according to claim 1, characterized in that, The step of obtaining image noise features based on the target image attributes corresponding to the target category identifier and the image features includes: Based on the target image attributes corresponding to the target category identifier and the image features, the image noise attribute weights of the target image attributes are obtained; The image noise features are obtained based on the image noise attribute weights, the image features, and the target activation function.

3. The image feature extraction method according to claim 2, characterized in that, The step of obtaining the image noise attribute weight of the target image attribute based on the target image attribute corresponding to the target category identifier and the image feature includes: The image noise attribute weight of the target image attribute is calculated by solving the gradient of the image feature corresponding to the target category identifier.

4. The image feature extraction method according to claim 2, characterized in that, The target category identifier includes at least a first target category identifier and a second target category identifier. Specifically, image noise features are obtained based on the target image attributes corresponding to the target category identifier and the image features, including: Based on the target image attributes identified by the first target category and the image features, the first image noise feature is obtained; Based on the first image noise features and the image features, process image features are obtained; The process image features are processed by a third fully connected layer to obtain process image attributes; The second image noise feature is obtained based on the image features and the process image attributes corresponding to the second target category identifier; Based on the second image noise feature and the image feature, the effective image features of the target image are obtained.

5. The image feature extraction method according to claim 1, characterized in that, Before processing the image features through the first fully connected layer to obtain different categories of image attributes, the method further includes: Image samples are acquired, and features are extracted from the image samples to obtain image feature samples and image attribute labels; Based on the image feature samples and the image attribute labels, train the first fully connected layer to be trained; If the preset first training stopping condition is met, the first fully connected layer that has completed training is obtained; If the first training stopping condition is not met, the model parameters of the first fully connected layer to be trained are adjusted until the first training stopping condition is met.

6. The image feature extraction method according to claim 5, characterized in that, Before processing the effective features of the image through the second fully connected layer to obtain the effective attribute features of the target image, the method further includes: The image feature samples are processed by the first fully connected layer to obtain image attribute samples of different categories, wherein the image attribute samples carry category identifiers for distinguishing attribute types; Based on the target image attribute sample corresponding to the target category identifier and the image feature sample, an image noise feature sample is obtained; Based on the image noise feature samples and the image feature samples, obtain the image effective feature samples and the labels corresponding to the image effective feature samples; The second fully connected layer to be trained is trained based on the effective feature samples of the image and the labels corresponding to the effective feature samples of the image. If the preset second training stopping condition is met, the second fully connected layer that has completed training is obtained; If the second training stopping condition is not met, the model parameters of the second fully connected layer to be trained are adjusted until the second training stopping condition is met.

7. The image feature extraction method according to claim 1, characterized in that, The step of extracting features from the acquired target image to obtain image features includes: The target image is subjected to feature extraction using a feature extraction model, wherein the feature extraction model includes at least one of a convolutional neural network model, a histogram of oriented gradients feature extraction model, and a Dlib image feature extraction model.

8. A face recognition method, characterized in that, include: Acquire images of the face to be identified; The image feature extraction method according to any one of claims 1-7 is used to process the face image to be identified, thereby obtaining the effective attribute features of the face image to be identified; The face image to be identified is identified based on the effective attribute features.

9. An image feature extraction device, characterized in that, include: The feature extraction module is used to extract features from the acquired target image to obtain image features; The attribute prediction module is used to process the image features through the first fully connected layer to obtain image attributes of different categories, wherein the image attributes carry a category identifier for distinguishing attribute types; The first calculation module is used to obtain image noise features based on the target image attributes corresponding to the target category identifier and the image features; The second calculation module is used to obtain the effective image features of the target image based on the image noise features and the image features; The feature decoupling module is used to process the effective features of the image through the second fully connected layer to obtain the effective attribute features of the target image.

10. A face recognition device, characterized in that, include: The image acquisition module is used to acquire images of the face to be identified. An attribute decoupling module is used to process the face image to be identified using the image feature extraction device of claim 9 to obtain the effective attribute features of the face image to be identified; The face recognition module is used to recognize the face image to be recognized based on the effective attribute features.

11. An electronic device, characterized in that, include: processor; The processor also includes a memory for storing executable instructions of the processor; wherein the processor is configured to perform the image feature extraction method as claimed in any one of claims 1-7, or the face recognition method as claimed in claim 8, by executing the executable instructions.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the image feature extraction method as described in any one of claims 1-7, or the face recognition method as described in claim 8.

Citation Information

Patent Citations

  • Method and equipment for recognizing multiple attributes of target objects, medium and neural network

    CN108052894A

  • Multi-task attribute identification method and device, electronic device and storage medium

    CN109635680A