Post-processing method of target detection algorithm and electronic device

CN122597774APending Publication Date: 2026-08-18JIANGNAN SHIPYARD (GRP) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610799832.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0009]2. 传统算法的局限性

Benefits of technology

[0022]As described above, the post-processing method and electronic device of the target detection algorithm of the present invention have the following beneficial effects: Traditional non-maximum suppression methods are based solely on the confidence ranking of detection boxes, which cannot meet the preference requirements for fine-grained categories in multi-granularity category detection. The present invention, by introducing category granularity weights, increases the priority of fine-grained category detection boxes, retaining more valuable fine-grained category boxes in the detection results, thereby reducing the problem of the same target being repeatedly detected by multiple granularity level categories. This method effectively improves the accuracy of the detection results and avoids repeated detection caused by multiple granularity categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597774A_ABST
    Figure CN122597774A_ABST
Patent Text Reader

Abstract

The application provides a post-processing method of a target detection algorithm and an electronic device, and the specific steps comprise: obtaining a plurality of detection boxes of target recognition, each detection box being associated with a confidence score, category information and a granularity level, the confidence score being used to represent the probability of the corresponding detection box containing a target to be recognized, the category information being used to indicate the category of the target to be recognized in the corresponding detection box, and the granularity level being used to indicate the degree of granularity of the category indicated in the category information; determining the category granularity weight corresponding to each detection box according to the granularity level of each detection box; calculating the comprehensive priority score corresponding to the detection box by weighting processing through the confidence score of each detection box and the corresponding category granularity weight; and performing non-maximum suppression processing on the plurality of detection boxes to retain the detection box with the highest score and suppress the detection box overlapping with the retained detection box by more than a threshold. The above method avoids repeated detection caused by multi-granularity categories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection algorithms in the shipbuilding industry, and in particular to a post-processing method for target detection algorithms. Background Technology

[0002] Currently, in the field of research and development of autonomous navigation systems for ships at sea, target detection algorithms are an important component of the visual perception module. They are mainly used to identify and locate various targets such as ships and navigation marks on the sea surface, so as to realize the ship's autonomous navigation, avoidance decision-making and safe navigation.

[0003] Object detection algorithms are an important part of computer vision. Their function is to identify all objects of interest in an image or video and map the specific location of each object within the image, usually marked as a bounding box. In addition to localization, object detection algorithms also need to classify objects, identifying which category they belong to according to a specific category labeling system.

[0004] To address the issue of duplicate and redundant bounding boxes in object detection and to retain the most likely correct detection result, non-maximum suppression (NVS) is a commonly used post-processing technique in object detection algorithms. Its core idea is to select the bounding box with the highest confidence and suppress other bounding boxes that have a high degree of overlap with it, thereby reducing the redundancy problem of the same object being detected multiple times.

[0005] For example, CN116012630A discloses a ship target detection method, system, and computer equipment, including: acquiring a ship image dataset and converting the labels of the images in the ship image dataset into VOC format labels; performing data augmentation processing on the images in the dataset labels, the data augmentation processing including at least optical transformation, geometric transformation, and noise addition; obtaining multiple sets of prior boxes based on the data-augmented images and using the K-Means algorithm, selecting the set with the highest score as the prior boxes of the ship image dataset; scaling the images in the ship image dataset to a preset size, then dividing the images into several small grids and obtaining offsets; obtaining predicted boxes using the prior boxes and offsets; inputting the image to be detected and the predicted boxes into a fully convolutional network, and performing non-maximum suppression (NMS) based on the intersection-union ratio (IU) and confidence level to filter the predicted boxes, obtaining the final detection result. The above technique is a traditional NMS method, which only targets overlapping detection boxes of the same category.

[0006] However, due to the extremely wide navigation area at sea, the large variation in the distance between the target vessel and the ship's own data acquisition equipment, and the variable sea environment, the image clarity may be affected by weather, leading to the following problems in detection and identification:

[0007] 1. The problem of uncertainty in target feature information

[0008] When the target vessel is very far from the onboard data acquisition equipment, the area occupied by various types of vessels in the acquired image is very small, making it difficult to specifically distinguish the vessel type. However, when the target vessel is relatively close to the onboard vessel, due to the vessel's large inertia and long collision avoidance reaction time, it is necessary to accurately identify the target vessel type in order to avoid dangerous vessel types such as oil tankers and liquefied gas carriers in advance. Therefore, the vessel target detection algorithm needs to support multi-level recognition from coarse-grained to fine-grained. This requires that the category settings include fine-grained specific vessel type labels, while also taking into account situations where the target vessel type cannot be completely determined and only a general vessel type classification can be provided.

[0009] 2. Limitations of traditional algorithms

