Identification method, device and electronic equipment

The deep learning model determines the key points and pixel parameters of the facial parts, determines the completeness and occlusion status of the face, solves the problem of facial occlusion affecting the recognition accuracy, and improves the accuracy of the facial recognition system.

CN113743305BActive Publication Date: 2024-10-22LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111037341.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-06
Publication Date
2024-10-22
Estimated Expiration
2041-09-06

AI Technical Summary

Technical Problem

During the face registration phase of the facial recognition system, the quality of the facial template is affected by facial occlusion, making it difficult to effectively identify whether there is facial occlusion in the image, affecting the recognition accuracy.

Method used

The deep learning model is used to determine the position of each key point of the facial part and the parameters of each pixel in the image to be recognized, to determine whether the image meets the facial integrity conditions, and to determine the associated area based on the position of the key point of the facial part, thereby determining the integrity of the image. Occlusion status.

Benefits of technology

It improves the accuracy and data richness of occlusion status, ensures the integrity and accuracy of facial part groups, and enhances the accuracy of facial recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113743305B_ABST
    Figure CN113743305B_ABST
Patent Text Reader

Abstract

The present application provides a recognition method, device and electronic device. When determining that an image to be recognized satisfies a facial integrity condition, the method determines the associated area corresponding to at least one facial part group in the image to be recognized based on the position of each facial part key point in the image to be recognized, so that the data used to determine the occlusion state of the image to be recognized can be more abundant and effective, and then the occlusion state of the image to be recognized can be determined based on the more abundant and effective data, i.e., the first parameter of each pixel point in the associated area, thereby improving the accuracy of the occlusion state. Moreover, according to the position of each facial part key point in the image to be recognized, it is determined that the image to be recognized satisfies the facial integrity condition, so that it can be ensured that the image to be recognized contains at least each facial part contained in a complete face. On this basis, the integrity and accuracy of the associated area corresponding to the facial part group are ensured, further improving the accuracy of the occlusion state of the image to be recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a recognition method, device and electronic equipment. Background Art

[0002] With the development of facial recognition technology, facial recognition systems have been widely used in many scenarios (such as face recognition to enter subway stations, store surveillance, etc.).

[0003] Among them, the facial recognition system obtains a high-quality facial template in the facial registration stage, which can effectively improve the accuracy of facial recognition. However, the quality of the facial template will be affected by facial occlusion, so how to identify whether there is facial occlusion in the image becomes a problem. Summary of the invention

[0004] This application provides the following technical solutions:

[0005] On one hand, the present application provides an identification method, comprising:

[0006] Obtaining an image to be recognized;

[0007] Inputting the image to be identified into a deep learning model, determining the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified;

[0008] Determining whether the image to be identified meets a facial integrity condition according to the position of each facial key point in the image to be identified;

[0009] In the case where the image to be identified satisfies the facial integrity condition, determining, based on the position of each facial part key point in the image to be identified, an associated region corresponding to at least one facial part group in the image to be identified, the facial part group including at least a first facial part and a second facial part that are associated with each other in the face;

[0010] Based on the first parameter of each pixel in the associated area, the occlusion state of the image to be recognized is determined.

[0011] The step of determining whether the image to be identified satisfies a facial integrity condition according to the position of each facial key point in the image to be identified includes:

[0012] Determine whether the number of positions of the facial part key points in the image to be recognized matches the set number of positions of the facial part key points.

[0013] The method further comprises:

[0014] If the number of positions of the facial part key points in the image to be identified does not match the set number of positions of the facial part key points, then if the number of positions of the facial part key points is less than the set number of positions of the facial part key points, it is determined that the image to be identified is an image that is missing at least part of the facial part;

[0015] When the number of the positions of the facial key points is greater than the set number of the positions of the facial key points, it is determined that the image to be recognized is an image containing multiple faces.

[0016] The method further comprises:

[0017] When the number of the positions of the facial part key points matches the set number of the positions of the facial part key points, it is determined whether the difference between the positions of every two facial part key points in the image to be recognized is within a set range.

[0018] The step of inputting the image to be identified into a deep learning model to determine the position of each key point of a facial part in the image to be identified includes:

[0019] Inputting the image to be identified into a deep learning model, and obtaining a second parameter of each pixel in the image to be identified obtained by the deep learning model;

[0020] Determine, from the second parameters of each pixel point in the image to be recognized, target second parameters that match the second parameters of each set facial part key point respectively;

[0021] The pixel point corresponding to the second target parameter is used as the key point of the facial part in the image to be recognized, and the position of the pixel point corresponding to the second target parameter in the image to be recognized is used as the position of the key point of the facial part.

[0022] The determining, based on the position of each facial part key point in the image to be identified, an associated area corresponding to at least one facial part group in the image to be identified, comprises:

[0023] Based on the position of each facial part key point in the image to be identified, determining at least one facial part key point association group in the image to be identified, the facial part key point association group at least including a first facial part key point and a second facial part key point that are stored in association;

[0024] Determine, based on the positions of the facial part key points in the facial part key point association group, an association area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group;

[0025] Based on the associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point associated group, the associated area corresponding to the facial part group in the image to be recognized is determined.

[0026] The determining, based on the positions of the facial part key points in the facial part key point association group, an associated region between the first facial part key point and the second facial part key point that are associated in the facial part key point association group comprises:

[0027] Determine, based on the positions of the facial part key points in the facial part key point association group, a first connecting line between the first facial part key point and the second facial part key point associated in the facial part key point association group and a length of the first connecting line;

[0028] Determine a first target line segment obtained by projecting a second connecting line between each pixel point in the image to be recognized and the first facial part key point or the second facial part key point onto the first connecting line;

