CN112949568A - Method and device for matching human face and human body, electronic equipment and storage medium - Google Patents

Method and device for matching human face and human body, electronic equipment and storage medium Download PDF

Info

Publication number
CN112949568A
CN112949568A CN202110321139.6A CN202110321139A CN112949568A CN 112949568 A CN112949568 A CN 112949568A CN 202110321139 A CN202110321139 A CN 202110321139A CN 112949568 A CN112949568 A CN 112949568A
Authority
CN
China
Prior art keywords
human body
human
face
frame
mask
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110321139.6A
Other languages
Chinese (zh)
Inventor
王彤舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN202110321139.6A priority Critical patent/CN112949568A/en
Publication of CN112949568A publication Critical patent/CN112949568A/en
Priority to PCT/CN2021/102829 priority patent/WO2022198821A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/70Multimodal biometrics, e.g. combining information from different biometric modalities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure relates to a method and an apparatus for matching a human face with a human body, an electronic device and a storage medium, wherein the method comprises: determining at least one face frame in a target image; determining at least one human body mask in the target image; and obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the position of the human face frame and the position of the human body mask. The embodiment of the disclosure can improve the accuracy of matching the human face and the human body.

Description

Method and device for matching human face and human body, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for matching a human face with a human body, an electronic device, and a storage medium.
Background
The technology of determining the identity of a person through image information of the person is mature day by day, and the identity of the person can be determined more accurately by matching the face of the person with the human body. In the process of matching the human face and the human body, the detected human face and the detected human body are subjected to the correlation operation of the same person.
The application scenes of matching human faces and human bodies are increasingly wide, for example, in an intelligent security system, due to the problems of the number, arrangement, image information and the like of cameras, all human faces are difficult to capture, and the human bodies can only be captured at a certain time. Although a clear face is not captured, the captured human body can be retrieved in a face-human body association database, and after a matched human body is retrieved, associated face information is further acquired, so that the identity information of the human body is determined.
In the database of human face-human body association, the human face and the human body are associated in advance, and the association process is realized by a human face and human body matching mode, however, in the related technology, the accuracy rate of human face and human body matching is low.
Disclosure of Invention
The present disclosure provides a technical scheme for matching human faces and human bodies.
According to an aspect of the present disclosure, there is provided a method for matching a human face with a human body, including:
determining at least one face frame in a target image;
determining at least one human body mask in the target image;
and obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the position of the human face frame and the position of the human body mask.
In one possible implementation, the determining at least one human mask in the target image includes:
determining at least one human body frame in the target image and a human body mask in the human body frame;
determining a target human body mask in a single human body frame under the condition that the single human body frame in the at least one human body frame contains more than one human body mask;
and deleting other human body masks except the target human body mask in the single human body frame.
In one possible implementation, the determining the target human mask in the single human frame includes:
determining two first human body masks with the largest area in a single human body frame;
and under the condition that the difference value of the areas of the two first human body masks is larger than a set threshold value, taking the first human body mask with the large area in the two first human body masks as a target human body mask.
In one possible implementation, after the determining two first human body masks with the largest area in a single human body frame, the method further includes:
and deleting the single human body frame and the human body masks in the single human body frame under the condition that the difference value of the areas of the two first human body masks is not larger than a set threshold value.
In one possible implementation, the determining at least one human body frame in the target image includes:
under the condition that the target image comprises a plurality of human body frames, determining a first human body frame with highest confidence level in the human body frames;
determining the overlapping degree of the first human body frame and each second human body frame, wherein the second human body frame is a human body frame except for the first human body frame in the plurality of human body frames;
and deleting the second human body frames with the overlapping degree larger than the threshold value of the overlapping degree in the second human body frames.
In a possible implementation manner, the obtaining a matching relationship between a face in the face frame and a human body in the human body mask based on the position of the face frame and the position of the human body mask includes:
and obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the distance between the human face frame and the top end of the human body mask.
In a possible implementation manner, the obtaining a matching relationship between a face in the face frame and a human body in the human body mask based on a distance between the face frame and the top end of the human body mask includes:
under the condition that the target image comprises a plurality of face frames and a plurality of human body masks, establishing a plurality of corresponding relation sets according to different corresponding modes between each face frame and each human body mask, wherein a single corresponding relation set comprises one-to-one corresponding relation between each face frame and each human body mask;
determining a matching score of a single corresponding relation set according to the sum of a plurality of first distances in the single corresponding relation set, wherein the first distances are distances between a human face frame with the corresponding relation and the top end of a human body mask, and the matching score is negatively correlated with the sum of the first distances;
and taking the corresponding relation in the corresponding relation set with the maximum matching score as the matching relation between each face frame and each human body mask in the target image.
In a possible implementation manner, after obtaining a matching relationship between the face in the face frame and the human body in the human body mask, the method further includes:
storing the matching relation into a matching relation library, wherein the matching relation library is used for storing the matching relation between the human face and the human body;
in response to an identity information query request for a target human body, searching the target human body in the matching relation library;
determining a face having a matching relationship with the target human body under the condition that the target human body is found;
and determining the identity information of the target human body according to the human face.
According to an aspect of the present disclosure, there is provided a human face and human body matching apparatus, including:
the face frame determining unit is used for determining at least one face frame in the target image;
the human body mask determining unit is used for determining at least one human body mask in the target image;
and the matching relation determining unit is used for obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the position of the human face frame and the position of the human body mask.
In one possible implementation manner, the human body mask determining unit includes:
the human body frame determining unit is used for determining at least one human body frame in the target image and a human body mask in the human body frame;
the target human body mask determining unit is used for determining a target human body mask in a single human body frame in the at least one human body frame under the condition that the single human body frame contains more than one human body mask;
and the human body mask deleting unit is used for deleting other human body masks except the target human body mask in the single human body frame.
In one possible implementation manner, the target human mask determining unit includes:
the first human body mask determining subunit is used for determining two first human body masks with the largest area in a single human body frame;
and the target human body mask determining subunit is used for taking the first human body mask with the larger area in the two first human body masks as the target human body mask under the condition that the difference value of the areas of the two first human body masks is larger than a set threshold value.
In one possible implementation, the apparatus further includes:
and the human body frame deleting unit is used for deleting the single human body frame and the human body mask in the single human body frame under the condition that the difference value of the areas of the two first human body masks is not larger than a set threshold value.
In one possible implementation manner, the human body frame determination unit includes:
a first human body frame determining unit, configured to determine, when a plurality of human body frames are included in the target image, a first human body frame with a highest confidence level among the plurality of human body frames;
an overlap determining unit, configured to determine an overlap between the first human body frame and each second human body frame, where the second human body frame is a human body frame other than the first human body frame in the plurality of human body frames;
and the second human body frame deleting unit is used for deleting the second human body frame of which the overlapping degree is greater than the threshold value of the overlapping degree in the second human body frame.
In a possible implementation manner, the matching relationship determining unit is configured to obtain a matching relationship between a face in the face frame and a human body in the human body mask based on a distance between the face frame and the top end of the human body mask.
In a possible implementation manner, the matching relationship determining unit includes:
a corresponding relation set establishing unit, configured to establish a plurality of corresponding relation sets according to different corresponding manners between each face frame and each human body mask when the target image includes the plurality of face frames and the plurality of human body masks, where a single corresponding relation set includes one-to-one corresponding relation between each face frame and each human body mask;
the matching score determining unit is used for determining the matching score of a single corresponding relation set according to the sum of a plurality of first distances in the single corresponding relation set, wherein the first distances are the distances between the human face frame with the corresponding relation and the top end of the human body mask, and the matching score is negatively related to the sum of the first distances;
and the matching relation determining subunit is used for taking the corresponding relation in the corresponding relation set with the maximum matching score as the matching relation between each face frame and each human body mask in the target image.
In one possible implementation, the apparatus further includes:
the storage unit is used for storing the matching relation into a matching relation library, and the matching relation library is used for storing the matching relation between the human face and the human body;
the searching unit is used for responding to an identity information query request aiming at a target human body and searching the target human body in the matching relation library;
the face determining unit is used for determining a face which has a matching relationship with the target human body under the condition that the target human body is found;
and the identity information determining unit is used for determining the identity information of the target human body according to the human face.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
In the embodiment of the present disclosure, at least one face frame and at least one human body mask in a target image are determined, and then a matching relationship between a face in the face frame and a human body in the human body mask is obtained based on the position of the face frame and the position of the human body mask. Therefore, compared with the human face and human body matching through the human face frame and the human body frame, the human body mask can accurately reflect the position of the human body, the human face and human body matching is carried out based on the human face frame and the human body mask, and the matching relation between the human face and the human body can be accurately obtained.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow chart of a face and body matching method according to an embodiment of the present disclosure.
Fig. 2 shows a block diagram of a human face and body matching apparatus according to an embodiment of the present disclosure.
Fig. 3 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure.
Fig. 4 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The matching of the human face and the human body can be realized based on the people in the same image, and the matching of the human face and the human body can be conveniently and quickly realized under the condition that the people in the same image comprise both the human face and the human body. In the related art, a face frame and a body frame are often obtained through face detection and body detection, and then face and body matching is performed through the face frame and the body frame, but the body frame often cannot accurately reflect the position of a human body, or a plurality of human bodies may exist in the body frame, so that the accuracy of a matching result obtained in a complex scene is low.
In the embodiment of the present disclosure, at least one face frame and at least one human body mask in a target image are determined, and then a matching relationship between a face in the face frame and a human body in the human body mask is obtained based on the position of the face frame and the position of the human body mask. Therefore, compared with the human face and human body matching through the human face frame and the human body frame, the human body mask can accurately reflect the position of the human body, the human face and human body matching is carried out based on the human face frame and the human body mask, and the matching relation between the human face and the human body can be accurately obtained.
The face and body matching method provided by the embodiment of the disclosure has a high application value in many fields, for example, in the security field, in the process of tracking a suspect, under a scene with a high crowd density or under the condition that the face is shielded, the face of the suspect can be obtained through the photographed human body of the suspect and a pre-established face-human body matching relationship, and then the identity of the suspect can be determined according to the face.
In a possible implementation manner, the human face and body matching method may be performed by an electronic device such as a terminal device or a server, the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like, and the method may be implemented by a processor calling a computer readable instruction stored in a memory. Alternatively, the method may be performed by a server.
For convenience of description, in one or more embodiments of the present specification, an execution subject of the face and human body matching method may be a face and human body matching device, and hereinafter, an implementation of the method will be described by taking the execution subject as the face and human body matching device as an example. It is understood that the implementation of the method by the human face and body matching device is only an exemplary illustration and should not be construed as a limitation of the method.
Fig. 1 shows a flowchart of a face and body matching method according to an embodiment of the present disclosure, and as shown in fig. 1, the face and body matching method includes:
in step S11, at least one face frame in the target image is determined.
The face frame is an area in an image containing a face, and the face frame is generally a rectangular frame, and the specific position of the rectangular frame (upper left corner, lower left corner, upper right corner and lower right corner) can be represented by the vertex of the rectangle.
The face frame is a positioning result of tracking and positioning a face, and there are various ways of positioning the face, for example, the face frame in the target image may be determined in a sliding window manner, the face features may be detected in the sliding window, and the window in which the face features are detected may be determined as the face frame. The face features may be, for example, face key points, which are key points on a face, for example, key points such as eyes (e.g., canthus, eyeball center, tail of eye), nose (e.g., tip of nose, wing of nose), mouth (e.g., lip angle, lip), chin, eyebrow, etc., and based on the detection of these key points, a face frame may be located.
What is needed is that there may be one or more face frames in the determined target image.
In step S12, at least one human mask in the target image is determined.
The human body mask is used for indicating the region where the outline of the human body is located, the human body mask can be obtained through example segmentation, and the example segmentation is to further distinguish different individuals of the same object on the basis of semantic segmentation, so that the determined human body mask corresponds to a single human body, namely one human body mask corresponds to one human body.
Example segmentation can be realized based on a target detection technology and a semantic segmentation technology, specifically, human bodies are detected in a target image at first, then pixels corresponding to each human body are labeled, and each human body in the image can be distinguished and labeled. For example, a human body frame representing the position of the human body can be obtained through a target detection technology, and the contour area of each human body in the human body frame is further divided on the basis of the human body frame, so that the human body mask is obtained.
In step S13, based on the position of the face frame and the position of the human body mask, a matching relationship between the face in the face frame and the human body in the human body mask is obtained.
The human face and the human body have a matching relationship, so that the characteristic that the human face and the human body belong to the same person is realized, the position of the human body and the position of the human face have strong correlation in the same image, and generally, the probability that the human face closest to the human body belongs to the same person is high. Therefore, after the face frame and the human body mask are determined, that is, the positions of the human body frame and the human body mask are determined, the matching relationship between the face in the face frame and the human body in the human body mask can be determined based on the positions of the face frame and the human body mask.
In the embodiment of the present disclosure, at least one face frame and at least one human body mask in a target image are determined, and then a matching relationship between a face in the face frame and a human body in the human body mask is obtained based on the position of the face frame and the position of the human body mask. Therefore, compared with the human face and human body matching through the human face frame and the human body frame, the human body mask can accurately reflect the position of the human body, the human face and human body matching is carried out based on the human face frame and the human body mask, and the matching relation between the human face and the human body can be accurately obtained.
In one possible implementation, the determining at least one human mask in the target image includes: determining at least one human body frame in the target image and a human body mask in the human body frame; determining a target human body mask in a single human body frame under the condition that the single human body frame in the at least one human body frame contains more than one human body mask; and deleting other human body masks except the target human body mask in the single human body frame.
The human body frame is an area in an image containing a human body, is generally a rectangular frame, and can represent the specific position of the rectangular frame (upper left corner, lower left corner, upper right corner and lower right corner) by using the vertex of the rectangle.
The human body frame is a positioning result of tracking and positioning a human body, and various ways of positioning the human body can be provided, for example, the human body frame in the target image can be detected in a sliding window way, human body features are detected in the sliding window, and the window in which the human body features are detected can be determined as the human body frame.
Therefore, under the condition that a single human body frame comprises more than one human body mask, the target human body mask in the single human body frame can be determined, and then other human body masks except the target human body mask in the single human body frame are deleted, so that the obtained human body frame only comprises one human body mask.
In the embodiment of the present disclosure, the target human body mask may be a mask of a human body with higher image quality, and if one human body frame simultaneously contains a plurality of human body masks, it indicates that the two human bodies cannot be distinguished in the human body detection process, which indicates that a human body with lower image quality may exist in the human body frame, so that by removing the mask of the human body with lower image quality, the accuracy of matching the human face and the human body can be improved, and the image quality of the matched human body is higher, so as to meet the subsequent use requirement on the matching result.
For the same person in the target image, there may be a case where a plurality of body frames are framed, and for this case, the plurality of body frames of the same person may be deduplicated, and only one body frame is reserved. Specifically, in one possible implementation manner, the determining at least one human body frame in the target image includes: under the condition that the target image comprises a plurality of human body frames, determining a first human body frame with highest confidence level in the human body frames; determining the overlapping degree of the first human body frame and each second human body frame, wherein the second human body frame is a human body frame except for the first human body frame in the plurality of human body frames; and deleting the second human body frames with the overlapping degree larger than the threshold value of the overlapping degree in the second human body frames.
In the process of detecting the human body features through the sliding window, the confidence degree of the human body features contained in the window is obtained, and the window with the confidence degree higher than the confidence degree threshold value is determined as the human body frame.
However, the human body frames of the same person often have overlapping parts, and then the human body frame having more overlap with the human body frame having the highest confidence coefficient may be deleted, and for convenience of description, the human body frame having overlap with the human body frame having the highest confidence coefficient will be described as the second human body frame hereinafter. The degree of overlap between the human body frames can be measured through the degree of overlap, and then the second human body frame with the degree of overlap larger than the threshold value of the degree of overlap in the second human body frame is deleted.
The overlapping degree here may be, for example, the sum of the area of the overlapping portion of the two human frames divided by the area of the two human frames, or the value of the area of the overlapping portion. Of course, the degree of overlap of the human body frames can also be measured by other criteria, which is not specifically limited by the present disclosure.
In the embodiment of the present disclosure, in a case where the same person corresponds to a plurality of body frames, a first body frame with the highest confidence level among the plurality of body frames is determined, then the overlapping degree between the first body frame and each second body frame is determined, and a second body frame with the overlapping degree larger than the overlapping degree threshold value among the second body frames is deleted. Therefore, the repeated human body frames are removed, the human body frames with high confidence coefficient are obtained, the accuracy of the obtained human body frames is improved, and the accuracy of matching of the human face and the human body is further improved.
In one possible implementation, the determining the target human mask in the single human frame includes: determining two first human body masks with the largest area in a single human body frame; and under the condition that the difference value of the areas of the two first human body masks is larger than a set threshold value, taking the first human body mask with the large area in the two first human body masks as a target human body mask.
Considering that the image quality of a human body is higher when the area is larger, therefore, in the case that a plurality of human body masks exist in a single human body frame, the areas of the plurality of human body masks may be determined, and then two human body masks with the largest area are selected, and for convenience of subsequent description, the two human body masks with the largest area are referred to as a first human body mask.
If the areas of the two first human body masks are different greatly, the quality of the human body mask with the largest area is far better than the quality of the other human body masks, and if the areas of the two first human body masks are not different greatly and the two first human body masks cannot be distinguished in the human body detection process, the quality of the two first human body masks is not good.
Therefore, in a case that a difference value between the areas of the two first human body masks is greater than a set threshold, the first human body mask with a large area may be used as the target human body mask, where the difference value is used to reflect a difference degree between the areas of the two first human body masks, and the difference value may be, for example, a difference value between the two first human body masks, or a ratio of the two first human body masks.
The threshold value is set to a threshold value set in advance, which may be set based on experience, for example, in the case where the disparity value is a ratio of two first human body masks, the disparity value may be 0.6.
In the embodiment of the disclosure, by determining two first human body masks with the largest area in a single human body frame, the first human body mask with the largest area is taken as the target human body mask when the difference value of the areas of the two first human body masks is larger than a set threshold. Therefore, the human body mask with the best image quality in a single human body frame can be rapidly obtained, the accuracy of matching of the human face and the human body can be improved, the image quality of the matched human body is high, and the follow-up use requirement on the matching result is met.
In one possible implementation, after the determining two first human body masks with the largest area in a single human body frame, the method further includes:
and deleting the single human body frame and the human body masks in the single human body frame under the condition that the difference value of the areas of the two first human body masks is not larger than a set threshold value.
If the areas of the two first human body masks are not large in difference and the two first human body masks cannot be distinguished in the human body detection process, the quality of the two first human body masks is not good, so that the human body masks in the human body frame and the human body frame can be deleted, the influence on matching of human bodies and human faces in other human body masks is reduced, the accuracy rate of matching of the human faces and the human bodies is improved, the image quality of the matched human bodies is high, and the follow-up use requirement on the matching result is met.
In a possible implementation manner, the obtaining a matching relationship between a face in the face frame and a human body in the human body mask based on the position of the face frame and the position of the human body mask includes: and obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the distance between the human face frame and the top end of the human body mask.
Because the face and the human body have a matching relationship under the condition that the face and the human body belong to the same person, and the face of the same person is often positioned at the top end of the human body in the same image, the matching relationship between the face in the face frame and the human body in the human body mask can be obtained based on the distance between the face frame and the top end of the human body mask, for example, the face in the face frame closest to the top end of the human body mask is used as the face matched with the human body in the human body mask.
In one possible implementation, the top of the human mask may be determined based on key points of the human body in the human mask. The human body key points comprise main parts of the head, the limbs, the waist and the like of the human body, and the top end (namely the direction of the head) of the human body can be determined based on the human body key points.
In the embodiment of the disclosure, the matching relationship between the face in the face frame and the human body in the human body mask is obtained based on the distance between the face frame and the top end of the human body mask, and thus, the matching relationship between the face and the human body can be accurately obtained.
In a possible implementation manner, the obtaining a matching relationship between a face in the face frame and a human body in the human body mask based on a distance between the face frame and the top end of the human body mask includes: under the condition that the target image comprises a plurality of face frames and a plurality of human body masks, establishing a plurality of corresponding relation sets according to different corresponding modes between each face frame and each human body mask, wherein a single corresponding relation set comprises one-to-one corresponding relation between each face frame and each human body mask; determining a matching score of a single corresponding relation set according to the sum of a plurality of first distances in the single corresponding relation set, wherein the first distances are distances between a human face frame with the corresponding relation and the top end of a human body mask, and the matching score is negatively correlated with the sum of the first distances; and taking the corresponding relation in the corresponding relation set with the maximum matching score as the matching relation between each face frame and each human body mask in the target image.
Under the condition that the target image comprises a plurality of face frames and a plurality of human body masks, the corresponding modes between the face and the human body have multiple possibilities, and then a plurality of corresponding relation sets can be established according to different corresponding modes between the face frames and the human body masks. For example, if the target image includes face frames a, b, c and a human mask A, B, C, then possible matching relationships include: { a-A, B-B, C-C }; { a-A, B-C, C-B }; { a-B, B-A, C-C }; { a-B, B-C, C-A }; { a-C, B-A, C-B }; { a-C, B-B, C-A }. Wherein, a group of corresponding relations in { } is a corresponding relation set, and a single corresponding relation set comprises a one-to-one corresponding relation between each face frame and each human body mask in the target image.
For a single human body mask, the face frame closest to the top end of the mask is found, that is, the face matched with the mask is found, that is, for the single human body mask, the face and the human body closest to the mask are the optimal face-human body matching relationship. However, for a single corresponding relationship set, it is necessary to optimize the matching relationship between a plurality of faces and human bodies in the whole of the single corresponding relationship set.
Based on the requirement for optimizing the matching relationship between the human faces and the human body in the single corresponding relationship set, the matching score of the single corresponding relationship set can be determined according to the sum of a plurality of first distances in the single corresponding relationship set, wherein the first distance is the distance between the human face frame with the corresponding relationship and the top end of the human body mask. The matching score can be used for representing whether the whole of a single corresponding relation set is optimal or not, and the larger the matching score is, the smaller the sum of the first distances is, and the better the whole of the human face-human body matching relation in the single corresponding relation set is.
Then, the human face-human body matching relationship in the correspondence set with the largest matching score is optimal as a whole, and therefore, the correspondence in the correspondence set with the largest matching score can be used as the matching relationship between each human face frame and each human body mask in the target image.
In one possible implementation, the set of correspondences for which the match score is greatest may be determined based on a least-cost-max-flow algorithm. Firstly, a network is constructed, and a source point S and a sink point T are established by taking all face frames in a target image as vertexes Xi in a bipartite graph and taking all human body masks as vertexes Yi in the bipartite graph. And connecting a directed edge with the capacity of 1 and the cost of 0 from S to each Xi, and connecting a directed edge with the capacity of 1 and the cost of 0 from each Yi to T. Connecting a directed edge with the capacity of 1 and the cost (-score) from each Xi to each Yj, namely constructing a plurality of corresponding relation sets, wherein the value of socre is the matching score between each human body mask and each human face frame, namely the closer the position of the human face frame is to the top end of the human body mask, the higher the score is.
The constructed network is a process of constructing a plurality of corresponding relation sets and solving the corresponding relation set with the maximum matching score, namely, the process of solving the corresponding relation set with the maximum matching score is a process of solving the minimum cost maximum flow of the constructed network, wherein the flow is the matching number, all full flow edges are a group of feasible solutions, and the opposite number of the minimum cost matching score is solved, namely, the matching score of each group of feasible solutions is maximum, so that the corresponding relation set with the maximum matching score can be obtained.
In the embodiment of the present disclosure, under the condition that the target image includes a plurality of face frames and a plurality of body masks, a plurality of corresponding relationship sets are established according to different corresponding manners between each face frame and each body mask, then a matching score of a single corresponding relationship set is determined according to a sum of a plurality of first distances in the single corresponding relationship set, and finally, a corresponding relationship in the corresponding relationship set with the largest matching score is used as a matching relationship between each face frame and each body mask in the target image. Therefore, the human face-human body matching relationship in the corresponding relationship set with the maximum matching score is optimal integrally, and the obtained human face-human body matching relationship is more accurate integrally.
In a possible implementation manner, after obtaining a matching relationship between the face in the face frame and the human body in the human body mask, the method further includes: storing the matching relation into a matching relation library, wherein the matching relation library is used for storing the matching relation between the human face and the human body; in response to an identity information query request for a target human body, searching the target human body in the matching relation library; determining a face having a matching relationship with the target human body under the condition that the target human body is found; and determining the identity information of the target human body according to the human face.
The face and human body matching method provided by the embodiment of the disclosure has a high application value in many fields, and based on face recognition, the identity information of a face can be obtained, so that after the matching relationship between the face and the human body is obtained, when only a human body exists in an image acquired by a camera, the face having the matching relationship with the human body can be searched based on the human body, and then the identity information is determined based on the matched face, namely the identity information of the human body in the acquired image is determined.
The following describes a face and human body matching method provided by the present disclosure with reference to a specific implementation, which specifically includes the following steps:
and step S21, inputting a target image, detecting the human face and the human body in the target image based on an example segmentation technology, and obtaining a human face frame, a human body frame and a human body mask in the human body frame.
Step S22, under the condition that a single human body frame contains more than one human body mask, determining two first human body masks with the largest area in the single human body frame, and under the condition that the ratio of the areas of the two first human body masks is more than 0.6, reserving the first human body mask with the largest area and deleting other human body masks;
and deleting the human body frame and the human body mask in the human body frame under the condition that the ratio of the areas of the two first human body masks is less than 0.6.
Step S23, under the condition that the target image comprises a plurality of face frames and a plurality of human body masks, establishing a plurality of corresponding relation sets according to different corresponding modes between the face frames and the human body masks, wherein a single corresponding relation set comprises a one-to-one corresponding relation between the face frames and the human body masks;
step S24, determining the matching score of the single corresponding relation set according to the sum of a plurality of first distances in the single corresponding relation set, wherein the first distances are the distances between the human face frame with the corresponding relation and the top end of the human body mask, and the matching score is negatively correlated with the sum of the first distances;
step S25, the correspondence in the correspondence set with the largest matching score is used as the matching relationship between each face frame and each body mask in the target image.
In the embodiment of the present disclosure, at least one face frame and at least one human body mask in a target image are determined, and then a matching relationship between a face in the face frame and a human body in the human body mask is obtained based on the position of the face frame and the position of the human body mask. Therefore, compared with the human face and human body matching through the human face frame and the human body frame, the human body mask can accurately reflect the position of the human body, the human face and human body matching is carried out based on the human face frame and the human body mask, and the matching relation between the human face and the human body can be accurately obtained.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides a device for matching a human face and a human body, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the methods for matching a human face and a human body provided by the present disclosure, and the corresponding technical solutions and descriptions thereof and the corresponding descriptions thereof in the methods section are omitted for brevity.
Fig. 2 is a block diagram of an apparatus for matching a human face and a human body according to an embodiment of the present disclosure, and as shown in fig. 2, the apparatus 30 includes:
a face frame determination unit 31 for determining at least one face frame in the target image;
a human body mask determining unit 32 for determining at least one human body mask in the target image;
a matching relationship determining unit 33, configured to obtain a matching relationship between the human face in the human face frame and the human body in the human body mask based on the position of the human face frame and the position of the human body mask.
In a possible implementation manner, the human body mask determining unit 32 includes:
the human body frame determining unit is used for determining at least one human body frame in the target image and a human body mask in the human body frame;
the target human body mask determining unit is used for determining a target human body mask in a single human body frame in the at least one human body frame under the condition that the single human body frame contains more than one human body mask;
and the human body mask deleting unit is used for deleting other human body masks except the target human body mask in the single human body frame.
In one possible implementation manner, the target human mask determining unit includes:
the first human body mask determining subunit is used for determining two first human body masks with the largest area in a single human body frame;
and the target human body mask determining subunit is used for taking the first human body mask with the larger area in the two first human body masks as the target human body mask under the condition that the difference value of the areas of the two first human body masks is larger than a set threshold value.
In one possible implementation, the apparatus further includes:
and the human body frame deleting unit is used for deleting the single human body frame and the human body mask in the single human body frame under the condition that the difference value of the areas of the two first human body masks is not larger than a set threshold value.
In one possible implementation manner, the human body frame determination unit includes:
a first human body frame determining unit, configured to determine, when a plurality of human body frames are included in the target image, a first human body frame with a highest confidence level among the plurality of human body frames;
an overlap determining unit, configured to determine an overlap between the first human body frame and each second human body frame, where the second human body frame is a human body frame other than the first human body frame in the plurality of human body frames;
and the second human body frame deleting unit is used for deleting the second human body frame of which the overlapping degree is greater than the threshold value of the overlapping degree in the second human body frame.
In a possible implementation manner, the matching relationship determining unit 33 is configured to obtain a matching relationship between a face in the face frame and a human body in the human body mask based on a distance between the face frame and the top end of the human body mask.
In a possible implementation manner, the matching relationship determining unit 33 includes:
a corresponding relation set establishing unit, configured to establish a plurality of corresponding relation sets according to different corresponding manners between each face frame and each human body mask when the target image includes the plurality of face frames and the plurality of human body masks, where a single corresponding relation set includes one-to-one corresponding relation between each face frame and each human body mask;
the matching score determining unit is used for determining the matching score of a single corresponding relation set according to the sum of a plurality of first distances in the single corresponding relation set, wherein the first distances are the distances between the human face frame with the corresponding relation and the top end of the human body mask, and the matching score is negatively related to the sum of the first distances;
and the matching relation determining subunit is used for taking the corresponding relation in the corresponding relation set with the maximum matching score as the matching relation between each face frame and each human body mask in the target image.
In one possible implementation, the apparatus further includes:
the storage unit is used for storing the matching relation into a matching relation library, and the matching relation library is used for storing the matching relation between the human face and the human body;
the searching unit is used for responding to an identity information query request aiming at a target human body and searching the target human body in the matching relation library;
the face determining unit is used for determining a face which has a matching relationship with the target human body under the condition that the target human body is found;
and the identity information determining unit is used for determining the identity information of the target human body according to the human face.
In some embodiments, functions or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementations and technical effects thereof may refer to the description of the above method embodiments, which are not described herein again for brevity.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The disclosed embodiments also provide a computer program product comprising computer readable code, when the computer readable code runs on a device, a processor in the device executes instructions for implementing the human face and body matching method provided in any of the above embodiments.
The embodiments of the present disclosure also provide another computer program product for storing computer readable instructions, which when executed, cause a computer to perform the operations of the human face and body matching method provided in any of the above embodiments.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 3 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 3, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 4 shows a block diagram of an electronic device 1900 according to an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 4, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as the Microsoft Server operating system (Windows Server), stored in the memory 1932TM) Apple Inc. of the present application based on the graphic user interface operating System (Mac OS X)TM) Multi-user, multi-process computer operating system (Unix)TM) Free and open native code Unix-like operating System (Linux)TM) Open native code Unix-like operating System (FreeBSD)TM) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (11)

