Target detection method and related apparatus, electronic device, and storage medium

By detecting candidate bounding box combinations of the main target and secondary targets in the image and eliminating irrelevant combinations, the problem of high false detection rate and high cost of target detection is solved, and low-cost, highly adaptable and highly accurate detection is achieved.

CN115761213BActive Publication Date: 2026-05-19IFLYTEK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
IFLYTEK CO LTD
Filing Date
2022-11-04
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing target detection technologies suffer from high false detection rates and high costs, making it difficult to improve detection accuracy while reducing detection costs.

Method used

By detecting the main target and several secondary targets in the image to be detected, candidate box combinations are obtained. Irrelevant combinations are eliminated based on the intersection analysis between the candidate boxes. Combinations are made using only image information, which reduces costs and improves accuracy.

Benefits of technology

Without increasing equipment, the cost of target detection is reduced, the adaptability and accuracy of detection are improved, and the detection accuracy is enhanced by assisting the detection through the constraint relationship between the main target and the auxiliary target.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115761213B_ABST
    Figure CN115761213B_ABST
Patent Text Reader

Abstract

The application discloses a target detection method and related device, electronic equipment and storage medium, wherein the target detection method comprises: detecting a main target in a to-be-detected image to obtain a first candidate box of the main target, and detecting a plurality of auxiliary targets in the to-be-detected image to obtain a second candidate box of each auxiliary target; wherein the plurality of auxiliary targets belong to the main target; and combining any first candidate box of the main target with any second candidate box of each auxiliary target to obtain a candidate box combination; and for each candidate box combination, analyzing whether to eliminate the candidate box combination based on the intersection between the first candidate box and each second candidate box; and taking the first candidate box in the retained candidate box combination as a target detection box of the main target. The above scheme can reduce the detection cost, improve the detection adaptability, and improve the accuracy of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology, and in particular to a target detection method and related devices, electronic devices, and storage media. Background Technology

[0002] With the rapid development of artificial intelligence technology, image recognition has become an important field of AI. Object detection, as a front-end technology of image recognition, has been widely applied in various industries such as education, entertainment, healthcare, and transportation.

[0003] Currently, object detection still suffers from a certain false detection rate in practical applications, such as incorrectly detecting a target when it is not actually present in the image. To reduce this rate, additional sensors or the construction of prior feature libraries are commonly employed. However, adding additional sensors increases detection costs, and feature libraries built on large datasets cannot be updated in real time, easily leading to misjudgments when the input image changes significantly. Therefore, improving object detection accuracy while reducing detection costs and enhancing its adaptability has become a pressing issue. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a target detection method and related devices, electronic equipment, and storage media that can improve the accuracy of target detection while reducing detection costs and increasing detection adaptability.

[0005] To address the aforementioned technical problems, the first aspect of this application provides a speech recognition method, comprising: detecting a primary target in an image to be detected to obtain a first candidate bounding box of the primary target; detecting several secondary targets in the image to be detected to obtain second candidate bounding boxes of each secondary target; wherein the several secondary targets belong to the primary target; combining any first candidate bounding box of the primary target with any second candidate bounding box of each secondary target to obtain a candidate bounding box combination; and for each candidate bounding box combination, analyzing whether to remove the candidate bounding box combination based on the intersection between the first candidate bounding box and each second candidate bounding box; and using the first candidate bounding box in the retained candidate bounding box combination as the target detection bounding box of the primary target.

[0006] To address the aforementioned technical problems, a second aspect of this application provides a target detection device, comprising a detection module, a combination module, an analysis module, and a determination module. The detection module detects a primary target in an image to be detected, obtaining a first candidate bounding box for the primary target, and detects several secondary targets in the image to be detected, obtaining second candidate bounding boxes for each secondary target; wherein the secondary targets belong to the primary target. The combination module combines any first candidate bounding box of the primary target with any second candidate bounding box of each secondary target to obtain a candidate bounding box combination. The analysis module analyzes whether to discard a candidate bounding box combination based on the intersection between the first candidate bounding box and each second candidate bounding box. The determination module selects the first candidate bounding box from the retained candidate bounding box combinations as the target detection bounding box of the primary target.

