Target detection result processing and target detection model acquisition method and apparatus
By combining multi-dimensional attribute information classification and non-maximum suppression threshold, the problem of redundant detection boxes in target detection models in traffic scenarios is solved, and higher accuracy target detection result processing is achieved.
Patent Information
- Application Number
- CN202310919983.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-07-25
AI Technical Summary
Existing object detection models suffer from inaccurate handling of redundant detection boxes in traffic scenarios, resulting in poor detection accuracy.
Multi-dimensional attribute information is used to classify detection boxes, and a corresponding non-maximum suppression threshold is set for each classification to perform non-maximum suppression processing. Redundant boxes are removed by combining the confidence score and intersection-union ratio of the detection boxes.
This improves the accuracy of target detection results, reduces the filtering of correct detection boxes and the retention of incorrect detection boxes, and enhances the precision of the processing results.
Smart Images

Figure CN117011810B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to a target detection result processing method and device and a target detection model obtaining method and device in the fields of computer vision, deep learning and intelligent transportation. BACKGROUND
[0002] In a traffic scene, a target obstacle in a collected image can be determined through target detection. For example, a target detection model can be used to perform target detection on the collected image to obtain a target detection result, which can include a detection box corresponding to a target obstacle. However, there is usually some redundancy in the obtained detection box, and therefore post-processing is needed to obtain an optimized target detection result. SUMMARY
[0003] The present disclosure provides a target detection result processing method and device and a target detection model obtaining method and device.
[0004] A target detection result processing method comprises:
[0005] Obtaining a target detection result of a to-be-processed image, wherein the target detection result comprises different detection boxes and multi-dimensional attribute information corresponding to each detection box, and the multi-dimensional attribute information comprises label information corresponding to N different attributes, and any label information is used to indicate whether the detection box has the corresponding attribute, and N is a positive integer greater than one;
[0006] Classifying each detection box according to the multi-dimensional attribute information, each classification corresponds to an attribute, and the detection boxes in the same classification all have the attribute corresponding to the classification;
[0007] For different attributes, performing non-maximum suppression processing on each detection box in the classification corresponding to the attribute according to a non-maximum suppression threshold corresponding to the attribute.
[0008] A target detection model obtaining method comprises:
[0009] Obtaining training samples, each training sample comprising a training image and label information, and the label information comprising different detection boxes and multi-dimensional attribute information corresponding to each detection box, and the multi-dimensional attribute information comprising label information corresponding to N different attributes, and any label information being used to indicate whether the detection box has the corresponding attribute, and N being a positive integer greater than one;
[0010] The target detection model is trained by using the training samples, and is used for generating a target detection result of an input image to be processed, wherein the target detection result includes different detection boxes and multi-dimensional attribute information corresponding to each detection box, the multi-dimensional attribute information is used for classifying each detection box, each classification corresponds to an attribute, detection boxes in a same classification have the attribute corresponding to the classification, different attributes have respective non-maximum suppression thresholds, and the non-maximum suppression thresholds are used for performing non-maximum suppression processing on each detection box in a corresponding classification.
[0011] A target detection result processing apparatus includes an obtaining module, a classifying module, and a processing module.
[0012] The obtaining module is configured to obtain a target detection result of an image to be processed, wherein the target detection result includes different detection boxes and multi-dimensional attribute information corresponding to each detection box, the multi-dimensional attribute information includes label information corresponding to N different attributes, any label information is used for indicating whether a detection box has a corresponding attribute, and N is a positive integer greater than 1.
[0013] The classifying module is configured to classify each detection box according to the multi-dimensional attribute information, each classification corresponds to an attribute, and detection boxes in a same classification have the attribute corresponding to the classification.
[0014] The processing module is configured to perform non-maximum suppression processing on each detection box in a classification corresponding to an attribute according to a non-maximum suppression threshold corresponding to the attribute.
[0015] A target detection model obtaining apparatus includes a sample obtaining module and a model training module.
[0016] The sample obtaining module is configured to obtain training samples, each training sample includes a training image and label information, the label information includes different detection boxes and multi-dimensional attribute information corresponding to each detection box, the multi-dimensional attribute information includes label information corresponding to N different attributes, any label information is used for indicating whether a detection box has a corresponding attribute, and N is a positive integer greater than 1.
[0017] The model training module is configured to train a target detection model by using the training samples, and the target detection model is configured to generate a target detection result of an input image to be processed, wherein the target detection result includes different detection boxes and multi-dimensional attribute information corresponding to each detection box, the multi-dimensional attribute information is used to classify each detection box, each classification corresponds to an attribute, detection boxes in the same classification have the attribute corresponding to the classification, different attributes have respective non-maximum suppression thresholds, and the non-maximum suppression thresholds are used to perform non-maximum suppression processing on each detection box in the corresponding classification.
[0018] An electronic device comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein
[0021] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0022] A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described above.
[0023] A computer program product comprising computer programs / instructions that, when executed by a processor, implement the method as described above.
[0024] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0025] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:
[0026] Figure 1 a flowchart of the target detection result processing method embodiment of the present disclosure;
[0027] Figure 2 a schematic diagram of the intersection part of the two detection boxes of the present disclosure;
[0028] Figure 3 a flowchart of the target detection model obtaining method embodiment of the present disclosure;
[0029] Figure 4A schematic diagram of a constituent structure of the target detection result processing device embodiment 400 according to the present disclosure is shown.
[0030] Figure 5 A schematic diagram of a constituent structure of the target detection model obtaining device embodiment 500 according to the present disclosure is shown.
[0031] Figure 6 A schematic block diagram of an electronic device 600 that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are included to provide a thorough understanding of embodiments of the present disclosure by individuals of ordinary skill in the art, and they should be considered in conjunction only, and should not be considered alone. Thus, those of ordinary skill in the art will realize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to make the description clear and concise, descriptions of well-known functions and structures are omitted in the following description.
[0033] In addition, it should be understood that the term "and / or" herein is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it.
[0034] Figure 1 A flowchart of the target detection result processing method embodiment according to the present disclosure is shown. As shown in Figure 1 the following detailed implementation is included.
[0035] In step 101, the target detection result of the image to be processed is obtained, which includes different detection boxes and multi-dimensional attribute information corresponding to each detection box, respectively. The multi-dimensional attribute information includes label information corresponding to N different attributes, respectively, and any label information is used to indicate whether the detection box has the corresponding attribute, and N is a positive integer greater than one.
[0036] In step 102, each detection box is classified according to the multi-dimensional attribute information, and each classification corresponds to an attribute. The detection boxes in the same classification all have the attribute corresponding to the classification.
[0037] In step 103, for different attributes, each detection box in the classification corresponding to the attribute is processed by NMS (Non-Maximum Suppression) according to the NMS threshold value corresponding to the attribute.
[0038] In a conventional manner, an NMS method is usually used to post-process the obtained target detection result to eliminate redundant detection boxes for the same target obstacle, so as to obtain an optimized target detection result. In the implementation process of the NMS method, the intersection over union (IOU) between the detection boxes needs to be compared with an NMS threshold. In the conventional manner, a fixed NMS threshold is usually used, that is, the NMS threshold is always a fixed value. This manner is prone to cause problems such as filtering out correct detection boxes and retaining incorrect detection boxes, that is, the accuracy of the processing result is poor.
[0039] By using the scheme described in the method embodiment, each detection box obtained through target detection can be classified according to multi-dimensional attribute information, and NMS processing can be performed on each classification result according to a corresponding NMS threshold, that is, NMS processing can be performed on each classification result separately, one dimension one solution, so as to avoid the problems in the conventional manner as much as possible, and thus the accuracy of the processing result is improved.
[0040] Preferably, for the image to be processed, it can be used as the input of the target detection model, so as to obtain the output target detection result. That is, the target detection model trained in advance can be used to efficiently and accurately determine the required target detection result.
[0041] Preferably, the N different attributes can include occlusion, blur, and truncation. In actual application, the number and types of the attributes can be extended according to actual needs, which is very flexible and convenient.
[0042] Suppose that 8 detection boxes are detected, which are referred to as detection box 1 to detection box 8 for convenience, and the multi-dimensional attribute information corresponding to each detection box is also obtained. Suppose that the value of N is 3, and the multi-dimensional attribute information corresponding to the detection box 1 includes label information corresponding to three different attributes, which are referred to as label information 1, label information 2, and label information 3 for convenience. The label information 1 can be used to indicate whether the detection box 1 has the attribute of occlusion (that is, whether it is occluded), the label information 2 can be used to indicate whether the detection box 1 has the attribute of blur, and the label information 3 can be used to indicate whether the detection box 1 has the attribute of truncation (that is, whether it is truncated). If the detection box 1 (the target obstacle therein) is occluded, blurred, and not truncated, the multi-dimensional attribute information corresponding to the detection box 1 will record that the detection box 1 has the attribute of occlusion and the attribute of blur, but does not have the attribute of truncation.
[0043] Correspondingly, each detection box can be classified according to the multi-dimensional attribute information, and each classification corresponds to an attribute, and detection boxes in the same classification all have the attribute corresponding to the classification.
[0044] For example, assuming that detection box 1, detection box 2, detection box 4, detection box 5 and detection box 7 all have the attribute of occlusion, the five detection boxes can be added to the classification corresponding to the attribute of occlusion. For another example, assuming that detection box 1, detection box 3, detection box 6 and detection box 8 all have the attribute of blur, the four detection boxes can be added to the classification corresponding to the attribute of blur.
[0045] For each attribute, a corresponding NMS threshold can be set, and the specific value of the NMS threshold corresponding to each attribute can be determined according to actual needs.
[0046] In addition, preferably, the target detection result can further include the confidence score corresponding to each detection box.
[0047] Correspondingly, as can be known from the foregoing introduction, the target detection result of the to-be-processed image can include B={b1, b2,..., bn}, S={s1, s2,..., sn} and MD={d1, d2,..., dn}.
[0048] wherein B represents a detection box set, n represents the number of detection boxes, S represents a confidence score set, s1 in the set represents the confidence score corresponding to detection box b1, s2 represents the confidence score corresponding to detection box b2, and so on, MD represents a multi-dimensional attribute information set, d1 in the set represents the multi-dimensional attribute information corresponding to detection box b1, d2 represents the multi-dimensional attribute information corresponding to detection box b2, and so on.
[0049] Preferably, for any attribute, each detection box in the classification corresponding to the attribute can be subjected to NMS processing according to the NMS threshold corresponding to the attribute and the confidence score of each detection box in the classification corresponding to the attribute, to obtain a processing result corresponding to the attribute.
[0050] Further, preferably, the specific manner in which the NMS processing is performed on each bounding box in the classification corresponding to the attribute to obtain the processing result corresponding to the attribute can include: using the bounding boxes with the attribute to form a first set, performing a predetermined processing on the first set, the predetermined processing including: taking the bounding box with the highest confidence score from the first set as a target bounding box, and adding the target bounding box to a second set, in response to the first set being empty, taking the bounding boxes in the second set as the processing result corresponding to the attribute, in response to the first set not being empty, deleting the bounding boxes in the first set that meet the following requirement: the IOU between the target bounding box and the bounding box is greater than or equal to the NMS threshold corresponding to the attribute, in response to the first set being empty, taking the bounding boxes in the second set as the processing result corresponding to the attribute, in response to the first set not being empty, repeatedly performing the predetermined processing.
[0051] The above process can be illustrated as follows:
[0052] Suppose that the classification corresponding to an attribute includes five bounding boxes, namely, bounding box 1 to bounding box 5, then the first set can be formed using the bounding boxes 1 to 5, after that, the bounding box with the highest confidence score can be selected from the first set, suppose that it is bounding box 1, as a target bounding box, and bounding box 1 can be deleted from the first set and added to the second set, the second set is initially empty, since the first set still includes bounding boxes 2 to 5 at this time, it is not empty, therefore, the IOU between bounding boxes 2 to 5 and bounding box 1 can be calculated respectively, and the four IOUs obtained can be compared with the NMS threshold corresponding to the attribute respectively, and then the bounding boxes corresponding to the IOU greater than or equal to the NMS threshold can be deleted from the first set, such as bounding boxes 2 and 5, since the first set still includes bounding boxes 3 and 4 at this time, it is not empty, therefore, the above processing can be repeated, that is, the bounding box with the highest confidence score can be selected from the first set, suppose that it is bounding box 3, and bounding box 3 can be deleted from the first set and added to the second set, since the first set still includes bounding box 4 at this time, it is not empty, therefore, the IOU between bounding boxes 4 and 3 can be calculated, and the IOU obtained can be compared with the NMS threshold, suppose that the IOU is greater than or equal to the NMS threshold, then bounding box 4 can be deleted from the first set, since the first set is empty at this time, the processing can be ended, and the bounding boxes in the second set can be taken as the processing result corresponding to the attribute, or, suppose that the IOU between bounding boxes 4 and 3 is less than the NMS threshold, then bounding box 4 can be retained, since the first set is not empty at this time, the above processing can be repeated, that is, the bounding box with the highest confidence score can be selected from the first set, suppose that it is bounding box 4, and bounding box 4 can be deleted from the first set and added to the second set, since the first set is empty at this time, the processing can be ended, and the bounding boxes in the second set can be taken as the processing result corresponding to the attribute.
[0053] For any two detection boxes, the IOU between the two detection boxes can be calculated in the following manner:
[0054]
[0055] Wherein, A and B represent the areas of the two detection boxes respectively, and A∩B represents the intersection part (overlapping part) of the two detection boxes, as shown in Figure 2 Figure 2 is a schematic view of the intersection part of the two detection boxes according to the present disclosure.
[0056] It can be seen that in the above processing manner, the NMS processing for each attribute can be completed in combination with the NMS threshold value corresponding to the single attribute, the IOU between the detection boxes, and the confidence score of the detection boxes, etc., while the correct detection boxes are retained as much as possible while the redundant detection boxes are deleted in a targeted manner.
[0057] Preferably, after obtaining the processing results corresponding to each attribute respectively, the processing results corresponding to each attribute can be fused to obtain the optimized target detection result.
[0058] Preferably, the union set of the processing results corresponding to each attribute can be obtained to obtain a third set, and the NMS processing can be performed on each detection box in the third set according to the NMS threshold value corresponding to the third set and the confidence score of each detection box in the third set, so as to obtain the optimized target detection result, and the NMS threshold value corresponding to the third set is greater than the NMS threshold value corresponding to each attribute.
[0059] Since one detection box can have multiple attributes, it can exist in the processing results corresponding to two or more attributes at the same time, and accordingly, the detection boxes in different processing results can be processed for deduplication, etc., to obtain the final required optimized target detection result.
[0060] Suppose the value of N is 3, then the processing results corresponding to 3 attributes can be taken as a union set to obtain a third set, and then the NMS processing can be performed on each detection box in the third set according to the NMS threshold value corresponding to the third set and the confidence score of each detection box in the third set, and the specific implementation manner of the NMS processing can refer to the foregoing description.
[0061] In addition, the NMS threshold value corresponding to the third set can be greater than the NMS threshold value corresponding to each attribute. For example, the NMS threshold value can be a larger value, such as 0.9, so that the detection boxes with higher overlapping degree can be filtered out.
[0062] It can be seen from the above introduction that the implementation of the scheme of the present disclosure needs to rely on a pre-trained target detection model. The acquisition method of the target detection model is further described below through specific embodiments.
[0063] Figure 3 The flowchart of the target detection model acquisition method embodiment of the present disclosure is shown in FIG. 3. Figure 3 As shown in FIG. 3, the following specific implementation is included.
[0064] In step 301, training samples are acquired, each of which includes a training image and annotation information. The annotation information includes different detection boxes and multi-dimensional attribute information corresponding to each detection box. The multi-dimensional attribute information includes label information corresponding to N different attributes. Any label information is used to indicate whether the detection box has the corresponding attribute. N is a positive integer greater than one.
[0065] In step 302, the target detection model is trained using the training samples. The target detection model is used to generate a target detection result of an input image to be processed. The target detection result includes different detection boxes and multi-dimensional attribute information corresponding to each detection box. The multi-dimensional attribute information is used to classify each detection box. Each classification corresponds to an attribute. The detection boxes in the same classification have the attribute corresponding to the classification. Different attributes have their own corresponding NMS threshold values. The NMS threshold values are used to perform NMS processing on the detection boxes in the corresponding classification.
[0066] The scheme of the above method embodiment can optimize the traditional target detection model. That is, the trained target detection model can output information in the traditional target detection result, such as different detection boxes, and can also output multi-dimensional attribute information corresponding to each detection box. Accordingly, the detection boxes can be classified according to the multi-dimensional attribute information, and each classification result can be processed according to the corresponding NMS threshold value, thereby improving the accuracy of the processing result.
[0067] There is no limitation on how to acquire the training samples. For example, training images can be collected manually and annotated manually to obtain annotation information, or an automatic collection and automatic annotation method can be used.
[0068] Compared with the traditional annotation information, the annotation information of the present disclosure additionally includes multi-dimensional attribute information corresponding to different detection boxes.
[0069] Preferably, the target detection model of the present disclosure can be a target detection model introducing a Feature Pyramid Networks (FPN) module. Accordingly, the divide-and-conquer processing can be realized through the FPN module to improve the model performance, etc.
[0070] In addition, the target detection model of the present disclosure can include a multi-dimensional attribute prediction head for generating multi-dimensional attribute information of different detection boxes.
[0071] When training the target detection model using training samples, the training samples can be batched into the target detection model for forward propagation, and the error between the output obtained by forward propagation and the label information in the training samples can be calculated, and then the error can be back-propagated for gradient update, etc., until convergence is reached.
[0072] After the training of the target detection model is completed, it can be applied in practice, i.e., the trained target detection model can be loaded, and an image to be processed can be input to obtain the target detection result of the image to be processed, and then subsequent processing can be performed according to the manner of the embodiment shown in Figure 1 .
[0073] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the action sequence described, because according to the present disclosure, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present disclosure. In addition, the parts not described in detail in a certain embodiment can be referred to the related description in other embodiments.
[0074] The above is the introduction of the method embodiment, and the scheme of the present disclosure will be further described through the device embodiment below.
[0075] Figure 4 is a schematic diagram of the constituent structure of the target detection result processing device embodiment 400 of the present disclosure. As shown in Figure 4 , it includes an acquisition module 401, a classification module 402, and a processing module 403.
[0076] The acquisition module 401 is configured to acquire the target detection result of the image to be processed, which includes different detection boxes and multi-dimensional attribute information corresponding to each detection box, and the multi-dimensional attribute information includes label information corresponding to N different attributes, and any label information is used to indicate whether the detection box has the corresponding attribute, and N is a positive integer greater than one.
[0077] The classification module 402 is configured to classify each detection frame according to the multi-dimensional attribute information, and each classification corresponds to an attribute, and detection frames in the same classification have the attribute corresponding to the classification.
[0078] The processing module 403 is configured to perform NMS processing on each detection frame in the classification corresponding to the attribute according to the NMS threshold corresponding to the attribute, for different attributes.
[0079] The above-mentioned device embodiment and the above-mentioned scheme can classify each detection frame obtained by target detection according to multi-dimensional attribute information, and can perform NMS processing on each classification result according to the corresponding NMS threshold, that is, NMS processing can be performed on each classification result separately, one dimension one solution, so as to avoid the problems in the traditional way as much as possible, and the accuracy of the processing result is improved.
[0080] Preferably, the acquisition module 401 can take the image to be processed as the input of the target detection model to obtain the output target detection result.
[0081] In addition, preferably, the N different attributes can include occlusion, blur, and truncation.
[0082] Preferably, the target detection result can further include the confidence score corresponding to each detection frame, and correspondingly, the processing module 403 can perform NMS processing on each detection frame in the classification corresponding to any attribute according to the NMS threshold corresponding to the attribute and the confidence score of each detection frame in the classification corresponding to the attribute, to obtain the processing result corresponding to the attribute.
[0083] Preferably, the processing module 403 can perform NMS processing on each detection frame in the classification corresponding to the attribute to obtain the processing result corresponding to the attribute in the following manner: a first set is formed by using detection frames having the attribute, a predetermined processing is performed on the first set, the predetermined processing includes: taking a detection frame with the highest confidence score from the first set as a target detection frame, and adding the target detection frame to a second set, in response to the first set being empty, taking the detection frames in the second set as the processing result corresponding to the attribute, in response to the first set being not empty, deleting a detection frame meeting the following requirements from the first set: the IOU between the detection frame and the target detection frame is greater than or equal to the NMS threshold corresponding to the attribute, in response to the first set being empty, taking the detection frames in the second set as the processing result corresponding to the attribute, in response to the first set being not empty, repeating the predetermined processing.
[0084] Preferably, after the processing module 403 obtains the processing result corresponding to each attribute, the processing module 403 can further fuse the processing results corresponding to each attribute to obtain an optimized target detection result.
[0085] Preferably, the processing module 403 can obtain the union of the processing results corresponding to each attribute, obtain a third set, and perform NMS processing on each detection frame in the third set according to the NMS threshold value corresponding to the third set and the confidence score of each detection frame in the third set, so as to obtain an optimized target detection result, and the NMS threshold value corresponding to the third set is greater than the NMS threshold value corresponding to each attribute.
[0086] Figure 5 A constituent structure schematic diagram of the target detection model obtaining device embodiment 500 of the present disclosure is shown in the figure. As shown in the figure, it comprises a sample obtaining module 501 and a model training module 502. Figure 5
[0087] The sample obtaining module 501 is configured to obtain training samples, each of which comprises a training image and annotation information, wherein the annotation information comprises different detection frames and multi-dimensional attribute information corresponding to each detection frame, and the multi-dimensional attribute information comprises label information corresponding to N different attributes, any label information is used to indicate whether the detection frame has the corresponding attribute, and N is a positive integer greater than one.
[0088] The model training module 502 is configured to train a target detection model using the training samples, wherein the target detection model is used to generate a target detection result of an input image to be processed, and the target detection result comprises different detection frames and multi-dimensional attribute information corresponding to each detection frame, wherein the generated multi-dimensional attribute information is used to classify each detection frame, each classification corresponds to an attribute, and the detection frames in the same classification have the attribute corresponding to the classification, different attributes have their own corresponding NMS threshold values, and the NMS threshold values are used to perform NMS processing on each detection frame in the corresponding classification.
[0089] The above-mentioned device embodiment can optimize the traditional target detection model, that is, the target detection model trained can output information in the traditional target detection result, such as different detection frames, and can also output multi-dimensional attribute information corresponding to each detection frame, accordingly, the subsequent classification of each detection frame according to the multi-dimensional attribute information can be performed, and NMS processing according to the corresponding NMS threshold value for each classification result can be performed, thereby improving the accuracy of the processing result.
[0090] In addition, preferably, the target detection model can be a target detection model with an introduced FPN module.
[0091] Figure 4 and Figure 5 The specific working process of the device embodiment shown in the figure can refer to the related description in the foregoing method embodiment, which will not be repeated here.
[0092] In summary, the scheme in the present disclosure proposes a multi-dimensional attribute information guided NMS processing manner, which can improve the accuracy of the processing result, has low implementation complexity, thereby reducing the implementation cost, and has good applicability to various scenarios.
[0093] The scheme in the present disclosure can be applied to the field of artificial intelligence, and particularly relates to the fields of computer vision, deep learning, intelligent transportation and the like. Artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) of human beings, and includes both hardware-level technologies and software-level technologies. The artificial intelligence hardware technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc., and the artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc.
[0094] In addition, the images in the embodiments of the present disclosure are not for a specific user, and cannot reflect the personal information of a specific user. In the technical scheme of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with the relevant legal regulations and do not violate public order and good customs.
[0095] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0096] Figure 6 A schematic block diagram of an electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, servers, servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the present disclosure described and / or claimed in this document.
[0097] As Figure 6As shown, the device 600 includes a computing unit 601 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from the storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0098] Various components in the device 600 are connected to the I / O interface 605, including an input unit 606 such as a keyboard, a mouse, etc., an output unit 607 such as various types of displays, speakers, etc., a storage unit 608 such as a magnetic disk, an optical disk, etc., and a communication unit 609 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0099] The computing unit 601 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs various methods and processes described above, such as the methods described in the present disclosure. For example, in some embodiments, the methods described in the present disclosure can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the methods described in the present disclosure can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the methods described in the present disclosure by any other appropriate means, such as by means of firmware.
[0100] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0101] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, or entirely on a remote machine or server.
[0102] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical conductors, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0103] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0104] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0105] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0106] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation, as long as the desired results of the technology disclosed in the present disclosure are achieved.
[0107] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above.
Claims
1. A method for processing target detection results, comprising: The image to be processed is input into the object detection model to obtain the output object detection result, which includes: different detection boxes and multi-dimensional attribute information corresponding to each detection box. The multi-dimensional attribute information includes label information corresponding to N different attributes. Each label information is used to indicate whether the detection box has the corresponding attribute, and N is a positive integer greater than one. The object detection model is trained using training samples. Each training sample includes: a training image and annotation information. The annotation information includes: different detection boxes and the multi-dimensional attribute information corresponding to each detection box. Each detection box is classified according to the multi-dimensional attribute information. Each category corresponds to an attribute, and all detection boxes in the same category have the attribute corresponding to the category. For different attributes, non-maximum suppression processing is performed on each detection box in the category corresponding to the attribute according to the non-maximum suppression threshold corresponding to the attribute.
2. The method according to claim 1, wherein, The N different attributes include: occlusion, blurring, and truncation.
3. The method according to claim 1 or 2, wherein, The target detection results also include: the confidence score corresponding to each detection box; The non-maximum suppression processing of each detection box in the category corresponding to the attribute includes: performing non-maximum suppression processing on each detection box in the category corresponding to the attribute according to the non-maximum suppression threshold corresponding to the attribute and the confidence score of each detection box in the category corresponding to the attribute, to obtain the processing result corresponding to the attribute.
4. The method according to claim 3, wherein, The non-maximum suppression processing performed on each detection box in the category corresponding to the attribute to obtain the processing result corresponding to the attribute includes: A first set is formed using detection boxes with the aforementioned attributes; Perform a predetermined process on the first set, the predetermined process including: taking the detection box with the highest confidence score from the first set as the target detection box, and adding the target detection box to the second set; in response to the first set being empty, taking the detection boxes in the second set as the processing result corresponding to the attribute; in response to the first set not being empty, deleting the detection boxes from the first set that meet the following requirements: the intersection-union ratio with the target detection box is greater than or equal to the non-maximum suppression threshold corresponding to the attribute; in response to the first set being empty, taking the detection boxes in the second set as the processing result corresponding to the attribute; in response to the first set not being empty, repeating the predetermined process.
5. The method according to claim 4, further comprising: The processing results corresponding to each attribute are fused, and the fused result is used as the optimized target detection result.
6. The method according to claim 5, wherein, The process of fusing the processing results corresponding to each attribute and using the fused result as the optimized target detection result includes: Obtain the union of the processing results corresponding to each attribute to get the third set; Based on the non-maximum suppression threshold corresponding to the third set and the confidence score of each detection box in the third set, non-maximum suppression processing is performed on each detection box in the third set to obtain the optimized target detection result. The non-maximum suppression threshold corresponding to the third set is greater than the non-maximum suppression threshold corresponding to each attribute.
7. A method for obtaining an object detection model, comprising: Obtain training samples. Each training sample includes a training image and annotation information. The annotation information includes different detection boxes and multi-dimensional attribute information corresponding to each detection box. The multi-dimensional attribute information includes label information corresponding to N different attributes. Each label information is used to indicate whether the detection box has the corresponding attribute. N is a positive integer greater than one. A target detection model is trained using the training samples. The target detection model is used to generate target detection results for the input image to be processed. The target detection results include different detection boxes and the multi-dimensional attribute information corresponding to each detection box. The generated multi-dimensional attribute information is used to classify the generated detection boxes. Each classification corresponds to an attribute. Detection boxes in the same classification all have the attribute corresponding to the classification. Different attributes each have their own corresponding non-maximum suppression threshold. The non-maximum suppression threshold is used to perform non-maximum suppression processing on each detection box in the corresponding classification.
8. The method according to claim 7, wherein, The target detection model includes: a target detection model that incorporates a feature pyramid network module.
9. A target detection result processing device, comprising: The module includes an acquisition module, a classification module, and a processing module. The acquisition module is used to input the image to be processed into the target detection model and obtain the output target detection result, which includes: different detection boxes and multi-dimensional attribute information corresponding to each detection box. The multi-dimensional attribute information includes label information corresponding to N different attributes. Each label information is used to indicate whether the detection box has the corresponding attribute, and N is a positive integer greater than one. The target detection model is trained using training samples. Each training sample includes: a training image and annotation information. The annotation information includes: different detection boxes and the multi-dimensional attribute information corresponding to each detection box. The classification module is used to classify each detection box according to the multi-dimensional attribute information. Each classification corresponds to an attribute, and the detection boxes in the same classification all have the attribute corresponding to the classification. The processing module is used to perform non-maximum suppression processing on each detection box in the category corresponding to the attribute, according to the non-maximum suppression threshold corresponding to the attribute.
10. The apparatus according to claim 9, wherein, The N different attributes include: occlusion, blurring, and truncation.
11. The apparatus according to claim 9 or 10, wherein, The target detection results also include: the confidence score corresponding to each detection box; For any given attribute, the processing module performs non-maximum suppression processing on each detection box in the category corresponding to the attribute, based on the non-maximum suppression threshold corresponding to the attribute and the confidence score of each detection box in the category corresponding to the attribute, to obtain the processing result corresponding to the attribute.
12. The apparatus according to claim 11, wherein, The processing module uses detection boxes with the aforementioned attribute to form a first set, and performs predetermined processing on the first set. The predetermined processing includes: taking the detection box with the highest confidence score from the first set as the target detection box, and adding the target detection box to a second set; in response to the first set being empty, using the detection boxes in the second set as the processing result corresponding to the attribute; in response to the first set not being empty, deleting detection boxes from the first set that meet the following requirements: the intersection-union ratio with the target detection box is greater than or equal to the non-maximum suppression threshold corresponding to the attribute; in response to the first set being empty, using the detection boxes in the second set as the processing result corresponding to the attribute; and in response to the first set not being empty, repeating the predetermined processing.
13. The apparatus according to claim 12, wherein, The processing module is further used to fuse the processing results corresponding to each attribute, and use the fused result as the optimized target detection result.
14. The apparatus according to claim 13, wherein, The processing module obtains the union of the processing results corresponding to each attribute to get a third set. Based on the non-maximum suppression threshold corresponding to the third set and the confidence score of each detection box in the third set, non-maximum suppression processing is performed on each detection box in the third set to obtain the optimized target detection result. The non-maximum suppression threshold corresponding to the third set is greater than the non-maximum suppression threshold corresponding to each attribute.
15. A target detection model acquisition device, comprising: Sample acquisition module and model training module; The sample acquisition module is used to acquire training samples. Each training sample includes a training image and annotation information. The annotation information includes different detection boxes and multi-dimensional attribute information corresponding to each detection box. The multi-dimensional attribute information includes label information corresponding to N different attributes. Each label information is used to indicate whether the detection box has the corresponding attribute, and N is a positive integer greater than one. The model training module is used to train an object detection model using the training samples. The object detection model is used to generate object detection results for the input image to be processed. The object detection results include different detection boxes and the multi-dimensional attribute information corresponding to each detection box. The generated multi-dimensional attribute information is used to classify the generated detection boxes. Each classification corresponds to an attribute. Detection boxes in the same classification have the attribute corresponding to the classification. Different attributes have their own corresponding non-maximum suppression thresholds. The non-maximum suppression thresholds are used to perform non-maximum suppression processing on each detection box in the corresponding classification.
16. The apparatus according to claim 15, wherein, The target detection model includes: a target detection model that incorporates a feature pyramid network module.
17. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
19. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Faster-RCNN target object detection method based on deep reinforcement learning
CN111476302A
Target detection method based on non-maximum suppression threshold optimization
CN116109812A