Target detection method and system
By using BEV images to correct 2D and 3D object detection in 3D object detection, the problem of center point offset of the object detection is solved, the accuracy and efficiency of detection are improved, and more efficient object detection is achieved.
Patent Information
- Application Number
- CN202411076772.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-31
AI Technical Summary
When the existing 3D object detection methods are close or close to the edge, the center points of 2D detection and 3D detection are easily offset, resulting in the target being filtered by error, reducing the accuracy and efficiency of detection.
The original image is acquired through the camera, the BEV image is generated for 2D and 3D object detection, and one-time correction and secondary correction are performed to ensure that the center points of 2D and 3D detection are consistent, so as to improve the accuracy and efficiency of the detection.
Through the 2D and 3D object detection correction of BEV images, object detection can be accurately completed, improving the detection accuracy and work efficiency, and avoiding the problem of targets being wrongly filtered.
Smart Images

Figure CN119229405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile technology, and in particular to a target detection method and system. Background Art
[0002] With the advancement of science and technology and the rapid development of productivity, cars have become popular in people's daily lives and have become one of the indispensable means of transportation for people's daily travel, greatly facilitating people's lives.
[0003] Among them, in the field of autonomous driving and robotic vision technology, monocular 3D detection is a key task used to improve the accuracy of subsequent image processing.
[0004] Furthermore, most of the existing 3D target detection methods need to perform 2D detection first, and then map the results of the 2D detection to 3D coordinates. However, when the target is very close or very close to the edge so that only a portion of it is captured, the center points of the existing 2D detection and 3D detection often have a large offset, which causes these targets to be incorrectly filtered during subsequent processing, thereby reducing the detection accuracy and work efficiency. Summary of the invention
[0005] Based on this, the purpose of the present invention is to provide a target detection method and system to solve the problem in the prior art that the center point will be offset during the detection process, resulting in the detection target being incorrectly filtered in the subsequent processing process.
[0006] The first aspect of the embodiment of the present invention proposes:
[0007] A target detection method, wherein the method comprises:
[0008] Acquire an original image corresponding to the target through a camera, and generate a corresponding BEV image according to the original image based on a preset rule;
[0009] Performing 2D object detection on the BEV image to generate a corresponding first detection result, and performing a correction on the truncated object according to the first detection result;
[0010] Based on the first detection result, 3D object detection is performed on the BEV image to generate a corresponding second detection result, and the truncated object is secondarily corrected according to the second detection result to perform object detection on the corrected truncated object.
[0011] The beneficial effect of the present invention is that by converting the collected original image into a corresponding BEV image, the information contained in the image can be obtained accordingly. Based on this, 2D target detection and 3D target detection are performed on the current BEV image in turn. At the same time, corresponding primary correction and secondary correction can be performed respectively, so that the center points of both 2D detection and 3D detection can be corrected to the same position, and then the target detection of subsequent truncated targets can be accurately completed, thereby improving work efficiency.
[0012] Furthermore, the step of generating a corresponding BEV image according to the original image based on a preset rule includes:
[0013] When the original image is acquired in real time, preprocessing the original image to generate a corresponding standard image;
[0014] The BEV image is generated according to the standard image.
[0015] Furthermore, the step of generating the BEV image according to the standard image includes:
[0016] When the standard image is acquired in real time, a three-dimensional image space adapted to the standard image is created in real time through a preset three-dimensional program;
[0017] The inverse projection mapping algorithm adapted to the standard image is called out in real time in a preset algorithm database, and the standard image is converted into the BEV image in the three-dimensional image space through the inverse projection mapping algorithm.
[0018] Furthermore, the step of performing 2D target detection on the BEV image to generate a corresponding first detection result includes:
[0019] When the BEV image is acquired in real time, calling out a first target detection model adapted to the BEV image in the preset algorithm database;
[0020] The first target detection model is used to identify a first position and a first category corresponding to the target object in the BEV image, and the first detection result is generated according to the first position and the first category. The first detection result is unique.
[0021] Furthermore, the step of generating the first detection result according to the first position and the first category includes:
[0022] When the first position and the first category are respectively acquired, mapping processing is performed on the first position and the first category to generate a corresponding mapping pair;
[0023] A corresponding first detection report is generated in real time based on the mapping pair, and the first detection report correspondingly includes the first detection result.
[0024] Further, the step of performing 3D object detection on the BEV image based on the first detection result to generate a corresponding second detection result includes:
[0025] When the first detection result is obtained in real time, the motion trajectory and position change of the target object between consecutive frames are calculated in real time according to the first detection result;
[0026] The second detection result is generated according to the motion trajectory and the position change.
[0027] Furthermore, the step of generating the second detection result according to the motion trajectory and the position change includes:
[0028] When the motion trajectory and the position change are respectively acquired, a motion curve corresponding to the target object is simulated according to the motion trajectory and the position change;
[0029] A corresponding second detection report is generated according to the motion curve, and the second detection report correspondingly includes the second detection result.
[0030] The second aspect of the embodiment of the present invention proposes:
[0031] A target detection system, wherein the system comprises:
[0032] An acquisition module, used for acquiring an original image corresponding to a target through a camera, and generating a corresponding BEV image from the original image based on a preset rule;
[0033] a first correction module, configured to perform 2D target detection on the BEV image to generate a corresponding first detection result, and perform a correction on the truncated target according to the first detection result;
[0034] The second correction module is used to perform 3D target detection on the BEV image based on the first detection result to generate a corresponding second detection result, and perform secondary correction on the truncated target according to the second detection result to perform target detection on the corrected truncated target.
[0035] Furthermore, the acquisition module is specifically used for:
[0036] When the original image is acquired in real time, preprocessing the original image to generate a corresponding standard image;
[0037] The BEV image is generated according to the standard image.
[0038] Furthermore, the acquisition module is specifically used for:
[0039] When the standard image is acquired in real time, a three-dimensional image space adapted to the standard image is created in real time through a preset three-dimensional program;
[0040] The inverse projection mapping algorithm adapted to the standard image is called out in real time in a preset algorithm database, and the standard image is converted into the BEV image in the three-dimensional image space through the inverse projection mapping algorithm.
[0041] Furthermore, the first correction module is specifically used for:
[0042] When the BEV image is acquired in real time, calling out a first target detection model adapted to the BEV image in the preset algorithm database;
[0043] The first target detection model is used to identify a first position and a first category corresponding to the target object in the BEV image, and the first detection result is generated according to the first position and the first category. The first detection result is unique.
[0044] Furthermore, the first correction module is specifically used for:
[0045] When the first position and the first category are respectively acquired, mapping processing is performed on the first position and the first category to generate a corresponding mapping pair;
[0046] A corresponding first detection report is generated in real time based on the mapping pair, and the first detection report correspondingly includes the first detection result.
[0047] Furthermore, the second correction module is specifically used for:
[0048] When the first detection result is obtained in real time, the motion trajectory and position change of the target object between consecutive frames are calculated in real time according to the first detection result;
[0049] The second detection result is generated according to the motion trajectory and the position change.
[0050] Furthermore, the second correction module is specifically used for:
[0051] When the motion trajectory and the position change are respectively acquired, a motion curve corresponding to the target object is simulated according to the motion trajectory and the position change;
[0052] A corresponding second detection report is generated according to the motion curve, and the second detection report correspondingly includes the second detection result.
[0053] The third aspect of the embodiment of the present invention proposes:
[0054] A computer comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the target detection method as described above when executing the computer program.
[0055] The fourth aspect of the embodiments of the present invention proposes:
[0056] A readable storage medium stores a computer program, wherein the program, when executed by a processor, implements the target detection method as described above.
[0057] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A flowchart of a target detection method provided by the first embodiment of the present invention;
[0059] Figure 2 This is a structural block diagram of a target detection system provided in the third embodiment of the present invention.
[0060] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0061] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0062] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0064] See also Figure 1 , shown is the target detection method provided by the first embodiment of the present invention. The target detection method provided by this embodiment can correct the center points of both 3D detection and 3D detection to the same position, so as to accurately complete the target detection of the truncated target and improve the work efficiency.
[0065] Specifically, this embodiment provides:
[0066] A target detection method comprises the following steps:
[0067] Step S10, acquiring an original image corresponding to the target through a camera, and generating a corresponding BEV image according to the original image based on a preset rule;
[0068] Step S20, performing 2D target detection on the BEV image to generate a corresponding first detection result, and performing a correction on the truncated target according to the first detection result;
[0069] Step S30, performing 3D target detection on the BEV image based on the first detection result to generate a corresponding second detection result, and performing secondary correction on the truncated target according to the second detection result to perform target detection on the corrected truncated target.
[0070] Specifically, in this embodiment, it should be noted that in order to objectively and accurately complete the target detection of the truncated target, it is necessary to accurately obtain the information contained in the collected original image. Among them, it should be pointed out that the truncated target disclosed in the present invention is that in the process of collecting images, when the target distance is very close or very close to the edge, only a part of the target is photographed. Based on this, in the actual application process, when the original image corresponding to the target to be detected is obtained in real time through the existing camera, in order to facilitate subsequent detection, the present invention will immediately convert the current original image into a corresponding BEV (battery electric) image in real time according to pre-set rules, and perform subsequent processing.
[0071] Furthermore, the present invention will immediately perform corresponding 2D target detection on the current BEV image first, and obtain the required first detection result. Preferably, the present invention will complete a correction of the current truncated target through the first detection result. Correspondingly, in order to further correct the center point used for 3D target detection, 3D target detection will be performed on the current BEV image based on the first detection result, and at the same time, the corresponding second detection result will be generated. On this basis, it is only necessary to perform a second correction on the current stage target through the current second detection result, so that the center points of the two can be corrected to the same position, and the target detection of the truncated target can be finally completed accurately, thereby improving the detection accuracy and work efficiency.
[0072] Second embodiment
[0073] Furthermore, the step of generating a corresponding BEV image according to the original image based on a preset rule includes:
[0074] When the original image is acquired in real time, preprocessing the original image to generate a corresponding standard image;
[0075] The BEV image is generated according to the standard image.
[0076] Furthermore, the step of generating the BEV image according to the standard image includes:
[0077] When the standard image is acquired in real time, a three-dimensional image space adapted to the standard image is created in real time through a preset three-dimensional program;
[0078] The inverse projection mapping algorithm adapted to the standard image is called out in real time in a preset algorithm database, and the standard image is converted into the BEV image in the three-dimensional image space through the inverse projection mapping algorithm.
[0079] Furthermore, the step of performing 2D target detection on the BEV image to generate a corresponding first detection result includes:
[0080] When the BEV image is acquired in real time, calling out a first target detection model adapted to the BEV image in the preset algorithm database;
[0081] The first target detection model is used to identify a first position and a first category corresponding to the target object in the BEV image, and the first detection result is generated according to the first position and the first category. The first detection result is unique.
[0082] Furthermore, the step of generating the first detection result according to the first position and the first category includes:
[0083] When the first position and the first category are respectively acquired, mapping processing is performed on the first position and the first category to generate a corresponding mapping pair;
[0084] A corresponding first detection report is generated in real time based on the mapping pair, and the first detection report correspondingly includes the first detection result.
[0085] Further, the step of performing 3D object detection on the BEV image based on the first detection result to generate a corresponding second detection result includes:
[0086] When the first detection result is obtained in real time, the motion trajectory and position change of the target object between consecutive frames are calculated in real time according to the first detection result;
[0087] The second detection result is generated according to the motion trajectory and the position change.
[0088] Furthermore, the step of generating the second detection result according to the motion trajectory and the position change includes:
[0089] When the motion trajectory and the position change are respectively acquired, a motion curve corresponding to the target object is simulated according to the motion trajectory and the position change;
[0090] A corresponding second detection report is generated according to the motion curve, and the second detection report correspondingly includes the second detection result.
[0091] In addition, in the present embodiment, it should be noted that after the required original image is acquired in real time through the above steps, in order to be able to objectively and accurately generate the required BEV image, the present invention will first perform preprocessing such as filtering and noise reduction on the current original image, and further create a three-dimensional image space that is compatible with the current standard image in real time through existing three-dimensional software such as ug or solidworks. Based on this, the current standard image is imported into the current three-dimensional image space. At the same time, it is also necessary to synchronously call out the inverse projection mapping algorithm that is compatible with the current standard image in real time in a pre-set algorithm database, and further convert the current standard image into the above-mentioned BEV image in the current three-dimensional image space through the inverse projection mapping algorithm. It should be pointed out that the above-mentioned inverse projection mapping algorithm can be obtained from the prior art.
[0092] Furthermore, after the required BEV image is acquired in real time through the above steps, the required first target detection model will be further called out in the above preset algorithm database, preferably, the DTW detection model will be called out, and the first position and the first category corresponding to the target object contained in the current BEV image will be further detected. Based on this, the current first position and the first category are mapped into corresponding mapping pairs, and the required first detection report is generated based on the current mapping pair, and the first detection report contains the required first detection result. Furthermore, the present invention will further calculate the motion trajectory and position change corresponding to the current target object between consecutive image frames based on the current first detection result. On this basis, the present invention will eventually simulate the motion curve corresponding to the above target object according to the current motion trajectory and position change. Similarly, the required second detection report is generated according to the current motion curve, and the second detection report contains the required second detection result, so that the target detection can be completed accurately, which correspondingly improves the work efficiency.
[0093] See also Figure 2 , the third embodiment of the present invention provides:
[0094] A target detection system, wherein the system comprises:
[0095] An acquisition module, used for acquiring an original image corresponding to a target through a camera, and generating a corresponding BEV image from the original image based on a preset rule;
[0096] a first correction module, configured to perform 2D target detection on the BEV image to generate a corresponding first detection result, and perform a correction on the truncated target according to the first detection result;
[0097] The second correction module is used to perform 3D target detection on the BEV image based on the first detection result to generate a corresponding second detection result, and perform secondary correction on the truncated target according to the second detection result to perform target detection on the corrected truncated target.
[0098] Furthermore, the acquisition module is specifically used for:
[0099] When the original image is acquired in real time, preprocessing the original image to generate a corresponding standard image;
[0100] The BEV image is generated according to the standard image.
[0101] Furthermore, the acquisition module is specifically used for:
[0102] When the standard image is acquired in real time, a three-dimensional image space adapted to the standard image is created in real time through a preset three-dimensional program;
[0103] The inverse projection mapping algorithm adapted to the standard image is called out in real time in a preset algorithm database, and the standard image is converted into the BEV image in the three-dimensional image space through the inverse projection mapping algorithm.
[0104] Furthermore, the first correction module is specifically used for:
[0105] When the BEV image is acquired in real time, calling out a first target detection model adapted to the BEV image in the preset algorithm database;
[0106] The first target detection model is used to identify a first position and a first category corresponding to the target object in the BEV image, and the first detection result is generated according to the first position and the first category. The first detection result is unique.
[0107] Furthermore, the first correction module is specifically used for:
[0108] When the first position and the first category are respectively acquired, mapping processing is performed on the first position and the first category to generate a corresponding mapping pair;
[0109] A corresponding first detection report is generated in real time based on the mapping pair, and the first detection report correspondingly includes the first detection result.
[0110] Furthermore, the second correction module is specifically used for:
[0111] When the first detection result is obtained in real time, the motion trajectory and position change of the target object between consecutive frames are calculated in real time according to the first detection result;
[0112] The second detection result is generated according to the motion trajectory and the position change.
[0113] Furthermore, the second correction module is specifically used for:
[0114] When the motion trajectory and the position change are respectively acquired, a motion curve corresponding to the target object is simulated according to the motion trajectory and the position change;
[0115] A corresponding second detection report is generated according to the motion curve, and the second detection report correspondingly includes the second detection result.
[0116] A fourth embodiment of the present invention provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the target detection method as described above when executing the computer program.
[0117] A fifth embodiment of the present invention provides a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the target detection method as described above.
[0118] In summary, the target detection method and system provided by the above embodiments of the present invention can correct the center points of both 2D detection and 3D detection to the same position, thereby accurately completing the target detection of subsequent truncated targets and improving work efficiency.
[0119] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0120] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0121] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0122] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0123] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0124] The above-described embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.
Claims
1. A target detection method, characterized in that: The method comprises: Acquire an original image corresponding to the target through a camera, and generate a corresponding BEV image according to the original image based on a preset rule; Performing 2D object detection on the BEV image to generate a corresponding first detection result, and performing a correction on the truncated object according to the first detection result; Based on the first detection result, 3D object detection is performed on the BEV image to generate a corresponding second detection result, and the truncated object is secondarily corrected according to the second detection result to perform object detection on the corrected truncated object.
2. The target detection method according to claim 1, characterized in that: The step of generating a corresponding BEV image according to the original image based on a preset rule comprises: When the original image is acquired in real time, preprocessing the original image to generate a corresponding standard image; The BEV image is generated according to the standard image.
3. The target detection method according to claim 2, characterized in that: The step of generating the BEV image according to the standard image comprises: When the standard image is acquired in real time, a three-dimensional image space adapted to the standard image is created in real time through a preset three-dimensional program; The inverse projection mapping algorithm adapted to the standard image is called out in real time in a preset algorithm database, and the standard image is converted into the BEV image in the three-dimensional image space through the inverse projection mapping algorithm.
4. The target detection method according to claim 3, characterized in that: The step of performing 2D target detection on the BEV image to generate a corresponding first detection result includes: When the BEV image is acquired in real time, calling out a first target detection model adapted to the BEV image in the preset algorithm database; The first target detection model is used to identify a first position and a first category corresponding to the target object in the BEV image, and the first detection result is generated according to the first position and the first category. The first detection result is unique.
5. The target detection method according to claim 4, characterized in that: The step of generating the first detection result according to the first position and the first category includes: When the first position and the first category are respectively acquired, mapping processing is performed on the first position and the first category to generate a corresponding mapping pair; A corresponding first detection report is generated in real time based on the mapping pair, and the first detection report correspondingly includes the first detection result.
6. The target detection method according to claim 5, characterized in that: The step of performing 3D object detection on the BEV image based on the first detection result to generate a corresponding second detection result includes: When the first detection result is obtained in real time, the motion trajectory and position change of the target object between consecutive frames are calculated in real time according to the first detection result; The second detection result is generated according to the motion trajectory and the position change.
7. The target detection method according to claim 6, characterized in that: The step of generating the second detection result according to the motion trajectory and the position change includes: When the motion trajectory and the position change are respectively acquired, a motion curve corresponding to the target object is simulated according to the motion trajectory and the position change; A corresponding second detection report is generated according to the motion curve, and the second detection report correspondingly includes the second detection result.
8. A target detection system, characterized in that: The system comprises: An acquisition module, used for acquiring an original image corresponding to a target through a camera, and generating a corresponding BEV image from the original image based on a preset rule; a first correction module, configured to perform 2D target detection on the BEV image to generate a corresponding first detection result, and perform a correction on the truncated target according to the first detection result; The second correction module is used to perform 3D target detection on the BEV image based on the first detection result to generate a corresponding second detection result, and perform secondary correction on the truncated target according to the second detection result to perform target detection on the corrected truncated target.
9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the target detection method according to any one of claims 1 to 7 is implemented.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the target detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Monocular vision target positioning method and system based on inverse perspective transformation matrix
CN112665577A
3D target detection method and device
CN114332845A
Target positioning method and device and electronic equipment
CN116843888A
BEV space target detection method and device for multi-view perspective image
CN116895059A
Object state detection model construction method and system
CN118334596A