[0007] To address the aforementioned technical problems, a third aspect of this application provides an electronic device, including a memory and a processor coupled to each other, wherein the memory stores program instructions and the processor executes the program instructions to implement the target detection method of the first aspect described above.

[0008] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the target detection method of the first aspect described above.

[0009] The above scheme involves detecting the main target in the image to be detected, obtaining a first candidate bounding box for the main target, and detecting several secondary targets in the image to be detected, obtaining second candidate bounding boxes for each secondary target; wherein the secondary targets are part of the main target; and combining any first candidate bounding box of the main target with any second candidate bounding box of each secondary target to obtain a candidate bounding box combination; then, for each candidate bounding box combination, analyzing whether to discard the candidate bounding box combination based on the intersection between the first candidate bounding box and each second candidate bounding box; and finally, using the first candidate bounding box in the retained candidate bounding box combinations as the target detection bounding box of the main target. This process, on the one hand, involves detecting the main target and several secondary targets in the image to be detected separately to obtain the first and second candidate bounding boxes. The system combines first and second candidate boxes to obtain candidate box combinations. This process relies solely on image information of the image to be detected, eliminating the need for additional equipment and minimizing target detection costs while improving adaptability. Furthermore, for each candidate box combination, the system analyzes the intersections between the first and second candidate boxes to determine whether to eliminate them. Based on the retained candidate box combinations, the target detection box for the primary target is obtained. This leverages the constraint relationship between the primary and secondary targets to aid in target detection, improving the accuracy of the retained candidate box combinations and consequently, the accuracy of the primary target's detection box. Therefore, this method effectively reduces detection costs, enhances detection adaptability, and simultaneously improves target detection accuracy.

[0010] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0012] Figure 1 This is a flowchart illustrating an embodiment of the target detection method of this application;

[0013] Figure 2 This is a schematic diagram of an embodiment where the main target is a person;

[0014] Figure 3 This is a schematic diagram of another embodiment where the main target is a person;

[0015] Figure 4 This is a schematic diagram of the framework of an embodiment of the target detection method of this application;

[0016] Figure 5 This is a schematic diagram of the framework of an embodiment of the target detection device of this application;

[0017] Figure 6 This is a schematic diagram of the framework of an embodiment of the electronic device of this application;

[0018] Figure 7 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0019] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0020] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0021] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. "Several" means at least one. The terms "first," "second," etc., in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0022] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the target detection method of this application.

[0023] Specifically, this may include the following steps:

[0024] Step S11: Detect the main target in the image to be detected to obtain the first candidate box of the main target, and detect several secondary targets in the image to be detected to obtain the second candidate box of each secondary target.

[0025] In this embodiment, several secondary targets belong to the primary target, meaning there is a constraint relationship between the primary target and the secondary targets. For example, when the primary target is a human body, the secondary targets include at least a human face; or, when the primary target is a vehicle, the secondary targets may include rearview mirrors, license plates, etc. It is understood that the illustrated method is merely one possible scenario in practical applications and does not limit the categories of the primary target and secondary targets in actual applications. The primary target and secondary targets can be determined according to the actual situation, and no specific limitations are made here.

[0026] In one implementation scenario, the first and second candidate boxes can be detected based on a network model, which may include, but is not limited to, CNN (convolutional neural network), RNN (recurrent neural network), etc.

[0027] In another implementation scenario, to improve the accuracy of the first and second candidate bounding boxes, detection can be performed first based on a network model, followed by further filtering to obtain the corresponding candidate boxes. Filtering methods can include, but are not limited to, NMS (Non-Maximum Suppression) filtering, threshold filtering, etc. The method for determining the first and second candidate bounding boxes can be determined according to the actual situation and is not specifically limited here. It should be noted that in practical applications, the primary target can detect at least one first candidate bounding box, and each secondary target can detect at least one second candidate bounding box. Taking the primary target as a human body and the secondary targets including a face and shoulders as an example, the primary target can detect at least one first candidate bounding box for the human body, the face can detect at least one second candidate bounding box, and the shoulders can detect at least one second candidate bounding box. Other cases can be deduced similarly, and will not be listed here.

