Target detection method, computer device, computer readable storage medium and vehicle

By optimizing the vertices of the intersection region between rotated boxes, a stable and accurate intersection-union ratio (IU) is obtained, which solves the problem of unstable and inaccurate IU of rotated boxes, and improves the accuracy of target detection and the safety of autonomous driving.

CN116030436BActive Publication Date: 2026-03-24安徽蔚来智驾科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing object detection methods suffer from unstable and inaccurate input data when obtaining the intersection-union ratio between rotated boxes, leading to false filtering and affecting the accuracy and security of object detection.

Method used

By obtaining the initial vertices of the intersection region between two rotating frames, optimizing adjacent initial vertices into a single vertex, and calculating the final vertices and area of ​​the intersection region, a stable and accurate intersection-union ratio can be obtained.

Benefits of technology

This improves the accuracy of rotating frame filtering, avoids missed detections of targets, and ensures the safety and reliability of autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116030436B_ABST
    Figure CN116030436B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automatic driving, and particularly provides a target detection method, computer equipment, a computer readable storage medium and a vehicle, and aims to solve the problem of improving target detection accuracy. To this end, the method provided by the application comprises the following steps: performing target detection on an image to obtain a plurality of rotating boxes corresponding to a target, filtering the plurality of rotating boxes according to the intersection-over-union of each two rotating boxes, and obtaining a detection result of the target according to the remaining rotating boxes after the filtering. The method provided by the application obtains the intersection-over-union in the following manner: obtaining initial vertices of an intersection region between two rotating boxes, optimizing the initial vertices adjacent to the vertex position into one vertex to obtain final vertices of the intersection region, obtaining the area of the intersection region according to the final vertices, and obtaining the intersection-over-union of the two rotating boxes according to the area. The accuracy of the intersection-over-union can be effectively improved by the above method, and the accuracy of target detection is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and specifically to a target detection method, a computer device, a computer-readable storage medium, and a vehicle. Background Technology

