Target detection method, device and storage medium

By extracting key points of the face and correlating them with the human body area, and combining the screening of the positive and negative parameters and deflection information of the human body, the correlation problem between the face and pedestrian detection results is solved, reducing false detection and improving detection accuracy.

CN115601783BActive Publication Date: 2025-02-25ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210795812.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2025-02-25
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

The prior art is difficult to correlate the face detection results with the pedestrian detection results, and there are false detection conditions.

Method used

By obtaining the image to be detected, multiple face areas and multiple human body areas, as well as a set of personnel key points corresponding to each human body area, extract the set of face key points corresponding to each human body area, and use these key points to connect with multiple human faces The location relationship of the region is related to obtain the first correlation relationship. Then, based on the human body's positive and negative parameters and deflection information, the accuracy of the association relationship is screened and confirmed, and the false detection association relationship is deleted.

Benefits of technology

The correlation between the face and human body detection results is achieved, the occurrence of false detection situations is reduced, and the accuracy of the detection results is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115601783B_ABST
    Figure CN115601783B_ABST
Patent Text Reader

Abstract

This application discloses a target detection method, device, and storage medium. The target detection method includes: acquiring an image to be detected, and detecting the image to obtain multiple face regions and multiple human body regions in the image to be detected, as well as a set of personnel key points corresponding to each human body region; further, extracting a set of face key points corresponding to each human body region from the set of personnel key points corresponding to each human body region, and associating the human body regions with the face regions using the positional relationship between the set of face key points of each human body region and the multiple face regions to obtain at least one first association relationship. Through the above method, this application realizes the association of faces and human bodies using key points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of face detection and pedestrian detection, and in particular to a target detection method, device and storage medium. Background Art

[0002] In computer vision, target detection is an important task, and face detection and pedestrian detection, as subtasks of target detection, have broad application prospects and markets. According to the features used, face detection methods can be roughly divided into two categories, namely, methods based on traditional manual features and methods based on convolutional neural network (CNN) features. Among them, the mainstream detection method is the convolutional neural network-based method. The model used by the convolutional neural network-based detection method can output face and body detection results at the same time, but the two are not related, and there are often false detections for face and body detection results. How to associate the face and body detection results output by the detection model and reduce the occurrence of false detections has become a problem that needs to be solved urgently. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a target detection method, device and storage medium, which can use key points to associate faces with human bodies and reduce the occurrence of false detection of targets caused by association.

[0004] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a target detection method, the method comprising: obtaining an image to be detected, and detecting the image to be detected to obtain multiple face areas and multiple body areas in the image to be detected, and a set of person key points corresponding to each body area; further, extracting a set of face key points corresponding to each body area from the set of person key points corresponding to each body area, and using the positional relationship between the set of face key points of each body area and the multiple face areas, associating the body area with the face area to obtain at least one first association relationship.

[0005] Among them, the human body area is associated with the face area by utilizing the positional relationship between the face key point set of each human body area and multiple face areas, including: obtaining the face key point set corresponding to each human body area, if the face key point set is in an unmatched face area, then associating the unmatched face area with the human body area to obtain a first association relationship between the face area and the human body area.

[0006] Among them, the facial key point set is within the unmatched face area, which is determined in the following way: the facial key point set corresponding to each human body area is matched with the unmatched face area, and the number of key points of the facial key points corresponding to each human body area in the unmatched face area is obtained; when the number of key points is greater than or equal to a preset number threshold, it is confirmed that the facial key point set is within the unmatched face area.

[0007] Among them, after associating the human body area with the face area to obtain at least one first association relationship, the target detection method also includes: determining a second association relationship from at least one first association relationship based on the coordinates of the human body key points in the human body key point set corresponding to each first association relationship.

[0008] Among them, based on the human body key point coordinates in the human body key point set corresponding to each first association relationship, a second association relationship is determined from at least one first association relationship, including: for each first association relationship, determining the human body key point set in each first association relationship; in the human body key point set, extracting at least one group of symmetrical key point pairs; using the human body key point coordinates of at least one group of symmetrical key point pairs to obtain human body positive and negative parameters and human body deflection information; based on the human body positive and negative parameters and the degree of human body deflection, determining whether the face area in the first association relationship is a falsely detected face area; when the face area in the first association relationship is a falsely detected face area, deleting the first association relationship; when the face area in the first association relationship is not a falsely detected face area, determining the first association relationship to be the second association relationship.