[0028] Step S12: Combine any first candidate box of the main target with any second candidate box of each auxiliary target to obtain a candidate box combination.

[0029] In one implementation scenario, any first candidate bounding box of the main target is combined with any second candidate bounding box of each of the auxiliary targets to obtain a candidate bounding box combination. It can be understood that a candidate bounding box combination includes one first candidate bounding box of the main target and one second candidate bounding box of each type of auxiliary target. That is, the number of candidate bounding box combinations is determined based on the number of first and second candidate bounding boxes. Specifically, if there are N types of auxiliary targets, and the main target detects K first candidate bounding boxes, and the i-th type of auxiliary target detects M... i If there are two second candidate boxes, then by using the above combination, a total of K*M1*…M can be obtained. i *…M N A combination of candidate boxes. For example, see [link to example]. Figure 2 , Figure 2This is a schematic diagram of one embodiment when the primary target is a person. When the primary target is a person, a face can be set as a secondary target. In this case, the first candidate box can be the bounding rectangle of the human body, and the second candidate box can be the bounding rectangle of the face. When the primary target is a vehicle, a vehicle rearview mirror can be set as a secondary target. In this case, the first candidate box can be the bounding rectangle of the vehicle, and the second candidate box can be the bounding rectangle of the vehicle rearview mirror. The candidate box combination can include the bounding rectangle of the vehicle (first candidate box) and the bounding rectangle of the license plate (second candidate box). Alternatively, the license plate can be set as a secondary target, and the second candidate box can also be the bounding rectangle of the license plate. In this case, the candidate box combination can include the bounding rectangle of the vehicle (first candidate box) and the bounding rectangle of the vehicle rearview mirror (second candidate box). Of course, the vehicle rearview mirror and license plate can also be set as secondary targets. In this case, the candidate box combination can include the bounding rectangle of the vehicle (first candidate box), the bounding rectangle of the vehicle rearview mirror (second candidate box), and the bounding rectangle of the license plate (second candidate box).

[0030] Step S13: For each candidate box combination, analyze whether to remove the candidate box combination based on the intersection between the first candidate box and each second candidate box.

[0031] In one implementation scenario, as a possible approach, the candidate box combination can be retained if there is an intersection between the first candidate box and any second candidate in the candidate box combination; if there is no intersection between the first candidate box and at least one second candidate in the candidate box combination, the candidate box combination can be eliminated. For example, please refer to... Figure 3 , Figure 3 This is a schematic diagram of another embodiment when the main target is a person. When the main target is a person, there is a constraint relationship between the first candidate box and the second candidate box. For example, the first candidate box is the bounding rectangle of the person and the second candidate box is the bounding rectangle of the face. When there is no intersection between the first candidate box and the second candidate box, the candidate box combination will necessarily be an abnormal detection result, and the candidate box combination will be eliminated.

[0032] In another implementation scenario, unlike the aforementioned implementation, to improve the accuracy of candidate box combination analysis, for each intersection generated by candidate box combinations, the second candidate box belonging to the intersection can be used as the current candidate box. For example, please refer to... Figure 2 ,like Figure 2 As shown, the first candidate box and the second candidate box group are combined to obtain a candidate box combination. Then, the intersection generated in the candidate box combination (i.e., the region of the second candidate box) is determined, and the second candidate box belonging to the intersection is taken as the current candidate box. Figure 2The second candidate box is shown. After determining the current candidate box, the correlation between the intersection and the current candidate box can be measured in several dimensions. It should be noted that the several dimensions may include at least one of the following: a first dimension related to geometric space and a second dimension related to color space. Understandably, in practical applications, the specific types of several dimensions can be determined according to the actual situation of the main target. For example, when the main target is a person, the several dimensions may only include the first dimension related to geometric space, and then the correlation between the intersection and the current candidate box can be measured through the first dimension such as lines and surfaces; when the main target is a vehicle, the several dimensions may include the first dimension related to geometric space and the second dimension related to color space, and then not only can the correlation between the intersection and the current candidate box be measured through the first dimension such as lines and surfaces, but the correlation between the intersection and the current candidate box can also be further measured through the second dimension such as color consistency.

