An object part detection method, device, electronic device and storage medium
By building a priori loss function, the correlation relationship between the target detection model is enhanced, and the problems of low detection accuracy and weak generalization ability are solved, and more efficient detection result optimization and model deployment are achieved.
Patent Information
- Application Number
- CN202111590203.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-12-23
AI Technical Summary
When faced with changes in different lighting intensities and resolutions, the existing target detection model has low detection accuracy and weak generalization ability, resulting in frequent misdetection and missed detection. The training method of increasing the data dimensions consumes a lot of time and calculation costs.
Build a priori loss function, based on the logical association relationship between target part categories, enhance the correlation constraint information of the detection model through multiple iterative training, optimize the mis-detected and missed detection object parts, and improve the accuracy and generalization ability of the detection results.
Without increasing the data dimension, through multiple iterative training of the prior loss function, the detection accuracy and deployability of the object detection model are improved, and the deployment cost is reduced.
Smart Images

Figure CN114549944B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision, and particularly to an object part detection method, device, electronic device and storage medium. Background Art
[0002] Object Detection technology is a computer vision processing technology based on techniques such as deep learning and neural networks to determine and obtain the categories and relative positions of each target object (object) in a specified target image, and plays a crucial role in fields such as target recognition and target tracking.
[0003] For example, in the process of recognizing a target image, the object detection model specifically performs the following four types of tasks: Classification, Location, Detection, and Segmentation. Specifically, during the model training process, it is usually necessary to generate corresponding detection frames containing specified candidate objects based on various candidate features extracted by the neural network from the sample image by means of image segmentation, region growing, etc. Further, for each generated detection frame, according to the intersection over union (IoU) between it and the actual object border, the effect is evaluated respectively, and then the object detection model is iteratively trained using the detection frames with good evaluation results and their corresponding detection results. However, the above method still has the following defects:
[0004] 1. Low detection accuracy.
[0005] In the related art, to ensure sufficient training of the object detection model, it is usually necessary to perform data augmentation on the sample images during the training process to simulate sample images under different lighting intensities, different resolutions, etc. respectively. However, in some special cases, for example, when the lighting intensity of the sample image is strong and the resolution is low, since the candidate features extracted by the neural network from the sample image are not accurate enough, when classifying and determining the extracted candidate features based on a preset target feature library, the category of the corresponding candidate object is often misjudged as the category of other objects with high feature similarity, that is, the situation of misdetection of the target category occurs, thus affecting the accuracy of the output result of the object detection model.
[0006] 2. Weak model generalization ability.
[0007] In the related art, to solve the problems of misdetection or missed detection of target categories during the model training process, for the sample data to be trained, on the basis of the original detection dimension, corresponding misdetection dimensions and missed detection dimensions are added, that is, for the sample data used for training, the corresponding scenario data and the proportion of the corresponding scenario data are divided, so as to improve the stability of the target detection model.
[0008] However, on the one hand, this method requires a large amount of time cost and computing cost. On the other hand, this training method is likely to make it difficult for the target detection model to ensure the accuracy of target detection in the target detection scenarios outside each training scenario, that is, the generalization ability of the target detection model is limited. Summary of the Invention
[0009] The embodiments of the present application provide an object part detection method, device, electronic device and storage medium, which are used to improve the detection accuracy of various target detection parts in an image and further improve the generalization ability of the detection model.
[0010] In a first aspect, the embodiments of the present application provide an object part detection method, including:
[0011] Based on a preset target detection model, obtain the original detection result of the image to be detected, and the original detection result at least includes: each detection area included in the image to be detected, where each detection area at least includes: one detection part for a specified detection object.
[0012] For each two overlapping detection areas among the respective detection areas, perform the following operations respectively: Based on the image features of the detection parts included in the two overlapping detection areas, determine the respective part categories of the corresponding two detection parts, and use a preset category rule library to determine the corresponding category association relationship between the part categories of the two detection parts.
[0013] Respectively use each two overlapping detection areas whose determined category association relationship meets the preset association relationship conditions as the corresponding target detection areas, and based on the detection parts included in each target detection area, determine the corresponding target detection result.
[0014] In a second aspect, the embodiments of the present application provide an object part detection device, including:
[0015] A detection module, configured to obtain the original detection result of the image to be detected based on a preset target detection model, and the original detection result at least includes: each detection area included in the image to be detected, where each detection area at least includes: one detection part for a specified detection object.
[0016] An association module, for each pair of overlapping detection regions among the various detection regions, respectively perform the following operations: Based on the image features of the detection parts included in the two overlapping detection regions, determine the part categories of the corresponding two detection parts respectively, and use a preset category rule library to determine the corresponding category association relationship between the part categories of the two detection parts.
[0017] A correction module, for each pair of overlapping detection regions whose determined category association relationship meets the preset association relationship conditions, respectively use them as the corresponding target detection regions, and based on the detection parts included in each target detection region, determine the corresponding target detection results.
[0018] In an alternative embodiment, before obtaining the original detection result of the image to be detected based on a preset target detection model, the detection module is further configured to:
[0019] Obtain a training sample set, where one training sample includes: input information and part entity labels determined corresponding to at least two part categories, and the input information at least includes: a set of sample image regions, where each sample image region includes at least two sample detection parts determined for a specified sample detection object;
[0020] Use the training samples in the training sample set to perform multiple rounds of iterative training on the preset detection model, and when the preset convergence condition is met, output a converged detection model; where, in one round of iterative training process, perform the following operations:
[0021] Use the detection model to obtain a first prediction result based on the input information in the training sample, and adjust the parameters of the detection model based on the loss value between the first prediction result and the corresponding part entity label.
[0022] In an alternative embodiment, the loss value between the first prediction result and the corresponding part entity label is determined in the following manner:
[0023] Based on a preset classification loss function, determine the classification loss value between the first prediction result and the corresponding part entity label.
[0024] Based on a preset regression loss function, determine the regression loss value between the first prediction result and the corresponding part entity label.
[0025] Based on a preset prior loss function, determine the prior loss value between the first prediction result and the corresponding part entity label, where the prior loss function is determined based on the category association relationship between the part categories of each pair of sample detection parts in a training sample.
[0026] Based on the first weights of the classification loss value, the regression loss value, and the prior loss value respectively, perform corresponding weighted processing to obtain the loss value between the first prediction result and the corresponding part entity label.
[0027] In an alternative embodiment, when the first prediction result at least includes: each predicted image region determined by the detection model for the training sample, and when determining the prior loss value between the first prediction result and the corresponding part entity label based on a preset prior loss function, the detection module specifically is used for:
[0028] For each sample image region in the training sample, perform the following operations respectively: Based on the position information of at least two specified sample detection parts included in a sample image region, determine the prior association value of each pair of sample detection parts respectively.
[0029] Based on the obtained prior association values, determine the target sample region from each sample image region, and determine the target prediction region corresponding to the target sample region.
[0030] Based on the obtained prior association values and the target prediction region, use a preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label.
[0031] In an alternative embodiment, when determining the prior association value of each pair of sample detection parts respectively based on the position information of at least two specified sample detection parts included in a sample image region, the detection module specifically is used for:
[0032] Based on the position information of at least two specified sample detection parts included in a sample image region, determine the part distance between each pair of sample detection parts respectively, and use the part distance as the prior association value between the corresponding two sample detection parts.
[0033] Or,
[0034] Based on the position information of at least two specified sample detection parts included in a sample image region, determine the part intersection over union of each pair of sample detection parts respectively, and use the part intersection over union as the prior association value between the corresponding two sample detection parts.
[0035] In an alternative embodiment, when using the preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label based on the obtained prior association values and the target prediction region, the detection module specifically is used for:
[0036] Respectively use the prior association values associated with at least two specified sample detection parts included in the target prediction region as the target association values corresponding to the target prediction region.
[0037] Based on the obtained respective target correlation values and respective prior correlation values, perform corresponding mean processing respectively to obtain corresponding target correlation means and prior correlation means.
[0038] Based on the target correlation mean and the prior correlation mean, use a preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label.
[0039] In an alternative embodiment, after outputting the convergence detection model, the detection module is further configured to:
[0040] Continue to perform multiple rounds of iterative training on the convergence detection model based on the training samples in the training sample set, and output the target detection model when the preset correlation constraint conditions are met; wherein, in one round of iterative training process, perform the following operations:
[0041] Use the convergence detection model to obtain a second prediction result based on the input information in the training sample, and adjust the parameters of the target detection model based on the loss value between the second prediction result and the corresponding part entity label.
[0042] Wherein, the loss value between the second prediction result and the corresponding part entity label is obtained by respectively assigning corresponding second weights to the classification loss value, the regression loss value, and the prior loss value based on a preset second training rule, and then performing corresponding weighted processing based on the assigned respective second weights.
[0043] In an alternative embodiment, the original detection result further includes: the confidence of each part detection region, then when determining the corresponding target detection result based on at least one detected part included in each target detection region, the correction module is specifically configured to:
[0044] For each target detection region, perform the following operations respectively:
[0045] Determine the confidence of a target detection region.
[0046] If the confidence of a target detection region is less than a preset confidence threshold, then regard the detected parts included in the target detection region as false positive detected parts, and filter out the false positive detected parts in the original detection result.
[0047] If the confidence of a target detection region is not less than the preset confidence threshold, then regard the detected parts included in the target detection region as the corresponding target detected parts, and regard the part category corresponding to the target detected parts as the corresponding target detection result.
[0048] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program that can run on the processor is stored on the memory. When the computer program is executed by the processor, the processor implements any one of the object detection site-based methods in the first aspect above.
[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the object site detection method in the first aspect is implemented.
[0050] An embodiment of the present application provides an image-based object detection method, device, electronic device, and storage medium. Based on the logical association relationship between target site categories in the detection task, a corresponding prior loss function is constructed. During the model training process, based on the constructed prior loss function, the logical association relationship between each target site category is enhanced, so that the target detection model can determine the corresponding association constraint information between each detection category to be output in the above steps, thereby optimizing the misdetected object sites and undetected object sites in the detection result, improving the accuracy of the detection result output by the target detection model. Further, during the model training process, no additional data dimension is added, but based on constructing the corresponding prior loss function, the model is iteratively trained for multiple rounds. The above method is easier to implement and has a lower deployment cost, thus ensuring the generalization ability of the target detection model and improving the deployability of the target detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic diagram of a possible application scenario provided by an embodiment of the present application;
[0052] Figure 2 It is a flowchart of the target detection model training provided by an embodiment of the present application;
[0053] Figure 3 It is a flowchart of a loss value determination method provided by an embodiment of the present application;
[0054] Figure 4 It is a schematic diagram of a strong association relationship between detection site categories provided by an embodiment of the present application;
[0055] Figure 5 It is a schematic diagram of a weak association relationship between detection site categories provided by an embodiment of the present application;
[0056] Figure 6 It is an example diagram of a training sample provided by an embodiment of the present application;
[0057] Figure 7 It is a flowchart of the prior loss function determination provided by an embodiment of the present application;
[0058] Figure 8 It is a schematic diagram of a prior association value determination method provided by an embodiment of the present application;
[0059] Figure 9 It is another schematic diagram of a prior association value determination method provided by an embodiment of the present application;
[0060] Figure 10 It is a flowchart of an object detection method based on images provided by an embodiment of the present application;
[0061] Figure 11a It is a schematic diagram of an original detection result provided by an embodiment of the present application;
[0062] Figure 11b It is a schematic diagram of the correction of an original detection result provided by an embodiment of the present application;
[0063] Figure 11c It is a schematic diagram of a target detection result provided by an embodiment of the present application;
[0064] Figure 12 It is a schematic diagram of an object detection device based on images provided by an embodiment of the present application;
[0065] Figure 13 It is a schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0066] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0067] Terms such as "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order different from those illustrated or described herein.
[0068] The design concept of the present application is as follows:
[0069] In the related art, to support different intelligent requirements, in some scenarios, there may be some associations among the various target object categories to be detected. Specifically, taking human body detection as an example (it can also be other objects, such as vehicles, animals, etc.), in some scenarios, it is necessary to carefully divide each part of the human body and perform independent detection respectively. For example, the human body is divided into different parts such as the head, shoulders, and upper body. However, due to data distribution reasons, in the process of independently detecting the above parts, it is easy to have different degrees of missed detection and background misdetection, thus affecting the accuracy of the detection result.
[0070] Furthermore, to improve the accuracy of the detection result, the commonly adopted method is: for the sample data to be trained, on the basis of the original detection dimension, add the corresponding misdetection dimension and missed detection dimension, that is, for the sample data used for training, divide the corresponding scenario data and the proportion of the corresponding scenario data, so as to improve the stability of the detection model.
[0071] However, adopting this method, on the one hand, the increase in data dimension requires a large amount of time cost and computing cost, and on the other hand, this training method also results in limited generalization ability of the detection model and poor deployability.
[0072] Based on the above defects, to improve the accuracy of the detection result and ensure the deployability of the detection model, the embodiments of the present application propose an image-based object detection method, device, electronic device, and storage medium. Based on the logical association relationship between target categories in the detection task, construct a corresponding prior loss function, and during the model training process, based on the constructed prior loss function, enhance the logical association relationship between each target part category, so that the target detection model can determine the corresponding association constraint information between each detection category to be output in the above steps, thereby optimizing the misdetected object parts and missed detected object parts in the detection result, improving the accuracy of the detection result output by the target detection model. Furthermore, during the model training process, instead of increasing the additional data dimension, multiple rounds of iterative training are performed on the model based on constructing the corresponding prior loss function. The above method is easier to implement and has a lower deployment cost, thus ensuring the generalization ability of the target detection model and improving the deployability of the detection model.
[0073] Next, the object part detection method proposed by the embodiments of the present application will be elaborated and described in detail with reference to the accompanying drawings.
[0074] Refer to Figure 1As shown in the figure, it is a schematic diagram of a possible application scenario in an embodiment of the present application. In this application scenario schematic diagram, it includes a target terminal 100 and a service system 110. Among them, a communication connection for data transmission is created between the target terminal 100 and the service system 110. Specifically, the target terminal 100 can represent one or more mobile terminals, computer terminals, or similar computing devices, including but not limited to electronic devices such as mobile phones, tablet computers, PCs, media players, smart wearable devices, smart TVs, in-vehicle devices, etc.; the service system 110 can represent one or more server devices in the embodiment of the present application that perform target detection on the to-be-detected image sent by the target terminal 100 and return corresponding detection results.
[0075] In addition, the relevant algorithms of the object part detection method proposed based on the present application can also be deployed on IPC devices (IP Camera, network cameras) or NVR devices (Network Video Recorder, network video recorders), so that the relevant IPC devices and NVR devices execute the specific steps of the object part detection method proposed in the embodiment of the present application. For the convenience of understanding, the embodiment of the present application only takes the server device as an example for detailed description, and other relevant devices will not be further elaborated.
[0076] Taking the server device as an example, in a possible technical solution of the present application, the target object is on a target terminal 100, sends the to-be-detected image to the corresponding service system 110, and selects the corresponding detection type. Among them, the detection type includes but is not limited to human body detection, vehicle detection, animal limb detection, etc. Further, the service system 110 based on the selected detection type, identifies and detects each to-be-detected object of the corresponding object category included in the to-be-detected image, and outputs the corresponding target detection result, which is returned to the target terminal 100.
[0077] Based on the above scenario description, refer to Figure 2 As shown in the figure, before receiving the to-be-detected image, the service system 110 has a pre-trained target detection model deployed in advance. In an optional embodiment, the target detection model can also be deployed on an IPC device or an NVR device associated with the service system 110 and execute the object part detection method proposed in the embodiment of the present application. Among them, the target detection model is trained in the following manner, including:
[0078] S201: Obtain a training sample set, where an input information and a part entity label corresponding to at least two part categories are included in one training sample.
[0079] Specifically, in order to train a target detection model for human body detection, the corresponding detection model is trained with each training sample containing "human body" related features. Figure 6An exemplary schematic diagram of one of the training samples is given. Further, in this training sample, for each sample object containing "human body" - related features, corresponding sample image regions are identified according to their relative positions in the training sample. Each sample image region contains at least two sample detection parts determined for the sample object.
[0080] It should be noted that the above - mentioned sample object is a certain complete entity object determined according to actual business requirements. For example, in the above Figure 6 each entity object with "human body" - related features is used as the corresponding sample detection object respectively, that is, as shown in Figure 6 sample object 1, sample object 2, sample object 3. Further, due to actual business requirements, it is often required to independently detect each sample detection part of an independent sample detection object to achieve a more accurate detection result. For example, in the sample image, each body part of each sample detection object related to the "human body" is independently detected. Specifically, if any body part such as "head", "hand", "foot" is independently detected, the determined above - mentioned body parts can be used as the corresponding sample detection parts respectively.
[0081] S202: Use the training samples in the training sample set to perform multiple rounds of iterative training on a preset detection model. When the preset convergence condition is met, output the converged detection model.
[0082] Among them, in the process of one - round iterative training, the following operations are performed: Use the detection model to obtain a first prediction result based on the input information in the training sample, and adjust the parameters of the detection model based on the loss value between the first prediction result and the corresponding part entity label.
[0083] Further, use the above - mentioned training sample set as the input signal of the neural network to perform multiple rounds of iterative training on the preset detection model until the model converges. Specifically, in each training process, based on a preset loss function, calculate the loss value between the first prediction result output by the detection model and the corresponding part entity label in the corresponding training sample. This part entity label represents the actual part category determined for the corresponding sample detection part. By comparing the detected part category with the actual part category represented by the corresponding part entity label, the quality of the prediction result output by the current detection model can be evaluated, and the relevant parameters of the detection model can be adjusted accordingly.
[0084] Optionally, as shown in Figure 3 to improve the accuracy of the prediction result output by the model, the following method is used to determine the loss value between the first prediction result and the corresponding part entity label, including:
[0085] S301: Determine the classification loss value between the first prediction result and the corresponding part entity label based on a preset classification loss function.
[0086] Specifically, for predicting the part categories of each part to be detected in the training samples, a corresponding classification loss function is constructed in advance. Optionally, any one of the Binary Cross Entropy Loss (BCEL), Hinge Loss (HL), and Multi-Class Classification Loss (MCCL) is used to determine the classification loss value between the first prediction object result and the corresponding object label, denoted as Loss calss 。
[0087] S302: Determine the regression loss value between the first prediction result and the corresponding part entity label based on a preset regression loss function.
[0088] Specifically, for the number of target objects existing in the training samples, a corresponding regression loss function is constructed in advance. Optionally, any one of the Mean Square Error Loss (MSEL), Mean Absolute Error Loss (MSEL), and Quantile Loss (QL) is used to determine the classification loss value between the first prediction result and the corresponding part entity label, denoted as Loss regression 。
[0089] S303: Determine the prior loss value between the first prediction result and the corresponding part entity label based on a preset prior loss function.
[0090] Specifically, in the embodiments of the present application, to improve the accuracy of the detection results, a corresponding prior loss function is constructed based on the class association relationship between the part categories of each two sample detection parts in each training sample, so as to constrain the detection model.
[0091] The construction of the prior loss function will be described in detail below.
[0092] In order to enable the target detection results output by the detection model to also include corresponding inter-class constraint information, during the construction of the prior loss, based on each sample detection part and the corresponding part category of each sample detection part, determine the class association relationship existing between every two sample detection part categories. Specifically, it is divided into the following two cases:
[0093] Case 1: Strong association.
[0094] Refer toFigure 4 As shown, in a possible case, the strong association in the embodiments of the present application may include an inclusion relationship. For example, if among a set of sample detection parts to be detected, the sample detection part of part category A1 includes the sample detection part of part category A2, it is considered that there is a strong association relationship (such as an inclusion relationship, etc.) between part category A1 and part category A2.
[0095] Specifically, still taking human body detection as an example, if a set of part categories to be detected includes two cases of "head" and "head and shoulders", since "head and shoulders" includes "head", it is considered that there is a strong association relationship between "head and shoulders" and "head"; for another example, if a set of part categories are respectively: "head", "head and shoulders", "upper body" and "whole body" determined by logical relationships, in the corresponding detection results, it should be ensured that "head" must belong to "head and shoulders", "head and shoulders" must belong to "upper body", and "upper body" must belong to "whole body", that is, there is an inclusion relationship between the corresponding part categories of the above sample detection parts, then it is determined that there is a strong association relationship between the part categories of every two sample detection parts among the above four part categories.
[0096] Case 2: Weak association.
[0097] Similarly, in the embodiments of the present application, if the part categories A3 and A4 of the sample detection parts determined based on the same sample object do not include each other, it is considered that there is a weak association relationship between part category A3 and part category A4;
[0098] Refer to Figure 5 As shown, there is a weak association relationship (such as non-inclusion) between each sample detection part. Specifically, the "human body" is divided into "head", "hand", "shoulder" and "foot", and independent detections are respectively carried out for each divided part. Then, determined by logical relationships, in the detection results, the four part categories of "head", "hand", "shoulder" and "foot" do not include each other, so it is determined that there is a weak association relationship between every two part categories among the above four part categories.
[0099] Furthermore, based on the determined category association relationship above and according to the number of categories of the sample detection parts, a corresponding prior loss function is constructed. Specifically, it includes the following two methods:
[0100] Method 1: If the number of categories of the sample detection parts is 2, a corresponding prior loss function is constructed based on the category association relationship between the corresponding two part categories.
[0101] Specifically, assume that in the training sample set, there are two different part categories. For example, Figure 6Exemplarily, a schematic diagram of training sample A in the training sample set containing two different part categories is given. Specifically, in training sample A, there are two different types of sample detection parts, namely "head" and "head and shoulders". Then, the construction of the prior loss function should satisfy that there is a strong correlation relationship (inclusion relationship) between the part category "head" and the part category "head and shoulders", that is, if "head" does not appear in "head and shoulders", there may be a misdetection. Optionally, refer to Figure 7 As shown, the following method is used to determine the prior loss function, including:
[0102] S701: For each sample image region in the training samples, perform the following operations respectively: Based on the position information of at least two specified sample detection parts included in a sample image region, determine the prior correlation value between each two sample detection parts respectively.
[0103] Specifically, still taking Figure 6 the training sample A shown as an example, through the position information of each sample detection part corresponding to "head" in training sample A and each sample detection part corresponding to "head and shoulders" in training sample A respectively, determine the prior correlation value between each two sample detection parts. Optionally, any one of the following methods can be used, including:
[0104] Method (1): Based on the position information of at least two specified sample detection parts included in a sample image region, determine the part distance between each two sample detection parts respectively, and use the part distance as the prior correlation value between the corresponding two sample detection parts.
[0105] For example, refer to Figure 8 As shown, for each sample detection part corresponding to the two part types of "head" and "head and shoulders" in training sample A, taking sample detection part 1 and sample detection part 2 as examples (where the part category of sample detection part 1 is "head" and the part category of sample detection part 2 is "head and shoulders"), then based on the position information of sample detection part 1 and sample detection part 2 respectively (such as the center point coordinates, etc.), determine the corresponding part distance, and use the part distance as the prior correlation value between the above two sample detection parts.
[0106] Method (2): Based on the position information of at least two specified sample detection parts included in a sample image region, determine the corresponding part intersection over union (IoU) between each two sample detection parts respectively, and use the part IoU as the prior correlation value between the corresponding two sample detection parts.
[0107] For example, refer to Figure 9As shown in the figure, still taking sample detection part 1 and sample detection part 2 as examples (where the part category of sample detection part 1 is "head" and the part category of sample detection part 2 is "head and shoulders"), in an alternative embodiment, based on the respective position information of sample detection part 1 and sample detection part 2 (such as the corresponding sample image region range), calculate the intersection over union (IOU) of sample detection part 1 and sample detection part 2, denoted as GT_IOU, and use the intersection over union as the prior association value between the above two sample detection parts. The rest will not be elaborated here.
[0108] Optionally, in the embodiments of the present application, for the determined strong association relationship above, adopt method (2) to determine the prior association value between every two sample detection parts.
[0109] S702: Based on the obtained prior association values, determine the target sample region from each sample image region, and determine the target prediction region corresponding to the target sample region.
[0110] Further, based on the above method, after determining each prior association value, based on each prior association value, determine the sample image region a with the largest prior association value as the corresponding target sample region. Then, after the detection model outputs the detection result, in each predicted image region, determine the predicted image region a corresponding to the target sample region (sample image region a), and use the above predicted image region a as the corresponding target prediction region.
[0111] S703: Based on the obtained prior association values and the target prediction region, use a preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label.
[0112] Further, based on the above S702, take the prior association values associated with sample detection part a and sample detection part b respectively included in the target prediction region (predicted image region a) as the corresponding target association values of the target prediction region, and based on the obtained target association values and each prior association value, perform mean processing to obtain the corresponding target association mean Pre_avg_IOU and prior association mean GT_avg_IOU.
[0113] Then, based on the above target association mean Pre_avg_IOU and prior association mean GT_avg_IOU, determine the prior loss function as:
[0114] Loss relation =Max(GT_avg_IOU - Pre_avg_IOU, 0)
[0115] Method 2: If the number of categories of the sample detection parts is greater than 2, then based on the category association relationships between every two category of parts in the respective parts categories, a corresponding prior loss function is constructed.
[0116] Specifically, assuming that the training sample set contains more than two different parts categories, then based on any one of the above methods (1) and (2), calculate the prior association values between every two parts categories in each parts category, and based on the obtained prior association values, calculate the corresponding prior association mean value GT_avg_IOU, and further, after determining the corresponding target prediction region, based on the respective target association values of the target prediction region, determine the corresponding target association mean value Pre_avg_IOU.
[0117] Then, based on the above target association mean value Pre_avg_IOU and prior association mean value GT_avg_IOU, determine the prior loss function as:
[0118] Loss relation = Max(GT_avg_IOU - Pre_avg_IOU, 0)
[0119] Further, then based on the above constructed prior loss function, determine the corresponding prior loss value, denoted as Loss relation .
[0120] S304: Based on the first weights of the classification loss value, regression loss value, and prior loss value respectively, perform corresponding weighted processing to obtain the loss value between the first prediction result and the corresponding part entity label.
[0121] Based on the above steps, during each training process, the corresponding classification loss value Loss calss , the corresponding regression loss value Loss regression and the corresponding prior loss value Loss relation can be determined. Then, perform weighted summation based on the first weights of each loss value, that is, the loss value between the first prediction result and the corresponding part entity label can be expressed as:
[0122] Loss = αLoss class + βLoss regression + δLoss relation
[0123] Among them, the above-mentioned α, β, and δ respectively represent the weights assigned to the classification loss value, the regression loss value, and the prior loss value during the training process. In the embodiments of the present application, during the initial training of the detection model, the corresponding first weights are respectively set to α = 1, β = 1, and δ = 0.1, so that the detection model can converge as soon as possible, and when the preset convergence condition is met, the corresponding converged detection model is output.
[0124] Further, after obtaining the converged detection model, the obtained model is continuously trained using the training sample set. During the continuous training process, in order to improve the accuracy of the detection result, based on the preset second training rule, the corresponding second weights are respectively assigned to the classification loss value, the regression loss value, and the prior loss value, and the weighted sum is obtained based on each of the assigned second weights to obtain the corresponding loss value. Optionally, in the embodiments of the present application, the above-mentioned second weights are respectively α = 1, β = 1, and δ = 1, so as to significantly improve the accuracy of the detection result of the converged detection model, and when the preset association constraint condition is met, the target detection model is output.
[0125] It should be noted that based on the above expression of the loss value, it can be seen that during the model training process, the weights of each loss value can be dynamically adjusted to meet the different needs of actual business. In the embodiments of the present application, the above-mentioned first weight and second weight are only examples and do not represent the actual number of model training times and the actual proportion of model loss.
[0126] After obtaining the target detection model based on the above process, refer to Figure 10 As shown, the embodiments of the present application propose an object part detection method, including:
[0127] S1001: Based on the preset target detection model, obtain the original detection result of the image to be detected. The original detection result at least includes: each detection area included in the image to be detected, where each detection area at least includes: one detection part determined for the specified detection object.
[0128] For example, refer to Figure 11a As shown, assume that the image to be detected is input into the above-mentioned target detection model, and the original detection result output by the target detection model is obtained. Specifically, in the original detection result, the corresponding detection areas (detection areas 1 to 5) of each detection part (detection parts 1 to 5) determined for each detection object (detection objects 1 to 3) in the image to be detected are given. Specifically, as shown in Table 1 below:
[0129] Table 1
[0130] Detection area Detection site Detection object Detection area 1 Detection site 1 Detection object 1 Detection area 2 Detection site 2 Detection object 1 Detection area 3 Detection site 3 Detection object 2 Detection area 4 Detection site 4 Detection object 2 Detection area 5 Detection site 5 Detection site 3
[0131] S1002: For every two overlapping detection regions in each detection area, perform the following operations respectively: Based on the image features of the detection parts included in the two overlapping detection regions, determine the part categories of the corresponding two detection parts respectively, and use a preset category rule library to determine the corresponding category association relationships between the part categories of the two detection parts.
[0132] Still taking Figure 11a the detection parts shown as an example, the target detection model further detects the part categories of the corresponding detection parts in each detection area. Specifically, assuming that in Table 1 above, the part categories of each detection part are as shown in Table 2 below:
[0133] Table 2
[0134] Detection area Detection site Detection object Site category Detection area 1 Detection site 1 Detection object 1 Head Detection area 2 Detection site 2 Detection object 1 Head and shoulders Detection area 3 Detection site 3 Detection object 2 Head Detection area 4 Detection site 4 Detection object 2 Head and shoulders Detection area 5 Detection site 5 Detection object 3 Head and shoulders
[0135] Specifically, as shown in Table 2 above, in Detection Area 1 and Detection Area 2, different detection parts (Detection Part 1, Detection Part 2) for the same detection object (Detection Object 1) are respectively included; similarly, in Detection Area 3 and Detection Area 4, different detection parts (Detection Part 3, Detection Part 4) for the same detection object (Detection Object 2) are respectively included, and in Detection Area 5, the corresponding Detection Part 5 represents the "head and shoulders" part of Detection Object 3. Then, for the adjacent two detection parts belonging to the same detection object (i.e., the corresponding detection areas overlap) among the above detection parts, determine the corresponding category association relationships respectively. Specifically, still taking the detection parts shown in Table 2 above as an example, determine the category association relationships between Detection Part 1 and Detection Part 2, and between Detection Part 3 and Detection Part 4.
[0136] S1003: Take every two overlapping detection regions whose determined category association relationships meet the preset association relationship conditions as the corresponding target detection regions respectively, and determine the corresponding target detection results based on the detection parts included in each target detection region. Specifically, referring to Figure 11b as shown, from the part categories of each detection part in Table 2 above, the category association relationships between Detection Part 1 and Detection Part 2, and between Detection Part 3 and Detection Part 4 belong to strong association relationships (inclusion). Then determine the corresponding Detection Areas 1 to 4 as the corresponding target detection regions, and take the corresponding detection parts (Detection Parts 1 to 4) and the detection categories corresponding to each detection part as the target detection results for the image to be detected. Refer to Table 3 below:
[0137] Table 3
[0138] Detection area Detection site Site category Detection area 1 Detection site 1 Head Detection area 2 Detection site 2 Head and shoulders Detection area 3 Detection site 3 Head Detection area 4 Detection site 4 Head and shoulders
[0139] In an alternative embodiment, to further improve the accuracy of the target detection results, in the original detection results output by the target detection model, it further includes: the confidence of each detection area. For example, assuming that in the above original detection results, the confidence of each detection part is as shown in Table 4 below:
[0140] Table 4
[0141] Detection area Detection site Detection site Confidence level Detection area 1 Detection site 1 Detection site 1 80 Detection area 2 Detection site 2 Detection site 2 90 Detection area 3 Detection site 3 Detection site 3 70 Detection area 4 Detection site 4 Detection site 4 60 Detection area 5 Detection site 5 Detection site 5 80
[0142] Refer to Figure 11c As shown, in step S1003, after determining the corresponding target detection areas (detection areas 1 to 4), further, the detection parts corresponding to each detection area that meet the preset confidence threshold condition are used as the corresponding target detection results. For example, if the preset confidence threshold is 80, among each target detection area, the detection areas (detection areas 1 and 2) with a confidence not less than 80 are determined, and the corresponding detection parts 1, detection part 2, and the part categories corresponding to detection parts 1 and 2 are the corresponding target detection results. Specifically, as shown in Table 5 below:
[0143] Table 5
[0144] Detection area Detection site Detection site Confidence level Detection area 1 Detection site 1 Detection site 1 80 Detection area 2 Detection site 2 Detection site 2 90
[0145] Based on the above steps, confidence screening is performed on each target detection area, and each target detection area with a confidence meeting the preset threshold is determined, and the original detection results are corrected according to the part categories corresponding to the detection parts represented by each corresponding target detection area, further ensuring the accuracy of the output target detection results.
[0146] Refer to Figure 12 As shown, an object part detection device provided in an embodiment of the present application includes a detection module 1201, an association module 1202, and a correction module 1203, where:
[0147] The detection module 1201 is configured to obtain the original detection results of the image to be detected based on a preset target detection model. The original detection results at least include: each detection area included in the image to be detected, where each detection area at least includes: one detection part for a specified detection object.
[0148] The association module 1202 is configured to, for each two overlapping detection areas among the respective detection areas, perform the following operations: based on the image features of the detection parts included in the two overlapping detection areas, determine the respective part categories of the corresponding two detection parts, and use a preset category rule library to determine the corresponding category association relationship between the part categories of the two detection parts.
[0149] A correction module 1203 is configured to use, as corresponding target detection regions respectively, every two overlapping detection regions whose determined category association relationship meets the conditions of a preset association relationship, and determine corresponding target detection results based on the detection parts included in each of the target detection regions.
[0150] In an optional embodiment, before obtaining the original detection result of the image to be detected based on a preset target detection model, the detection module 1201 is further configured to:
[0151] Obtain a training sample set, where one training sample includes: input information and part entity labels determined corresponding to at least two part categories, and the input information at least includes: a sample image region set, where each sample image region includes at least two sample detection parts determined for a specified sample detection object.
[0152] Use the training samples in the training sample set to perform multiple rounds of iterative training on the preset detection model, and output a converged detection model when meeting the preset convergence conditions; where, in one round of iterative training process, perform the following operations:
[0153] Use the detection model to obtain a first prediction result based on the input information in the training sample, and adjust the parameters of the detection model based on the loss value between the first prediction result and the corresponding part entity label.
[0154] In an optional embodiment, the loss value between the first prediction result and the corresponding part entity label is determined in the following manner:
[0155] Determine a classification loss value between the first prediction result and the corresponding part entity label based on a preset classification loss function.
[0156] Determine a regression loss value between the first prediction result and the corresponding part entity label based on a preset regression loss function.
[0157] Determine a prior loss value between the first prediction result and the corresponding part entity label based on a preset prior loss function, where the prior loss function is determined based on the category association relationship between the part categories of every two sample detection parts in one training sample.
[0158] Perform corresponding weighted processing based on the first weights of the classification loss value, the regression loss value, and the prior loss value respectively, to obtain the loss value between the first prediction result and the corresponding part entity label.
[0159] In an alternative embodiment, the first prediction result at least includes: each predicted image region determined by the detection model for the training sample. When determining the prior loss value between the first prediction result and the corresponding part entity label based on a preset prior loss function, the detection module 1201 is specifically configured to:
[0160] For each sample image region in the training sample, perform the following operations respectively: Based on the position information of at least two specified sample detection parts included in a sample image region, determine the prior association value of each pair of sample detection parts respectively.
[0161] Based on the obtained prior association values, determine the target sample region from each sample image region, and determine the target prediction region corresponding to the target sample region.
[0162] Based on the obtained prior association values and the target prediction region, use the preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label.
[0163] In an alternative embodiment, when determining the prior association value of each pair of sample detection parts respectively based on the position information of at least two specified sample detection parts included in a sample image region, the detection module 1201 is specifically configured to:
[0164] Based on the position information of at least two specified sample detection parts included in a sample image region, determine the part distance between each pair of sample detection parts respectively, and use the part distance as the prior association value between the corresponding pair of sample detection parts.
[0165] Or,
[0166] Based on the position information of at least two specified sample detection parts included in a sample image region, determine the part intersection over union of each pair of sample detection parts respectively, and use the part intersection over union as the prior association value between the corresponding pair of sample detection parts.
[0167] In an alternative embodiment, when determining the prior loss value between the first prediction result and the corresponding part entity label by using the preset prior loss function based on the obtained prior association values and the target prediction region, the detection module 1201 is specifically configured to:
[0168] Use the prior association values associated with at least two specified sample detection parts included in the target prediction region as the target association values corresponding to the target prediction region respectively.
[0169] Based on the obtained target association values and each prior association value, perform corresponding mean processing respectively to obtain the corresponding target association mean and prior association mean.
[0170] Based on the target correlation mean and the prior correlation mean, a preset prior loss function is used to determine the prior loss value between the first prediction result and the corresponding part entity label.
[0171] In an alternative embodiment, after outputting the convergence detection model, the detection module 1201 is further configured to:
[0172] Based on the training samples in the training sample set, continue to perform multiple rounds of iterative training on the convergence detection model, and output the target detection model when the preset association constraint conditions are met; wherein, in the process of one round of iterative training, the following operations are performed:
[0173] The convergence detection model is used to obtain a second prediction result based on the input information in the training sample, and the parameters of the target detection model are adjusted based on the loss value between the second prediction result and the corresponding part entity label.
[0174] Wherein, the loss value between the second prediction result and the corresponding part entity label is obtained by respectively assigning corresponding second weights to the classification loss value, the regression loss value, and the prior loss value based on a preset second training rule, and then performing corresponding weighted processing based on each assigned second weight.
[0175] In an alternative embodiment, the original detection result further includes: the confidence of each part detection region. Then, when determining the corresponding target detection result based on at least one detected part included in each target detection region, the correction module 1203 is specifically configured to:
[0176] For each target detection region, the following operations are respectively performed:
[0177] Determine the confidence of a target detection region.
[0178] If the confidence of a target detection region is less than the preset confidence threshold, the detected parts included in the target detection region are used as false positive detected parts, and the false positive detected parts are filtered out in the original detection result.
[0179] If the confidence of a target detection region is not less than the preset confidence threshold, the detected parts included in the target detection region are used as the corresponding target detected parts, and the part category corresponding to the target detected part is used as the corresponding target detection result.
[0180] Based on the same inventive concept as the above application embodiment, an electronic device is further provided in the embodiment of the present application. The electronic device can be used for object part detection. In one embodiment, the electronic device can be a server, or a terminal device or other electronic devices. In this embodiment, the structure of the electronic device can be asFigure 13 As shown, it includes a memory 1301, a communication interface 1303, and one or more processors 1302.
[0181] The memory 1301 is used to store computer programs executed by the processor 1302. The memory 1301 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and programs required to run the instant messaging function, etc.; the data storage area can store various instant messaging information and operation instruction sets, etc.
[0182] The memory 1301 can be a volatile memory, such as a random-access memory (RAM); the memory 1301 can also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), or the memory 1301 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1301 can be a combination of the above memories.
[0183] The processor 1302 can include one or more central processing units (CPUs) or be a digital processing unit, etc. The processor 1302 is used to implement the above object part detection method when calling the computer program stored in the memory 1301.
[0184] The communication interface 1303 is used to communicate with terminal devices and other servers.
[0185] In the embodiments of the present application, the specific connection medium between the above-mentioned memory 1301, communication interface 1303, and processor 1302 is not limited. In the embodiments of the present application Figure 13 it is shown that the memory 1301 and the processor 1302 are connected through a bus 1304. The bus 1304 is represented by a thick line in Figure 13 The connection methods between other components are only for illustrative purposes and are not to be taken as limitations. The bus 1304 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 13 only one thick line is used to represent it in
[0186] According to one aspect of the present application, there is provided a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any one of the object part detection methods in the above embodiments. The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0187] According to one aspect of the present application, the present application further provides a computer program product, which, when called by a computer, causes the computer to execute the method described in the first aspect.
[0188] The embodiments of the present application provide an object part detection method, device, electronic device, and storage medium. Based on the logical association relationship between target part categories in the detection task, a corresponding prior loss function is constructed, and during the model training process, based on the constructed prior loss function, the logical association relationship between each target part category is enhanced, so that the target detection model can determine the corresponding association constraint information between each detected part category to be output in the above steps, thereby optimizing the misdetected object parts and undetected object parts in the detection result, improving the accuracy of the detection result output by the target detection model. Further, during the model training process, instead of increasing the extra data dimension, multiple rounds of iterative training are performed on the model based on the constructed corresponding prior loss function. The above method is easier to implement and has a lower deployment cost, thus ensuring the generalization ability of the target detection model and improving the deployability of the detection model.
[0189] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0190] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0191] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0192] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.
Claims
1. An object part detection method, characterized in that, Including: Based on a preset object detection model, obtain the original detection result of the image to be detected. The original detection result at least includes: each detection region included in the image to be detected, where each detection region at least includes: one determined detection part for a specified detection object; For each two overlapping detection regions among the respective detection regions, perform the following operations respectively: Based on the image features of the detection parts included in the two overlapping detection regions, determine the part categories of the corresponding two detection parts respectively, and use a preset category rule library to determine the corresponding category association relationship between the part categories of the two detection parts; where the category association relationship is used to indicate whether the part categories of the two detection parts of the specified detection object are in a strong association relationship or a weak association relationship; Respectively use each two overlapping detection regions whose determined category association relationship meets the preset association relationship condition as the corresponding target detection regions, and based on the detection parts included in each target detection region, determine the corresponding target detection result; where the target detection result is used to indicate the part category to which the detection part belongs.
2. The method according to claim 1, wherein Before obtaining the original detection result of the image to be detected based on the preset object detection model, it further includes: Obtain a training sample set, where one training sample includes: input information and part entity labels determined corresponding to at least two part categories. The input information at least includes: a set of sample image regions, where each sample image region includes at least two sample detection parts determined for a specified sample detection object; Use the training samples in the training sample set to perform multiple rounds of iterative training on the preset detection model, and when the preset convergence condition is met, output the converged detection model; where during one round of iterative training, perform the following operations: Use the detection model to obtain a first prediction result based on the input information in the training sample, and adjust the parameters of the detection model based on the loss value between the first prediction result and the corresponding part entity label.
3. The method according to claim 2, characterized in that, The loss value between the first prediction result and the corresponding part entity label is determined in the following manner: Based on a preset classification loss function, determine the classification loss value between the first prediction result and the corresponding part entity label; Based on a preset regression loss function, determine the regression loss value between the first prediction result and the corresponding part entity label; Based on a preset prior loss function, determine the prior loss value between the first prediction result and the corresponding part entity label, where the prior loss function is determined based on the category association relationship between the part categories of each two sample detection parts in the one training sample; Based on the first weights of the classification loss value, the regression loss value, and the prior loss value respectively, perform corresponding weighted processing to obtain the loss value between the first prediction result and the corresponding part entity label.
4. The method according to claim 3, characterized in that, The first prediction result at least includes: each predicted image region determined by the detection model for the training sample; then, based on a preset prior loss function, determining the prior loss value between the first prediction result and the corresponding part entity label includes: For each sample image region in the training sample, the following operations are respectively performed: based on the position information of at least two sample detection parts included in a sample image region, determining the prior association value of each pair of sample detection parts respectively; Based on the obtained prior association values, determining a target sample region from the sample image regions, and determining a target prediction region corresponding to the target sample region; Based on the obtained prior association values and the target prediction region, using a preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label.
5. The method according to claim 4, wherein The determining the prior association value of each pair of sample objects based on the position information of at least two sample detection parts included in a sample image region respectively includes: Based on the position information of at least two sample detection parts included in a sample image region, determining the corresponding part distance between each pair of sample detection parts respectively, and using the part distance as the prior association value corresponding to the two sample detection parts; Or, Based on the position information of at least two sample detection parts included in a sample image region, determining the corresponding part intersection over union between each pair of sample detection parts respectively, and using the part intersection over union as the prior association value corresponding to the two sample detection parts.
6. The method according to claim 4 or 5, characterized in that The using a preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label based on the obtained prior association values and the target prediction region includes: Using the prior association values associated with at least two specified sample detection parts included in the target prediction region as the target association values corresponding to the target prediction region respectively; Based on the obtained target association values and each prior association value, performing corresponding mean processing respectively to obtain the corresponding target association mean and prior association mean; Based on the target association mean and the prior association mean, using a preset prior loss function to determine the prior loss value between the first prediction result and the corresponding part entity label.
7. The method according to claim 3, characterized in that, After outputting the convergence detection model, it further includes: Continuing to perform multiple rounds of iterative training on the convergence detection model based on the training samples in the training sample set, and outputting a target detection model when a preset association constraint condition is satisfied; wherein, in the process of one round of iterative training, the following operations are performed: Using the convergence detection model to obtain a second prediction result based on the input information in the training sample, and adjusting the parameters of the target detection model based on the loss value between the second prediction result and the corresponding part entity label. Among them, the loss value between the second prediction result and the corresponding part entity label is obtained by respectively assigning corresponding second weights to the classification loss value, the regression loss value, and the prior loss value based on a preset second training rule, and then performing corresponding weighted processing based on each assigned second weight.
8. The method according to any one of claims 1-5, characterized in that, The original detection result further includes: the confidence of each detection area. Then, determining the corresponding target detection result based on the detection parts included in each target detection area respectively includes: For each of the target detection areas, the following operations are respectively performed: Determine the confidence of a target detection area; If the confidence of the target detection area is less than a preset confidence threshold, then use the detection part included in the target detection area as a false positive detection part, and filter out the false positive detection part in the original detection result; If the confidence of the target detection area is not less than the preset confidence threshold, then use the detection part included in the target detection area as the corresponding target detection part, and use the part category corresponding to the target detection part as the corresponding target detection result.
9. An object part detection device, characterized in that, Including: A detection module, configured to obtain an original detection result of an image to be detected based on a preset target detection model, where the original detection result at least includes: each detection area included in the image to be detected, and each detection area at least includes: a detection part determined for a specified detection object; An association module, configured to, for every two overlapping detection areas among the detection areas, respectively perform the following operations: determine the part categories of the corresponding two detection parts based on the image features of the detection parts included in the two overlapping detection areas, and use a preset category rule library to determine the corresponding category association relationship between the part categories of the two detection parts; where the category association relationship is used to indicate whether the part categories of the two detection parts of the specified detection object are in a strong association relationship or a weak association relationship; A correction module, configured to respectively use each of the overlapping detection areas whose determined category association relationship meets the preset association relationship condition as a corresponding target detection area, and determine a corresponding target detection result based on the part categories included in each target detection area; where the target detection result is used to indicate the part category to which the detection part belongs.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method described in any one of claims 1-8 is implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the method described in any one of claims 1-8 is implemented.
12. A computer program product, characterized in that, When the computer program product is called by a computer, the computer is caused to execute the method described in any one of claims 1-8.
Citation Information
Patent Citations
Pedestrian target detection method, electronic equipment and storage medium
CN112257692A