[0029] If the first target line segment is at least a partial line segment of the first connecting line and the length of the first target line segment is not greater than the length of the first connecting line, the pixel point is used as the first target pixel point, and the area formed by the first target pixel points is used as the first target area;

[0030] Acquire a second target area from the first target area, where the second target area at least includes an area corresponding to the first connecting line, and the second target area is smaller than the first target area;

[0031] The second target area is used as an associated area between the first facial part key points and the second facial part key points that are associated in the facial part key point association group.

[0032] The deep learning model is obtained in the following way:

[0033] Obtain a facial image sample;

[0034] Determine the position of each facial part key point in the facial image sample, and determine at least one facial part key point association group in the facial image sample based on the position of each facial part key point in the facial image sample, wherein the facial part key point association group includes at least a first facial part key point and a second facial part key point that are associated with each other;

[0035] Determine, based on the positions of the facial part key points in the facial part key point association group in the facial image sample, an association area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group in the facial image sample;

[0036] Determine, based on an associated region between the first facial part key point and the second facial part key point associated in the facial part key point association group in the facial image sample, an associated region corresponding to the facial part group in the facial image sample, wherein the facial part group in the facial image sample includes at least the first facial part and the second facial part associated in the face;

[0037] Obtaining a first sub-first parameter annotated for each pixel point in a facial part group in the facial image sample, and a second sub-first parameter annotated for each pixel point other than the facial part group in the facial image sample;

[0038] Determine a first confidence level of each facial part key point in the facial image sample and a second confidence level of each pixel point in the facial image sample except the facial part key point;

[0039] A facial image sample labeled with the first sub-first parameter, the second sub-first parameter, the first sub-second parameter, and the second sub-second parameter is input into a deep learning model to train the deep learning model.

[0040] Another aspect of the present application provides an identification device, comprising:

[0041] A first acquisition module, used for acquiring an image to be recognized;

[0042] A first determination module, used for inputting the image to be identified into a deep learning model, and determining the position of each key point of each facial part in the image to be identified and a first parameter of each pixel in the image to be identified;

[0043] A second determination module is used to determine whether the image to be identified meets the facial integrity condition according to the position of each facial part key point in the image to be identified;

[0044] a third determination module, configured to determine, when the image to be identified satisfies the facial integrity condition, based on the position of each facial part key point in the image to be identified, an associated region corresponding to at least one facial part group in the image to be identified, the facial part group including at least a first facial part and a second facial part that are associated with each other in the face;

[0045] The fourth determination module is used to determine the occlusion state of the image to be identified based on the first parameter of each pixel point in the associated area.

[0046] A third aspect of the present application provides an electronic device, including:

[0047] Memory and processor;

[0048] The memory is used to store at least one set of instruction sets;

[0049] The processor is used to call and execute the instruction set in the memory, and execute any one of the identification methods described above by executing the instruction set.

[0050] In the present application, by inputting the image to be identified into a deep learning model, the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified are determined. When it is determined that the image to be identified meets the facial integrity condition based on the position of each key point of the facial part in the image to be identified, the associated area corresponding to at least one facial part group in the image to be identified is determined based on the position of each key point of the facial part in the image to be identified. This can make the data used to determine the occlusion state of the image to be identified richer and more effective, and then based on the richer and more effective data, namely the first parameter of each pixel in the associated area, the occlusion state of the image to be identified is determined, thereby improving the accuracy of the occlusion state. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1 It is a flowchart of an identification method provided in the first embodiment of the present application;

[0053] Figure 2 It is a flowchart of an identification method provided in the second embodiment of the present application;

[0054] Figure 3 is a flowchart of an identification method provided in the third embodiment of the present application;

[0055] Figure 4 is a flowchart of an identification method provided in the fourth embodiment of the present application;

[0056] Figure 5 is a flowchart of an identification method provided in the fifth embodiment of the present application;

[0057] Figure 6 This application provides a schematic diagram of a facial part correlation degree association group;

[0058] Figure 7 It is a schematic diagram of a second target area corresponding to a facial part key point association group provided by the present application;

[0059] Figure 8 It is a structural schematic diagram of an identification device provided by the present application;

[0060] Fig. 9 It is a structural schematic diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0062] In order to solve the above problems, the present application provides a communication method, which is introduced below.

[0063] Reference Figure 1 , is a flow chart of an identification method provided in the first embodiment of the present application. The identification method provided in the present application can be applied to electronic devices. The present application does not limit the product type of the electronic device, such as Figure 1 As shown, the method may include but is not limited to the following steps:

[0064] Step S101: Obtain an image to be recognized.

[0065] Optionally, the image to be identified may be an image collected by a collection device, or may be an image acquired through other methods or channels, such as user upload, network download, etc.

[0066] Step S102: input the image to be identified into the deep learning model to determine the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified.

[0067] The facial key points can be understood as: pixels that can represent the features of facial parts. Each facial key point corresponds to a facial part, and the facial parts corresponding to each facial key point are different from each other.

[0068] The first parameter of each pixel in the image to be identified can characterize the facial part association state and / or facial part occlusion state corresponding to the pixel. The facial part association state and / or facial part occlusion state may include but are not limited to: no association between facial parts, association between facial parts and occlusion, or association between facial parts and no occlusion.

[0069] Step S103: Determine whether the image to be identified meets the facial integrity condition according to the position of each facial key point in the image to be identified.

[0070] It is understandable that the positional relationship between the facial parts contained in a complete face is fixed, so the positions of the key points of the facial parts can be used as a basis for determining whether the image to be identified meets the facial integrity condition.