[0033] In a specific implementation scenario, in response to several dimensions including the x-axis direction, the ratio of the intersection to the length of the current candidate box in the x-axis direction can be obtained as the relevance in the x-axis direction. Specifically, this can be expressed as:

[0034] Lx rate =Lx ∩ / Lx

[0035] Among them, Lx rate Lx represents the ratio of the intersection to the length of the current candidate box along the x-axis. ∩ Lx represents the length of the intersection along the x-axis, and Lx represents the length of the current candidate box along the x-axis.

[0036] In another specific implementation scenario, in response to several dimensions including the y-axis direction, the ratio of the intersection to the length of the current candidate box in the y-axis direction can be obtained as the relevance in the y-axis direction. Specifically, this can be expressed as:

[0037] Ly rate =Ly ∩ / Ly

[0038] Among them, Ly rate Ly represents the ratio of the intersection to the length of the current candidate box along the y-axis. ∩ This represents the length of the intersection along the y-axis, and Ly represents the length of the current candidate box along the y-axis.

[0039] In another specific implementation scenario, responding to several dimensions including area, the ratio of the intersection to the area of ​​the current candidate box can be obtained as the relevance of the area dimension. Specifically, this can be expressed as:

[0040] Srate = S∩ / S

[0041] Where Srate represents the ratio of the intersection area to the area of ​​the current candidate box, S ∩ The area represents the intersection, and S represents the area of ​​the current candidate box.

[0042] Furthermore, after obtaining the relevance levels of the intersection across several dimensions, it can be determined whether the current candidate box (i.e., the second candidate box to which the intersection belongs) is related to the first candidate box in the candidate box combination. Specifically, based on the relevance thresholds set for each of the several dimensions, it can be checked whether the relevance level of each dimension meets the preset requirements. The preset requirements can be that the relevance level of each dimension is greater than the threshold, or the preset requirements can be that the relevance level of each dimension is within a preset range. The preset requirements can be determined according to the actual situation and are not specifically limited here. Then, based on the number of dimensions that meet the preset requirements, it is determined whether the current candidate box is related to the first candidate box in the candidate box combination. It is understood that, as a possible implementation, the current candidate box can be determined to be related to the first candidate box in the candidate box combination when the relevance level of each dimension meets the preset requirements; or, as another possible implementation, the current candidate box can be determined to be related to the first candidate box in the candidate box combination when the relevance level of some dimensions meets the preset requirements, and this is not limited here. In summary, when the number of dimensions meeting the preset requirements is not less than a certain threshold, it can be determined that the current candidate box is related to the first candidate box in the candidate box combination. This threshold can be set as a predetermined proportion of the total number of dimensions, such as 50% or 70%, and is not limited here. The above method verifies the degree of relevance by setting degree thresholds for several dimensions, thereby determining whether the current candidate box is related to the first candidate box in the candidate box combination. Verifying across several dimensions helps improve the accuracy of the verification, further enhancing the accuracy of determining the degree of relevance between the current candidate box and the first candidate box in the candidate box combination. Furthermore, based on the second candidate box in the candidate box combination that is related to the first candidate box, it is determined whether to remove the candidate box combination. The above method takes the second candidate box to which the intersection belongs as the current candidate box, and determines whether the current candidate box is related to the first candidate box in the candidate box combination based on the relevance of several dimensions. In this process, the relevance of the candidate box combination is determined by the relevance of several dimensions, which improves the accuracy of the judgment on the relevance between the current candidate box and the first candidate box in the candidate box combination. Further, it determines whether to remove the candidate box combination, which helps to improve the accuracy of the candidate box combination analysis.

[0043] Furthermore, after analyzing one intersection generated by the candidate box combinations using the above method to determine whether the second candidate box to which the intersection belongs is related to the first candidate box in the candidate box combination, the analysis can continue to the next intersection until all intersections generated by the candidate box combinations have been analyzed. This allows us to determine whether the second candidate box to which each intersection generated by the candidate box combination belongs is related to the first candidate box in the candidate box combination, thus determining whether to retain the candidate box combination. Further, for each candidate box combination, this process can be repeated to select which candidate box combinations to retain or remove.