[0009] Among them, based on the positive and negative parameters of the human body and the degree of deflection of the human body, determining whether the face area in the first association relationship is a falsely detected face area includes: when the positive and negative parameters of the human body are less than 0, and the degree of deflection of the human body is greater than a preset deflection threshold, determining that the face area in the first association relationship is a falsely detected face area.

[0010] Among them, the human body key point information of at least one group of symmetrical key point pairs is used to obtain the positive and negative parameters of the human body and the degree of human body deflection, including: obtaining the coordinate difference of at least one group of symmetrical key point pairs along the X-axis; determining the positive and negative parameters of the human body based on the product of the coordinate difference of at least one group of symmetrical key point pairs; determining the degree of human body deflection based on the ratio of the sum of the coordinate difference of at least one group of symmetrical key point pairs to the target width threshold.

[0011] Wherein, based on the product of the coordinate difference of at least one group of symmetrical key point pairs, the positive and negative parameters of the human body are determined, including: comparing the coordinate difference of each group of symmetrical key point pairs with the difference parameter; when the coordinate difference of a group of symmetrical key point pairs is less than or equal to the difference parameter, using the coordinate difference as the human body parameter of the group of symmetrical key point pairs; when the coordinate difference of a group of symmetrical key point pairs is greater than the difference parameter, using the difference parameter as the human body parameter of the group of symmetrical key point pairs; calculating the product of the human body parameters of all groups of symmetrical key point pairs to determine the positive and negative parameters of the human body.

[0012] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide a target detection device, which includes a memory and a processor, the memory is used to store program data, and the processor is used to execute the program data to implement the target detection method as mentioned above.

[0013] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium, which stores program data. When the program data is executed by a processor, it is used to implement the target detection method as described above.

[0014] The beneficial effects of the present application are as follows: Different from the prior art, the target detection method provided by the present application detects the image to be detected to obtain multiple face regions and multiple body regions, as well as a set of key points of personnel corresponding to each body region, and then extracts a set of face key points corresponding to each body region from the set of key points of personnel corresponding to each body region, and further, uses the positional relationship between the set of face key points of each body region and multiple face regions to associate human body regions with face regions to obtain at least one first association relationship. In one embodiment, the face key points in the human body region are associated with multiple face regions to obtain the first association information between the face and the human body. In the above manner, the association between the face and the human body is achieved by using the key points. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] 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 creative work.

[0016] in:

[0017] Figure 1 It is a flowchart of the first embodiment of the target detection method provided by the present application;

[0018] Figure 2is a flow chart of the second embodiment of the target detection method provided by the present application;

[0019] Figure 3 is a flowchart of a third embodiment of the target detection method provided by the present application;

[0020] Figure 4 is a flowchart of a fourth embodiment of the target detection method provided by the present application;

[0021] Figure 5 is a flowchart of a fifth embodiment of the target detection method provided by the present application;

[0022] Figure 6 It is a structural schematic diagram of an embodiment of a target detection device provided by the present application;

[0023] Figure 7 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

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

[0025] See also Figure 1 , Figure 1 : is a flow chart of a first embodiment of a target detection method provided by the present application, the method comprising:

[0026] Step 11: Get the image to be detected.

[0027] The image to be detected can be obtained from an existing dataset. Optionally, commonly used datasets in the field of object detection include PASCAL VOC (the PASCAL visual object classification), ImageNet, MS-COCO (Microsoft common objects in context), Open Images, etc.

[0028] Specifically, the PASCAL VOC dataset is mainly used for image classification and target detection tasks. Currently, the two widely used versions are PASCAL VOC 2007 and PASCAL VOC 2012. Both datasets contain 20 categories of data, mainly people, animals, vehicles, indoor objects, etc., and the images in the dataset have corresponding XML files to mark the location and type of the target.

[0029] Specifically, the ImageNet dataset is a large-scale visual dataset for visual object recognition software research organized according to the WordNet hierarchy. Each node of the hierarchy is composed of hundreds or thousands of images. The most used sub-dataset is ILSVRC (ImageNet large scale visual recognition challenge), which covers 1,000 object categories.

[0030] Specifically, the MS-COCO dataset is a large-scale image dataset developed and maintained by Microsoft. It is mainly used for target detection, image classification, and image caption generation tasks. It has the characteristics of complex scenes, multiple targets in a single image, and many small target objects. It is currently the largest dataset in the field of image segmentation.