[0071] If the image to be recognized meets the facial integrity condition, step S104 is executed.

[0072] Step S104: based on the position of each facial part key point in the image to be identified, determine the associated area corresponding to at least one facial part group in the image to be identified, where the facial part group includes at least a first facial part and a second facial part that are associated with each other in the face.

[0073] Based on the position of each facial part key point in the image to be identified, determining the associated area corresponding to at least one facial part group in the image to be identified can make the data used to determine the occlusion state of the image to be identified more abundant and effective.

[0074] When the image to be identified meets the facial completeness condition, it can be determined that the image to be identified contains at least one facial part included in a complete face. When ensuring that the image to be identified contains at least one facial part included in a complete face, based on the position of the key point of each facial part in the image to be identified, the associated area corresponding to at least one facial part group in the image to be identified is determined, which can avoid omissions of facial part groups and ensure the integrity and accuracy of the associated area corresponding to the at least one determined facial part group.

[0075] Step S105: Determine the occlusion state of the image to be recognized based on the first parameter of each pixel in the associated area.

[0076] Determining the occlusion state of the image to be identified based on the first parameter of each pixel in the associated area may include but is not limited to:

[0077] Determine the proportion of the first parameters representing each occlusion state in the associated region in the set of first parameters of each pixel in the associated region;

[0078] The occlusion state represented by the first parameter with the largest ratio is taken as the occlusion state of the image to be recognized.

[0079] Based on the occlusion state of the image to be recognized and the application scenario, it can be determined whether to use the image to be recognized. For example, in the face registration scenario, if the occlusion state of the image to be recognized is occlusion, it can be determined that the quality of the image to be recognized does not meet the requirements, and the image to be recognized is not used as the image to be used; if the occlusion state of the image to be recognized is no occlusion, it can be determined that the quality of the image to be recognized meets the requirements, and the image to be recognized is used as the image to be used.

[0080] In the present application, by inputting the image to be identified into a deep learning model, the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified are determined. When it is determined that the image to be identified meets the facial integrity condition based on the position of each key point of the facial part in the image to be identified, the associated area corresponding to at least one facial part group in the image to be identified is determined based on the position of each key point of the facial part in the image to be identified. This can make the data used to determine the occlusion state of the image to be identified richer and more effective, and then based on the richer and more effective data, namely the first parameter of each pixel in the associated area, the occlusion state of the image to be identified is determined, thereby improving the accuracy of the occlusion state.

[0081] Furthermore, according to the position of the key point of each facial part in the image to be identified, it is determined that the image to be identified meets the facial integrity condition, which can ensure that the image to be identified contains at least all the facial parts contained in a complete face. On this basis, based on the position of the key point of each facial part in the image to be identified, the associated area corresponding to at least one facial part group in the image to be identified is determined, which can ensure the integrity and accuracy of the associated area corresponding to the facial part group, and further improve the accuracy of the occlusion state of the image to be identified.

[0082] As another optional embodiment of the present application, refer to Figure 2 , is a flow chart of a recognition method provided in the second embodiment of the present application. This embodiment is mainly a refinement of the recognition method described in the first embodiment above. Figure 2 As shown, the method may include but is not limited to the following steps:

[0083] Step S201: Obtain an image to be recognized.

[0084] Step S202: input the image to be identified into the deep learning model to determine the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified.

[0085] The detailed process of steps S201-S202 can refer to the relevant introduction of steps S101-S102 in the first embodiment, which will not be repeated here.

[0086] Step S203: determine whether the number of positions of facial key points in the image to be identified matches the set number of positions of facial key points.

[0087] If they match, execute step S204.

[0088] The number of facial key point positions is set to be the number of facial key points contained in a complete face.

[0089] Step S203 is a specific implementation of step S103 in the first implementation mode.

[0090] Step S204: based on the position of each facial part key point in the image to be identified, determine the associated area corresponding to at least one facial part group in the image to be identified, where the facial part group includes at least a first facial part and a second facial part that are associated with each other in the face.

[0091] Step S205: Determine the occlusion state of the image to be recognized based on the first parameter of each pixel in the associated area.

[0092] The detailed process of steps S204-S205 can refer to the relevant introduction of steps S104-S105 in the first embodiment, which will not be repeated here.

[0093] In this embodiment, by determining whether the number of positions of key points of facial parts in the image to be identified matches the set number of positions of key points of facial parts, it can be ensured that the image to be identified contains at least all the facial parts contained in a complete face. On this basis, based on the position of each key point of facial part in the image to be identified, the associated area corresponding to at least one facial part group in the image to be identified is determined, which can ensure the integrity and accuracy of the associated area corresponding to the facial part group, and can improve the accuracy of the occlusion state of the image to be identified.

[0094] As another optional embodiment of the present application, refer to Figure 3 , is a flow chart of an identification method provided in the third embodiment of the present application. This embodiment is mainly an extension of the identification method described in the second embodiment above. Figure 3 As shown, the method may include but is not limited to the following steps:

[0095] Step S301: Obtain an image to be recognized.

[0096] Step S302: input the image to be identified into the deep learning model to determine the position of each facial key point in the image to be identified and the first parameter of each pixel in the image to be identified.

[0097] Step S303: determine whether the number of positions of key points of facial parts in the image to be identified matches the set number of positions of key points of facial parts.

[0098] If they match, go to step S304; if they do not match, go to step S306

[0099] Step S304: based on the position of each facial part key point in the image to be identified, determine the associated area corresponding to at least one facial part group in the image to be identified, where the facial part group includes at least a first facial part and a second facial part that are associated with each other in the face.

[0100] Step S305: Determine the occlusion state of the image to be identified based on the first parameter of each pixel in the associated area.