[0044] In a specific implementation scenario, as one approach, when each second candidate box in a candidate box combination is related to the first candidate box in the candidate box combination, the candidate box combination can be determined to be retained; when at least one second candidate box in a candidate box combination is not related to the first candidate box in the candidate box combination, the candidate box combination can be determined to be eliminated.

[0045] In another specific implementation scenario, unlike the aforementioned implementation, for each candidate box combination, the total number of second candidate boxes related to the first candidate box within that combination can be counted. If the total number is not less than a threshold, the candidate box combination can be retained; otherwise, if the total number is less than the threshold, the candidate box combination can be removed. Specifically, the threshold can be the product of a preset percentage (e.g., 80%, 90%) and the total number of auxiliary targets. This method, by counting the total number of second candidate boxes related to the first candidate box within a candidate box combination and then determining whether to remove the candidate box combination based on the total number, helps improve the applicability of the target detection method.

[0046] Step S14: Select the first candidate box from the retained candidate box combinations as the target detection box of the main target.

[0047] In one implementation scenario, after obtaining the retained candidate box combinations, the first candidate box in the retained candidate box combination can be used as the target detection box of the main target. That is, the number of target detection boxes is determined based on the retained candidate box combinations; that is, when there are n retained candidate box combinations, there are also n target detection boxes of the main target.

[0048] The above scheme involves detecting the main target in the image to be detected, obtaining a first candidate bounding box for the main target, and detecting several secondary targets in the image to be detected, obtaining second candidate bounding boxes for each secondary target; wherein the secondary targets are part of the main target; and combining any first candidate bounding box of the main target with any second candidate bounding box of each secondary target to obtain a candidate bounding box combination; then, for each candidate bounding box combination, analyzing whether to discard the candidate bounding box combination based on the intersection between the first candidate bounding box and each second candidate bounding box; and finally, using the first candidate bounding box in the retained candidate bounding box combinations as the target detection bounding box of the main target. This process, on the one hand, involves detecting the main target and several secondary targets in the image to be detected separately to obtain the first and second candidate bounding boxes. The system combines first and second candidate boxes to obtain candidate box combinations. This process relies solely on image information of the image to be detected, eliminating the need for additional equipment and minimizing target detection costs while improving adaptability. Furthermore, for each candidate box combination, the system analyzes the intersections between the first and second candidate boxes to determine whether to eliminate them. Based on the retained candidate box combinations, the target detection box for the primary target is obtained. This leverages the constraint relationship between the primary and secondary targets to aid in target detection, improving the accuracy of the retained candidate box combinations and consequently, the accuracy of the primary target's detection box. Therefore, this method effectively reduces detection costs, enhances detection adaptability, and simultaneously improves target detection accuracy.

[0049] Please see Figure 4 , Figure 4 This is a schematic diagram of the framework of an embodiment of the target detection method of this application. Specifically, an image to be detected can be acquired first, a main target can be detected in the image to be detected to obtain a first candidate box of the main target, and several secondary targets (secondary target 1, ..., secondary target n) can be detected in the image to be detected to obtain a second candidate box of each secondary target; any first candidate box of the main target can be combined with any second candidate box of each secondary target to obtain a candidate box combination; further, based on the intersection between the first candidate box and each second candidate box, the candidate box combination is judged, and candidate box combinations that do not meet the preset conditions are eliminated to obtain a retained candidate box combination, and the first candidate box in the retained candidate box combination is used as the target detection box of the main target.

[0050] The above scheme involves detecting the main target in the image to be detected, obtaining a first candidate bounding box for the main target, and detecting several secondary targets in the image to be detected, obtaining second candidate bounding boxes for each secondary target; wherein the secondary targets are part of the main target; and combining any first candidate bounding box of the main target with any second candidate bounding box of each secondary target to obtain a candidate bounding box combination; then, for each candidate bounding box combination, analyzing whether to discard the candidate bounding box combination based on the intersection between the first candidate bounding box and each second candidate bounding box; and finally, using the first candidate bounding box in the retained candidate bounding box combinations as the target detection bounding box of the main target. This process, on the one hand, involves detecting the main target and several secondary targets in the image to be detected separately to obtain the first and second candidate bounding boxes. The system combines first and second candidate boxes to obtain candidate box combinations. This process relies solely on image information of the image to be detected, eliminating the need for additional equipment and minimizing target detection costs while improving adaptability. Furthermore, for each candidate box combination, the system analyzes the intersections between the first and second candidate boxes to determine whether to eliminate them. Based on the retained candidate box combinations, the target detection box for the primary target is obtained. This leverages the constraint relationship between the primary and secondary targets to aid in target detection, improving the accuracy of the retained candidate box combinations and consequently, the accuracy of the primary target's detection box. Therefore, this method effectively reduces detection costs, enhances detection adaptability, and simultaneously improves target detection accuracy.