[0010] Existing ship target detection algorithms primarily categorize ships based on specific ship types, such as "bulk carrier" or "cruise ship," neglecting the need for different levels of recognition granularity. This makes detection difficult when the target is far away at sea or when image features are unclear due to weather conditions. Furthermore, the lack of features during data annotation makes it difficult to identify the specific ship type, significantly hindering the process. In addition, traditional non-maximum suppression methods only address overlapping bounding boxes within the same category, failing to effectively handle duplicate detections across multiple categories. Summary of the Invention

[0011] In view of the shortcomings of the above-mentioned related technologies, the purpose of this invention is to provide a post-processing method for target detection algorithms and an electronic device.

[0012] To achieve the above and other related objectives, this invention provides a post-processing method for a target detection algorithm. The post-processing method includes: acquiring multiple detection boxes for target recognition, wherein each detection box is associated with a confidence score, category information, and granularity level. The confidence score characterizes the probability that the corresponding detection box contains the target to be identified. The category information indicates the category of the target to be identified within the corresponding detection box. The granularity level corresponds to the category information and indicates the fineness of the category indicated in the category information. Based on the granularity level of each detection box, a corresponding category granularity weight is determined, wherein the category granularity weight is positively correlated with the fineness of the granularity level. Using the confidence score and the corresponding category granularity weight of each detection box, a weighted average is performed to calculate a comprehensive priority score corresponding to the corresponding detection box. Based on the comprehensive priority score, non-maximum suppression is performed on the multiple detection boxes to retain the detection box with the highest comprehensive priority score and suppress detection boxes whose overlap with the retained detection boxes exceeds a threshold.

[0013] Optionally, the step of calculating the comprehensive priority score corresponding to each detection box using the confidence score of each detection box and the corresponding category granularity weight includes: calculating the product of the confidence score of each detection box corresponding to the target to be identified and the corresponding category granularity weight to obtain multiple comprehensive priority scores corresponding to each detection box; the step of performing non-maximum suppression processing on multiple detection boxes based on the comprehensive priority scores includes: sorting the multiple comprehensive priority scores from highest to lowest to obtain an ordered queue; determining the detection box corresponding to the first score in the ordered queue as a retained box; determining the intersection-union ratio (IUR) between the detection boxes corresponding to each of the remaining scores in the ordered queue (excluding the first score) and the retained boxes; if it is confirmed that the IUR between the detection boxes and the retained boxes is greater than the overlap threshold, then determining to delete the detection box corresponding to the IUR.

[0014] Optionally, the granularity level is divided into coarse-grained, medium-grained, and fine-grained. Coarse-grained corresponds to the "ship" category in the category information, medium-grained corresponds to ships classified by using attributes in the category information, and fine-grained corresponds to ships of specific ship types in the category information.

[0015] Optionally, the ships classified by using attributes include cargo ships and passenger ships, and the specific ship types include bulk carriers and oil tankers.

[0016] Optionally, the category granularity weights are: coarse-grained < medium-grained < fine-grained.

[0017] Optionally, the step of calculating the comprehensive priority score using the confidence score of each detection box and the corresponding category granularity weight is as follows: based on the actual use scenario, construct a functional relationship between the comprehensive priority score, the confidence score, and the category granularity weight.

[0018] Optionally, the functional relationship between the overall priority score, confidence score, and category granularity weight is: Overall priority score = Confidence score · Category granularity weight.

[0019] Optionally, the post-processing method further includes: recording the suppressed detection boxes as "processed", selecting the detection box with the highest comprehensive score again from the remaining detection boxes that are not marked as retained boxes or "processed", and repeating the above steps until all detection boxes are processed.

[0020] Optionally, the overlap is measured using the crossover-union ratio.

[0021] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, can implement the method described above.

[0022] As described above, the post-processing method and electronic device of the target detection algorithm of the present invention have the following beneficial effects: Traditional non-maximum suppression methods are based solely on the confidence ranking of detection boxes, which cannot meet the preference requirements for fine-grained categories in multi-granularity category detection. The present invention, by introducing category granularity weights, increases the priority of fine-grained category detection boxes, retaining more valuable fine-grained category boxes in the detection results, thereby reducing the problem of the same target being repeatedly detected by multiple granularity level categories. This method effectively improves the accuracy of the detection results and avoids repeated detection caused by multiple granularity categories. Attached Figure Description

[0023] Figure 1 The flowchart shown is a post-processing method of the target detection algorithm in an embodiment of the present invention.

[0024] Figure 2 The diagram shows the category information division for target detection in an embodiment of the present invention. Detailed Implementation

[0025] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.