[0101] The detailed process of steps S301 - S305 can refer to the related introduction of steps S201 - S205 in the second embodiment, which will not be repeated here.

[0102] Step S306: Determine the relationship between the number of positions of the part key points and the number of set positions of the facial part key points.

[0103] If the number of the positions of the facial key points is less than the set number of the facial key points, step S307 is executed; if the number of the positions of the facial key points is greater than the set number of the facial key points, step S308 is executed.

[0104] Step S307: Determine that the image to be identified is an image in which at least part of the facial area is missing.

[0105] In the case where it is determined that the image to be recognized is an image in which at least a part of the facial part is missing, the image to be used may not be used as the image to be used.

[0106] Step S308: Determine whether the image to be identified is an image containing multiple faces.

[0107] In the case where it is determined that the image to be recognized is an image containing multiple faces, the image to be recognized may not be used as the image to be used.

[0108] In this embodiment, by determining whether the number of positions of key points of facial parts in the image to be identified matches the set number of positions of key points of facial parts, if the number of positions of key points of facial parts in the image to be identified does not match the set number of positions of key points of facial parts, based on the size relationship between the number of positions of key points of facial parts and the set number of positions of key points of facial parts, it is determined whether the image to be identified is an image missing at least part of the facial part or an image with multiple faces, thereby effectively determining an image with missing facial parts or with multiple faces.

[0109] As another optional embodiment of the present application, refer to Figure 4 , is a flow chart of an identification method provided in the fourth embodiment of the present application. This embodiment is mainly an extension of the identification method described in the second embodiment above. Figure 4 As shown, the method may include but is not limited to the following steps:

[0110] Step S401: Obtain an image to be recognized.

[0111] Step S402: input the image to be identified into the deep learning model to determine the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified.

[0112] Step S403: determine whether the number of positions of facial key points in the image to be identified matches the set number of positions of facial key points.

[0113] If they match, execute step S204.

[0114] Step S404: determine whether the difference between the positions of every two facial key points in the image to be identified is within a set range.

[0115] If not, execute step S405.

[0116] The setting range can at least distinguish that the facial parts corresponding to every two facial key points meet the requirements of a facial composition. The setting of the specific value of the setting range is not limited in this application.

[0117] If the difference between the positions of two facial key points in the image to be recognized is within a set range, it can be determined that the facial parts corresponding to the two facial key points do not meet the requirements for a facial composition.

[0118] Step S405: based on the position of each facial part key point in the image to be identified, determine the associated area corresponding to at least one facial part group in the image to be identified, where the facial part group includes at least a first facial part and a second facial part that are associated with each other in the face.

[0119] Step 406: Determine the occlusion state of the image to be recognized based on the first parameter of each pixel in the associated area.

[0120] The detailed process of steps S204-S205 can refer to the relevant introduction of steps S104-S105 in the first embodiment, which will not be repeated here.

[0121] In this embodiment, by determining whether the number of positions of key points of facial parts in the image to be identified matches the set number of positions of key points of facial parts, and if they match, further determining whether the difference between the positions of every two key points of facial parts in the image to be identified is within the set range, the accuracy of the result of determining that the image to be identified contains at least one complete face of each facial part can be improved, thereby improving the integrity and accuracy of the associated area corresponding to the facial part group, and further improving the accuracy of the occlusion state of the image to be identified.

[0122] As another optional embodiment of the present application, refer to Figure 5 , is a flow chart of a recognition method provided in the fifth embodiment of the present application. This embodiment is mainly a refinement of the recognition method described in the first embodiment above. Figure 5 As shown, the method may include but is not limited to the following steps:

[0123] Step S501: Obtain an image to be recognized.

[0124] The detailed process of step S501 can refer to the relevant introduction of step S101 in the first embodiment, which will not be repeated here.

[0125] Step S502: input the image to be identified into the deep learning model, and obtain the first parameter of each pixel in the image to be identified and the second parameter of each pixel in the image to be identified obtained by the deep learning model.

[0126] Step S503: Determine, from the second parameters of each pixel in the image to be identified, target second parameters that match the second parameters of each set facial part key point.

[0127] The second parameter may include but is not limited to: confidence.

[0128] Step S504: taking the pixel point corresponding to the second target parameter as the facial part key point in the image to be identified, and taking the position of the pixel point corresponding to the second target parameter in the image to be identified as the position of the facial part key point.

[0129] Steps S502 - S504 are a specific implementation of step S102 in the first implementation.

[0130] Step S505: Determine whether the image to be identified meets the facial integrity condition according to the position of each facial key point in the image to be identified.

[0131] If yes, execute step S506.

[0132] Step S506: Based on the position of each facial part key point in the image to be identified, determine the associated area corresponding to at least one facial part group in the image to be identified, where the facial part group includes at least a first facial part and a second facial part that are associated with each other in the face.

[0133] In this embodiment, based on the position of each facial part key point in the recognition image, determining the associated area corresponding to at least one facial part group in the image to be recognized may include but is not limited to:

[0134] S5061, based on the position of each facial part key point in the image to be identified, determining at least one facial part key point association group in the image to be identified, the facial part key point association group at least including a first facial part key point and a second facial part key point that are stored in association;

[0135] S5062, based on the positions of the facial part key points in the facial part key point association group, determining an association area between a first facial part key point and a second facial part key point that are associated in the facial part key point association group;

[0136] In this embodiment, based on the positions of the facial part key points in the facial part key point association group, determining the association area between the first facial part key point and the second facial part key point in the facial part key point association group may include but is not limited to:

[0137] S50621, based on the positions of the facial part key points in the facial part key point association group, determining a first connecting line between a first facial part key point and a second facial part key point that are associated in the facial part key point association group and a length of the first connecting line;

[0138] S50622, determining a first target line segment obtained by projecting a second connecting line between each pixel point in the image to be recognized and the first facial part key point or the second facial part key point onto the first connecting line;

[0139] S50623. If the first target line segment is at least a portion of the first connecting line and the length of the first target line segment is not greater than the length of the first connecting line, the pixel point is used as the first target pixel point, and the area formed by the first target pixel point is used as the first target area;

[0140] S50624, acquiring a second target area from the first target area, where the second target area at least includes an area corresponding to the first connecting line, and the second target area is smaller than the first target area;

[0141] In this embodiment, obtaining the second target area from the first target area may include but is not limited to:

[0142] Cut out a rectangular area including the first connecting line from the first target area, and use the rectangular area including the first connecting line as the second target area;

[0143] The length of one set of opposite sides of the rectangular area is the same as the length of the first connecting line, and the length of the other set of opposite sides is a set length. The set length can be set as needed and is not limited in this application.

[0144] S50625: Use the second target area as an associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group.

[0145] S5063: Determine an associated region corresponding to the facial part group in the image to be identified based on an associated region between the first facial part key point and the second facial part key point that are associated in the facial part key point association group.

[0146] Determining the associated area corresponding to the facial part group in the image to be identified based on the associated area between the associated first facial part key point and the second facial part key point in the facial part key point association group may include but is not limited to:

[0147] The associated region between the first facial part key point and the second facial part key point associated in the facial part key point associated group is used as the associated region corresponding to the facial part group in the image to be recognized.

[0148] Of course, determining the associated area corresponding to the facial part group in the image to be identified based on the associated area between the associated first facial part key point and the second facial part key point in the facial part key point association group may also include but is not limited to:

[0149] A portion of the area is cut out from the associated area between the first facial part key point and the second facial part key point in the facial part key point associated group as the associated area corresponding to the facial part group in the image to be recognized.

[0150] Step S507: Determine the occlusion state of the image to be identified based on the first parameter of each pixel in the associated area.

[0151] The detailed process of steps S505-S507 can refer to the relevant introduction of steps S103-S105 in the first embodiment, which will not be repeated here.

[0152] In another embodiment of the present application, the training process of the above-mentioned deep learning model is described, which may specifically include the following steps:

[0153] S601: Obtain facial image samples.

[0154] S602, determine the position of each facial part key point in the facial image sample, and based on the position of each facial part key point in the facial image sample, determine at least one facial part key point association group in the facial image sample, the facial part key point association group including at least a first facial part key point and a second facial part key point that are associated with each other.

[0155] In this embodiment, determining the position of each facial key point in the facial image sample may include:

[0156] Determine the confidence level of each pixel in the facial image sample;

[0157] Determine, from the confidence of each pixel in the facial image sample, a target confidence that matches the confidence of each set facial part key point;

[0158] The pixel points corresponding to the target confidence are used as the key points of facial parts in the facial image sample, and the positions of the pixel points corresponding to the target confidence in the facial image sample are used as the positions of the key points of facial parts in the facial image sample.

[0159] In this embodiment, Figure 6 As shown, the facial part key point association group may include but is not limited to:

[0160] The first facial part key point association group 1, the second facial part key point association group 2, the third facial part key point association group 3, the fourth facial part key point association group 4, the fifth facial part key point association group 5, the sixth facial part key point association group 6, the seventh facial part key point association group 7, the eighth facial part key point association group 8, the ninth facial part key point association group 9, the tenth facial part key point association group 10, the eleventh facial part key point association group 11, the twelfth facial part key point association group 12 and the thirteenth facial part key point association group 13.

[0161] The first facial part key point association group 1 includes the associated forehead key point and the right eye key point;

[0162] The second facial part key point association group 2 includes the associated forehead key point and the left eye key point;

[0163] The third facial part key point association group 3 includes the associated forehead key point and the right eye key point;

[0164] The fourth facial part key point association group 4 includes the associated forehead key point and the left eye key point;

[0165] The fifth facial part key point association group 5 includes the associated left eye key points and right eye key points;

[0166] The sixth facial part key point association group 6 includes the associated right ear key point and right cheek key point;

[0167] The seventh facial part key point association group 7 includes the associated left ear key point and left cheek key point;

[0168] The eighth facial part key point association group 8 includes the associated right cheek key point and chin key point;

[0169] The ninth facial part key point association group 9 includes the associated left cheek key point and chin key point;

[0170] The tenth facial part key point association group 10 includes the associated right upper lip key point and the right mouth corner key point;

[0171] The eleventh facial part key point association group 11 includes the associated left upper lip key point and the left mouth corner key point;

[0172] The twelfth facial part key point association group 12 includes the associated right lower lip key point and the right mouth corner key point;

[0173] The thirteenth facial part key point association group 13 includes the associated left lower lip key point and the left mouth corner key point.

[0174] S603: Determine an associated region between a first facial part key point and a second facial part key point that are associated in the facial part key point association group in the facial image sample based on the positions of the facial part key points in the facial part key point association group in the facial image sample.

[0175] Determining, based on the positions of the facial part key points in the facial part key point association group in the facial image sample, an association area between a first facial part key point and a second facial part key point that are associated in the facial part key point association group in the facial image sample may include:

[0176] S6031, based on the positions of the facial part key points in the facial part key point association group, determining a third connecting line between a first facial part key point and a second facial part key point associated with the facial part key point association group and a length of the third connecting line;