[0051] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0052] Please see Figure 5 , Figure 5 This is a schematic diagram of the framework of an embodiment of the target detection device of this application. The target detection device 50 includes a detection module 51, a combination module 52, an analysis module 53, and a determination module 54. The detection module 51 is used to detect a main target in the image to be detected, obtaining a first candidate box of the main target, and to detect several secondary targets in the image to be detected, obtaining second candidate boxes of each secondary target; wherein the several secondary targets belong to the main target; the combination module 52 is used to combine any first candidate box of the main target with any second candidate box of each secondary target to obtain a candidate box combination; the analysis module 53 is used to analyze whether to remove a candidate box combination based on the intersection between the first candidate box and each second candidate box; the determination module 54 is used to select the first candidate box from the retained candidate box combinations as the target detection box of the main target.

[0053] The above scheme involves detecting the main target in the image to be detected, obtaining a first candidate bounding box for the main target, and detecting several secondary targets in the image to be detected, obtaining second candidate bounding boxes for each secondary target; wherein the secondary targets are part of the main target; and combining any first candidate bounding box of the main target with any second candidate bounding box of each secondary target to obtain a candidate bounding box combination; then, for each candidate bounding box combination, analyzing whether to discard the candidate bounding box combination based on the intersection between the first candidate bounding box and each second candidate bounding box; and finally, using the first candidate bounding box in the retained candidate bounding box combinations as the target detection bounding box of the main target. This process, on the one hand, involves detecting the main target and several secondary targets in the image to be detected separately to obtain the first and second candidate bounding boxes. The system combines first and second candidate boxes to obtain candidate box combinations. This process relies solely on image information of the image to be detected, eliminating the need for additional equipment and minimizing target detection costs while improving adaptability. Furthermore, for each candidate box combination, the system analyzes the intersections between the first and second candidate boxes to determine whether to eliminate them. Based on the retained candidate box combinations, the target detection box for the primary target is obtained. This leverages the constraint relationship between the primary and secondary targets to aid in target detection, improving the accuracy of the retained candidate box combinations and consequently, the accuracy of the primary target's detection box. Therefore, this method effectively reduces detection costs, enhances detection adaptability, and simultaneously improves target detection accuracy.

[0054] In some disclosed embodiments, the analysis module 53 includes an acquisition submodule and a determination submodule. The acquisition submodule is used to take the second candidate box to which the intersection belongs as the current candidate box for each intersection generated by the candidate box combination, and measure the correlation between the intersection and the current candidate box in several dimensions, and determine whether the current candidate box is related to the first candidate box in the candidate box combination based on the correlation corresponding to the several dimensions. The determination submodule is used to determine whether to remove the candidate box combination based on the second candidate box in the candidate box combination that is related to the first candidate box.

[0055] Therefore, by taking the second candidate box to which the intersection belongs as the current candidate box, and determining whether the current candidate box is related to the first candidate box in the candidate box combination based on the correlation degree corresponding to several dimensions, the correlation of the candidate box combination is determined by determining the correlation degree corresponding to several dimensions, thereby improving the accuracy of the correlation judgment between the current candidate box and the first candidate box in the candidate box combination. Further determining whether to remove the candidate box combination helps to improve the accuracy of the candidate box combination analysis.

[0056] In some disclosed embodiments, the dimensions include at least one of a first dimension related to geometric space and a second dimension related to color space.