1. A method for matching a human face with a human body is characterized by comprising the following steps:
determining at least one face frame in a target image;
determining at least one human body mask in the target image;
and obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the position of the human face frame and the position of the human body mask.
2. The method of claim 1, wherein the determining at least one human mask in the target image comprises:
determining at least one human body frame in the target image and a human body mask in the human body frame;
determining a target human body mask in a single human body frame under the condition that the single human body frame in the at least one human body frame contains more than one human body mask;
and deleting other human body masks except the target human body mask in the single human body frame.
3. The method of claim 2, wherein the determining the target human mask in the single human frame comprises:
determining two first human body masks with the largest area in a single human body frame;
and under the condition that the difference value of the areas of the two first human body masks is larger than a set threshold value, taking the first human body mask with the large area in the two first human body masks as a target human body mask.
4. The method of claim 3, wherein after the determining the two first human masks with the largest area in the single human frame, the method further comprises:
and deleting the single human body frame and the human body masks in the single human body frame under the condition that the difference value of the areas of the two first human body masks is not larger than a set threshold value.
5. The method according to any one of claims 2-4, wherein the determining at least one human frame in the target image comprises:
under the condition that the target image comprises a plurality of human body frames, determining a first human body frame with highest confidence level in the human body frames;
determining the overlapping degree of the first human body frame and each second human body frame, wherein the second human body frame is a human body frame except for the first human body frame in the plurality of human body frames;
and deleting the second human body frames with the overlapping degree larger than the threshold value of the overlapping degree in the second human body frames.
6. The method according to any one of claims 1 to 5, wherein the obtaining a matching relationship between the face in the face frame and the human in the human mask based on the position of the face frame and the position of the human mask comprises:
and obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the distance between the human face frame and the top end of the human body mask.
7. The method according to claim 6, wherein obtaining the matching relationship between the face in the face frame and the human in the human mask based on the distance between the face frame and the top of the human mask comprises:
under the condition that the target image comprises a plurality of face frames and a plurality of human body masks, establishing a plurality of corresponding relation sets according to different corresponding modes between each face frame and each human body mask, wherein a single corresponding relation set comprises one-to-one corresponding relation between each face frame and each human body mask;
determining a matching score of a single corresponding relation set according to the sum of a plurality of first distances in the single corresponding relation set, wherein the first distances are distances between a human face frame with the corresponding relation and the top end of a human body mask, and the matching score is negatively correlated with the sum of the first distances;
and taking the corresponding relation in the corresponding relation set with the maximum matching score as the matching relation between each face frame and each human body mask in the target image.
8. The method according to any one of claims 1-7, wherein after obtaining the matching relationship between the face in the face box and the body in the body mask, the method further comprises:
storing the matching relation into a matching relation library, wherein the matching relation library is used for storing the matching relation between the human face and the human body;
in response to an identity information query request for a target human body, searching the target human body in the matching relation library;
determining a face having a matching relationship with the target human body under the condition that the target human body is found;
and determining the identity information of the target human body according to the human face.
9. An apparatus for matching a human face with a human body, comprising:
the face frame determining unit is used for determining at least one face frame in the target image;
the human body mask determining unit is used for determining at least one human body mask in the target image;
and the matching relation determining unit is used for obtaining the matching relation between the human face in the human face frame and the human body in the human body mask based on the position of the human face frame and the position of the human body mask.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1 to 8.
11. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 8.
CN202110321139.6A 2021-03-25 2021-03-25 Method and device for matching human face and human body, electronic equipment and storage medium Pending CN112949568A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110321139.6A CN112949568A (en) 2021-03-25 2021-03-25 Method and device for matching human face and human body, electronic equipment and storage medium
PCT/CN2021/102829 WO2022198821A1 (en) 2021-03-25 2021-06-28 Method and apparatus for performing matching between human face and human body, and electronic device, storage medium and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110321139.6A CN112949568A (en) 2021-03-25 2021-03-25 Method and device for matching human face and human body, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112949568A true CN112949568A (en) 2021-06-11