[0177] S6032, determining a second target line segment obtained by projecting a fourth connecting line between each pixel point in the facial image sample and the first facial part key point or the second facial part key point onto the third connecting line;

[0178] S6033: If the second target line segment is at least a portion of the third connecting line and the length of the second target line segment is not greater than the length of the third connecting line, taking the pixel point as the second target pixel point, and taking the area formed by the second target pixel point as the third target area;

[0179] S6034. Obtain a fourth target area from the third target area, where the fourth target area at least includes an area corresponding to the third connecting line, and the fourth target area is smaller than the third target area.

[0180] In this embodiment, obtaining the fourth target area from the third target area may include but is not limited to:

[0181] intercepting a rectangular area including the third connecting line from the third target area, and taking the rectangular area including the third connecting line as the fourth target area;

[0182] The length of one set of opposite sides of the rectangular area is the same as the length of the third connecting line, and the length of the other set of opposite sides is a set length. The set length can be set as needed and is not limited in this application.

[0183] Figure 6 The second target area corresponding to the second facial part key point association group 2 shown can be seen in Figure 7 The second target area corresponding to the fifth facial part key point association group 5 can be seen in the area a2 in FIG. Figure 7 Area a5 in .

[0184] S6035: Use the second target area as an associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group.

[0185] S604. Determine an associated area corresponding to the facial part group in the facial image sample based on an associated area between the first facial part key point and the second facial part key point in an associated group of facial part key points in the facial image sample, wherein the facial part group in the facial image sample includes at least the first facial part and the second facial part in the face that are associated.

[0186] Determining the associated area corresponding to the facial part group in the facial image sample based on the associated area between the first facial part key point and the second facial part key point in the facial part key point association group in the facial image sample may include but is not limited to:

[0187] The associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group in the facial image sample is used as the associated area corresponding to the facial part group in the facial image sample.

[0188] Of course, determining the associated area corresponding to the facial part group in the facial image sample based on the associated area between the first facial part key point and the second facial part key point in the facial part key point association group in the facial image sample may also include but is not limited to:

[0189] A portion of the area is cut out from the associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group in the facial image sample as the associated area corresponding to the facial part group in the facial image sample.

[0190] S605: Obtain a first sub-first parameter annotated for each pixel point in the facial part group in the facial image sample, and a second sub-first parameter annotated for each pixel point other than the facial part group in the facial image sample.

[0191] It should be noted that the first sub-first parameter corresponding to the case where the facial part group is occluded is different from the first sub-first parameter corresponding to the case where the facial part group is not occluded.

[0192] Specifically, the first sub-parameter and the second sub-parameter may be annotated in the following manner:

[0193] Using affinity analysis to analyze relationships Label the first subparameter and the second subparameter;

[0194] Represents the first sub-parameter or the second sub-parameter, p represents pixel, c represents face, k represents facial part group, no occ represents no occlusion, occ represents occlusion, otherwise represents that the pixel is outside the facial part group and has no occlusion.

[0195] It can be determined from the affinity analysis relationship that if the pixel point belongs to the facial part group and there is no occlusion, the first sub-first parameter is v; if the pixel point belongs to the facial part group and there is occlusion, the first sub-first parameter is -v; if the pixel point is outside the facial part group and there is no occlusion, the second sub-first parameter is 0.

[0196] It should be noted that the affinity analysis relationship is only one implementation method of the labeling, and it does not serve as a limitation on the labeling of the first sub-parameter and the second sub-parameter.

[0197] S606: Determine a first sub-second parameter of each facial part key point in the facial image sample and a second sub-second parameter of each pixel point in the facial image sample except the facial part key point.

[0198] The first sub-second parameter of the facial part key point is different from the second sub-second parameter of the pixel point other than the facial part key point.

[0199] In this embodiment, the confidence of the key points of the facial parts may be used as the first sub-second parameter, and the confidence of each pixel point in the facial image sample except the key points of the facial parts may be used as the second sub-second parameter.

[0200] S607: Input the facial image sample annotated with the first sub-first parameter, the second sub-first parameter, the first sub-second parameter and the second sub-second parameter into the deep learning model to train the deep learning model.

[0201] A facial image sample labeled with a first sub-first parameter, a second sub-first parameter, a first sub-second parameter and a second sub-second parameter is input into a deep learning model, and the deep learning model is trained. Based on the trained deep learning model, the position of each key point of each facial part in the image to be identified and the first parameter of each pixel in the image to be identified can be determined.

[0202] Next, the identification device provided in the present application is introduced. The identification device introduced below and the identification method introduced above can refer to each other.

[0203] See also Figure 8 The identification device includes: a first obtaining module 100, a first determining module 200, a second determining module 300, a third determining module 400 and a fourth determining module 500.

[0204] A first obtaining module 100 is used to obtain an image to be identified;

[0205] A first determination module 200, for inputting the image to be identified into the deep learning model, and determining the position of each key point of each facial part in the image to be identified and the first parameter of each pixel in the image to be identified;

[0206] The second determination module 300 is used to determine whether the image to be identified meets the facial integrity condition according to the position of each facial part key point in the image to be identified;

[0207] The third determination module 400 is used to determine, when the image to be identified meets the facial integrity condition, based on the position of each facial part key point in the image to be identified, an associated area corresponding to at least one facial part group in the image to be identified, where the facial part group includes at least a first facial part and a second facial part that are associated with each other in the face;

[0208] The fourth determination module 500 is used to determine the occlusion state of the image to be identified based on the first parameter of each pixel point in the associated area.

[0209] In this embodiment, the second determining module 300 may be specifically used for:

[0210] Determine whether the number of positions of key points of facial parts in the image to be recognized matches the number of set positions of key points of facial parts.