[0057] In some disclosed embodiments, the acquisition submodule includes a first response unit, a second response unit, and a third response unit. The first response unit is configured to respond to several dimensions, including the x-axis direction, by obtaining the ratio of the intersection to the length of the current candidate box in the x-axis direction, as the relevance in the x-axis direction; the second response unit is configured to respond to several dimensions, including the y-axis direction, by obtaining the ratio of the intersection to the length of the current candidate box in the y-axis direction, as the relevance in the y-axis direction; and the third response unit is configured to respond to several dimensions, including the area dimension, by obtaining the ratio of the intersection to the area of ​​the current candidate box, as the relevance in the area dimension.

[0058] In some disclosed embodiments, the acquisition submodule further includes a verification unit and a determination unit. The verification unit is used to verify whether the relevance of each dimension meets preset requirements based on degree thresholds set for several dimensions. The determination unit is used to determine whether the current candidate box is related to the first candidate box in the candidate box combination based on the number of dimensions that meet the preset requirements.

[0059] Therefore, by setting thresholds for several dimensions, the degree of relevance is verified, thereby determining whether the current candidate box is related to the first candidate box in the candidate box combination. In this process, verification on several dimensions helps to improve the accuracy of the verification, and further improves the accuracy of determining the degree of relevance between the current candidate box and the first candidate box in the candidate box combination.

[0060] In some disclosed embodiments, the determining submodule includes a statistics unit and a selection unit. The statistics unit is used to count the total number of second candidate boxes associated with the first candidate box in the candidate box combination; the selection unit is used to determine whether to remove the candidate box combination based on the total number.

[0061] Therefore, by counting the total number of second candidate boxes related to the first candidate box in the candidate box combination, and then determining whether to remove the candidate box combination based on the total number, it helps to improve the applicability of the object detection method.

[0062] In some disclosed embodiments, when the primary target is a human body, several secondary targets include at least a human face.

[0063] Please see Figure 6 , Figure 6 This is a schematic diagram of a framework of an embodiment of the electronic device of this application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other. The memory 61 stores program instructions, and the processor 62 is used to execute the program instructions to implement the steps in any of the above-described target detection method embodiments. Specifically, the electronic device 60 may include, but is not limited to: a conference tablet, a touch screen all-in-one machine, a desktop computer, a laptop computer, a server, a mobile phone, a tablet computer, etc., and is not limited thereto.

[0064] Specifically, processor 62 controls itself and memory 61 to implement the steps in any of the above-described target detection method embodiments. Processor 62 can also be referred to as a CPU (Central Processing Unit). Processor 62 may be an integrated circuit chip with signal processing capabilities. Processor 62 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 62 can be implemented using integrated circuit chips.

[0065] The above scheme, on the one hand, detects the main target and several secondary targets separately in the image to be detected, obtaining first and second candidate boxes. These first and second candidate boxes are then combined to obtain a candidate box combination. In this process, only the image information of the image to be detected is needed to obtain the candidate box combination, without adding any additional equipment, thus minimizing the cost of target detection and improving its adaptability. On the other hand, for each candidate box combination, the intersection between the first and second candidate boxes is analyzed to determine whether to eliminate the candidate box combination. Based on the retained candidate box combinations, the target detection box of the main target is obtained. This allows the constraint relationship between the main target and secondary targets to assist target detection, helping to improve the accuracy of the retained candidate box combinations, and thus improving the accuracy of the main target's target detection box. Therefore, it can improve the accuracy of target detection while reducing detection costs and improving detection adaptability.

[0066] Please see Figure 7 , Figure 7 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 70 stores program instructions 71 that can be executed by a processor. The program instructions 71 are used to implement the steps in any of the above-described embodiments of the target detection method.

[0067] The above scheme, on the one hand, detects the main target and several secondary targets separately in the image to be detected, obtaining first and second candidate boxes. These first and second candidate boxes are then combined to obtain a candidate box combination. In this process, only the image information of the image to be detected is needed to obtain the candidate box combination, without adding any additional equipment, thus minimizing the cost of target detection and improving its adaptability. On the other hand, for each candidate box combination, the intersection between the first and second candidate boxes is analyzed to determine whether to eliminate the candidate box combination. Based on the retained candidate box combinations, the target detection box of the main target is obtained. This allows the constraint relationship between the main target and secondary targets to assist target detection, helping to improve the accuracy of the retained candidate box combinations, and thus improving the accuracy of the main target's target detection box. Therefore, it can improve the accuracy of target detection while reducing detection costs and improving detection adaptability.