Family

ID=76228104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110321139.6A Pending CN112949568A (en) 2021-03-25 2021-03-25 Method and device for matching human face and human body, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112949568A (en)
WO (1) WO2022198821A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022198821A1 (en) * 2021-03-25 2022-09-29 深圳市商汤科技有限公司 Method and apparatus for performing matching between human face and human body, and electronic device, storage medium and program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740516A (en) * 2018-12-29 2019-05-10 深圳市商汤科技有限公司 A kind of user identification method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395965B (en) * 2017-07-14 2019-11-29 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN110889315B (en) * 2018-09-10 2023-04-28 北京市商汤科技开发有限公司 Image processing method, device, electronic equipment and system
CN111476214A (en) * 2020-05-21 2020-07-31 北京爱笔科技有限公司 Image area matching method and related device
CN111709391B (en) * 2020-06-28 2022-12-02 重庆紫光华山智安科技有限公司 Human face and human body matching method, device and equipment
CN112949568A (en) * 2021-03-25 2021-06-11 深圳市商汤科技有限公司 Method and device for matching human face and human body, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740516A (en) * 2018-12-29 2019-05-10 深圳市商汤科技有限公司 A kind of user identification method, device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022198821A1 (en) * 2021-03-25 2022-09-29 深圳市商汤科技有限公司 Method and apparatus for performing matching between human face and human body, and electronic device, storage medium and program