[0211] In this embodiment, the identification device may further include:

[0212] The fifth determining module is used for:

[0213] If the number of positions of facial key points in the image to be identified does not match the set number of positions of facial key points, then if the number of positions of facial key points is less than the set number of positions of facial key points, it is determined that the image to be identified is an image missing at least part of the facial part;

[0214] A sixth determining module is used to

[0215] When the number of positions of facial key points is greater than the set number of positions of facial key points, it is determined that the image to be recognized is an image containing multiple faces.

[0216] In this embodiment, the second determining module 300 may also be used to:

[0217] When the number of the positions of the facial part key points matches the set number of the positions of the facial part key points, it is determined whether the difference between the positions of every two facial part key points in the image to be recognized is within a set range.

[0218] In this embodiment, the first determining module 200 may be specifically used for:

[0219] Inputting the image to be identified into the deep learning model, and obtaining the second parameter of each pixel in the image to be identified obtained by the deep learning model;

[0220] Determine, from the second parameters of each pixel point in the image to be recognized, target second parameters that match the second parameters of each set facial part key point respectively;

[0221] The pixel point corresponding to the second parameter of the target is used as the key point of the facial part in the image to be identified, and the position of the pixel point corresponding to the second parameter of the target in the image to be identified is used as the position of the key point of the facial part.

[0222] In this embodiment, the third determining module 400 may be specifically used for:

[0223] Based on the position of each facial part key point in the image to be identified, determining at least one facial part key point association group in the image to be identified, the facial part key point association group at least including a first facial part key point and a second facial part key point that are stored in association;

[0224] Determine, based on the positions of the facial part key points in the facial part key point association group, an association region between a first facial part key point and a second facial part key point that are associated in the facial part key point association group;

[0225] Based on the associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group, the associated area corresponding to the facial part group in the image to be recognized is determined.

[0226] In this embodiment, the third determining module 400 may be specifically used for:

[0227] Determine, based on the positions of the facial part key points in the facial part key point association group, a first connecting line between a first facial part key point and a second facial part key point associated with the facial part key point association group and a length of the first connecting line;

[0228] Determine a first target line segment obtained by projecting a second connecting line between each pixel point in the image to be recognized and the first facial part key point or the second facial part key point onto the first connecting line;

[0229] If the first target line segment is at least a portion of the first connecting line and the length of the first target line segment is not greater than the length of the first connecting line, the pixel point is taken as the first target pixel point, and the area formed by the first target pixel point is taken as the first target area;

[0230] Acquire a second target area from the first target area, where the second target area at least includes an area corresponding to the first connecting line, and the second target area is smaller than the first target area;

[0231] The second target area is taken as an associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group.

[0232] In this embodiment, the identification device may further include:

[0233] The second acquisition module is used to:

[0234] Obtain facial image samples;

[0235] Determine the position of each facial part key point in the facial image sample, and determine at least one facial part key point association group in the facial image sample based on the position of each facial part key point in the facial image sample, wherein the facial part key point association group includes at least a first facial part key point and a second facial part key point that are associated;

[0236] Determine, based on the positions of the facial part key points in the facial part key point association group in the facial image sample, an association region between a first facial part key point and a second facial part key point that are associated in the facial part key point association group in the facial image sample;

[0237] Determine, based on an associated region between an associated first facial part key point and a second facial part key point in an associated group of facial part key points in the facial image sample, an associated region corresponding to a facial part group in the facial image sample, wherein the facial part group in the facial image sample includes at least the associated first facial part and the second facial part in the face;

[0238] Obtaining a first sub-first parameter annotated for each pixel point in a facial part group in the facial image sample, and a second sub-first parameter annotated for each pixel point other than the facial part group in the facial image sample;

[0239] Determine a first sub-second parameter of each facial part key point in the facial image sample and a second sub-second parameter of each pixel point in the facial image sample except the facial part key point;

[0240] The facial image samples labeled with the first sub-first parameter, the second sub-first parameter, the first sub-second parameter and the second sub-second parameter are input into the deep learning model to train the deep learning model.

[0241] Corresponding to the above-mentioned embodiment of an identification method provided by the present application, the present application also provides an embodiment of an electronic device applying the identification method.

[0242] like Fig. 9 The figure is a schematic diagram of the structure of a first embodiment of an electronic device provided by the present application. The electronic device may include the following structure:

[0243] A memory 10 and a processor 20 .

[0244] A memory 10, used to store at least one set of instruction sets;

[0245] The processor 20 is used to call and execute the instruction set in the memory 10, and execute the steps of the identification method introduced in any one of the first implementation mode-5 by executing the instruction set.

[0246] Corresponding to the above-mentioned control method embodiment provided by the present application, the present application also provides an embodiment of a storage medium.

[0247] In this embodiment, the storage medium stores a computer program for implementing the identification method as described in any one of the aforementioned embodiments, and the computer program is executed by a processor to implement each step of the identification method as described in any one of the aforementioned embodiments.

[0248] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0249] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0250] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0251] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0252] The above is a detailed introduction to an identification method, device and electronic device provided by the present application. 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 of the present application and its core idea; at the same time, for general 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. An identification method, comprising: Obtaining an image to be recognized; Inputting the image to be identified into a deep learning model to determine the position of each key point of the facial part in the image to be identified and the first parameter of each pixel in the image to be identified; Determining whether the image to be identified meets a facial integrity condition according to the position of each facial key point in the image to be identified; In the case where the image to be identified meets the facial integrity condition, determining, based on the position of each facial part key point in the image to be identified, an associated region corresponding to at least one facial part group in the image to be identified, the facial part group at least includes a first facial part and a second facial part that are associated with each other in the face; wherein the associated region is a region between the first facial part and the second facial part in the facial part group to which it corresponds; Based on the first parameter of each pixel in the associated area, the occlusion state of the image to be recognized is determined.