[0031] Specifically, the Open Images dataset is a dataset developed by the Google team for image classification, object detection, visual relationship detection, image segmentation, and image description. Most of the bounding boxes in the Open Images image library are manually drawn by professionals to ensure the accuracy and consistency of the annotations. The image scenes are complex and usually contain multiple targets (8.3 per image on average).

[0032] It can be understood that, in one embodiment, the selected image to be detected needs to include at least one human image, and the human image includes a face and a human body, rather than just a face image, and the selected image to be detected needs to be an unlabeled image.

[0033] Step 12: Detect the image to be detected to obtain multiple face regions and multiple body regions in the image to be detected, as well as a set of key points of a person corresponding to each body region.

[0034] Specifically, the image to be detected is input into a trained detection model to obtain a plurality of face regions and a plurality of body regions, as well as a set of key points of a person corresponding to each body region.

[0035] Among them, the set of key points of the person corresponding to each human body area includes the key point positions marked on the image to be detected and the human body geometric features represented by the key points, such as eyes, nose, left and right shoulders. Then each face area is a face detection frame, and each body area is a body detection frame.

[0036] For example, by inputting a full-body photo of a man and detecting it through the trained detection model, we can obtain multiple face detection frames, multiple body detection frames, and a set of key points corresponding to each body area. Each body detection frame contains key point annotations (such as the nose is 0, the left eye is 1, and the right eye is 2).

[0037] Understandably, traditional target detection methods mainly focus on how to design better features and classifiers. After deep learning was successfully applied to computer vision classification tasks, target detection technology based on deep learning has been further developed. Compared with traditional detection algorithms that manually design features, deep convolutional neural networks can automatically complete feature extraction and integrate high-level semantic features, thereby improving the ability to express targets. Target detection models based on deep learning can be divided into two categories, one is a two-stage model and the other is a one-stage model. The two-stage model first generates a series of detection boxes and extracts the corresponding feature vectors, and then classifies them through the classifier of the corresponding area. Compared with the two-stage model, the one-stage model reduces the detection box generation steps.

[0038] Understandably, traditional pedestrian detection models mainly extract features manually, and then input the features into a classifier for classification. Currently, the widely used pedestrian detection model extracts features through deep learning.

[0039] Optionally, methods for obtaining key point detection results based on the image to be detected include traditional methods such as classic active appearance models (AAM), constrained local models (CLM), regression method, cascade regression, and methods based on convolutional neural networks.

[0040] Specifically, the technical route of target detection is divided into three parts, including generating a detection frame, extracting feature vectors, and classifying the detection frame. In one embodiment, the present application inputs the image to be detected into a trained detection model so that the trained detection model resizes the image to be detected, and then extracts the face, body, and key points by the middle network layer, and outputs the corresponding multiple face areas and multiple body areas in the last network layer, as well as the set of key points of the personnel corresponding to each body area.

[0041] Step 13: Extract the face key point set corresponding to each body area from the person key point set corresponding to each body area.

[0042] Specifically, in one embodiment, the set of key points of the person corresponding to each human body region includes the human body geometric features represented by the key points and the marked numbers, including "0: nose", "1: left eye", "2: right eye", "3: left ear", "4: right ear", "5: neck", "6: left shoulder", "7: right shoulder", "8: left elbow", "9: right elbow", "10: left wrist", "11: right wrist", "12: left hip", "13: right hip", "14: left knee", "15: right knee" and "16: left ankle", "17: right ankle".

[0043] Specifically, in one embodiment, the set of facial key points includes 0: nose, 1: left eye, 2: right eye, 3: left ear, and 4: right ear.

[0044] It is worth noting that the positions of the symmetrical key points on the front and back sides of the human body image in the image to be detected are opposite. For example, "6: left shoulder" is marked on the left side of the front side, and "6: left shoulder" is marked on the right side of the back side.

[0045] Step 14: using the positional relationship between the facial key point sets of each human body region and the multiple facial regions, the human body region is associated with the facial region to obtain at least one first association relationship.

[0046] It can be understood that the human body area and face area refer to a human body detection frame and a face detection frame, and each human body detection frame and face detection frame includes a number of key points.