[0002] When controlling autonomous driving in vehicles, images or 3D point clouds of the surrounding environment are typically acquired. Target detection (e.g., obstacles, pedestrians) is then performed on these images or point clouds to obtain target information (e.g., target position, size). This target information is then used to control the vehicle's autonomous driving (e.g., planning the vehicle's trajectory). In practical applications, multiple bounding boxes often correspond to the same target during target detection. In such cases, it's necessary to obtain the Intersection over Union (IoU) ratio between these bounding boxes and filter them based on this ratio to remove those that don't actually belong to the target. However, current conventional target detection methods suffer from unstable or inaccurate input data (the data used to obtain the IoU, such as the bounding box's position information) when obtaining the IoU ratio between two bounding boxes. This significantly impacts the stability and accuracy of the IoU ratio. In such situations, filtering bounding boxes based on the IoU ratio may result in false filtering, incorrectly filtering out bounding boxes belonging to the same target, leading to missed target detections. This poses a significant safety hazard to autonomous driving. For example, filtering out the target's bounding box during target tracking may cause tracking interruption.

[0003] Accordingly, a new technical solution is needed in this field to solve the above problems. Summary of the Invention

[0004] To overcome the above-mentioned deficiencies, the present invention is proposed to provide a target detection method, computer device, computer-readable storage medium, and vehicle that solve or at least partially solve the technical problem of how to improve the accuracy of target detection.

[0005] In a first aspect, a target detection method is provided, the method comprising:

[0006] Perform object detection on the image to obtain multiple rotated bounding boxes corresponding to the object;

[0007] Based on the intersection-union ratio of every two rotating frames in the plurality of rotating frames, the plurality of rotating frames are filtered, and the detection result of the target is obtained based on the remaining rotating frames after filtering.

[0008] The intersection-union ratio is obtained in the following way:

[0009] Obtain the initial vertices of the intersection region between two rotating boxes, and optimize the initial vertices with adjacent vertex positions into a single vertex to obtain the final vertices of the intersection region;

[0010] The area of ​​the intersection region is obtained based on the final vertex, and the intersection-union ratio of the two rotated frames is obtained based on the area.

[0011] In one technical solution of the above-mentioned target detection method, the step of "obtaining the initial vertices of the intersection region between two rotated frames" specifically includes:

[0012] Obtain the intersection point between the two rotating frames and use the intersection point as the initial vertex;

[0013] And / or,

[0014] For each of the two rotating frames, obtain the frame vertex located inside the other rotating frame from the frame vertices of the current rotating frame, and use the frame vertex located inside the other rotating frame as the initial vertex.

[0015] In one technical solution of the above-mentioned target detection method, before "optimizing the initial vertices with adjacent vertex positions into a single vertex", the method further includes:

[0016] Determine if the initial number of vertices is less than a preset threshold.

[0017] If so, then set the intersection-union ratio to zero directly;

[0018] If not, continue to optimize the initial vertices that are adjacent to each other into a single vertex.

[0019] In one technical solution of the above-mentioned object detection method, the step of "optimizing initial vertices with adjacent vertex positions into a single vertex" specifically includes:

[0020] Obtain the vertex position of each of the plurality of initial vertices;

[0021] Obtain the average position of the vertex;

[0022] The plurality of initial vertices are optimized into vertices located at the average position.

[0023] In one technical solution of the above-mentioned object detection method, the step of "optimizing initial vertices with adjacent vertex positions into a single vertex" further includes:

[0024] According to the preset vertex position arrangement order, each initial vertex is sorted based on its position.

[0025] During the sorting process, initial vertices with adjacent vertex positions are optimized into a single vertex, and the optimized vertices are sorted according to their vertex positions.

[0026] The vertex position includes the vertex angle. The vertex angle corresponding to each initial vertex is the angle between the line connecting each initial vertex and the same target vertex and the preset coordinate axis in the image coordinate system. The target vertex is one of all the initial vertices in the intersection region.

[0027] In one technical solution of the above-mentioned target detection method, the method further includes obtaining initial vertices adjacent to the vertex positions through the following method:

[0028] Obtain multiple initial vertices that are adjacent in both angle and distance.

[0029] Wherein, the vertex angle corresponding to each initial vertex is the angle between the line connecting each initial vertex and the same target vertex and the preset coordinate axis in the image coordinate system, and the target vertex is one of all the initial vertices in the intersection region;

[0030] The vertex distance corresponding to each initial vertex is the distance from each initial vertex to the center point of the intersection region.

[0031] In one technical solution of the above-mentioned target detection method, before the step of "obtaining the initial vertices of the intersection region between the two rotated frames", the method further includes:

[0032] Determine whether the angle difference between the rotation angles of the two rotating frames is less than a set threshold.

[0033] If so, the intersection-union ratio of the two rotated boxes is obtained using the method for obtaining the intersection-union ratio of the parallel boxes, and the initial vertex is no longer obtained;

[0034] If not, continue to acquire the initial vertex.

[0035] In a second aspect, a computer device is provided, comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and executed by the processor to perform the method described in any of the above-described technical solutions of the target detection method.

[0036] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, the program codes being adapted to be loaded and run by a processor to perform the method described in any of the above-described target detection methods.

[0037] In a fourth aspect, a vehicle is provided that includes the computer equipment described in the above-described computer equipment technical solution.

[0038] The above-described technical solutions of the present invention have at least one or more of the following beneficial effects:

[0039] In the technical solution of the target detection method provided by this invention, target detection can be performed on an image to obtain multiple rotating boxes corresponding to the target. Then, the multiple rotating boxes are filtered according to the intersection-union ratio (IU / U) of every two rotating boxes, and the target detection result is obtained based on the remaining rotating boxes after filtering. Simultaneously, the IU / U can also be obtained in the following way: obtain the initial vertices of the intersection region between two rotating boxes, and optimize adjacent initial vertices into a single vertex to obtain the final vertex of the intersection region; obtain the area of ​​the intersection region based on the final vertex, and obtain the IU / U based on the area. Through the above implementation scheme, even if the input data (the data used to obtain the IU / U, such as the position information of the rotating boxes) is unstable or inaccurate, a stable and accurate IU / U can be obtained, thereby avoiding the filtering out of rotating boxes belonging to the same target, which would lead to missed detections in target detection.

[0040] Furthermore, in other technical solutions implementing the target detection method provided by this invention, before obtaining the initial vertices of the intersection region between two rotated boxes, it can be determined whether the angular difference between the rotation angles of the two rotated boxes is less than a set threshold. If so, the intersection-union ratio (IU) of parallel boxes is obtained using the IU method, and the IU of the two rotated boxes is obtained without obtaining the initial vertices, i.e., the IU of the initial vertices is no longer obtained using the method described in the aforementioned technical solution. If not, the initial vertices are obtained again, i.e., the IU of the initial vertices is still obtained using the method described in the aforementioned technical solution. In this way, the efficiency of obtaining the IU can be improved while ensuring the stability and accuracy of the IU. Attached Figure Description

[0041] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:

[0042] Figure 1 This is a schematic flowchart of the main steps of a target detection method according to an embodiment of the present invention;

[0043] Figure 2 This is a schematic flowchart of the main steps of a method for obtaining the intersection-union ratio between two rotating frames according to an embodiment of the present invention;

[0044] Figure 3 This is a schematic diagram of the vertices of the intersection region according to an embodiment of the present invention;

[0045] Figure 4 This is a schematic diagram of initial vertices with adjacent vertex positions according to an embodiment of the present invention;

[0046] Figure 5 This is a schematic diagram of the vertex angle according to an embodiment of the present invention;

[0047] Figure 6 This is a schematic flowchart of the main steps of a method for obtaining the intersection-union ratio between two rotating frames according to another embodiment of the present invention;

[0048] Figure 7 This is a schematic diagram of the main structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0049] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0050] In the description of this invention, "processor" can include hardware, software, or a combination of both. A processor can be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and / or signal processing capabilities. The processor can be implemented in software, in hardware, or a combination of both. Computer-readable storage media includes any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B.