[0026] In the detailed description of embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged and not to scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0027] For ease of description, spatial relation terms such as “below,” “under,” “lower than,” “below,” “above,” and “upper” may be used herein to describe the relationship between one element or feature shown in the accompanying drawings and other elements or features. It will be understood that these spatial relation terms are intended to include directions other than those depicted in the drawings for the device in use or operation. Furthermore, when a layer is referred to as being “between” two layers, it can be the only layer between the two layers, or there may be one or more layers in between. The phrase “between” as used herein includes both endpoint values.

[0028] In the context of this application, the structure described above the first feature may include embodiments in which the first and second features are formed in direct contact, or embodiments in which additional features are formed between the first and second features, such that the first and second features may not be in direct contact.

[0029] It should be noted that the illustrations provided in this embodiment are only schematic representations of the basic concept of the present invention. Therefore, the illustrations only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0030] like Figure 1 and Figure 2 As shown, this embodiment provides a post-processing method for a target detection algorithm, the specific steps of which include:

[0031] S1. Obtain multiple detection boxes for the same target to be identified. Each detection box is associated with a confidence score, category information, and granularity level. The confidence score represents the probability that the detection box contains the target; the category information indicates the category of the target within the detection box; and the granularity level corresponds to the category information and indicates the fineness of the category.

[0032] In this implementation, the detection box is represented as , Let be the total number of bounding boxes, and let be the confidence level of each bounding box. .

[0033] The category information and granularity levels for object detection are as follows:

[0034] Level L1 (Coarse-grained): Includes only the "Vessel" category. When a vessel target is extremely far away, it can only be identified as a vessel without obtaining further valid features. In this case, a coarse-grained "Vessel" category can be set to ensure the completeness of the vessel category label and distinguish vessels from other types of surface targets. This can be understood as the target vessel's features being extremely vague, only able to distinguish it from other floating objects, and unable to be further identified; therefore, it is labeled as a "Vessel" at Level L1.

[0035] Level L2 (Medium Granularity): Includes categories such as "cargo ship" and "passenger ship". Primarily used for situations where the specific category of a vessel cannot be identified, but its purpose can be determined from its general outline. In other words, the characteristics of the target vessel are somewhat vague, but its usage can be roughly distinguished from its external shape; in such cases, it is labeled according to the Level L2 category.

[0036] Level L3 (Fine-grained): Includes specific ship types, such as "bulk carrier" and "oil tanker," used for high-precision identification when features are clear. It can be understood as, at the data annotation level, for ships in the image whose features are very clear and whose specific ship type can be identified, they are labeled according to the Level L3 type.

[0037] The detected target categories are represented as follows: ,and The granularity level corresponding to the category is .

[0038] S2. Determine the corresponding category granularity weight based on the granularity level of each detection box, wherein the category granularity weight is positively correlated with the fineness of the granularity level.

[0039] In this embodiment, the category granularity weight of each detection box is denoted as: , ,in, .

[0040] S3. Calculate the overall priority score by weighting the confidence score of each detection box with the corresponding category granularity weight.

[0041] In this embodiment, the overall priority score refers to the confidence-weighted value. , Each detection box will have a corresponding score. This is a weighting function, which can be selected according to the actual use case. Here, it can be simply set to... .

[0042] S4. Based on the comprehensive priority score, perform non-maximum suppression processing on multiple detection boxes to retain the detection box with the highest comprehensive priority score and suppress other detection boxes whose overlap with the detection box exceeds a threshold.

[0043] All detection boxes are sorted from high to low according to their comprehensive priority scores to obtain an ordered queue. First, the detection box with the highest weighted value is selected as the reserved box, that is, the detection box corresponding to the first score in the ordered queue is determined as the reserved box. Then, the overlap between the reserved box and other detection boxes is calculated. The overlap is usually measured by the intersection-union ratio (IoU). If the IoU value is higher, it means that the degree of overlap between the reserved box and the detection box is greater.

[0044] After the overlap between the retained bounding box and all remaining detection boxes is compared, if the overlap exceeds the set threshold, the detection box is suppressed, that is, removed from the ordered queue and recorded as "processed". The finally retained bounding box is the detection box corresponding to the ship identification.

[0045] If multiple vessels need to be identified, multiple iterative calculations are required. Among the remaining unmarked bounding boxes and those not marked as "retained" or "processed," the bounding box with the highest overall score is selected again, and the above steps are repeated to obtain more retaining boxes until all bounding boxes have been processed. After this iterative calculation, multiple retaining boxes will be obtained, each corresponding to one identified vessel.

[0046] This embodiment also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement the above-described method when executing the computer program.

[0047] This invention addresses the uncertainty of feature information for maritime targets at different distances by classifying ship target detection into three granularity levels. At long distances or in poor visual conditions, basic identification can be achieved using coarse-grained categories (e.g., L1 "ship"). At medium distances or when some features are discernible, more detailed classification is performed using medium-grained categories (e.g., L2 "cargo ship"). And at close range or when features are clear, high-precision target identification is achieved using fine-grained categories (e.g., L3 "bulk carrier"). This hierarchical category design ensures robustness of detection and meets the identification needs of different scenarios.

