Target bounding box post-processing method and device, electronic equipment and storage medium
By obtaining the overlap and confidence of the target detection results and the false detection category detection boxes, the problem of the inability to effectively eliminate false detection boxes in the existing technology is solved, and higher detection accuracy and false detection rate are achieved.
Patent Information
- Application Number
- CN202110432161.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2041-04-21
AI Technical Summary
In existing object detection methods, nonmaximum suppression algorithms cannot effectively eliminate false detection boxes of inappropriate size.
By obtaining the overlap between the target detection results and the false detection category bounding boxes, and combining the overlap and confidence scores, it is determined whether to retain or eliminate the target detection boxes.
It effectively reduces the false detection rate of target detection boxes, improves the accuracy of false detection judgment, and ensures the precision of target detection.
Smart Images

Figure CN115311480B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of target detection, and in particular to a target detection box post-processing method and device, electronic equipment and a storage medium. BACKGROUND
[0002] At present, the post-processing method widely used in the field of target detection is the Non-maximum Suppression (NMS for short). The Non-maximum Suppression algorithm can be used to eliminate redundant detection boxes, and it deletes a part of detection boxes with low confidence and high overlap with other detection boxes of the same category by sorting the confidence of the detection boxes and calculating the Intersection over Union (IoU for short) between two detection boxes of the same category. However, this method has no size constraint on the detection boxes, and still retains a number of misdetected boxes with obviously improper size. SUMMARY
[0003] The technical problem solved by the present application is to eliminate misdetected boxes in the target detection result.
[0004] To solve the above technical problem, the present application provides a target detection box post-processing method, which comprises: obtaining a target detection result of a to-be-processed image, the target detection result comprising the category of a target object in the to-be-processed image and the corresponding target detection box thereof; obtaining a misdetected category corresponding to the category and a misdetected category detection box thereof; determining the overlap degree of the target detection box and the misdetected category detection box; and processing the target detection box based on the overlap degree.
[0005] Optionally, the category is a category that needs to be post-processed; and the post-processing method comprises: obtaining a misdetected rate of the category, determining whether the misdetected rate is greater than or equal to a misdetected threshold, and if so, determining that the category needs to be post-processed.
[0006] Optionally, the post-processing method comprises: selecting a first test image of a category not including a target object to form a first test set; using a preset detection network model to perform target detection on each first test image in the first test set to obtain a first detection result corresponding to each first test image, respectively; obtaining a test detection box including a target object in the first detection result; and determining the ratio of the number of first test images in which the test detection box is located to the total number of all first test images in the first test set as the misdetected rate.
[0007] Optionally, obtaining a misdetected category corresponding to the category and a misdetected category detection box thereof comprises: obtaining a misdetected category corresponding to the category; determining whether the misdetected category is included in the target detection result, and if so, obtaining a misdetected category detection box corresponding to the misdetected category.
[0008] Optionally, the overlap degree includes a first overlap degree, and the first overlap degree is a ratio of an area of an intersection of the target detection frame and the false detection category detection frame to an area of a union of the target detection frame and the false detection category detection frame.
[0009] Optionally, the post-processing method includes: presetting different overlap degree levels and corresponding judgment standards, and different overlap degree levels correspond to different judgment standards; and the processing the target detection frame based on the overlap degree includes: obtaining an overlap degree level corresponding to the first overlap degree and a corresponding judgment standard, and processing the target detection frame based on the judgment standard.
[0010] Optionally, the post-processing method includes: presetting different overlap degree threshold ranges, and different overlap degree threshold ranges correspond to different overlap degree levels; and the obtaining the overlap degree level corresponding to the first overlap degree and the corresponding judgment standard includes: comparing the first overlap degree with the different overlap degree threshold ranges to obtain an overlap degree threshold range to which the first overlap degree belongs, and obtaining an overlap degree level corresponding to the overlap degree threshold range and a corresponding judgment standard.
[0011] Optionally, the judgment standard includes a first overlap degree judgment threshold; and the processing the target detection frame based on the judgment standard includes: judging whether the first overlap degree is greater than or equal to the first overlap degree judgment threshold, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
[0012] Optionally, the overlap degree includes a second overlap degree or a third overlap degree, the second overlap degree includes a ratio of an area of an intersection of the target detection frame and the false detection category detection frame to an area of the target detection frame, and the third overlap degree includes a ratio of the area of the intersection of the target detection frame and the false detection category detection frame to an area of the false detection category detection frame; the judgment standard includes a second overlap degree judgment threshold or a third overlap degree judgment threshold; and the processing the target detection frame based on the judgment standard includes: judging whether the second overlap degree is greater than or equal to the second overlap degree judgment threshold or judging whether the third overlap degree is greater than or equal to the third overlap degree judgment threshold, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
[0013] Optionally, the post-processing method includes: determining an area ratio of the target detection frame and the false detection category detection frame; the judgment standard includes an area ratio threshold range; and the processing the target detection frame based on the judgment standard includes: judging whether the area ratio is located in the area ratio threshold range, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
[0014] Optionally, the coincidence degree includes a second coincidence degree and a third coincidence degree, the second coincidence degree includes a ratio of an area of an intersection of the target detection frame and the false detection category detection frame to an area of the target detection frame, and the third coincidence degree includes a ratio of the area of the intersection of the target detection frame and the false detection category detection frame to an area of the false detection category detection frame; the judgment criterion includes a second coincidence degree judgment threshold and a third coincidence degree judgment threshold; and the processing of the target detection frame based on the judgment criterion includes: judging whether the second coincidence degree is greater than or equal to the second coincidence degree judgment threshold and whether the third coincidence degree is greater than or equal to the third coincidence degree judgment threshold, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
[0015] Optionally, the coincidence degree level includes high coincidence; and the post-processing method further includes: presetting a confidence threshold of the target detection frame or the false detection category detection frame, obtaining a confidence of the target detection frame or the false detection category detection frame, judging whether the confidence of the target detection frame is greater than or equal to the confidence threshold of the target detection frame or whether the confidence of the false detection category detection frame is less than or equal to the confidence threshold of the false detection category detection frame, if yes, retaining the target detection frame, and if no, eliminating the target detection frame.
[0016] Optionally, the coincidence degree level includes moderate coincidence; and the post-processing method further includes: obtaining confidences of the target detection frame and the false detection category detection frame, judging whether the confidence of the target detection frame is greater than or equal to the confidence of the false detection category detection frame, if yes, retaining the target detection frame, and if no, eliminating the target detection frame.
[0017] Optionally, the coincidence degree level includes moderate coincidence; and the post-processing method further includes: presetting a confidence difference threshold, obtaining confidences of the target detection frame and the false detection category detection frame, judging whether a difference between the confidence of the false detection category detection frame and the confidence of the target detection frame is less than or equal to the confidence difference threshold, if yes, retaining the target detection frame, and if no, eliminating the target detection frame.
[0018] The embodiment of the present application further provides a post-processing device of a target detection frame, which comprises: a first obtaining module, used to obtain a target detection result of a to-be-processed image, the target detection result including a category of a target object in the to-be-processed image and a corresponding target detection frame of the target object; a second obtaining module, used to obtain a false detection category corresponding to the category and a false detection category detection frame of the false detection category; a first processing module, used to determine a coincidence degree of the target detection frame and the false detection category detection frame; and a second processing module, used to process the target detection frame based on the coincidence degree.
[0019] The embodiment of the present application further provides an electronic device, which comprises: a processor; and a memory, which stores a computer program capable of running on the processor; wherein the computer program is executed by the processor to implement the post-processing method of the target detection frame.
[0020] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed to realize the target bounding box post-processing method.
[0021] Compared with the prior art, the technical scheme of the embodiment of the present application has beneficial effects.
[0022] For example, whether the target bounding box is a false detection can be judged based on the coincidence degree of the target bounding box corresponding to the category of the target object in the image to be processed and the false positive category detection box corresponding thereto, so that the false detection rate of the target bounding box can be effectively reduced.
[0023] For another example, whether the target bounding box is eliminated can be judged based on the first coincidence degree, or based on the second coincidence degree or the third coincidence degree, or based on the second coincidence degree and the third coincidence degree, which is flexible and easy to operate.
[0024] For another example, for the case that the target bounding box and the false detection category detection box are highly coincident and moderately coincident, whether the target bounding box is eliminated can also be judged in combination with the coincidence degree and the confidence, so as to effectively improve the accuracy of false detection judgment, thereby effectively eliminating the false detection box of the target object in the image to be processed.
[0025] For another example, for the case that the target bounding box and the false detection category detection box are lowly coincident, the target bounding box can also be processed based on the coincidence degree only, which can also have a higher accuracy of false detection judgment, thereby effectively eliminating the false detection box of the target object in the image to be processed. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 is a flowchart of the target bounding box post-processing method in the embodiment of the present application;
[0027] Figure 2 is a schematic diagram of the target detection result of the image to be processed in the embodiment of the present application;
[0028] Figure 3 is a coincidence diagram of the target bounding box and the false detection category detection box in the embodiment of the present application;
[0029] Figure 4 is a principle block diagram of the target bounding box post-processing device in the embodiment of the present application. DETAILED DESCRIPTION
[0030] In the prior art, the false detection box in the target detection result cannot be effectively eliminated.
[0031] To solve the above technical problems, the embodiment of the present application provides a post-processing method of a target detection frame, comprising: obtaining a target detection result of a to-be-processed image, including a category of a target object in the to-be-processed image and a corresponding target detection frame of the target object; obtaining a false detection category corresponding to the category and a false detection category detection frame of the false detection category; determining an overlapping degree of the target detection frame and the false detection category detection frame; and processing the target detection frame based on the overlapping degree.
[0032] Compared with the prior art, the technical scheme of the embodiment of the present application has beneficial effects.
[0033] For example, whether the target detection frame is false detection is judged based on the overlapping degree of the target detection frame of the target object corresponding to the category in the to-be-processed image and the corresponding false detection category detection frame, which can effectively reduce the false detection rate of the target detection frame.
[0034] In order to make the purpose, features and beneficial effects of the embodiment of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below with reference to the drawings. It can be understood that the specific embodiments described below are only used to explain the present application, but not to limit the present application. In addition, in order to facilitate the description, only the parts related to the present application are shown in the drawings, not all the structures.
[0035] Figure 1 is a flowchart of the post-processing method of the target detection frame in the embodiment of the present application.
[0036] With reference to Figure 1 , the post-processing method of the target detection frame provided by the embodiment of the present application comprises:
[0037] S1, obtaining a target detection result of a to-be-processed image, including a category of a target object in the to-be-processed image and a corresponding target detection frame of the target object;
[0038] S2, obtaining a false detection category corresponding to the category and a false detection category detection frame of the false detection category;
[0039] S3, determining an overlapping degree of the target detection frame and the false detection category detection frame;
[0040] S4, processing the target detection frame based on the overlapping degree.
[0041] In the embodiment of the present application, the target detection result is obtained based on target detection on the to-be-processed image by using a preset detection network model.
[0042] In the specific implementation, the preset detection network model can be realized by using any conventional technical means known in the art.
[0043] In the specific implementation, the target detection result includes the category of the target object in the to-be-processed image and the corresponding target detection frame of the target object.
[0044] Figure 2 is a schematic diagram of a target detection result of a to-be-processed image in an embodiment of the present application.
[0045] Referring to Figure 2 The to-be-processed image 100 includes three target detection results, which are a first target detection result 101, a second target detection result 102 and a third target detection result 103 respectively.
[0046] Specifically, the first target detection result 101 includes a metal (i.e. the category of the target object) and a target detection frame corresponding to the metal. The second target detection result 102 includes a glass (i.e. the category of the target object) and a target detection frame corresponding to the glass. The third target detection result 103 includes an umbrella (i.e. the category of the target object) and a target detection frame corresponding to the umbrella.
[0047] In some embodiments, it can be determined whether the target detection frame corresponding to the target object needs to be post-processed based on the category of the target object, i.e. by determining whether the category of the target object is a category that needs to be post-processed to screen out the target detection frame that needs to be post-processed.
[0048] For example, it can be determined which or which categories of the metal, the glass and the umbrella correspond to the target detection frame that needs to be post-processed by respectively determining whether the metal, the glass and the umbrella are categories that need to be post-processed.
[0049] Specifically, the false detection rate of the category of the target object can be obtained, and it can be determined whether the false detection rate is greater than or equal to a false detection threshold, and if so, it is determined that the category of the target object needs to be post-processed.
[0050] In some embodiments, the post-processing method of the target detection frame can further include:
[0051] S11, obtaining a false detection rate of a category of a target object;
[0052] S12, determining whether the false detection rate is greater than or equal to a false detection threshold, and if so, determining that the category of the target object needs to be post-processed, and if not, determining that the category of the target object does not need to be post-processed.
[0053] In some embodiments, the step S11 of obtaining the false detection rate of the category of the target object can include:
[0054] S111, selecting a first test image set composed of first test images that do not include the category of the target object;
[0055] S112, performing target detection on each first test image in the first test image set by using a preset detection network model to obtain a first detection result corresponding to each first test image respectively;
[0056] S113, acquire a test bounding box of the target object corresponding category in the first detection result;
[0057] S114, determine the ratio of the number of the first test images where the test bounding box is located to the total number of all first test images in the first test set as the false detection rate of the target object corresponding category.
[0058] Generally, when performing target detection on images by using a detection network model, false detection may occur with a certain probability. For example, when performing target detection on images not including the target object corresponding category, i.e., the first test images, a detection result including the target object corresponding category may occur. Specifically, the detection result includes the target object corresponding category and a test bounding box corresponding to the category.
[0059] For example, when performing target detection on the first test set composed of the first test images not including the knife corresponding to the fruit knife (i.e., the target object), the detection result of some of the first test images may include the test bounding box of the knife (i.e., the category corresponding to the target object).
[0060] In a specific implementation, the number of the first test images where the test bounding box of the target object corresponding category is located can be counted, and the ratio of the number to the total number of all first test images in the first test set can be determined as the false detection rate of the target object corresponding category.
[0061] For example, the number of the first test images where the test bounding box of the knife appears can be counted, and the ratio of the number to the total number of all first test images in the first test set can be determined as the false detection rate of the knife.
[0062] When the false detection rate of the target object corresponding category is greater than or equal to the false detection threshold, it can be determined that the target object corresponding category is a category that needs to be post-processed, and the target detection box corresponding to the category needs to be post-processed.
[0063] For example, when the false detection rate of the knife is greater than or equal to the false detection threshold, it can be determined that the target detection box corresponding to the knife needs to be post-processed.
[0064] In some embodiments, the false detection threshold includes 5‰.
[0065] In some embodiments, the acquiring of the false detection category corresponding to the category and the false detection category detection box thereof in step S2 can include:
[0066] S21, acquiring the false detection category corresponding to the category;
[0067] S22, determining whether the target detection result includes the false detection category, and if so, acquiring the false detection category detection box corresponding to the false detection category.
[0068] Generally, when a detection network model is used to detect a target object in an image, the target object may be misdetected as another category. Thus, a misdetected category of the target object can be determined based on a target detection result.
[0069] In specific implementations, the misdetected category of the target object can include one or more than one.
[0070] In specific implementations, the misdetected category corresponding to the category can be obtained in step S21, and the method can include the following steps.
[0071] S211, selecting a second test image including the category corresponding to the target object to form a second test set;
[0072] S212, using a preset detection network model to detect a target in each second test image in the second test set to obtain a second detection result corresponding to each second test image, respectively;
[0073] S213, determining a misdetected category of the target object based on the second detection result.
[0074] For example, a second test image including a fruit knife can be selected to form a second test set, and a preset detection network model can be used to detect a target in each second test image in the second test set to obtain a second detection result corresponding to each second test image, respectively.
[0075] In specific implementations, the second detection result includes a correct category of the fruit knife, i.e., a knife, and a misdetected category of the fruit knife, such as a metal strip or a bottle bottom. Thus, the misdetected category of the knife can be determined based on the second detection result, including a metal strip or a bottle bottom.
[0076] In specific implementations of step S22, it can be determined whether the misdetected category of the category corresponding to the target object is included in the target detection result. If the misdetected category is included, it can be determined that the target detection frame corresponding to the target object needs to be post-processed, and a misdetected category detection frame corresponding to the misdetected category is obtained. If the misdetected category is not included, it can be directly determined that the target detection frame needs to be reserved.
[0077] In the embodiment of the application, the category in step S2 is a category having a misdetected category and including the misdetected category in the target detection result in step S1.
[0078] For example, the target detection result obtained by detecting a target in a to-be-processed image including a fruit knife (which has a misdetected category, such as a metal strip or a bottle bottom) includes a knife (i.e., a category of the target object) and a target detection frame corresponding thereto, and a misdetected category (such as a metal strip or a bottle bottom) corresponding to the knife and a misdetected category detection frame corresponding thereto.
[0079] In the embodiments of the present application, the false detection category detection box is the target detection box corresponding to the false detection category.
[0080] In the embodiments of the present application, the coincidence degree of the target detection box corresponding to the target object category and the false detection category detection box corresponding to the false detection category of the category can be used to determine how to process the target detection box.
[0081] For example, the coincidence degree of the target detection box corresponding to the fruit knife and the false detection category detection box corresponding to the false detection category of the metal strip of the category of the knife can be used to determine how to process the target detection box of the knife.
[0082] In specific implementation, processing the target detection box includes retaining the target detection box or eliminating the target detection box.
[0083] Specifically, when the target detection box corresponding to the target object category and the false detection category detection box have a high coincidence degree, it can be considered that the target detection box should correspond to the false detection category, and the target detection box is a false detection box for the corresponding category of the target object and needs to be eliminated.
[0084] When the target detection box corresponding to the target object category and the false detection category detection box have a low coincidence degree, it can be considered that the target detection box has a small possibility of corresponding to the false detection category, and the target detection box as the target detection box corresponding to the target object category is correctly detected and should be retained.
[0085] In some embodiments, the determination of the coincidence degree of the target detection box and the false detection category detection box in step S3 can include judging whether the target detection box and the false detection category detection box coincide with each other, determining the coincidence degree of the two when they coincide with each other, and determining that the detection box should be retained when they do not coincide with each other.
[0086] In specific implementation, for the false detection category of the target object category, there are two or more cases, and whether the false detection category detection box of each false detection category coincides with the target detection box can be determined respectively.
[0087] For example, the target object category is a knife, and the knife has two false detection categories, which are a metal strip and a bottle bottom respectively. For the false detection category detection boxes of the metal strip and the bottle bottom, it is necessary to determine whether they coincide with the target detection box respectively.
[0088] In some embodiments, for the same false detection category, there can be two or more false detection category detection boxes corresponding thereto. For each false detection category detection box, it can be determined whether it coincides with the target detection box.
[0089] Figure 3 It is a schematic diagram of the coincidence of the target detection box and the false detection category detection box in the embodiments of the present application.
[0090] As shown in Figure 3 The target object corresponds to the category of the target detection frame 201 and one of the false detection category detection frame 202 has an overlapping area 203.
[0091] In specific implementation, the degree of overlap between the target detection frame 201 and the false detection category detection frame 202 includes a first degree of overlap. The first degree of overlap is the ratio of the area of the intersection of the target detection frame 201 and the false detection category detection frame 202 to the area of the union.
[0092] Specifically, the first degree of overlap can be expressed by the following formula (1):
[0093] IoU=S i / (S1+S2+S i ) (1)
[0094] Wherein, IoU represents the first degree of overlap, S i represents the area of the intersection of the target detection frame and the false detection category detection frame, S1 represents the area of the target detection frame, S2 represents the area of the false detection category detection frame, and S1+S2+S i represents the area of the union of the target detection frame and the false detection category detection frame.
[0095] In some embodiments, the post-processing method of the target detection frame can further include: presetting different degrees of overlap and their corresponding judgment standards, and different degrees of overlap correspond to different judgment standards.
[0096] In specific implementation, three different degrees of overlap can be preset, which are high overlap, medium overlap and low overlap. Different judgment standards can be preset corresponding to different degrees of overlap, which are high overlap judgment standard, medium overlap judgment standard and low overlap judgment standard.
[0097] In specific implementation, based on different degrees of overlap, the corresponding degree of overlap judgment standard is selected to determine whether the target detection frame needs to be eliminated.
[0098] In specific implementation, the degree of overlap can be determined based on the degree of overlap threshold range.
[0099] In some embodiments, the post-processing method of the target detection frame can further include: presetting different degrees of overlap threshold range, and different degrees of overlap threshold range correspond to different degrees of overlap.
[0100] In some embodiments, the coincidence degree can be divided into three different coincidence degree threshold ranges, i.e., a high coincidence degree threshold range (0.5, 1], a medium coincidence degree threshold range (0.3, 0.5], and a low coincidence degree threshold range (0, 0.3]. And the coincidence degree level corresponding to the high coincidence degree threshold range is high coincidence, the coincidence degree level corresponding to the medium coincidence degree threshold range is medium coincidence, and the coincidence degree level corresponding to the low coincidence degree threshold range is low coincidence.
[0101] Thus, the corresponding coincidence degree level can be obtained based on the coincidence degree threshold range, and the corresponding judgment standard can be obtained based on the corresponding coincidence degree level, and then it is determined whether the target detection frame needs to be eliminated based on the corresponding judgment standard.
[0102] In specific implementation, the coincidence degree level of the target detection frame and the false detection category detection frame can be judged based on the first coincidence degree.
[0103] Correspondingly, the target detection frame processed based on the coincidence degree in step S4 can include:
[0104] S41, obtaining a coincidence degree level corresponding to the first coincidence degree and a corresponding judgment standard thereof,
[0105] S42, processing the target detection frame based on the judgment standard.
[0106] In specific implementation, the first coincidence degree can be compared with different coincidence degree threshold ranges to determine which coincidence degree threshold range the first coincidence degree is in, and the level corresponding to the first coincidence degree and the corresponding judgment standard thereof can be determined based on the coincidence degree threshold range.
[0107] Specifically, the obtaining of the coincidence degree level corresponding to the first coincidence degree and the corresponding judgment standard thereof in step S41 can include:
[0108] S411, comparing the first coincidence degree with different coincidence degree threshold ranges to obtain a coincidence degree threshold range to which the first coincidence degree belongs;
[0109] S412, obtaining a coincidence degree level corresponding to the coincidence degree threshold range and a corresponding judgment standard thereof.
[0110] For example, it can be assumed that the first overlap degree IoU is 0.6, and 0.6 is compared with the high overlap threshold range (0.5, 1], the medium overlap threshold range (0.3, 0.5] and the low overlap threshold range (0, 0.3] respectively, it can be determined that 0.6 is located in the high overlap threshold range (0.5, 1]. Since the high overlap threshold range corresponds to high overlap. Therefore, it can be determined that when the first overlap degree IoU is 0.6, the overlap level of the target detection frame and the false detection category detection frame is high overlap. In this case, the target detection frame can be processed based on the high overlap judgment standard.
[0111] For another example, it can also be assumed that the first overlap degree IoU is 0.4, and 0.4 is compared with the high overlap threshold range (0.5, 1], the medium overlap threshold range (0.3, 0.5] and the low overlap threshold range (0, 0.3] respectively, it can be determined that 0.4 is located in the medium overlap threshold range (0.3, 0.5]. Since the medium overlap threshold range corresponds to medium overlap. Therefore, it can be determined that when the first overlap degree IoU is 0.4, the overlap level of the target detection frame and the false detection category detection frame is medium overlap. In this case, the target detection frame can be processed based on the medium overlap judgment standard.
[0112] For another example, it can also be assumed that the first overlap degree IoU is 0.2, and 0.2 is compared with the high overlap threshold range (0.5, 1], the medium overlap threshold range (0.3, 0.5] and the low overlap threshold range (0, 0.3] respectively, it can be determined that 0.2 is located in the low overlap threshold range (0, 0.3]. Since the low overlap threshold range corresponds to low overlap. Therefore, it can be determined that when the first overlap degree IoU is 0.2, the overlap level of the target detection frame and the false detection category detection frame is low overlap. In this case, the target detection frame can be processed based on the low overlap judgment standard.
[0113] In some embodiments, the overlap of the target detection frame and the false detection category detection frame can also include a second overlap degree or a third overlap degree.
[0114] In a specific implementation, the second overlap degree includes a ratio of an area of an intersection of the target detection frame and the false detection category detection frame to an area of the target detection frame.
[0115] Specifically, the second overlap degree can be expressed by the following formula (2):
[0116] IoC j = S i / S1 (2)
[0117] Wherein, C j represents a category corresponding to the target object, IoC j represents the second overlap degree, S iS1 represents the area of the target detection frame.
[0118] In specific implementations, the third coincidence degree includes a ratio of the area of the intersection of the target detection frame and the false detection class detection frame to the area of the false detection class detection frame.
[0119] Specifically, the third coincidence degree can be expressed by the following formula (3):
[0120]
[0121] wherein, represents the category C of the target object j of the false detection class, represents the third coincidence degree, S i S1 represents the area of the intersection of the target detection frame and the false detection class detection frame, and S2 represents the area of the false detection class detection frame.
[0122] In some embodiments, the high coincidence judgment criterion, the medium coincidence judgment criterion and the low coincidence judgment criterion can all be set based on the first coincidence degree. Accordingly, the target detection frame can be judged whether to be eliminated based on the first coincidence degree.
[0123] In other embodiments, the high coincidence judgment criterion, the medium coincidence judgment criterion and the low coincidence judgment criterion can all be set based on the second coincidence degree or the third coincidence degree. Accordingly, the target detection frame can be judged whether to be eliminated based on the second coincidence degree or the third coincidence degree.
[0124] In still other embodiments, the high coincidence judgment criterion, the medium coincidence judgment criterion and the low coincidence judgment criterion can all be set based on the second coincidence degree and the third coincidence degree. Accordingly, the target detection frame can be judged whether to be eliminated based on the second coincidence degree and the third coincidence degree.
[0125] The following takes the target detection frame based on the first coincidence degree to judge whether to be eliminated as an example.
[0126] In specific implementations, the high coincidence judgment criterion, the medium coincidence judgment criterion and the low coincidence judgment criterion can all include a first coincidence degree judgment threshold, and the first coincidence degree judgment threshold corresponding to different coincidence degree judgment criteria is also different.
[0127] In specific implementations, the first coincidence degree judgment threshold corresponding to the high coincidence judgment criterion is located in the high coincidence degree threshold range, the first coincidence degree judgment threshold corresponding to the medium coincidence judgment criterion is located in the medium coincidence degree threshold range, and the first coincidence degree judgment threshold corresponding to the low coincidence judgment criterion is located in the low coincidence degree threshold range.
[0128] Correspondingly, the processing the target detection frame based on the judgment criterion in step S42 can include:
[0129] S421, judging whether the first coincidence degree is greater than or equal to a first coincidence degree judgment threshold, if yes, eliminating the target detection frame, if no, keeping the target detection frame.
[0130] For example, for the high coincidence judgment criterion, the corresponding first coincidence degree judgment threshold can be 0.7. In specific implementation, it can be judged whether the first coincidence degree is greater than the first coincidence degree judgment threshold 0.7, if yes, the target detection frame is eliminated, if no, the target detection frame is kept. Assuming that the first coincidence degree is 0.6, since 0.6 is not greater than 0.7, it can be determined that the target detection frame is correctly detected and kept.
[0131] For example, for the high coincidence judgment criterion, the corresponding first coincidence degree judgment threshold can be 0.7. In specific implementation, it can be judged whether the first coincidence degree is greater than the first coincidence degree judgment threshold 0.7, if yes, the target detection frame is eliminated, if no, the target detection frame is kept. Assuming that the first coincidence degree is 0.6, since 0.6 is not greater than 0.7, it can be determined that the target detection frame is correctly detected and kept.
[0132] For example, for the high coincidence judgment criterion, the corresponding first coincidence degree judgment threshold can be 0.7. In specific implementation, it can be judged whether the first coincidence degree is greater than the first coincidence degree judgment threshold 0.7, if yes, the target detection frame is eliminated, if no, the target detection frame is kept. Assuming that the first coincidence degree is 0.6, since 0.6 is not greater than 0.7, it can be determined that the target detection frame is correctly detected and kept.
[0133] The following is an example of judging whether the target detection frame is eliminated based on the second coincidence degree or the third coincidence degree.
[0134] In specific implementation, the high coincidence judgment criterion, the medium coincidence judgment criterion and the low coincidence judgment criterion can all include a second coincidence degree judgment threshold, and the second coincidence degree judgment threshold is different corresponding to different coincidence degree judgment criteria.
[0135] In specific implementation, the second coincidence degree judgment threshold corresponding to the high coincidence judgment criterion is in the high coincidence degree threshold range, the second coincidence degree judgment threshold corresponding to the medium coincidence judgment criterion is in the medium coincidence degree threshold range, and the second coincidence degree judgment threshold corresponding to the low coincidence judgment criterion is in the low coincidence degree threshold range.
[0136] Correspondingly, the processing the target detection frame based on the judgment criterion in step S42 can include:
[0137] S422, determining whether the second coincidence degree is greater than or equal to a second coincidence degree judgment threshold, if yes, eliminating the target detection frame, if no, keeping the target detection frame.
[0138] In specific implementations, the high coincidence degree judgment criterion, the medium coincidence degree judgment criterion and the low coincidence degree judgment criterion can all include a third coincidence degree judgment threshold, and the third coincidence degree judgment threshold corresponding to different coincidence degree judgment criteria is also different.
[0139] In specific implementations, the third coincidence degree judgment threshold corresponding to the high coincidence degree judgment criterion is located in the high coincidence degree threshold range, the third coincidence degree judgment threshold corresponding to the medium coincidence degree judgment criterion is located in the medium coincidence degree threshold range, and the third coincidence degree judgment threshold corresponding to the low coincidence degree judgment criterion is located in the low coincidence degree threshold range.
[0140] Correspondingly, the processing of the target detection frame based on the judgment criterion in step S42 can include:
[0141] S423, determining whether the third coincidence degree is greater than or equal to a third coincidence degree judgment threshold, if yes, eliminating the target detection frame, if no, keeping the target detection frame.
[0142] In specific implementations, steps S422 and S423 can be implemented by using the technical means provided in the implementation process of step S421, which will not be described here.
[0143] In some embodiments, on the basis of judging the target detection frame based on the second coincidence degree or the third coincidence degree, the area ratio of the target detection frame and the false detection category detection frame can also be combined to further judge whether the target detection frame is eliminated.
[0144] Specifically, the post-processing method of the target detection frame can also include determining the area ratio S1 / S2 of the target detection frame and the false detection category detection frame.
[0145] Correspondingly, the judgment criterion can also include an area ratio threshold range. The processing of the target detection frame based on the judgment criterion in step S42 can include: determining whether the area ratio S1 / S2 is located in the area ratio threshold range, if yes, eliminating the target detection frame, if no, keeping the target detection frame.
[0146] For example, it can be determined whether the second coincidence degree is greater than or equal to a second coincidence degree judgment threshold, and whether the area ratio S1 / S2 of the target detection frame and the false detection category detection frame is located in the area ratio threshold range, if yes, eliminating the target detection frame, if no, keeping the target detection frame.
[0147] For example, it can also be determined whether the third coincidence degree is greater than or equal to a third coincidence degree determination threshold value, and whether the area ratio S1 / S2 of the target detection frame and the false detection category detection frame is within an area ratio threshold value range, if yes, the target detection frame is eliminated, if no, the target detection frame is retained.
[0148] In some embodiments, the area ratio threshold value range includes [0.75, 1.3].
[0149] The following is described taking the target detection frame based on the second coincidence degree and the third coincidence degree to determine whether to eliminate as an example.
[0150] In specific implementation, the high coincidence degree determination criterion, the medium coincidence degree determination criterion and the low coincidence degree determination criterion can all include a second coincidence degree determination threshold value and a third coincidence degree determination threshold value; and corresponding to different coincidence degree determination criteria, the second coincidence degree determination threshold value is different, and the third coincidence degree determination threshold value is different; and corresponding to the same coincidence degree determination criterion, the second coincidence degree determination threshold value and the third coincidence degree determination threshold value can be the same or different.
[0151] Correspondingly, the processing of the target detection frame based on the determination criterion in step S42 can include:
[0152] S424, determining whether the second coincidence degree is greater than or equal to a second coincidence degree determination threshold value, and determining whether the third coincidence degree is greater than or equal to a third coincidence degree determination threshold value, if yes, the target detection frame is eliminated, if no, the target detection frame is retained.
[0153] For example, for the high coincidence degree determination criterion, the corresponding second coincidence degree determination threshold value and third coincidence degree determination threshold value are both 0.6. In specific implementation, it can be determined whether the second coincidence degree is greater than or equal to the second coincidence degree determination threshold value 0.6, and whether the third coincidence degree is greater than or equal to the third coincidence degree determination threshold value 0.6, if yes, the target detection frame is eliminated, if no, the target detection frame is retained. Assuming that the second coincidence degree is 0.65, and the third coincidence degree is 0.55, since 0.65 is greater than 0.6 and 0.55 is not greater than 0.6, it can be determined that the target detection frame is correctly detected and retained.
[0154] For example, for the high overlap criterion, the second overlap criterion threshold and the third overlap criterion threshold are both 0.6. In implementation, it can be determined whether the second overlap criterion is greater than or equal to the second overlap criterion threshold 0.6 and whether the third overlap criterion is greater than or equal to the third overlap criterion threshold 0.6. If yes, the target detection frame is eliminated; if no, the target detection frame is retained. Assuming that the second overlap criterion is 0.62 and the third overlap criterion is 0.67, since 0.62 is greater than 0.6 and 0.67 is also greater than 0.6, it can be determined that the target detection frame is a false detection and is eliminated.
[0155] For example, for the low overlap criterion, the second overlap criterion threshold and the third overlap criterion threshold are both 0.2. In implementation, it can be determined whether the second overlap criterion is greater than or equal to the second overlap criterion threshold 0.2 and whether the third overlap criterion is greater than or equal to the third overlap criterion threshold 0.2. If yes, the target detection frame is eliminated; if no, the target detection frame is retained. Assuming that the second overlap criterion is 0.23 and the third overlap criterion is 0.17, since 0.23 is greater than 0.2 and 0.17 is not greater than 0.2, it can be determined that the target detection frame is a correct detection and is retained.
[0156] In some embodiments, for the high overlap and the medium overlap, on the basis of the aforementioned processing of the target detection frame based on the overlap criterion provided by the embodiments of the present application, the confidence of both the target detection frame and the false detection category detection frame can be combined to process the detection frame. That is, the target detection frame can be processed based on the overlap criterion and the confidence.
[0157] Specifically, when it is determined based on the overlap criterion that the target detection frame is retained, the target detection frame can be directly determined to be retained. When it is determined based on the overlap criterion that the target detection frame is eliminated, it can be further determined based on the confidence whether the target detection frame is finally eliminated.
[0158] In this way, in the case of high overlap and medium overlap, the target detection frame can be more accurately processed to improve the accuracy of false detection judgment, thereby effectively eliminating the false detection frame of the target object in the image to be processed.
[0159] The following will take the high overlap as an example to illustrate how to determine whether the target detection frame is eliminated based on the confidence.
[0160] In some embodiments, the post-processing method of the target detection frame can further include:
[0161] S51, presetting a confidence threshold of the target detection frame or the false detection category detection frame;
[0162] S52, acquiring the confidence of the target detection frame or the false detection category detection frame;
[0163] S53, determining whether the confidence of the target detection box is greater than or equal to a confidence threshold of the target detection box, or determining whether the confidence of the false detection category detection box is less than or equal to a confidence threshold of the false detection category detection box, if yes, retaining the target detection box, if not, eliminating the target detection box.
[0164] Specifically, when the target detection box and the false detection category detection box are highly overlapped, whether the target detection box is eliminated can be determined based on the confidence of the target detection box or the confidence of the false detection category detection box.
[0165] In specific implementation, the confidence threshold of the target detection box can be set to a high value, for example, greater than or equal to 0.8.
[0166] In specific implementation, the confidence threshold of the false detection category detection box can be set to a low value, for example, less than or equal to 0.1.
[0167] In specific implementation, the confidence of the target detection box or the confidence of the false detection category detection box can be obtained based on the target detection result.
[0168] In specific implementation, the target detection box with a confidence greater than or equal to the confidence threshold of the target detection box can be determined as correct detection for retention processing, and the target detection box with a confidence less than the confidence threshold of the target detection box can be determined as false detection for elimination processing.
[0169] In specific implementation, when the confidence of the false detection category detection box is less than or equal to the confidence threshold of the false detection category detection box, it can be determined that the reliability of the false detection category detection box is low, and based on this, the target detection box is determined as correct detection for retention processing; and when the confidence of the false detection category detection box is greater than the confidence threshold of the false detection category detection box, it can be determined that the reliability of the false detection category detection box is high, and based on this, the target detection box is determined as false detection for elimination processing.
[0170] For example, for the highly overlapped case, the confidence threshold of the target detection box can be preset as 0.8, and the confidence threshold of the false detection category detection box can be preset as 0.1, so that it can be determined whether the confidence of the target detection box is greater than or equal to the confidence threshold 0.8 of the target detection box, or whether the confidence of the false detection category detection box is less than or equal to the confidence threshold 0.1 of the false detection category detection box, if yes, retaining the target detection box, if not, eliminating the target detection box.
[0171] Next, how to determine whether the target detection box is eliminated based on the confidence will be illustrated by taking the moderate overlap as an example.
[0172] In some embodiments, the post-processing method of the target detection box can further include:
[0173] S61, obtain the confidence of the target detection frame and the confidence of the false detection category detection frame;
[0174] S62, determine whether the confidence of the target detection frame is greater than or equal to the confidence of the false detection category detection frame, if yes, keep the target detection frame, if not, eliminate the target detection frame.
[0175] Specifically, when the target detection frame and the false detection category detection frame are moderately overlapped, whether the target detection frame is eliminated can be determined based on the size relationship between the confidence of the target detection frame and the confidence of the false detection category detection frame.
[0176] In specific implementation, the confidence of the target detection frame or the confidence of the false detection category detection frame can be obtained based on the target detection result.
[0177] In specific implementation, whether the confidence of the target detection frame is greater than or equal to the confidence of the false detection category detection frame can be determined, if yes, the target detection frame is kept, if not, the target detection frame is eliminated.
[0178] For example, when the confidence of the target detection frame is greater than or equal to the confidence of the false detection category detection frame, it can be determined that the reliability of the target detection frame is high, and thus the target detection frame is determined to be correctly detected and kept.
[0179] For another example, when the confidence of the target detection frame is less than the confidence of the false detection category detection frame, it can be determined that the reliability of the false detection category detection frame is high, and the reliability of the target detection frame is low, and thus the target detection frame is determined to be false detection and eliminated.
[0180] In some other embodiments, the post-processing method of the target detection frame can further include:
[0181] S71, preset a confidence difference threshold value;
[0182] S72, obtain the confidence of the target detection frame and the confidence of the false detection category detection frame;
[0183] S73, determine whether the difference between the confidence of the false detection category detection frame and the confidence of the target detection frame is less than or equal to the confidence difference threshold value, if yes, keep the target detection frame, if not, eliminate the target detection frame.
[0184] Specifically, when the target detection frame and the false detection category detection frame are moderately overlapped, whether the target detection frame is eliminated can also be determined based on the difference between the confidence of the false detection category detection frame and the confidence of the target detection frame.
[0185] In specific implementation, the confidence of the target detection frame or the confidence of the false detection category detection frame can be obtained based on the target detection result.
[0186] In specific implementations, it can be determined whether the difference between the confidence of the false detection category detection box and the confidence of the target detection box is less than or equal to a confidence difference threshold value, if yes, the target detection box is retained, if no, the target detection box is eliminated.
[0187] For example, when the difference between the confidence of the false detection category detection box and the confidence of the target detection box is less than or equal to the confidence difference threshold value, the target detection box still has a higher correct detection possibility compared with the false detection category detection box, so it can be determined that the target detection box is correct detection and is retained.
[0188] For another example, when the difference between the confidence of the false detection category detection box and the confidence of the target detection box is greater than the confidence difference threshold value, the target detection box has a lower correct detection possibility compared with the false detection category detection box, so it can be determined that the target detection box is false detection and is eliminated.
[0189] In specific implementations, the confidence difference threshold value can be greater than or equal to 0.2.
[0190] It can be understood that in other embodiments, for the case of high overlap and moderate overlap, the target detection box can also be determined whether to be eliminated based on the confidence first, when it is determined that the target detection box is retained, the target detection box is directly determined to be retained, and when it is determined that the target detection box is eliminated, the target detection box is further determined whether to be eliminated finally based on the foregoing technical solution of processing the target detection box based on the overlap degree.
[0191] In the embodiments of the present application, for the case of low overlap, since the overlap degree of the target detection box and the false detection category detection box is very low, even if the target detection box is processed only based on the overlap degree, it also has a high false detection judgment accuracy, so that the false detection box of the target object in the image to be processed can be effectively eliminated.
[0192] In the embodiments of the present application, the target detection result of the image to be processed can include multiple target objects and their corresponding categories, and the target detection box of the corresponding category can be post-processed for the target object of different categories respectively.
[0193] For the target object of the same category, multiple target detection boxes corresponding thereto can be included in the same image to be processed, and the post-processing can be performed on each target detection box respectively.
[0194] The threshold values in the embodiments of the present application can be determined based on the related data in the target detection verification set.
[0195] The embodiments of the present application also provide a post-processing device of a target detection box.
[0196] Figure 4is a principle block diagram of a post-processing device of a target detection frame in an embodiment of the present application.
[0197] Referring to Figure 4 The post-processing device 300 of the target detection frame includes a first acquisition module 301, a second acquisition module 302, a first processing module 303, and a second processing module 304.
[0198] Specifically, the first acquisition module 301 is configured to acquire a target detection result of a to-be-processed image, including a category of a target object in the to-be-processed image and a corresponding target detection frame of the target object; the second acquisition module 302 is configured to acquire a false detection category corresponding to the category and a false detection category detection frame of the false detection category; the first processing module 303 is configured to determine an overlap degree of the target detection frame and the false detection category detection frame; and the second processing module 304 is configured to process the target detection frame based on the overlap degree.
[0199] In specific implementation, the first acquisition module 301, the second acquisition module 302, the first processing module 303, and the second processing module 304 can be implemented based on the technical solutions of the post-processing method of the target detection frame disclosed in the embodiments of the present application.
[0200] The embodiments of the present application also provide an electronic device.
[0201] The electronic device includes a processor and a memory. The memory stores a computer program that can run on the processor. When the computer program is executed by the processor, the post-processing method of the target detection frame disclosed in the embodiments of the present application is implemented.
[0202] The embodiments of the present application also provide a computer readable storage medium.
[0203] The computer readable storage medium stores a computer program. When the computer program is executed, the post-processing method of the target detection frame disclosed in the embodiments of the present application is implemented.
[0204] In specific implementation, the computer readable storage medium can include ROM, RAM, a magnetic disk, or an optical disk, etc.
[0205] Although the specific embodiments have been described above, these embodiments are not intended to limit the scope of the present application, even if a single embodiment is described with respect to a particular feature. The feature examples provided in the present application are intended to be illustrative, not limiting, unless otherwise specified. In specific implementation, one or more technical features of the dependent claims can be combined with the technical features of the independent claims, and the technical features from the corresponding independent claims can be combined in any appropriate manner rather than only through the specific combinations listed in the claims, if technically feasible.
[0206] Although the present application has been disclosed with reference to the above embodiments, the application is not limited to the above embodiments. It will be apparent to those skilled in the art that various modifications and changes can be made thereto without departing from the spirit and scope of the application. The scope of the application should be limited only by the appended claims.
Claims
1. A method for post-processing a bounding box of an object, characterized in that, The method comprises the following steps: obtaining a target detection result of a to-be-processed image, wherein the target detection result comprises a category of a target object in the to-be-processed image and a corresponding target detection frame of the target object; obtaining a mis-detection category corresponding to the category and a mis-detection category detection frame corresponding to the mis-detection category; determining a coincidence degree of the target detection frame and the mis-detection category detection frame; processing the target detection frame based on the coincidence degree; the coincidence degree comprises a first coincidence degree, and the first coincidence degree is a ratio of an intersection area of the target detection frame and the mis-detection category detection frame to a union area of the target detection frame and the mis-detection category detection frame; different coincidence degree thresholds are preset, and different coincidence degree thresholds correspond to different coincidence degree levels; the processing of the target detection frame based on the coincidence degree comprises the following steps: obtaining a coincidence degree level corresponding to the first coincidence degree and a corresponding judgment standard, and processing the target detection frame based on the judgment standard. the judgment standard comprises a first coincidence degree judgment threshold; the processing of the target detection frame based on the judgment standard comprises the following steps: determining whether the first coincidence degree is greater than or equal to the first coincidence degree judgment threshold; if yes, the target detection frame is eliminated; and if no, the target detection frame is retained.
2. The post-processing method of claim 1, wherein, the category is a category that needs to be post-processed; the post-processing method comprises the following steps: obtaining a mis-detection rate of the category, determining whether the mis-detection rate is greater than or equal to a mis-detection threshold; if yes, it is determined that the category needs to be post-processed.
3. The post-processing method of claim 2, wherein, The method comprises the following steps: selecting a first test image of the category not including the target object to form a first test set; using a preset detection network model to perform target detection on each first test image in the first test set to obtain a first detection result corresponding to each first test image respectively; obtaining a test detection frame including the target object in the first detection result; determining a ratio of a number of first test images in which the test detection frame is located to a total number of all first test images in the first test set as the mis-detection rate.
4. The post-processing method of claim 1, wherein, The method comprises the following steps: obtaining a mis-detection category corresponding to the category; determining whether the mis-detection category is included in the target detection result; if yes, obtaining a mis-detection category detection frame corresponding to the mis-detection category.
5. The post-processing method of claim 1, wherein, The method comprises the following steps: different coincidence degree threshold ranges are preset, and different coincidence degree threshold ranges correspond to different coincidence degree levels; the method comprises the following steps: comparing the first coincidence degree with different coincidence degree threshold ranges to obtain a coincidence degree threshold range to which the first coincidence degree belongs, obtaining a coincidence degree level corresponding to the coincidence degree threshold range and a corresponding judgment standard.
6. The post-processing method of claim 1, wherein, the coincidence degree comprises a second coincidence degree or a third coincidence degree; the second coincidence degree comprises a ratio of an intersection area of the target detection frame and the mis-detection category detection frame to an area of the target detection frame; and the third coincidence degree comprises a ratio of the intersection area of the target detection frame and the mis-detection category detection frame to an area of the mis-detection category detection frame. The judgment criterion comprises a second overlap degree judgment threshold or a third overlap degree judgment threshold; the processing of the target detection frame based on the judgment criterion comprises: determining whether the second overlap degree is greater than or equal to the second overlap degree judgment threshold or determining whether the third overlap degree is greater than or equal to the third overlap degree judgment threshold, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
7. The post-processing method according to claim 6, characterized in that, comprise: determining an area ratio of the target detection frame and the false detection category detection frame; the judgment criterion comprises an area ratio threshold range; the processing of the target detection frame based on the judgment criterion comprises: determining whether the area ratio is within the area ratio threshold range, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
8. The post-processing method of claim 1, wherein, The overlap degree comprises a second overlap degree and a third overlap degree, the second overlap degree comprises a ratio of an area of an intersection of the target detection frame and the false detection category detection frame to an area of the target detection frame, and the third overlap degree comprises a ratio of the area of the intersection of the target detection frame and the false detection category detection frame to an area of the false detection category detection frame; the judgment criterion comprises a second overlap degree judgment threshold and a third overlap degree judgment threshold; the processing of the target detection frame based on the judgment criterion comprises: determining whether the second overlap degree is greater than or equal to the second overlap degree judgment threshold and determining whether the third overlap degree is greater than or equal to the third overlap degree judgment threshold, if yes, eliminating the target detection frame, and if no, retaining the target detection frame.
9. The post-processing method according to any one of claims 1 to 8, characterized in that, The overlap degree level comprises high overlap; the post-processing method further comprises: presetting a confidence threshold of the target detection frame or the false detection category detection frame, obtaining a confidence of the target detection frame or the false detection category detection frame, determining whether the confidence of the target detection frame is greater than or equal to the confidence threshold of the target detection frame or determining whether the confidence of the false detection category detection frame is less than or equal to the confidence threshold of the false detection category detection frame, if yes, retaining the target detection frame, and if no, eliminating the target detection frame.
10. The post-processing method according to any one of claims 1 to 8, characterized in that, The overlap degree level comprises moderate overlap; the post-processing method further comprises: obtaining a confidence of the target detection frame and the false detection category detection frame, determining whether the confidence of the target detection frame is greater than or equal to the confidence of the false detection category detection frame, if yes, retaining the target detection frame, and if no, eliminating the target detection frame.
11. The post-processing method according to any one of claims 1 to 8, characterized in that, The overlap degree level comprises moderate overlap; the post-processing method further comprises: presetting a confidence difference threshold, obtaining a confidence of the target detection frame and the false detection category detection frame, determining whether a difference between the confidence of the false detection category detection frame and the confidence of the target detection frame is less than or equal to the confidence difference threshold, if yes, retaining the target detection frame, and if no, eliminating the target detection frame.
12. An apparatus for post-processing of a target detection box, characterized in that, comprise: a first obtaining module, configured to obtain a target detection result of a to-be-processed image, the target detection result comprising a category of a target object in the to-be-processed image and a corresponding target detection frame of the target object; The second acquisition module is configured to acquire a misclassification corresponding to the category and a misclassification bounding box of the misclassification; The first processing module is configured to determine an overlap degree of the target bounding box and the misclassification bounding box; The second processing module is configured to process the target bounding box based on the overlap degree; the overlap degree includes a first overlap degree, and the first overlap degree is a ratio of an area of an intersection of the target bounding box and the misclassification bounding box to an area of a union of the target bounding box and the misclassification bounding box; Different overlap degree levels and corresponding judgment standards are preset, and different overlap degree levels correspond to different judgment standards; the processing of the target bounding box based on the overlap degree includes: acquiring an overlap degree level corresponding to the first overlap degree and a corresponding judgment standard, and processing the target bounding box based on the judgment standard; the judgment standard includes a first overlap degree judgment threshold; the processing of the target bounding box based on the judgment standard includes: judging whether the first overlap degree is greater than or equal to the first overlap degree judgment threshold, and if yes, eliminating the target bounding box, and if no, retaining the target bounding box.
13. An electronic device, comprising: The computer program is executed to implement the method in any one of claims 1 to 11. The computer program is executed to implement the method in any one of claims 1 to 11. The computer program is executed to implement the method in any one of claims 1 to 11. 14. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that,
Citation Information
Patent Citations
Target detection method and device
CN108009544A
Non-maximum suppression method, device and equipment for multi-target detection
CN110826572A