[0051] The following describes an embodiment of the target detection method provided by the present invention.

[0052] See appendix Figure 1 , Figure 1 This is a schematic flowchart illustrating the main steps of a target detection method according to an embodiment of the present invention. Figure 1 As shown, the target detection method in this embodiment of the invention mainly includes the following steps S101 to S102.

[0053] Step S101: Perform target detection on the image to obtain multiple rotating boxes corresponding to the target.

[0054] The image can be acquired through a vision sensor (such as a camera) on the vehicle. After obtaining the image, it can be input into a preset detection model. This detection model detects targets in the image and obtains the corresponding bounding box of the target in the image. This detection model can be constructed using conventional methods in the field of neural network technology. This embodiment of the invention does not limit the specific structure and training method of the detection model, as long as it has the ability to detect targets from the image and obtain the bounding box.

[0055] A rotated box can be understood as the bounding box of the target in an image.

[0056] A rotated frame can be represented as (x c ,y c ,w,h,θ),(x c ,y c () indicates the center point position of the rotating frame, x c This represents the center point's position on the X-axis and y-axis in the image coordinate system. c The coordinates of the center point on the Y-axis in the image coordinate system are given by 'w', 'h', and 'θ'. 'w' represents the width of the rotating frame in the image, 'h' represents the height of the rotating frame in the image, and 'θ' represents the rotation angle of the rotating frame. When rotating counterclockwise along the X-axis in the image coordinate system, the side of the rotating frame that first coincides with the X-axis is the width, and its length is the width 'w'. The side perpendicular to this width is the height, and its length is the height 'h'. The angle between the width and the X-axis is the rotation angle 'θ'.

[0057] It should be noted that all vehicle-related operations mentioned in this invention, such as acquiring images through the vehicle's visual sensors, are performed after full authorization from the user or other parties. In other words, the vehicle in this invention is an authorized vehicle. In some embodiments, the vehicle's infotainment system or a backend server can detect whether authorization information has been received. If authorization information is received, it indicates that the current vehicle is authorized; otherwise, the current vehicle is unauthorized. The authorization information can be sent through terminal devices including, but not limited to, mobile phones, tablets, and smartwatches.

[0058] Step S102: Filter the multiple rotating frames according to the intersection-union ratio of every two rotating frames, and obtain the target detection result based on the remaining rotating frames after filtering.

[0059] The intersection-union ratio is the ratio between the area of ​​the intersection (or overlap) region between two rotated frames and the total area of ​​the two rotated frames. The intersection-union ratio can be expressed as shown in the following formula (1).

[0060] IoU=c / (a+bc) (1)

[0061] The meanings of the parameters in formula (1) are as follows:

[0062] IoU represents the intersection-union ratio, c represents the area of ​​the intersection region, a represents the area of ​​one rotated frame, and b represents the area of ​​another rotated frame.

[0063] When performing object detection on an image, multiple bounding boxes may be detected for the same target, each representing the current target. In this case, it's necessary to filter these bounding boxes to remove those that don't actually belong to the current target. For example, when targets occlude each other, other targets might be misidentified as the current target, leading to the misidentification of their bounding boxes as the current target's bounding box. Furthermore, after removing bounding boxes that don't actually belong to the current target, if multiple bounding boxes still exist, it's necessary to select the optimal bounding box to obtain the object detection result, i.e., removing redundant bounding boxes, to improve the efficiency of object detection.

[0064] In this embodiment of the invention, a conventional method in the field of autonomous driving technology, based on the intersection-union ratio (IU) of rotated frames, can be used for filtering. This involves filtering multiple rotated frames based on the IU of every two of them, and then obtaining the target detection result from the remaining rotated frames. For example, when removing rotated frames that do not actually belong to the current target, if the IU of a rotated frame is very small (e.g., less than a preset IU threshold), it indicates that this rotated frame does not actually belong to the current target and can be removed. When removing redundant rotated frames, the rotated frames can be sorted according to the IU, and the rotated frame with the largest IU among all other rotated frames can be selected as the optimal rotated frame. Then, the remaining rotated frames are removed.

[0065] The following is in conjunction with the appendix Figure 2 To be continued Figure 5 The method for obtaining the intersection-union ratio is explained.

[0066] like Figure 2 As shown, in this embodiment of the invention, the intersection-to-union ratio of two rotating frames can be obtained through the following steps S201 to S202.

[0067] Step S201: Obtain the initial vertices of the intersection region between the two rotated boxes, and optimize the initial vertices with adjacent vertex positions into a single vertex to obtain the final vertex of the intersection region.

[0068] The intersection region refers to the area where two revolved frames intersect or overlap; the geometry of this region is represented by a convex hull. For example... Figure 3 As shown, the intersection of rotating frame 1 and rotating frame 2 is a convex hull containing four vertices (a1, a2, a3, a4).

[0069] Figure 3 The diagram shows that, ideally, the intersection of rotated frame 1 and rotated frame 2 contains four vertices. However, in practical applications, multiple initial vertices may be detected near each vertex. In such cases, adjacent initial vertices can be optimized into a single vertex. For example... Figure 4 As shown, four initial vertices (a11, a12, a13, a14) are obtained near a vertex in the intersection region. These four initial vertices can then be optimized into a single vertex. Figure 3 Vertex a1 in the original text. After optimization, the optimized vertex and the unoptimized initial vertex together form the final vertices of the intersection region. For example... Figure 4 As shown, the final vertices of the intersection region include the initial vertices a2, a3, and a4, and the vertex a1 formed after optimizing a11 to a14. Figure 4 (Not shown).

[0070] In some implementations, after obtaining the initial vertices of the intersection region between two rotating frames and before optimizing adjacent initial vertices into a single vertex, it can be determined whether the number of initial vertices is less than a preset threshold. If so, it indicates that there is no intersection region between the two rotating frames, and the intersection-union ratio can be directly set to zero, without executing the other steps of step S201 or step S202. If not, it indicates that there is an intersection region between the two rotating frames, and adjacent initial vertices can continue to be optimized into a single vertex, i.e., executing the other steps of step S201 and continuing to execute step S202. In this implementation, the minimum number of vertices in the intersection region when there is an intersection region between the two rotating frames can be counted, and the preset threshold can be set to this minimum value. For example, if the minimum number of vertices is 3, the preset threshold can be 3. Through the above method, it is possible to quickly and conveniently determine whether there is an intersection region between two rotating frames. If there is an intersection region, it is not necessary to execute subsequent steps, thereby reducing the consumption of computing resources and improving efficiency.

[0071] Step S202: Obtain the area of ​​the intersection region based on the final vertex, and obtain the intersection-union ratio of the two rotated boxes based on the area.

[0072] In this embodiment of the invention, the conventional convex hull area calculation method in the field of geometry can be used to calculate the area of ​​the intersection region (convex hull) based on the final vertex of the intersection region (convex hull). Alternatively, the conventional method for calculating the area of ​​two rotated frames can be used to obtain the areas of each rotated frame. After obtaining the area of ​​the intersection region and the area of ​​each rotated frame, the intersection-union ratio of the two rotated frames can be obtained using the intersection-union ratio calculation formula shown in formula (1).

[0073] In the methods described in steps S201 to S202 above, optimizing adjacent initial vertices into a single vertex is actually a degenerate approach. When obtaining the area of ​​an intersection region, the vertices of the intersection region are usually sorted first, and then the area is obtained based on the sorted vertices. However, when multiple adjacent initial vertices exist near the same location, even a slight error in the position of any one initial vertex (unstable, inaccurate) can affect the sorting result, leading to a significant error (unstable, inaccurate) in the area of ​​the intersection region. Optimizing adjacent initial vertices into a single vertex overcomes this problem, ensuring the stability and accuracy of the intersection region area, and thus improving the stability and accuracy of the intersection-union ratio obtained from the intersection region area.

[0074] Based on the method described in steps S101 to S102 above, the cross-union ratio between rotating frames can be accurately obtained, thereby accurately completing the rotating frame filtering, thus ensuring the accuracy and reliability of the target detection results.

[0075] The following provides a further explanation of step S201 in the above method embodiment.

[0076] I. The method for obtaining the initial vertices of the intersection region is explained.

[0077] In some embodiments of step S201 above, the initial vertices of the intersection region between the two rotating frames can be obtained in the following manner:

[0078] In this embodiment, the intersection point between two rotated frames can be obtained and used as the initial vertex. A rotated frame typically contains four edges, and the intersection point refers to the point where the edges of the two rotated frames meet. For example... Figure 3 As shown, vertices a1 and a3 are the intersection points between the two rotating frames.

[0079] In this embodiment, for each of the two rotating frames, the frame vertex located inside the other rotating frame can be obtained from the frame vertices of the current rotating frame, and the frame vertex located inside the other rotating frame can be used as the initial vertex. For example... Figure 3 As shown, vertex a2 is a vertex of rotating frame 1, and this vertex is located inside rotating frame 2. It should be noted that, in this embodiment of the invention, conventional vertex detection methods in the field of rotating frame detection technology can be used to detect whether a vertex of one rotating frame is located inside another rotating frame; this embodiment of the invention does not impose specific limitations on this method.

[0080] In addition, in this embodiment, the intersection point and the frame vertex located inside another rotating frame can be obtained simultaneously as the initial vertex.

[0081] The above method allows us to obtain each initial vertex of the intersection region as accurately as possible, which helps us to obtain a more accurate area of ​​the intersection region.

[0082] II. The method for obtaining the initial vertices adjacent to the vertex positions is explained.

[0083] In some embodiments of step S201 above, multiple initial vertices that are adjacent in both vertex angle and vertex distance can be obtained as initial vertices that are adjacent in vertex position.

[0084] The vertex angle corresponding to each initial vertex is the angle between the line connecting each initial vertex and the same target vertex and a preset coordinate axis in the image coordinate system. The target vertex is one of all the initial vertices in the intersection region. In some embodiments, the preset coordinate axis can be the X-axis. This embodiment of the invention does not specifically limit this, as long as the vertex angle of each initial vertex is obtained using the same preset coordinate axis.

[0085] like Figure 5 As shown, assume the initial vertices of the intersection region include a1, a2, a31, a32, a33, and a4, and the target vertex is a1. The angle between the continuous line formed by vertex a1 and the target vertex and the positive X-axis is 0°. Figure 5 (Not shown), the angles formed by a2, a31, a32, a33, a4 and the target vertex with the positive X-axis are θ1, θ2, θ3, θ4, θ5, respectively.

[0086] The vertex distance corresponding to each initial vertex is the distance from each initial vertex to the center point of the intersection region. In this embodiment of the invention, the center point of the intersection region can be obtained using conventional center point acquisition methods, and the distance from the initial vertex to the center point of the intersection region can be obtained based on the position of the center point and the position of the initial vertex. This embodiment of the invention does not impose specific limitations on this.

[0087] III. The method of optimizing the initial vertex into a single vertex is explained.

[0088] In some embodiments of step S201 above, the initial vertices with adjacent vertex positions can be optimized into a single vertex through the following steps 11 to 13.

[0089] Step 11: Obtain the vertex position of each of the multiple initial vertices.

[0090] Step 12: Obtain the average position of the vertex.

[0091] like Figure 4As shown, if the initial vertex positions from a11 to a14 are l1, l2, l3, and l4 respectively, then the average position of these vertices is (l1+l2+l3+l4) / 4.

[0092] Step 13: Optimize multiple initial vertices into vertices located at the average position.

[0093] like Figure 4 As shown, the initial vertices a11 to a14 can be optimized into a single vertex. This optimized vertex can be... Figure 3 vertex a1 in the equation.

[0094] Based on the method described in steps 11 to 13 above, the accuracy of initial vertex optimization can be improved, so that even if the initial vertices with adjacent vertex positions are optimized into a single vertex, the convex hull shape of the intersection region can be accurately represented, thereby improving the accuracy of obtaining the area of ​​the intersection region.

[0095] As described in the foregoing method embodiments, when obtaining the area of ​​the intersection region, it is usually necessary to first sort the vertices of the intersection region, and then obtain the area based on the sorted vertices. To ensure the accuracy of the sorting, in some embodiments of step S201, each initial vertex can be sorted according to a preset vertex position order, and adjacent initial vertices can be optimized into a single vertex during the sorting process. This optimized vertex is then sorted based on its position.

[0096] Vertex positions can include vertex angles. The vertex angle corresponding to each initial vertex is the angle between the line connecting each initial vertex and the same target vertex and a preset coordinate axis in the image coordinate system. The target vertex is one of all the initial vertices in the intersection region. In this case, the preset order of vertex positions is actually the order of vertex angles. This order can be from smallest to largest vertex angles or from largest to smallest vertex angles. This embodiment of the invention does not specifically limit this.

[0097] If multiple initial vertices with adjacent positions are detected during the sorting process, these initial vertices are first optimized into a single vertex, and then the optimized vertex is sorted. For example... Figure 5 As shown, assume the initial vertices of the intersection region include a1, a2, a31, a32, a33, and a4, and the target vertex is a1. The angles formed by vertices a1, a2, a31, a32, a33, and a4 with the target vertex and the positive X-axis are 0° respectively. Figure 5(not shown), θ1, θ2, θ3, θ4, θ5, 0° < θ1 < θ2 < θ3 < θ4 < θ5. a31, a32, a33 are three initial vertices with adjacent positions. The default order of the vertex positions is in ascending order of vertex angles.

[0098] If a31, a32, and a33 are not optimized into a single vertex during the sorting process, the order of the vertices will be a1, a2, a31, a32, a33, and a4.

[0099] If during the sorting process, a31, a32, and a33 are optimized into a single vertex a3( Figure 5 If (not shown), then the order of the vertices is a1, a2, a3, a4.

[0100] The above is an explanation of step S201.

[0101] Further, please refer to the appendix. Figure 6 In an embodiment of the target detection method provided by the present invention, before obtaining the initial vertices of the intersection region between the two rotated frames in step S201, it can be determined whether to use the intersection-union ratio (IU) method of parallel frames based on the rotation angle of the rotated frames, and the IU of the two rotated frames can be obtained. Specifically, it can be achieved by... Figure 6 The following steps S301 to S303 are used to obtain the crossover-union ratio.

[0102] Step S301: Determine whether the angle difference between the two rotating frames is less than a set threshold; if yes, it indicates that the angle difference is relatively small and the two rotating frames are close to being parallel. In this case, the intersection-union ratio of parallel frames can be used, so proceed to step S302; if no, it indicates that the angle difference is relatively large and the two rotating frames are not close to being parallel. In this case, the intersection-union ratio of parallel frames cannot be used, so proceed to step S303.

[0103] Step S302: Obtain the intersection-union ratio (IU) of two rotated frames using a parallel frame IU method. Parallel frames are also referred to as horizontal frames in the field of detection frame technology. In this embodiment of the invention, a conventional parallel frame IU method can be used to obtain the IU of two rotated frames. This embodiment of the invention does not specifically limit the method for obtaining the IU of parallel frames.

[0104] Step S303: Obtain the initial vertices and obtain the intersection-union ratio based on the initial vertices.

[0105] In this step, the initial vertices can be obtained by using the methods described in steps S201 to S202 of the aforementioned method embodiment, and the intersection-union ratio can be obtained based on the initial vertices.

[0106] In the methods described in steps S301 to S302 above, the method of obtaining the intersection-union ratio (IU) of two rotated frames using the parallel frame IU method is actually a degenerate approach. As described in steps S201 to S202 of the aforementioned method embodiments, obtaining the IU based on the area of ​​the intersection region requires not only accurately obtaining each vertex of the intersection region but also sorting the vertices and then obtaining the area based on the sorted vertices. In this process, any error (instability, inaccuracy) in any step can affect the area of ​​the intersection region, thereby reducing the stability and accuracy of the IU. However, by sampling the parallel frame IU method when the two rotated frames are nearly parallel, the aforementioned instability and inaccuracy problems can be overcome, ensuring the accuracy of the intersection region area, and thus improving the stability and accuracy of the IU obtained from the intersection region area. Furthermore, since it eliminates the need to perform steps such as obtaining vertices, sorting vertices, and calculating the area, the consumption of computational resources can be reduced, thereby improving the efficiency of obtaining the IU.

[0107] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not necessarily have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These adjusted solutions are equivalent to the technical solutions described in the present invention and therefore will also fall within the protection scope of the present invention.

[0108] Those skilled in the art will understand that all or part of the processes in the method of the above embodiment of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0109] Furthermore, the present invention also provides a computer device.

[0110] See appendix Figure 7 , Figure 7 This is a schematic diagram of the main structure of a computer device according to an embodiment of the present invention. Figure 7 As shown, the computer device in this embodiment of the invention mainly includes a storage device and a processor. The storage device can be configured to store a program for executing the target detection method of the above-described method embodiments, and the processor can be configured to execute the program in the storage device. This program includes, but is not limited to, a program for executing the target detection method of the above-described method embodiments. For ease of explanation, only the parts related to the embodiments of the invention are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of the invention.

[0111] In embodiments of the present invention, the computer device may be a control device comprising various electronic devices. In some possible implementations, the computer device may include multiple storage devices and multiple processors. The program executing the target detection method of the above method embodiments may be divided into multiple subroutines, each subroutine being loaded and run by a processor to perform different steps of the target detection method of the above method embodiments. Specifically, each subroutine may be stored in different storage devices, and each processor may be configured to execute programs in one or more storage devices to jointly implement the target detection method of the above method embodiments, that is, each processor executes different steps of the target detection method of the above method embodiments to jointly implement the target detection method of the above method embodiments.

[0112] The aforementioned multiple processors can be processors deployed on the same device. For example, the aforementioned computer device can be a high-performance device composed of multiple processors, and the aforementioned multiple processors can be processors configured on that high-performance device. Alternatively, the aforementioned multiple processors can also be processors deployed on different devices. For example, the aforementioned computer device can be a server cluster, and the aforementioned multiple processors can be processors on different servers within the server cluster.

[0113] Furthermore, the present invention also provides a computer-readable storage medium.

[0114] In one embodiment of the computer-readable storage medium according to the present invention, the computer-readable storage medium may be configured to store a program for performing the target detection method of the above-described method embodiments. This program may be loaded and run by a processor to implement the target detection method. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The computer-readable storage medium may be a storage device comprising various electronic devices. Optionally, in the embodiments of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.

[0115] Furthermore, the present invention also provides a vehicle.

[0116] In one embodiment of a vehicle according to the present invention, the vehicle may include the computer equipment described in the above-described computer equipment embodiments. In this embodiment, the vehicle may be an autonomous vehicle, an unmanned vehicle, or the like. Furthermore, according to the type of power source, the vehicle in this embodiment may be a gasoline vehicle, an electric vehicle, a hybrid vehicle that combines electric and gasoline power, or a vehicle using other new energy sources, etc.

[0117] The technical solution of the present invention has been described above with reference to one embodiment shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions resulting from such changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A target detection method, characterized in that, The method includes: Perform object detection on the image to obtain multiple rotated bounding boxes corresponding to the object; Based on the intersection-union ratio of every two rotating frames in the plurality of rotating frames, the plurality of rotating frames are filtered, and the detection result of the target is obtained based on the remaining rotating frames after filtering. The intersection-union ratio is obtained in the following way: Obtain the initial vertices of the intersection region between two rotating boxes, and optimize the initial vertices with adjacent vertex positions into a single vertex to obtain the final vertices of the intersection region; The area of ​​the intersection region is obtained based on the final vertex, and the intersection-union ratio of the two rotated frames is obtained based on the area. The step of optimizing adjacent initial vertices into a single vertex includes: sorting each initial vertex according to a preset vertex position order; optimizing adjacent initial vertices into a single vertex during the sorting process; and sorting the optimized vertices according to their positions. The vertex position includes the vertex angle, where the vertex angle corresponding to each initial vertex is the angle between the line connecting each initial vertex and the same target vertex and a preset coordinate axis in the image coordinate system. The target vertex is one of all initial vertices in the intersection region.

2. The method according to claim 1, characterized in that, The steps for "obtaining the initial vertices of the intersection region between two rotated boxes" specifically include: Obtain the intersection point between the two rotating frames and use the intersection point as the initial vertex; And / or, For each of the two rotating frames, obtain the frame vertex located inside the other rotating frame from the frame vertices of the current rotating frame, and use the frame vertex located inside the other rotating frame as the initial vertex.

3. The method according to claim 1, characterized in that, Before "optimizing initially adjacent vertices into a single vertex", the method further includes: Determine if the initial number of vertices is less than a preset threshold. If so, then set the intersection-union ratio to zero directly; If not, continue to optimize the initial vertices that are adjacent to each other into a single vertex.

4. The method according to claim 1, characterized in that, The steps of "optimizing initial vertices with adjacent vertex positions into a single vertex" specifically include: Obtain the vertex position of each of the plurality of initial vertices; Obtain the average position of the vertex; The plurality of initial vertices are optimized into vertices located at the average position.

5. The method according to claim 1, characterized in that, The method further includes obtaining initial vertices adjacent to each other in the following manner: Obtain multiple initial vertices that are adjacent in both angle and distance. Wherein, the vertex angle corresponding to each initial vertex is the angle between the line connecting each initial vertex and the same target vertex and the preset coordinate axis in the image coordinate system, and the target vertex is one of all the initial vertices in the intersection region; The vertex distance corresponding to each initial vertex is the distance from each initial vertex to the center point of the intersection region.

6. The method according to claim 1, characterized in that, Prior to the step of "obtaining the initial vertices of the intersection region between the two rotated frames", the method further includes: Determine whether the angle difference between the rotation angles of the two rotating frames is less than a set threshold. If so, the intersection-union ratio of the two rotated boxes is obtained using the method for obtaining the intersection-union ratio of the parallel boxes, and the initial vertex is no longer obtained; If not, continue to acquire the initial vertex.

7. A computer device comprising a processor and a storage device, said storage device being adapted to store a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to perform the target detection method according to any one of claims 1 to 6.

8. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform the target detection method according to any one of claims 1 to 6.

9. A vehicle, characterized in that, The vehicle includes the computer equipment as described in claim 7.

Citation Information

Patent Citations

  • Parking place state automatic detection method

    CN103198705A

  • Detection frame overlapping degree generation method and target detection method and device

    CN114419333A

  • Method and apparatus for generating zebra crossing in high resolution map, and electronic device

    US20220230453A1