[0048] Traditional nonmaximum suppression methods rely solely on the confidence ranking of bounding boxes, failing to meet the preference requirements for fine-grained categories in multi-granularity category detection. This invention introduces category granularity weights, increasing the priority of fine-grained category bounding boxes and retaining more valuable fine-grained category boxes in the detection results. This reduces the problem of the same target being repeatedly detected by multiple granularity levels of categories. This method effectively improves the accuracy of detection results and avoids duplicate detections caused by multiple granularity categories.

[0049] By using a weighted function that combines category granularity weights with confidence levels for sorting, this invention achieves a better balance between confidence levels and granularity levels. In practical applications, this weighting mechanism gives higher priority to detection boxes of fine-grained categories when they have the same confidence level, thus better meeting the needs for fine-grained recognition in real-world scenarios.

[0050] The multi-granularity category design and weighted nonmaximum suppression method of this invention have good scalability and can adapt to different autonomous navigation scenarios at sea. Especially in practical applications where the target distance varies greatly and weather conditions are complex, it can still maintain high detection accuracy and robustness.

[0051] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A post-processing method for a target detection algorithm, characterized in that, The post-processing method includes: Multiple detection boxes for target recognition are obtained, wherein each detection box is associated with a confidence score, category information and granularity level. The confidence score is used to characterize the probability that the corresponding detection box contains the target to be identified. The category information is used to indicate the category of the target to be identified in the corresponding detection box. The granularity level corresponds to the category information and is used to indicate the fineness of the category indicated in the category information. Based on the granularity level of each detection box, the corresponding category granularity weight is determined, wherein the category granularity weight is positively correlated with the fineness of the granularity level. By using the confidence score of each detection box and the corresponding category granularity weight, a weighted average is performed to calculate the comprehensive priority score corresponding to the detection box. Based on the comprehensive priority score, non-maximum suppression is performed on multiple detection boxes to retain the detection box with the highest comprehensive priority score and suppress detection boxes whose overlap with the retained detection boxes exceeds a threshold.

2. The post-processing method of the target detection algorithm as described in claim 1, characterized in that: The step of using the confidence score of each detection box and the corresponding category granularity weight to calculate the comprehensive priority score corresponding to the corresponding detection box includes: calculating the product of the confidence score of each detection box corresponding to the target to be identified and the corresponding category granularity weight to obtain multiple comprehensive priority scores corresponding to each detection box. The step of performing non-maximum suppression processing on multiple detection boxes based on the comprehensive priority score includes: sorting the multiple comprehensive priority scores from highest to lowest to obtain an ordered queue; identifying the detection box corresponding to the first score in the ordered queue as a retained box; determining the intersection-union ratio (IUR) between the detection boxes corresponding to each of the remaining scores in the ordered queue (excluding the first score) and the retained boxes; and deleting the detection box corresponding to the IUR if the IUR is confirmed to be greater than an overlap threshold.

3. The post-processing method of the target detection algorithm according to claim 1, characterized in that: The granularity levels are divided into coarse-grained, medium-grained, and fine-grained. Coarse-grained corresponds to the "ship" category in the category information, medium-grained corresponds to ships classified by attributes in the category information, and fine-grained corresponds to ships of specific ship types in the category information.

4. The post-processing method of the target detection algorithm according to claim 3, characterized in that: The ships categorized by attributes include cargo ships and passenger ships, and the specific ship types include bulk carriers and oil tankers.

5. The post-processing method of the target detection algorithm according to claim 3, characterized in that: The category granularity weights are: coarse-grained < medium-grained < fine-grained.

6. The post-processing method of the target detection algorithm according to claim 1, characterized in that: The step of calculating the comprehensive priority score by using the confidence score of each detection box and the corresponding category granularity weight is as follows: Based on the actual use scenario, construct a functional relationship between the comprehensive priority score, the confidence score, and the category granularity weight.

7. The post-processing method of the target detection algorithm according to claim 6, characterized in that: The functional relationship between the overall priority score, confidence score, and category granularity weight is: Overall Priority Score = Confidence Score · Category Granularity Weight.

8. The post-processing method of the target detection algorithm according to claim 1, characterized in that: The post-processing method further includes: recording the suppressed detection boxes as "processed", selecting the detection box with the highest comprehensive score from the remaining detection boxes that are not marked as retained boxes or "processed", and repeating the above steps until all detection boxes are processed.

9. The post-processing method of the target detection algorithm according to claim 1, characterized in that: The degree of overlap is measured using the crossover-union ratio.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it can implement the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Ship target detection method and system and computer equipment

    CN116012630A