[0047] For example, a full-body photo of a man is input into a trained detection model, and the detection model processes the full-body photo to obtain multiple face regions, multiple body regions, and a set of person key points corresponding to the body regions, wherein the face region includes a face detection frame and key points marked in the detection frame, and the body region refers to the body detection frame. The face key point sets corresponding to each body region are extracted from the set of person key points corresponding to each body region, and the positional relationship between the face key point sets of each body region and the multiple face regions is used to associate the body regions with the face regions (such as the nose and eyes marked in the face detection frame correspond to the positional relationship between the nose and eyes in the body detection frame) to obtain an association relationship.

[0048] Different from the prior art, the target detection method of the present application can detect the image to be detected to obtain multiple face areas and multiple body areas, as well as a set of person key points corresponding to each body area, and extract the face key point set corresponding to each body area from the set of person key points corresponding to each body area. Furthermore, by utilizing the positional relationship between the face key point set of each body area and the multiple face areas, the body areas are associated with the face areas to obtain at least one first association relationship, rather than just obtaining separate face detection results (including detection frames, key points) and body detection results (including detection frames, key points). Through the above method, faces can be associated with bodies.

[0049] See also Figure 2 , Figure 2 : is a flow chart of a second embodiment of a target detection method provided by the present application, the method comprising:

[0050] Step 21: Get the image to be detected.

[0051] Specifically, the image to be detected includes a plurality of human body images.

[0052] Step 22: Detect the image to be detected to obtain multiple face regions and multiple body regions in the image to be detected, as well as a set of key points of a person corresponding to each body region.

[0053] It can be understood that the face area corresponds to the face detection frame, the body area corresponds to the body detection frame, and the person key point set corresponding to each body area includes 18 key points.

[0054] Specifically, the image to be detected is input into the trained detection model for detection, and obtaining the trained detection model includes the following steps (not shown):

[0055] S1: Acquire a training sample, where the training sample includes at least one human body image.

[0056] S2: using the pre-established correspondence between human region key points, human region, face region and labels, the human region key points, human region and face region in each human image are annotated with corresponding labels.

[0057] S3: Inputting the labeled training samples into the detection model to train the detection model.

[0058] Specifically, the trained detection model is obtained by continuously inputting labeled human body images for machine learning to obtain machine-labeled human body areas, face areas, and sets of key points of people corresponding to each human body area, and the obtained human body areas, face areas, and sets of key points of people corresponding to each human body area are continuously compared and corrected with the original images (deep learning) to obtain a detection model whose labeling difference with the original human body images of human body areas, face areas, and sets of key points of people corresponding to each human body area is not much, that is, a mature detection model that has been trained.

[0059] It can be understood that when the image to be detected is input into the trained detection model, there is no need to manually label the model to be detected. Instead, a deep convolutional neural network is used to select human body regions and face regions of the image to be detected, and the sets of key points of people corresponding to each human body region are detected and labeled.

[0060] Step 23: extracting the set of facial key points corresponding to each human body region from the set of human key points corresponding to each human body region.

[0061] Specifically, among the 18 key points in the person key point set, 5 key points are located in the face area.

[0062] Step 24: Obtain a set of facial key points corresponding to each human body region.

[0063] It can be understood that the key points of each human body region include facial key points (such as left eye, right eye, nose, left ear, right ear) and key points of other geometric features of the human body (such as left knee, right knee, left elbow, right elbow).

[0064] Step 25: Match the facial key point set corresponding to each human body region with the unmatched facial region, and obtain the number of key points of the facial key points corresponding to each human body region in the unmatched facial region.

[0065] It can be understood that, in one embodiment, the facial key points in each human body region are compared with the key points in other unmatched facial regions to obtain the number of overlapping key points.

[0066] Step 26: Determine whether the number of key points is greater than or equal to a preset number threshold.

[0067] Specifically, the preset quantity threshold is related to the set of facial key points corresponding to each human body region.

[0068] If yes, go to step 27.

[0069] Step 27: confirm that the facial key point set is within the unmatched facial region, then associate the unmatched facial region with the human body region to obtain a first association relationship between the facial region and the human body region.

[0070] It can be understood that the face region obtained from the image to be detected includes unmatched face regions. In the embodiment of the present application, the face / body regions associated in the association between the body region and the face region are all unmatched regions.

[0071] Different from the prior art, the target detection method provided in the present application can use the facial key points in the human body area to associate the human body area with the facial area.

[0072] See also Figure 3 , Figure 3 : is a flow chart of a third embodiment of a target detection method provided by the present application, the method comprising:

[0073] Step 31: Obtain the image to be detected.

[0074] It can be understood that the image to be detected includes at least a human body image.

[0075] Step 32: Detect the image to be detected to obtain multiple face regions and multiple body regions in the image to be detected, as well as a set of key points of a person corresponding to each body region.

[0076] It can be understood that the image to be detected is input into the trained detection model to obtain the face area, the body area and the person key point set, wherein the person key point set includes face key points and non-face key points.

[0077] Step 33: extracting a set of facial key points corresponding to each human body region from a set of human key points corresponding to each human body region.

[0078] Specifically, the set of key points of the person corresponding to each human body region has 18 key points, among which there are 5 face key points.

[0079] Step 34: using the positional relationship between the facial key point sets of each human body region and the multiple facial regions, the human body region is associated with the facial region to obtain at least one first association relationship.

[0080] It can be understood that, in one embodiment, the key points of the face in the human body region are compared with the key points of the face region in terms of position (coordinates), and association is performed based on the comparison information.

[0081] Step 35: Based on the coordinates of the human body key points in the human body key point set corresponding to each first association relationship, determine a second association relationship from the at least one first association relationship.

[0082] It can be understood that the set of human key points corresponding to the first association relationship includes 18 key points, and there may be incomplete associations between face areas and human areas in the first association relationship, so it is necessary to obtain the final association relationship, that is, the second association relationship, from the first association relationship.

[0083] Different from the prior art, the target detection method provided by the present application can use the facial key points in each human body region to associate the human body region with the facial region to obtain a first association relationship, and use the coordinates of the human body key points in the first association relationship to perform a secondary detection on the first association relationship. If the first association relationship is wrong, it is corrected to obtain a second association relationship between the human body region and the facial region. In the above manner, not only can the association between the human body and the face be achieved, but also the accuracy of the association between the human body and the face can be improved.

[0084] See also Figure 4 , Figure 4 : is a flow chart of a fourth embodiment of a target detection method provided by the present application, the method comprising:

[0085] Step 41: Acquire the image to be detected.

[0086] It can be understood that the images to be detected include at least one human body image.

[0087] Step 42: Detect the image to be detected to obtain a plurality of face regions and a plurality of body regions in the image to be detected, and a set of key points of a person corresponding to each body region.

[0088] It can be understood that, in one embodiment, the key points involved in the person key point set include 18 key points, and the corresponding labeled numbers are 0-17, such as "0: nose".

[0089] Step 43: extracting a set of human face key points corresponding to each human body region from a set of human face key points corresponding to each human body region.

[0090] It can be understood that in one embodiment, the human body geometric features involved in the facial key points corresponding to each human body area include the nose, left and right eyes, and left and right ears. That is to say, in this embodiment, the face and the body are matched and associated, and the key points used include "0: nose", "1: left eye", "2: right eye", "3: left ear" and "4: right ear".

[0091] Step 44: using the positional relationship between the facial key point sets of each human body region and the multiple facial regions, the human body region is associated with the facial region to obtain at least one first association relationship.

[0092] It can be understood that in one embodiment, the face is associated with the body, and the key points used are the face key points in each body area. The face key points in each body area are compared with the key points in the face area to associate the body area with the face area.

[0093] Step 45: for each first association relationship, determine a set of human body key points in each first association relationship.

[0094] It can be understood that when the first association relationship is determined, the human body key points in the first association relationship include all geometric features of the target human body. In one embodiment, there are 18 human body key points, which will not be repeated here.

[0095] Step 46: extract at least one set of symmetric key point pairs from the human body key point set.

[0096] It can be understood that the symmetrical key point pairs include left and right eyes, left and right ears, left and right shoulders, left and right elbows, left and right wrists, left and right hips, left and right knees, and left and right ankles.

[0097] Step 47: using the human body key point coordinates of the at least one set of symmetrical key point pairs to obtain human body positive and negative parameters and human body deflection information.

[0098] It can be understood that the positive and negative parameters of the human body and the deflection information of the human body are related to the positions of the key points of the human body. For details, please refer to Figure 5 .

[0099] Step 48: Based on the front and back parameters of the human body and the degree of deflection of the human body, determine whether the face area in the first association relationship is a falsely detected face area.

[0100] Specifically, when the human body positive and negative parameters are less than 0, and the human body deflection degree is greater than a preset deflection threshold, it is determined that the face region in the first association relationship is a falsely detected face region.