2. The method according to claim 1, wherein determining whether the image to be identified satisfies a facial integrity condition according to the position of each facial part key point in the image to be identified comprises: Determine whether the number of positions of the facial part key points in the image to be recognized matches the set number of positions of the facial part key points.

3. The method according to claim 2, further comprising: If the number of positions of the facial part key points in the image to be identified does not match the set number of positions of the facial part key points, then if the number of positions of the facial part key points is less than the set number of positions of the facial part key points, it is determined that the image to be identified is an image that is missing at least part of the facial part; When the number of the positions of the facial key points is greater than the set number of the positions of the facial key points, it is determined that the image to be recognized is an image containing multiple faces.

4. The method according to claim 2, further comprising: When the number of the positions of the facial part key points matches the set number of the positions of the facial part key points, it is determined whether the difference between the positions of every two facial part key points in the image to be recognized is within a set range.

5. The method according to any one of claims 1 to 4, wherein inputting the image to be identified into a deep learning model to determine the position of each facial key point in the image to be identified comprises: Inputting the image to be identified into a deep learning model, and obtaining a second parameter of each pixel in the image to be identified obtained by the deep learning model; Determine, from the second parameters of each pixel point in the image to be recognized, target second parameters that match the second parameters of each set facial part key point respectively; The pixel point corresponding to the second target parameter is used as the key point of the facial part in the image to be recognized, and the position of the pixel point corresponding to the second target parameter in the image to be recognized is used as the position of the key point of the facial part.

6. The method according to any one of claims 1 to 4, wherein determining the associated area corresponding to at least one facial part group in the image to be identified based on the position of each facial part key point in the image to be identified comprises: Based on the position of each facial part key point in the image to be identified, determining at least one facial part key point association group in the image to be identified, the facial part key point association group at least including a first facial part key point and a second facial part key point that are stored in association; Determine, based on the positions of the facial part key points in the facial part key point association group, an association area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group; Based on the associated area between the first facial part key point and the second facial part key point that are associated in the facial part key point associated group, the associated area corresponding to the facial part group in the image to be recognized is determined.

7. The method according to claim 6, wherein determining the associated region between the first facial part key point and the second facial part key point associated with each other in the facial part key point associated group based on the positions of the facial part key points in the facial part key point associated group comprises: Determine, based on the positions of the facial part key points in the facial part key point association group, a first connecting line between the first facial part key point and the second facial part key point associated in the facial part key point association group and a length of the first connecting line; Determine a first target line segment obtained by projecting a second connecting line between each pixel point in the image to be recognized and the first facial part key point or the second facial part key point onto the first connecting line; If the first target line segment is at least a partial line segment of the first connecting line and the length of the first target line segment is not greater than the length of the first connecting line, the pixel point is used as the first target pixel point, and the area formed by the first target pixel points is used as the first target area; Acquire a second target area from the first target area, where the second target area at least includes an area corresponding to the first connecting line, and the second target area is smaller than the first target area; The second target area is used as an associated area between the first facial part key points and the second facial part key points that are associated in the facial part key point association group.

8. According to the method of claim 1, the deep learning model is obtained by: Obtain facial image samples; Determine the position of each facial part key point in the facial image sample, and determine at least one facial part key point association group in the facial image sample based on the position of each facial part key point in the facial image sample, wherein the facial part key point association group includes at least a first facial part key point and a second facial part key point that are associated with each other; Determine, based on the positions of the facial part key points in the facial part key point association group in the facial image sample, an association area between the first facial part key point and the second facial part key point that are associated in the facial part key point association group in the facial image sample; Determine, based on an associated region between the first facial part key point and the second facial part key point associated in the facial part key point association group in the facial image sample, an associated region corresponding to the facial part group in the facial image sample, wherein the facial part group in the facial image sample includes at least the first facial part and the second facial part associated in the face; Obtaining a first sub-first parameter annotated for each pixel point in a facial part group in the facial image sample, and a second sub-first parameter annotated for each pixel point other than the facial part group in the facial image sample; Determine a first sub-second parameter of each facial part key point in the facial image sample and a second sub-second parameter of each pixel point in the facial image sample except the facial part key point; A facial image sample labeled with the first sub-first parameter, the second sub-first parameter, the first sub-second parameter, and the second sub-second parameter is input into a deep learning model to train the deep learning model.

9. An identification device, comprising: A first acquisition module, used for acquiring an image to be recognized; A first determination module is used to input the image to be identified into a deep learning model to determine the position of each facial part key point in the image to be identified and a first parameter of each pixel in the image to be identified; the first parameter represents the facial part association state and / or facial part occlusion state corresponding to the pixel; A second determination module is used to determine whether the image to be identified meets the facial integrity condition according to the position of each facial part key point in the image to be identified; A third determination module is used to determine, when the image to be identified satisfies the facial integrity condition, an associated region corresponding to at least one facial region group in the image to be identified based on the position of each facial region key point in the image to be identified, wherein the facial region group includes at least a first facial region and a second facial region that are associated with each other in the face; wherein the associated region is an area between the first facial region and the second facial region in the facial region group to which it corresponds; The fourth determination module is used to determine the occlusion state of the image to be identified based on the first parameter of each pixel point in the associated area.

10. An electronic device comprising: Memory and processor; The memory is used to store at least one set of instruction sets; The processor is used to call and execute the instruction set in the memory, and execute the identification method according to any one of claims 1 to 8 by executing the instruction set.