A target detection post-processing method and system applied to a traffic scene
By acquiring and analyzing the spatial structure distribution attribute information and reweighted optimal correction cost value of multiple sets of target detection results, this paper solves the problems of detection bias and slow accuracy and poor versatility of existing target detection post-processing methods under non-uniform target density conditions, and achieves high-precision and universal target detection post-processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INTELLIGENT INTER CONNECTION TECH CO LTD
- Filing Date
- 2023-08-31
- Publication Date
- 2026-06-12
AI Technical Summary
Existing post-processing methods for object detection suffer from detection bias when the object density distribution within the dataset is uneven, and Transformer-based models suffer from slow accuracy and poor versatility.
By acquiring the spatial structure distribution attribute information of multiple sets of target detection results, the optimal target matching result in the image, and the optimal reweighted correction cost value, it is determined whether the detection results need to be corrected, and then merged and updated to improve detection accuracy and versatility.
It improves the effective recall rate in dense target distribution areas, suppresses false detection output, and achieves plug-and-play high-precision post-processing, which is applicable to existing target detection algorithms.
Smart Images

Figure CN117274922B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent parking management, and in particular to a target detection post-processing method and system applied to traffic scenarios. Background Technology
[0002] Object detection is a fundamental and crucial task among various visual tasks. High-precision detection results provide essential input data support for subsequent visual tasks and logical algorithm design. Currently, post-processing algorithms based on Non-Maximum Suppression (NMS) are commonly used. However, NMS-based post-processing techniques also have certain drawbacks. For example, when the variance of the object density distribution in the dataset is large, a single NMS threshold setting can cause detection bias. If the threshold is too high, redundant detections will occur; conversely, false negatives will occur. Another approach is to use object detection models based on the Transformer architecture. These models can provide end-to-end inference capabilities and avoid the use of post-processing algorithms. However, these models suffer from issues such as slow model accuracy, convergence speed, and inference speed. Furthermore, using these models requires retraining, making it difficult to adapt to existing algorithms in current business applications to quickly improve model performance, resulting in poor versatility. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a target detection post-processing method and system applicable to traffic scenarios, which can solve the problems of low detection accuracy and poor versatility in existing target detection post-processing methods.
[0004] To achieve the above objectives, in one aspect, the present invention provides a target detection post-processing method applied to traffic scenarios, the method comprising:
[0005] Based on different groups of prediction probability thresholds and prediction box overlap thresholds, obtain multiple groups of target detection results for each image;
[0006] Based on multiple sets of target detection results corresponding to each image, obtain the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal correction cost value of reweighting, and the maximum inverse offset parameter of the unmatched target in the image;
[0007] Based on the image reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets, determine whether the image needs to correct the detection results.
[0008] If so, the corrected sets of target detection results will be merged and updated.
[0009] Furthermore, the step of obtaining the maximum inverse offset parameter of the unmatched target in the image based on multiple sets of target detection results corresponding to each image includes:
[0010] Based on multiple sets of target detection results corresponding to each image, obtain the successfully matched target sequence, the unsuccessfully matched target sequence, and the number of unmatched targets;
[0011] The maximum inverse offset parameter of unmatched targets in the image is obtained based on the successfully matched target sequences, the unsuccessfully matched target sequences, and the number of unmatched targets.
[0012] Furthermore, the step of obtaining the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal reweighted correction cost value, and the maximum inverse offset parameter of the unmatched target in the image based on the multiple sets of target detection results corresponding to each image includes:
[0013] Based on the multiple sets of target detection results corresponding to each image, we obtain various spatial structure distribution attribute information, target matching matrix, and target correction cost matrix for each detected target.
[0014] Based on the target matching matrix and the target correction cost matrix, update the correction cost weighting matrix, and obtain the unmatched target sequences and corresponding target types between different groups of detection results, the target sequences and corresponding target correction cost values that are successfully matched between different groups of detection results and are greater than the threshold, the corresponding target types, and the corresponding weighting matrix values of all successfully matched targets.
[0015] Update the unmatched sequence, matched sequence, target matching matrix, and weighted matrix based on the low-quality matching target sequence and type sequence;
[0016] Based on the target matching matrix, target correction cost matrix, weighting matrix, and algorithm hyperparameters, calculate the reweighted optimal correction cost value of the image.
[0017] Further, the step of determining whether the image needs to be corrected based on the reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets includes:
[0018] When the visual center of the image at the location of the unmatched target is offset by a preset threshold, the image is reweighted to the optimal correction cost value.
[0019] If the number of unmatched targets is greater than zero and the optimal correction cost of image reweighting is greater than the filtering threshold, then the detection results need to be corrected.
[0020] Furthermore, the step of merging and updating the corrected sets of target detection results includes:
[0021] Configure the initial detection results as the target detection boxes that were successfully matched in the first group of target detection results;
[0022] The initial detection results are updated by using the unmatched detection results from other groups of target detection results besides the first group of target detection results;
[0023] The detection results that failed to match in the first set of target detection results are used to update the initial detection results a second time.
[0024] On the other hand, the present invention provides a target detection post-processing system applied to traffic scenarios. The system includes: an acquisition unit, used to acquire multiple sets of target detection results corresponding to each image based on different sets of prediction probability thresholds and prediction box overlap thresholds;
[0025] The acquisition unit is also used to acquire, based on multiple sets of target detection results corresponding to each image, the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal reweighted correction cost value, and the maximum inverse offset parameter of the unmatched target in the image;
[0026] The judgment unit is used to determine whether the image needs to be corrected based on the image reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets.
[0027] The merge update unit is used to merge and update multiple sets of target detection results if the condition is met.
[0028] Furthermore, the acquisition unit is specifically used to acquire the sequence of successfully matched targets, the sequence of unsuccessfully matched targets, and the number of unmatched targets based on multiple sets of target detection results corresponding to each image; and to acquire the maximum inverse offset parameter of unmatched targets in the image based on the sequence of successfully matched targets, the sequence of unsuccessfully matched targets, and the number of unmatched targets.
[0029] Furthermore, the acquisition unit is specifically used to acquire, based on the multiple sets of target detection results corresponding to each image, various spatial structure distribution attribute information, target matching matrix, and target correction cost matrix corresponding to each detected target; update the correction cost weighting matrix based on the target matching matrix and the target correction cost matrix; and acquire, respectively, the unmatched target sequences and corresponding target types between different sets of detection results, the target sequences and corresponding target types that are successfully matched between different sets of detection results and whose corresponding target correction cost value is greater than a threshold, and the corresponding weighting matrix values of all successfully matched targets; update the unmatched sequences, matched sequences, target matching matrix, and weighting matrix based on the low-quality matched target sequences and type sequences; and calculate the reweighted optimal correction cost value of the image based on the target matching matrix, target correction cost matrix, weighting matrix, and algorithm hyperparameters.
[0030] Furthermore, the judgment unit is specifically used to reweight the image to the optimal correction cost value when the position offset of the acquired unmatched target from the visual center of the image is greater than a preset threshold; if the number of unmatched targets is greater than zero and the reweighted optimal correction cost value of the image is greater than the filtering threshold, then the detection result needs to be corrected.
[0031] Furthermore, the merge update unit is specifically used to configure the initial detection result as the target detection box that was successfully matched in the first group of target detection results; update the initial detection result with the detection results that were not successfully matched in other groups of target detection results outside the first group of target detection results; and perform a second update on the updated initial detection result with the detection results that were not successfully matched in the first group of target detection results.
[0032] This invention provides a target detection post-processing method and system applied to traffic scenarios. It performs pairing analysis based on existing target detection model results, combining spatial structure distribution attributes of each target from multiple target detection model results, optimal target matching results within the image, reweighted optimal correction cost value, and the maximum inverse offset parameter of unmatched targets in the image. Then, based on the analysis results, it filters target images that need correction, thereby improving the effective recall rate of densely distributed target areas in the image, suppressing false detections, improving post-processing accuracy, and allowing direct integration into existing target detection algorithm post-processing, achieving plug-and-play functionality and enhancing the versatility of existing post-processing algorithms. Attached Figure Description
[0033] Figure 1 This is a flowchart of a target detection post-processing method applied to traffic scenarios provided by the present invention;
[0034] Figure 2 This is a schematic diagram of the structure of a target detection post-processing system applied to traffic scenarios provided by the present invention. Detailed Implementation
[0035] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0036] like Figure 1 As shown in the figure, an embodiment of the present invention provides a target detection post-processing method applied to traffic scenarios, which includes the following steps:
[0037] 101. Based on different prediction probability thresholds and prediction box overlap thresholds, obtain multiple sets of target detection results for each image.
[0038] For example, select a high-quality object detection model (such as YOLOv5) trained for traffic scenarios. For the post-processing parameters thr_list = [score_thr, nms_thr] (which are the prediction probability threshold score_thr and the NMS bounding box overlap threshold nms_thr, respectively), select two sets of values, such as thr_list1 = [0.3, 0.4] and thr_list2 = [0.5, 0.7]. Perform post-processing operations on the direct output of the object detection model to obtain two sets of detection results det1 and det2 for each image, where the number of detected objects in det1 and det2 are num1 and num2, respectively.
[0039] 102. Based on the multiple sets of target detection results corresponding to each image, obtain the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal correction cost value of reweighting, and the maximum inverse offset parameter of the unmatched target in the image.
[0040] Specifically, based on multiple sets of target detection results corresponding to each image, the sequence of successfully matched targets, the sequence of unsuccessfully matched targets, and the number of unmatched targets are obtained; based on the sequence of successfully matched targets, the sequence of unsuccessfully matched targets, and the number of unmatched targets, the maximum inverse offset parameter of unmatched targets in the image is obtained. Further, the step of obtaining the spatial structure distribution attribute information of each target, the optimal matching result of the target within the image, the reweighted optimal correction cost value, and the maximum inverse offset parameter of the unmatched target in the image based on the multiple sets of target detection results corresponding to each image includes: obtaining multiple spatial structure distribution attribute information, target matching matrix, and target correction cost matrix corresponding to each detected target based on the multiple sets of target detection results corresponding to each image; updating the correction cost weighting matrix based on the target matching matrix and the target correction cost matrix, and obtaining the unmatched target sequence and corresponding target type between different sets of detection results, the target sequence and corresponding target type that are successfully matched between different sets of detection results and whose target correction cost value is greater than a threshold, and the corresponding weighting matrix value of all successfully matched targets; updating the unmatched sequence, matched sequence, target matching matrix, and weighting matrix based on the low-quality matched target sequence and type sequence; and calculating the reweighted optimal correction cost value of the image based on the target matching matrix, target correction cost matrix, weighting matrix, and algorithm hyperparameters.
[0041] For example, still selecting the above two sets of detection results, step 102.1: For the two sets of detection results det1 and det2, calculate the two spatial structure distribution attribute information obj_attr_p and obj_attr_ap for each detected target. The calculation method is as follows: According to the image size information img_size=[w,h], for the target detection box coordinate value box=[x1,y1,x2,y2] obtained for each set of detection results, calculate the normalized distance dist to the center point of the image and the normalized detection box area ss of the image size. The specific calculation formula is: dist=sqrt(((x1+x2) / w-1)^2+((y1+y2) / h-1)^2);
[0042] ss=(x2-x1) / w*(y2-y1) / h. Using the target normalized distance dist, calculate the target spatial position inverse offset parameter obj_attr_p=1 / dist; using the target normalized distance dist and the normalized detection box area ss, calculate the target spatial distribution importance parameter obj_attr_ap=((ss / mean(ss)) / ((dist / mean(dist)).
[0043] Step 102.2: Using the two sets of detection results det1 and det2, obtain the target matching matrix P and the target correction cost matrix M. For the specific calculation method, refer to the Optimal Correction Cost for Object Detection Evaluation (CVPR2022). In order to adapt to the current algorithm requirements, the algorithm hyperparameters alpha = 0.9 and beta = alpha * 0.2 are set to focus on the detection box position offset information.
[0044] Step 102.3: Using the target matching matrix P and target correction cost matrix M obtained in the above steps, update the correction cost weighting matrix W (size is the same as P, initialized as a 0 matrix), and obtain the following three types of data respectively: for det1 relative to det2, the unmatched target sequences fn_objids and the corresponding target types fn_objids_cls, update the corresponding matrix values W[i,num2] = obj_attr_ap1[i] (i belongs to fn_objids), and use the obj_attr_p1 attribute to obtain the maximum value max_fn_weight of the image target ID belonging to fn_objids; for det2 relative to det1, the unmatched target sequences fp_objids and the corresponding target types fp_objids_cls, update the corresponding ..., the unmatched target sequences fp_objids and the corresponding target types fp_objids_cls, update the corresponding values W[i,num2] = obj_attr_ap1[i] (i belongs to fn_objids), update the corresponding values W[i,num2] = obj_attr_ap1[i] (i belongs to fn_objids), update the corresponding values W[i,num2 The matrix value W[num1,i] = obj_attr_ap2[i] (i belongs to fp_objids) is obtained, and the maximum value max_fp_weight of the image target ID belonging to fp_objids is obtained using the obj_attr_p2 attribute; the target sequences that successfully match det1 and det2 (mtc_objids) but whose corresponding target correction cost is greater than the threshold are: gt_badids, pd_badids, and the corresponding target types gt_badids_cls, pd_badids_cls; and the corresponding weighted matrix value W[i,j] = (obj_attr_ap1[i] + obj_attr_ap2[j]) / 2 (i,j belongs to mtc_objids).
[0045] Step 102.4: Based on the low-quality matching target sequence and its type sequence gt_badids, pd_badids, gt_badids_cls, pd_badids_cls, update the unmatched sequence fn_objids, fp_objids and the matched sequence mtc_objids, the target matching matrix P and the weighting matrix W. The specific calculation method is as follows: If the target types of the low-quality matching pairs are inconsistent (gt_badids_cls[i] != pd_badids_cls[i]), then add the target gt_badids[i] to the fn_objids sequence and add the target pd_badids[i] to the fp_objids sequence respectively. Calculate fn_num = len(fn_objids) and fp_num = len(fp_objids). Update the maximum inverse offset parameters max_fn_weight and max_fp_weight of the unmatched targets in the image.
[0046] Update matrix M:
[0047] W[gt_badids[i],num2]=obj_attr_ap1[gt_badids[i]],
[0048] W[num1,pd_badids[i]]=obj_attr_ap2[pd_badids[i]],
[0049] W[gt_badids[i],pd_badids[i]]=0.0;
[0050] And update matrix P:
[0051] P[gt_badids[i],num2]=1.0
[0052] P[num1,pd_badids[i]]=1.0,
[0053] P[gt_badids[i],pd_badids[i]]=0.0.
[0054] Step 102.5: Using the target matching matrix P, target correction cost matrix M, and weighting matrix W calculated above, as well as the algorithm hyperparameter beta, calculate the reweighted optimal correction cost value of the image: rewgt_otc = sum(M((PW) / sum(P))) / beta.
[0055] 103. Based on the image reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets, determine whether the image needs to correct the detection results.
[0056] Specifically, when the position offset of the acquired unmatched target from the visual center of the image is greater than a preset threshold, the image is reweighted to the optimal correction cost value; if the number of unmatched targets is greater than zero and the reweighted optimal correction cost value of the image is greater than the filtering threshold, the detection result needs to be corrected.
[0057] For example, step 103.1: When the obtained unmatched target position is sufficiently offset from the visual center of the image, reset rewgt_otc to the minimum value min_cost = min(rewgt_otc_thr1, rewgt_otc_thr2), where rewgt_otc_thr1 and rewgt_otc_thr2 are both screening thresholds, and any one of the following conditions can be satisfied: If fp_num == 0 and fn_num > 0 and max_fn_weight < thr; If fn_num == 0 and fp_num > 0 and max_fp_weight < thr; fn_num > 0 and max_fn_weight < thr and fp_num > 0 and max_fp_weight < thr;
[0058] Step 103.2: Initialize if_badcase = 0. If any one of the following conditions is satisfied, it is determined that the image needs to correct the detection result, and update if_badcase = 1: fn_num > 0 and rewgt_otc > rewgt_otc_thr1; fp_num > 0 and rewgt_otc > rewgt_otc_thr2.
[0059] 104. If so, merge and update the corrected multiple sets of object detection results.
[0060] Specifically, configure the initial detection result as the successfully paired object detection boxes in the first set of object detection results; update the initial detection result with the unmatched detection results in the other sets of object detection results except the first set of object detection results; and perform a secondary update on the updated initial detection result with the detection results that are not successfully paired in the first set of object detection results.
[0061] For example, step 104.1: Initialize the detection result det_new as the successfully paired object detection boxes in det1 using the successfully matched target sequence mtc_objids screened in the above steps;
[0062] Step 104.2: Screen the unmatched detection results in det2 to update det_new: First, sort the detection boxes corresponding to fp_objids in descending order of the predicted probability value, and then judge the type and position correlation of each target with all the detection targets in det_new one by one, and eliminate the targets that do not meet the predicted probability threshold and physical distribution correlation (such as unreasonable inclusion relationships generated according to the predicted type or excessive overlap and morphological consistency with the existing object detection boxes in det_new), and add the targets that meet the conditions to the det_new sequence;
[0063] Step 104.3: Filter out unmatched detection results in det1 and update det_new. The steps are the same as those above. Finally, output the corrected detection result det_new.
[0064] This invention provides a target detection post-processing method for traffic scenarios. It performs pairing analysis based on existing target detection model results, combining spatial structure distribution attributes of each target from multiple target detection model results, the optimal target matching result within the image, the reweighted optimal correction cost value, and the maximum inverse offset parameter of unmatched targets in the image. Then, based on the analysis results, it filters target images that need correction, thereby improving the effective recall rate of densely distributed target areas in the image, suppressing false detections, and improving the accuracy of post-processing. Furthermore, it can be directly configured into existing target detection algorithm post-processing, achieving plug-and-play functionality and improving the versatility of existing post-processing algorithms.
[0065] To implement the method provided in the embodiments of the present invention, the embodiments of the present invention provide a target detection post-processing system applied to traffic scenarios, such as... Figure 2 As shown, the system includes: an acquisition unit 21, a judgment unit 22, and a merging and updating unit 23.
[0066] The acquisition unit 21 is used to acquire multiple sets of target detection results for each image based on different groups of prediction probability thresholds and prediction box overlap thresholds.
[0067] The acquisition unit 21 is also used to acquire, based on the multiple sets of target detection results corresponding to each image, the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal correction cost value of the reweighted target, and the maximum inverse offset parameter of the unmatched target in the image;
[0068] Judgment unit 22 is used to determine whether the image needs to be corrected based on the image reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets;
[0069] The merge update unit 23 is used to merge and update the corrected sets of target detection results if the condition is met.
[0070] Furthermore, the acquisition unit 21 is specifically used to acquire the sequence of successfully matched targets, the sequence of unsuccessfully matched targets, and the number of unmatched targets based on the multiple sets of target detection results corresponding to each image; and to acquire the maximum inverse offset parameter of the unmatched targets in the image based on the sequence of successfully matched targets, the sequence of unsuccessfully matched targets, and the number of unmatched targets.
[0071] Furthermore, the acquisition unit 21 is specifically used to acquire, based on the multiple sets of target detection results corresponding to each image, various spatial structure distribution attribute information, target matching matrix, and target correction cost matrix corresponding to each detected target; update the correction cost weighting matrix based on the target matching matrix and the target correction cost matrix; and acquire, respectively, the unmatched target sequence and corresponding target type between different sets of detection results, the target sequence and corresponding target type that are successfully matched between different sets of detection results and whose target correction cost value is greater than a threshold, and the corresponding weighting matrix value of all successfully matched targets; update the unmatched sequence, matched sequence, target matching matrix, and weighting matrix based on the low-quality matched target sequence and type sequence; and calculate the reweighted optimal correction cost value of the image based on the target matching matrix, target correction cost matrix, weighting matrix, and algorithm hyperparameters.
[0072] Furthermore, the judgment unit 22 is specifically used to reweight the image to the optimal correction cost value when the position offset of the acquired unmatched target from the visual center of the image is greater than a preset threshold; if the number of unmatched targets is greater than zero and the reweighted optimal correction cost value of the image is greater than the filtering threshold, then the detection result needs to be corrected.
[0073] Furthermore, the merging and updating unit 23 is specifically used to configure the initial detection result as the target detection box that was successfully matched in the first group of target detection results; update the initial detection result with the detection results that were not successfully matched in other groups of target detection results outside the first group of target detection results; and update the updated initial detection result a second time with the detection results that were not successfully matched in the first group of target detection results.
[0074] This invention provides a target detection post-processing system for traffic scenarios. It performs pairing analysis based on existing target detection model results, combining spatial structure distribution attributes of each target from multiple target detection model results, optimal target matching results within the image, reweighted optimal correction cost values, and the maximum inverse offset parameter of unmatched targets in the image. Then, based on the analysis results, it filters target images that need correction, thereby improving the effective recall rate of densely distributed target areas in the image, suppressing false detections, and improving the accuracy of post-processing. Furthermore, it can be directly configured into existing target detection algorithm post-processing, achieving plug-and-play functionality and improving the versatility of existing post-processing algorithms.
[0075] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.
[0076] In the above detailed description, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features of the single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, wherein each claim stands alone as a preferred embodiment of the invention.
[0077] The disclosed embodiments have been described above to enable any person skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments without departing from the spirit and scope of this disclosure. Therefore, this disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.
[0078] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."
[0079] Those skilled in the art will also understand that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention can be implemented by electronic hardware, computer software, or a combination of both. To clearly demonstrate the interchangeability of hardware and software, the functions of the various illustrative components, units, and steps described above have been generally described. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functions using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of the present invention.
[0080] The various illustrative logic blocks or units described in the embodiments of this invention can be implemented or operate the described functions using a general-purpose processor, digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor; alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented using a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0081] The steps of the methods or algorithms described in the embodiments of this invention can be directly embedded in hardware, a software module executed by a processor, or a combination of both. The software module can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and storage medium can be housed in an ASIC, which can be housed in a user terminal. Optionally, the processor and storage medium can also be housed in different components of the user terminal.
[0082] In one or more exemplary designs, the functions described in the embodiments of the present invention can be implemented in hardware, software, firmware, or any combination of these three. If implemented in software, these functions can be stored on a computer-readable medium or transmitted on a computer-readable medium in the form of one or more instructions or code. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one place to another. Storage media can be any available media that can be accessed by a general-purpose or special-purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program code in the form of instructions or data structures and other forms that can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Furthermore, any connection can be suitably defined as a computer-readable medium, for example, if the software is transmitted from a website, server or other remote resource via a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wirelessly, such as infrared, wireless and microwave, it is also included in the defined computer-readable medium. The disks and discs mentioned include compressed disks, laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs. Disks typically copy data magnetically, while disks typically copy data optically using lasers. Combinations of the above can also be contained in computer-readable media.
[0083] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A target detection post-processing method applied to traffic scenarios, characterized in that, The method includes: Based on different prediction probability thresholds and prediction box overlap thresholds, obtain multiple sets of target detection results for each image; Based on multiple sets of target detection results corresponding to each image, obtain the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal correction cost value of reweighting, and the maximum inverse offset parameter of the unmatched target in the image; Based on the image reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets, determine whether the image needs to correct the detection results. If so, the corrected sets of target detection results will be merged and updated. The steps of obtaining the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal reweighted correction cost value, and the maximum inverse offset parameter of the unmatched target in the image based on the multiple sets of target detection results corresponding to each image include: Based on the multiple sets of target detection results corresponding to each image, we obtain various spatial structure distribution attribute information, target matching matrix, and target correction cost matrix for each detected target. Based on the target matching matrix and the target correction cost matrix, update the correction cost weighting matrix, and obtain the unmatched target sequences and corresponding target types between different groups of detection results, the target sequences that are successfully matched between different groups of detection results and whose corresponding target correction cost is greater than the threshold, the low-quality matched target sequences, and the corresponding weighting matrix values of all successfully matched targets. Update the unmatched sequence, matched sequence, target matching matrix, and weighted matrix based on the low-quality matching target sequence and type sequence; Based on the target matching matrix, target correction cost matrix, weighting matrix, and algorithm hyperparameters, calculate the reweighted optimal correction cost value of the image.
2. The target detection post-processing method applied to traffic scenarios according to claim 1, characterized in that, The step of obtaining the maximum inverse offset parameter of the unmatched target in the image based on multiple sets of target detection results corresponding to each image includes: Calculate the spatial structure distribution attribute information of multiple sets of target detection results for each image.
3. The target detection post-processing method applied to traffic scenarios according to claim 1, characterized in that, The step of determining whether the image needs to be corrected based on the reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets includes: When the visual center of the image at the location of the unmatched target is offset by a preset threshold, the image is reweighted to the optimal correction cost value. If the number of unmatched targets is greater than zero and the optimal correction cost of image reweighting is greater than the filtering threshold, then the detection results need to be corrected.
4. The target detection post-processing method applied to traffic scenarios according to claim 1, characterized in that, The step of merging and updating the corrected sets of target detection results includes: Configure the initial detection results as the target detection boxes that were successfully matched in the first group of target detection results; The initial detection results are updated with the detection results that did not match successfully in the second set of target detection results; The detection results that failed to match in the first set of target detection results are used to update the initial detection results a second time.
5. A target detection post-processing system applied in traffic scenarios, characterized in that, The system includes: The acquisition unit is used to acquire multiple sets of target detection results for each image based on different groups of prediction probability thresholds and prediction box overlap thresholds. The acquisition unit is also used to acquire, based on multiple sets of target detection results corresponding to each image, the spatial structure distribution attribute information of each target, the optimal matching result of the target in the image, the optimal reweighted correction cost value, and the maximum inverse offset parameter of the unmatched target in the image; The judgment unit is used to determine whether the image needs to be corrected based on the image reweighted optimal correction cost value, the number of unmatched targets, and the maximum inverse offset parameter of the unmatched targets. The merge update unit is used to merge and update multiple sets of corrected target detection results if the condition is met. The acquisition unit is further configured to acquire, based on multiple sets of target detection results corresponding to each image, various spatial structure distribution attribute information, target matching matrix, and target correction cost matrix corresponding to each detected target; update the correction cost weighting matrix based on the target matching matrix and the target correction cost matrix; and acquire, respectively, unmatched target sequences and low-quality matched target sequences between different sets of detection results, target sequences that are successfully matched between different sets of detection results and whose corresponding target correction cost value is greater than a threshold, the corresponding target types, and the corresponding weighting matrix values of all successfully matched targets; update the unmatched sequences, matched sequences, target matching matrix, and weighting matrix based on the low-quality matched target sequences and type sequences; and calculate the reweighted optimal correction cost value of the image based on the target matching matrix, target correction cost matrix, weighting matrix, and algorithm hyperparameters.
6. A target detection post-processing system applied to traffic scenarios according to claim 5, characterized in that, The acquisition unit is specifically used to calculate the spatial structure distribution attribute information of multiple sets of target detection results corresponding to each image.
7. A target detection post-processing system applied to traffic scenarios according to claim 5, characterized in that, The judgment unit is specifically used to reweight the image to the optimal correction cost value when the obtained unmatched target position offset from the visual center of the image is greater than a preset threshold. If the number of unmatched targets is greater than zero and the optimal correction cost of image reweighting is greater than the filtering threshold, then the detection results need to be corrected.
8. A target detection post-processing system applied to traffic scenarios according to claim 6, characterized in that, The merge update unit is specifically used to configure the initial detection result as the successfully matched target detection boxes in the first group of target detection results; and to update the initial detection result with the unmatched detection results in the second group of target detection results. The detection results that failed to match in the first set of target detection results are used to update the initial detection results a second time.