[0101] Specifically, in one embodiment, the preset deflection threshold is related to the number of groups of symmetric key points.

[0102] It can be understood that in one embodiment, only when the positive and negative information parameters of the human body are less than 0 and the degree of deflection of the human body is greater than the preset deflection threshold, the corresponding association relationship will be determined to be a false detection. At this time, the falsely detected association relationship will be removed from the association relationship list, and the above steps will continue to be looped.

[0103] If it is a false detection, go to step 49, otherwise go to step 410.

[0104] Step 49: Delete the first association relationship.

[0105] Step 410: Determine that the first association relationship is a second association relationship.

[0106] It can be understood that the second association relationship is a face and body association relationship obtained by further optimizing the first association relationship. That is to say, there may be false detections in the first association relationship, that is, the obtained association relationship is not necessarily an association relationship between a face and a body, and the associated face and body may not match. Performing a secondary association (to determine whether it is a false detection) can effectively avoid the chance of errors in associating faces and bodies using association points.

[0107] Different from the existing technology, the target detection method provided by the present application can use the facial key points in each human body area to match the human body area with other unmatched facial areas, obtain a first association relationship, and further perform false detection screening to confirm whether the first association relationship is incorrect. If there is an error, it will be corrected to obtain a second association relationship, which can effectively avoid the occurrence of errors in the association between face and body.

[0108] The following is a detailed description of the process of how to obtain the positive and negative parameters of the human body and the deflection information of the human body in the above step 47.

[0109] See also Figure 5 , Figure 5 : is a flowchart of a fifth embodiment of a target detection method provided by the present application, the method comprising:

[0110] Step 51: Obtain the coordinate difference of the at least one set of symmetric key point pairs along the X-axis.

[0111] Optionally, in one embodiment, the upper left corner of the target detection frame is used as the coordinate origin. Of course, in other embodiments, the lower left corner or the center point of the target detection frame may also be used as the coordinate origin.

[0112] Specifically, in one embodiment, there are 8 pairs of symmetrical key points including eyes, ears, shoulders, elbows, wrists, hips, knees and ankles. In addition, single key points include nose and neck, and each key point is labeled with a number, such as "0: nose", "1: left eye", "2: right eye".

[0113] Step 52: Compare the coordinate difference of each set of symmetric key point pairs with the difference parameter.

[0114] Specifically, the difference parameter is the width of the target human body in the detection frame. In one embodiment, the distance measurement is started from the outermost edge of the human body in the detection frame to obtain the difference parameter.

[0115] Specifically, in one embodiment, the value range of the difference parameter is between a negative difference parameter and a positive difference parameter.

[0116] It can be understood that the minimum value is obtained by determining the coordinate differences of multiple groups of symmetric key points along the x-axis and comparing each coordinate difference with the difference parameter.

[0117] If the coordinate difference is less than or equal to the difference parameter, proceed to step 53 , otherwise proceed to step 54 .

[0118] Step 53: When the coordinate difference of a group of symmetrical key point pairs is less than or equal to the difference parameter, the coordinate difference is used as the human body parameter of the group of symmetrical key point pairs.

[0119] Step 54: When the coordinate difference of a group of symmetrical key point pairs is greater than the difference parameter, the difference parameter is used as the human body parameter of the group of symmetrical key point pairs.

[0120] It can be understood that the coordinate difference of each set of symmetrical key point pairs is compared with the difference parameter to obtain the minimum value between the two as the human body parameter of the set of symmetrical key point pairs. In one embodiment, the human body parameter is used to determine the front and back of the human body.

[0121] Step 55: Calculate the product of the human body parameters of all groups of symmetrical key point pairs to determine the positive and negative parameters of the human body.

[0122] It can be understood that when the coordinate difference and the difference parameter are compared, the minimum value of the two is obtained, and then all the minimum values ​​are multiplied to obtain the value used to determine the front and back sides of the human body in the image to be detected.

[0123] In which, in response to the human body positive and negative information parameters being greater than 0, the human body is determined to be in the positive direction, or in response to the human body positive and negative information parameters being less than 0, the human body is determined to be in the negative direction.

[0124] Step 56: Determine the degree of deflection of the human body based on the ratio of the sum of the coordinate differences of the at least one set of symmetrical key point pairs to the target width threshold.

[0125] It can be understood that the image to be detected is not necessarily obtained with the human body facing the camera head-on, and there may be a certain inclination or deflection angle.