[0068] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0069] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0070] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0071] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0072] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0073] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A target detection method, characterized in that, include: In the image to be detected, a main target is detected to obtain a first candidate bounding box of the main target, and several secondary targets are detected in the image to be detected to obtain second candidate bounding boxes of each of the secondary targets; wherein, the several secondary targets belong to the main target; Each of the first candidate boxes of the main target is combined with each of the second candidate boxes of each of the auxiliary targets to obtain a candidate box combination; wherein, the candidate box combination includes one first candidate box of the main target and one second candidate box of each of the auxiliary targets; For each candidate box combination, based on the intersection between the first candidate box and each of the second candidate boxes, it is analyzed whether to remove the candidate box combination; The first candidate box in the retained candidate box combination is used as the target detection box of the main target.

2. The method according to claim 1, characterized in that, The step of analyzing whether to remove the candidate box combination based on the intersection between the first candidate box and each of the second candidate boxes includes: For each intersection generated by the candidate box combination, the second candidate box to which the intersection belongs is taken as the current candidate box, and the correlation between the intersection and the current candidate box is measured in several dimensions respectively. Based on the correlation corresponding to the several dimensions respectively, it is determined whether the current candidate box is related to the first candidate box in the candidate box combination. Based on the second candidate box in the candidate box combination that is related to the first candidate box, determine whether to remove the candidate box combination.

3. The method according to claim 2, characterized in that, The aforementioned dimensions include at least one of a first dimension related to geometric space and a second dimension related to color space.

4. The method according to claim 3, characterized in that, The measurement of the correlation between the intersection and the current candidate box in several dimensions includes at least one of the following: In response to the x-axis direction being one of the dimensions, the ratio of the intersection to the length of the current candidate box in the x-axis direction is obtained as the degree of correlation in the x-axis direction; In response to the aforementioned dimensions including the y-axis direction, the ratio of the intersection to the length of the current candidate box in the y-axis direction is obtained as the degree of correlation in the y-axis direction; In response to the several dimensions including the area dimension, the ratio of the intersection to the area of ​​the current candidate box is obtained as the correlation degree of the area dimension.

5. The method according to claim 2, characterized in that, The step of determining whether the current candidate box is related to the first candidate box in the candidate box combination based on the relevance corresponding to the several dimensions includes: Based on the degree thresholds set for the aforementioned dimensions, verify whether the correlation degree of each of the aforementioned dimensions meets the preset requirements; Based on the number of dimensions that meet the preset requirements, it is determined whether the current candidate box is related to the first candidate box in the candidate box combination.

6. The method according to claim 2, characterized in that, The step of determining whether to remove the candidate box combination based on the second candidate box related to the first candidate box in the candidate box combination includes: Count the total number of second candidate boxes related to the first candidate box in the candidate box combination; Based on the total number, determine whether to remove the candidate box combination.

7. The method according to claim 1, characterized in that, When the primary target is a human body, the secondary targets include at least a human face.

8. A target detection device, characterized in that, include: The detection module is used to detect a main target in the image to be detected, obtain a first candidate box of the main target, and detect several secondary targets in the image to be detected, obtain a second candidate box of each of the secondary targets; wherein the several secondary targets belong to the main target; A combination module is used to combine any first candidate box of the main target with any second candidate box of each of the auxiliary targets to obtain a candidate box combination; wherein, the candidate box combination includes one first candidate box of the main target and one second candidate box of each auxiliary target; The analysis module is used to analyze whether to remove each candidate box combination based on the intersection between the first candidate box and each of the second candidate boxes for each candidate box combination. The determination module is used to select the first candidate box from the retained candidate box combination as the target detection box of the main target.

9. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores program instructions and the processor executes the program instructions to implement the target detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device stores program instructions that can be executed by a processor, the program instructions being used to implement the target detection method according to any one of claims 1 to 7.