Also Published As

Publication number Publication date
WO2022198821A1 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
CN110674719B (en) Target object matching method and device, electronic equipment and storage medium
WO2020135127A1 (en) Pedestrian recognition method and device
CN110569777B (en) Image processing method and device, electronic device and storage medium
US11288531B2 (en) Image processing method and apparatus, electronic device, and storage medium
CN107692997B (en) Heart rate detection method and device
CN111241887B (en) Target object key point identification method and device, electronic equipment and storage medium
CN111553864A (en) Image restoration method and device, electronic equipment and storage medium
CN111243011A (en) Key point detection method and device, electronic equipment and storage medium
CN111523346B (en) Image recognition method and device, electronic equipment and storage medium
CN110933488A (en) Video editing method and device
CN110928627A (en) Interface display method and device, electronic equipment and storage medium
CN112991553A (en) Information display method and device, electronic equipment and storage medium
CN109344703B (en) Object detection method and device, electronic equipment and storage medium
CN112184787A (en) Image registration method and device, electronic equipment and storage medium
CN111860373B (en) Target detection method and device, electronic equipment and storage medium
CN112270288A (en) Living body identification method, access control device control method, living body identification device, access control device and electronic device
CN111652107A (en) Object counting method and device, electronic equipment and storage medium
CN111625671A (en) Data processing method and device, electronic equipment and storage medium
CN114581525A (en) Attitude determination method and apparatus, electronic device, and storage medium
CN113807253A (en) Face recognition method and device, electronic equipment and storage medium
CN110929545A (en) Human face image sorting method and device
CN112613447A (en) Key point detection method and device, electronic equipment and storage medium
CN112949568A (en) Method and device for matching human face and human body, electronic equipment and storage medium
CN114550261A (en) Face recognition method and device, electronic equipment and storage medium
CN114648649A (en) Face matching method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40045805

Country of ref document: HK

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611