[0126] (Step 56 can be obtained directly from step 51 without going through steps 52-55))

[0127] Specifically, the coordinate difference of each group of symmetrical key points along the x-axis is determined, all the coordinate differences are added, and the result obtained by the addition operation is divided by the target width threshold. The result obtained is used to represent the degree of deflection of the human body in the image to be detected.

[0128] Through the above method, the positive and negative parameters of the human body and the deflection information of the human body can be effectively obtained, so that these two parameters can be used for false detection screening later.

[0129] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of a target detection device provided in the present application. The target detection device 60 includes a memory 601 and a processor 602. The memory 601 is used to store program data, and the processor 602 is used to execute program data to implement the target detection method as described above, which will not be repeated here.

[0130] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 70 stores program data 701. When the program data 701 is executed by the processor, it is used to implement the target detection method as described above, which will not be repeated here.

[0131] When the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory) or an optical disk.

[0132] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A target detection method, characterized in that: The method comprises: Acquire the image to be detected; Detecting the image to be detected to obtain a plurality of face regions and a plurality of body regions in the image to be detected, and a set of key points of a person corresponding to each body region; Extracting a set of human face key points corresponding to each human body region from a set of human key points corresponding to each human body region; Associating the human body region with the facial region by using the positional relationship between the facial key point set of each human body region and the plurality of facial regions to obtain at least one first association relationship; For each first association relationship, determine a set of human body key points in each first association relationship; Extracting symmetric key point pairs from the human body key point set; Obtaining the coordinate difference of the pair of symmetrical key points along the X-axis; wherein the positions of the symmetrical key points on the front and back sides of the human body image in the image to be detected are opposite; Compare the coordinate difference of each set of symmetrical key point pairs with the difference parameter; wherein the difference parameter is the width of the target human body in the detection frame; the detection frame includes a face detection frame and a human body detection frame, the face detection frame corresponds to the face area, and the human body detection frame corresponds to the human body area; When the coordinate difference of a group of symmetrical key point pairs is less than or equal to the difference parameter, the coordinate difference is used as the human body parameter of the group of symmetrical key point pairs; When the coordinate difference of a set of symmetrical key point pairs is greater than the difference parameter, the difference parameter is used as the human body parameter of the set of symmetrical key point pairs; Calculate the product of the human body parameters of all groups of symmetrical key point pairs to determine the positive and negative parameters of the human body; Determine the degree of deflection of the human body based on the ratio of the sum of the coordinate differences of the symmetric key point pairs to a target width threshold; Based on the front and back parameters of the human body and the degree of deflection of the human body, determining whether the face region in the first association relationship is a falsely detected face region; When the face region in the first association relationship is not a falsely detected face region, the first association relationship is determined to be a second association relationship.

2. The target detection method according to claim 1, characterized in that: The associating the human body region with the facial region by utilizing the positional relationship between the facial key point set of each human body region and the plurality of facial regions comprises: Obtain the set of facial key points corresponding to each human body region; If the facial key point set is within an unmatched facial region, the unmatched facial region is associated with the human body region to obtain a first association relationship between the facial region and the human body region.

3. The target detection method according to claim 2, characterized in that: The facial key points are set in the unmatched facial region and are determined in the following manner: Matching the set of facial key points corresponding to each human body region with the unmatched human face region, and obtaining the number of key points of the facial key points corresponding to each human body region in the unmatched human face region; When the number of the key points is greater than or equal to a preset number threshold, it is confirmed that the facial key point set is within the unmatched facial region.

4. The target detection method according to claim 1, characterized in that: After determining whether the face region in the first association relationship is a falsely detected face region, the method further includes: When the face region in the first association relationship is a falsely detected face region, the first association relationship is deleted.

5. The target detection method according to claim 1, characterized in that: The determining, based on the front and back parameters of the human body and the degree of deflection of the human body, whether the face region in the first association relationship is a falsely detected face region includes: When the human body positive and negative parameters are less than 0, and the human body deflection degree is greater than a preset deflection threshold, it is determined that the face region in the first association relationship is a falsely detected face region.

6. A target detection device, characterized in that: The target detection device includes a memory and a processor, the memory is used to store program data, and the processor is used to execute the program data to implement the target detection method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program data, and when the program data is executed by a processor, it is used to execute the target detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Face image clustering method, device, server and storage medium

    CN109117803A