Target detection method and device, computer equipment and readable storage medium
By fusing the image data of short-focus cameras and telephoto cameras with millimeter-wave radar data in different coordinate systems, the problem of small field of view in the existing technology is solved and the accuracy and range of target detection are improved.
Patent Information
- Application Number
- CN202310339623.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the fusion field of view of millimeter wave radar data and camera data is small, which affects the accuracy of target detection.
By acquiring the image data collected by the short-focus camera and the long-focus camera and the radar data of the millimeter-wave radar, the fusion detection of the target is performed in different coordinate systems, using the near-end high precision of the short-focus camera and the far-end data of the long-focus camera. characteristics to achieve the synthesis of target detection results.
The fusion of millimeter-wave radar data and camera data is achieved within a larger field of view, improving the accuracy of target detection and making full use of the characteristics of cameras and radar data with different focal lengths.
Smart Images

Figure CN118731933A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of transportation, and in particular to target detection methods, devices, computer equipment and readable storage media. Background Art
[0002] With the rapid development of target detection and tracking technology, multi-sensor fusion technology represented by millimeter-wave radar and camera has been widely used in the field of transportation. Generally speaking, the detection range of millimeter-wave radar is usually 10-500m, while the stable detection range of camera is 0-120m. Usually, a fusion system including a millimeter-wave radar and a camera can detect targets based on the fusion of millimeter-wave radar data and camera data at the near end of the fusion system (i.e. within the camera field of view of 0-120m), while at the far end of the fusion system (i.e. beyond the camera's farthest field of view of 120m), target detection can only be based on millimeter-wave radar data. That is, target detection based on the current fusion system can only achieve data fusion in some areas, resulting in a smaller field of view of the fusion of millimeter-wave radar data and camera data, affecting the accuracy of target detection. Summary of the invention
[0003] The embodiments of the present application provide a target detection method, apparatus, computer device and readable storage medium, which solve the technical problem in the prior art that the fusion of millimeter-wave radar data and camera data has a small field of view, which affects the target detection accuracy.
[0004] In a first aspect, an embodiment of the present application provides a target detection method, the method comprising: acquiring image data of a first field of view collected by a short-focus camera, image data of a second field of view collected by a telephoto camera, and radar data of a third field of view collected by a millimeter-wave radar, the minimum value of the second field of view being greater than the minimum value of the first field of view and the maximum value of the second field of view being greater than the maximum value of the first field of view, and the third field of view having a common field of view with the first field of view and the second field of view; performing fusion detection of the target in the coordinate system of the millimeter-wave radar according to the radar data and the image data of the first field of view, and obtaining a first fusion detection result; performing fusion detection of the target in the coordinate system of the telephoto camera according to the radar data and the image data of the second field of view, and obtaining a second fusion detection result; and determining the target detection result according to the first fusion detection result and the second fusion detection result.
[0005] In the above method, the fusion detection of the target can be realized in both the first field of view and the second field of view, that is, the fusion of the millimeter-wave radar data and the camera data can be realized in a larger field of view; in addition, since the first field of view of the short-focus camera is closer to the fusion system, the second field of view of the telephoto camera is farther away from the fusion system. Since the millimeter-wave radar has high detection accuracy for nearby targets, when the fusion detection of the target is performed based on the image data and radar data of the closer first field of view, it is performed in the coordinate system of the millimeter-wave radar to obtain the first fusion detection result; the millimeter-wave radar has poor detection accuracy for distant targets, so when the fusion detection of the target is performed based on the image data and radar data of the farther second field of view, it is performed in the coordinate system of the telephoto camera to obtain the second fusion detection result; finally, the final target detection result is obtained based on the first fusion detection result and the second fusion detection result. This method makes full use of the characteristics of the data of cameras with different focal lengths and the data of the millimeter-wave radar, and performs fusion detection of the target in different coordinate systems according to the different distances of the field of view, which can improve the accuracy of target detection.
[0006] In one embodiment, the minimum value of the second field of view is less than or equal to the maximum value of the first field of view.
[0007] In one of the embodiments, performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the radar data and the image data of the first field of view to obtain a first fusion detection result includes: performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the first radar data and the image data of the first field of view to obtain the first fusion detection result, wherein the first radar data includes radar data whose distance from the millimeter wave radar is less than a first threshold in the radar data;
[0008] According to the radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera, including: according to the second radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera to obtain a second fusion detection result, the second radar data includes radar data in the radar data whose distance from the millimeter wave radar is greater than or equal to the first threshold.
[0009] In one embodiment, the minimum value of the second field of view is less than or equal to the maximum value of the first field of view, the first threshold is greater than or equal to the minimum value of the second field of view, and the first threshold is less than or equal to the maximum value of the first field of view.
[0010] In one of the embodiments, if the minimum value of the second field of view is smaller than the maximum value of the first field of view, before determining the target detection result based on the first fusion detection result and the second fusion detection result, the method also includes: performing target deduplication on the first fusion detection result and the second fusion detection result.
[0011] In one of the embodiments, performing fusion detection of the target in a coordinate system of the millimeter-wave radar according to the first radar data and the image data of the first field of view to obtain a first fusion detection result includes:
[0012] Target recognition is performed on the image data of the first field of view and the first radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; the detection frame information of each image target is projected into the coordinate system of the millimeter-wave radar by using a first conversion relationship, and the first conversion relationship is a conversion relationship between the coordinate system of the millimeter-wave radar and the coordinate system of the short-focus camera; a first fusion detection result is determined based on the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter-wave radar.
[0013] In one of the embodiments, determining a first fusion detection result according to the detection frame information of each image target and the detection frame information of each radar target in the coordinate system projected onto the millimeter wave radar includes:
[0014] Determine the minimum bounding rectangle of each detection frame pair, where a detection frame pair includes a detection frame of an image target and a detection frame of a radar target; construct a DIOU association cost matrix using the minimum bounding rectangles of all detection frame pairs; match each image target and each radar target according to the DIOU association cost matrix to obtain a first fusion detection result.
[0015] In one of the embodiments, performing fusion detection of the target in the coordinate system of the telephoto camera according to the second radar data and the image data in the second field of view to obtain a second fusion detection result includes:
[0016] Target recognition is performed on the image data of the second field of view and the second radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; the detection frame information of each radar target is projected into the coordinate system of the telephoto camera by using a second transformation relationship, and the second transformation relationship is a transformation relationship between the coordinate system of the millimeter wave radar and the coordinate system of the telephoto camera; the second fusion detection result is determined based on the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera.
[0017] In one of the embodiments, determining the second fusion detection result according to the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera includes:
[0018] Determine the minimum bounding rectangle of each detection frame pair, where a detection frame pair includes a detection frame of an image target and a detection frame of a radar target; construct a CIOU association cost matrix based on the minimum bounding rectangles of all detection frame pairs; match each image target and each radar target based on the CIOU association cost matrix to obtain a second fusion detection result.
[0019] In one embodiment, the first conversion relationship is obtained by spatially calibrating the millimeter-wave radar and the short-focus camera using homography transformation; or the second conversion relationship is obtained by spatially calibrating the millimeter-wave radar and the long-focus camera using homography transformation.
[0020] In one embodiment, target recognition is performed on image data of a first field of view, or target recognition is performed on image data of a second field of view, including: inputting the image data of the first field of view or the image data of the second field of view into a preset image detection model to obtain detection frame information of each image target, wherein the preset image detection model is trained using a preset training data set, and in the preset training data set, the ratio of the number of images of the telephoto camera to the number of images of the short-focus camera is 1:1.
[0021] In one of the embodiments, the method further includes: tracking the target according to the target detection result.
[0022] In a second aspect, an embodiment of the present application provides a target detection device, which includes a unit for executing each step of the method as described in any one of the first aspects above.
[0023] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the methods described in the first aspect when executing the computer program.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the above first aspects is implemented.
[0025] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 It is a schematic diagram of an application scenario of a target detection method provided by an embodiment of the present application;
[0028] Figure 2 is a schematic diagram of time synchronization of a millimeter wave radar and a short-focus camera provided by an embodiment of the present application;
[0029] Figure 3 It is a flowchart of a spatial calibration process of a millimeter-wave radar and a short-focus camera provided in an embodiment of the present application;
[0030] Figure 4 is a flowchart of a target detection method provided by an embodiment of the present application;
[0031] Figure 5 It is a flowchart of a process of obtaining a first fusion detection result in a target detection method provided in an embodiment of the present application;
[0032] Figure 6 is a schematic diagram of two rectangular target detection frames provided in an embodiment of the present application;
[0033] Figure 7 is a flowchart of a process of obtaining a second fusion detection result in a target detection method provided in an embodiment of the present application;
[0034] Figure 8 is a structural block diagram of a target detection device provided by an embodiment of the present application;
[0035] Fig. 9 It is an internal structure diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0036] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0037] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0038] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0039] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0040] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0041] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0042] An embodiment of the present application provides a target detection method, which uses a short-focus camera to collect image data of a first field of view at a near end, uses a long-focus camera to collect image data of a second field of view at a far end, and uses a millimeter-wave radar to collect radar data of a third field of view covering the near end and the far end; then, in the coordinate system of the millimeter-wave radar, a fusion detection of the target is performed based on the radar data and the image data of the first field of view to obtain a first fusion detection result; in the coordinate system of the long-focus camera, a fusion detection of the target is performed based on the radar data and the image data of the second field of view to obtain a second fusion detection result; finally, the target detection result is determined based on the first fusion detection result and the second fusion detection result.
[0043] It should be understood that in the embodiments of the present application, a telephoto camera and a short-focus camera are relative concepts, wherein the telephoto camera is used to detect distant scenes, and the short-focus camera is used to detect nearby scenes. Those skilled in the art can select appropriate cameras as the telephoto camera and the short-focus camera according to the requirements of the field of view.
[0044] In addition, the telephoto camera and the short-focus camera in the embodiment of the present application are both devices for acquiring images within the coverage area. Camera, camera head, camera sensor, image sensor, etc. have similar meanings and can be interchanged in the embodiment of the present application. That is, in the embodiment of the present application, the camera can also be understood as a camera head, camera sensor, image sensor, etc., and this solution does not limit this.
[0045] In the embodiment of the present application, the fusion detection of the target can be achieved in both the first field of view and the second field of view, that is, the fusion of millimeter-wave radar data and camera data can be achieved in a larger field of view; in addition, since the millimeter-wave radar has a better detection effect at the near end, the target fusion detection of the image data of the field of view of the short-focus camera and the millimeter-wave radar data is completed in the coordinate system of the millimeter-wave radar; the accuracy of the target detection by the far-end radar is reduced, so the target fusion detection of the image data of the field of view of the telephoto camera and the millimeter-wave radar data is completed in the coordinate system of the telephoto camera. This method fully considers the detection characteristics of the millimeter-wave radar, completes the near-end and far-end target fusion detection in different coordinate systems, and then determines the final target detection result based on the two fusion detection results, thereby improving the target detection accuracy.
[0046] The target detection method provided in the present application is exemplarily described below in conjunction with specific embodiments.
[0047] For ease of understanding, before describing the target detection method in the embodiment of the present application, an exemplary description of the application scenario of the embodiment of the present application is first given. It is known to those skilled in the art that the application scenario is only used as an example and is not intended to limit the scope of protection of the present application.
[0048] Figure 1 Schematic diagram of application scenarios of target detection methods in some embodiments of the present application, such as Figure 1 As shown, in this application scenario, the target detection method is applied to a roadside fusion perception system 101, in which the roadside fusion perception system 101 includes a telephoto camera, a short-focus camera, a millimeter-wave radar, and a roadside computing unit. Figure 1The first field of view S1 shown in the figure is used for image data collection, the telephoto camera is used for image data collection for the second field of view S2, and the millimeter wave radar is used for radar data collection for the third field of view S3. The first field of view covers the range where S1 is close to the roadside fusion perception system, while the second field of view S2 covers the range where it is far from the roadside fusion perception system; the minimum value of the second field of view S2 is greater than the minimum value of the first field of view S1 and the maximum value of the second field of view S2 is greater than the maximum value of the first field of view S1, and the third field of view S3 has a common field of view area with the first field of view S1 and the second field of view S2.
[0049] Among them, the roadside calculation unit performs fusion detection of the target in the coordinate system of the millimeter-wave radar according to the radar data and the image data of the first field of view to obtain a first fusion detection result; performs fusion detection of the target in the coordinate system of the telephoto camera according to the radar data and the image data of the second field of view to obtain a second fusion detection result; and then determines the target detection result based on the first fusion detection result and the second fusion detection result.
[0050] In some embodiments, the minimum value of the second field of view S2 is equal to the maximum value of the first field of view S1. In this case, there is no common area between the first field of view and the second field of view, but the first field of view and the second field of view are just completely connected, so it can be ensured that there is no missing area between the short-focus camera and the long-focus camera.
[0051] In some embodiments, the minimum value of the second viewing range S2 is smaller than the maximum value of the first viewing range S1. Figure 1 The first field of view range S1 and the second field of view range S2 have a common field of view area, that is, since there is a common field of view area between the telephoto camera and the short-focus camera, it is possible to further avoid missing areas between the short-focus camera and the telephoto camera.
[0052] Optionally, the third viewing range S3 may just cover the first viewing range S1 and the second viewing range S2, that is, the minimum value of the third viewing range S3 is equal to the minimum value of the first viewing range S1, and the maximum value of the third viewing range S3 is equal to the maximum value of the second viewing range S2.
[0053] It is understandable that the first field of view range, the second field of view range and the third field of view range may also be set by any other feasible scheme, and the present application does not impose any specific limitation on this.
[0054] Those skilled in the art will appreciate that the specific form of the roadside fusion perception system is not limited to the above description. For example, the roadside computing unit may also be a background computing device or a cloud computing device, etc.; the number and position of millimeter-wave radars, telephoto cameras, and short-focus cameras may also be set as needed, that is, different parts of the roadside fusion perception system may be located in different locations and communicate with each other to exchange data.
[0055] It should be understood that in addition to the roadside fusion perception system described above, the target detection method in the embodiment of the present application can also be applied to the vehicle-side fusion perception system, or the vehicle-side and roadside collaborative fusion perception system, and the present application does not limit this.
[0056] It can be understood that the basis of sensor data fusion is time synchronization and space synchronization, that is, the radar data and image data used for target fusion detection should be synchronized in time and space. In the embodiment of the present application, synchronization is a relative concept, that is, as long as the time or space error of the two data is within the allowable range, the two data can be considered to be synchronized.
[0057] The time synchronization process is described below in an exemplary manner. In the embodiment of the present application, the method of time synchronization between radar data and image data can be soft synchronization or hard synchronization, which is not limited in the embodiment of the present application.
[0058] To facilitate understanding, the soft synchronization of millimeter-wave radar and short-focus camera is taken as an example. Figure 2 FIG. 1 is a schematic diagram of time synchronization between a millimeter wave radar and a short-focus camera in an embodiment of the present application, as shown in FIG. Figure 2 As shown in Figure 1, the horizontal axis represents the timestamp of the sampling time of the millimeter wave radar and the short-focus camera. Figure 2 As shown in Figure 1, there is a difference in frequency between the millimeter-wave radar and the short-focus camera. The frequency of the short-focus camera is twice that of the millimeter-wave radar. The millimeter-wave radar with a lower frequency is used as the time reference for time synchronization. Figure 2 As shown, the radar data and image data aligned with the dotted line are two frames of time-synchronized data.
[0059] It is understandable that in the case where the data collection time of the millimeter wave radar and the short-focus camera is inconsistent, a soft synchronization method can also be used to synchronize the time. The embodiment of the present application does not specifically limit the method of time synchronization, and all methods that can achieve time synchronization between the millimeter wave radar and the short-focus camera can be applied to the present application. In addition, the time synchronization of the millimeter wave radar and the telephoto camera can also adopt a similar method, which will not be described in detail.
[0060] After explaining time synchronization, the following explains space synchronization by taking the roadside fusion perception system as an example.
[0061] It should be understood that spatial synchronization is also called spatial calibration. The roadside fusion perception system includes a millimeter-wave radar, a telephoto camera, and a short-focus camera. The radar data output by the millimeter-wave radar represents the target information in the world coordinate system, while the image data output by the telephoto camera and the short-focus camera represents the target information in the pixel coordinate system (i.e., the telephoto camera coordinate system or the short-focus camera coordinate system). There is a spatial mapping relationship between the telephoto camera and the millimeter-wave radar, and between the short-focus camera and the millimeter-wave radar. Because the pixel coordinate system is a two-dimensional plane coordinate system, it can be assumed that the road is a plane, and the millimeter-wave radar is a two-dimensional plane coordinate on the plane. Therefore, the millimeter-wave radar and the telephoto camera, as well as the millimeter-wave radar and the short-focus camera can be spatially calibrated using homography transformation.
[0062] In some embodiments, a homography transformation is used to spatially synchronize the millimeter-wave radar and the short-focus camera to obtain a first conversion relationship; a homography transformation is used to spatially synchronize the millimeter-wave radar and the short-focus camera to obtain a second conversion relationship. The first conversion relationship is used for coordinate conversion between radar data of the millimeter-wave radar and image data of the short-focus camera; the second conversion relationship is used for coordinate conversion between radar data of the millimeter-wave radar and image data of the long-focus camera. In this embodiment, the homography transformation is used for spatial calibration, and the internal parameters of the short-focus camera and the long-focus camera do not need to be known, and no special target object needs to be selected during the spatial calibration process. The free-flow target of the traffic scene can be directly used as the calibration object. The method process is simple and easy to implement.
[0063] The following uses a millimeter wave radar and a short-focus camera as an example to illustrate the process of spatial calibration using homography transformation. It is understood that the radar data and image data described below refer to the radar data and image data after time synchronization. A flowchart of the millimeter wave radar and short-focus camera spatial calibration process provided in one embodiment of the present application is as follows: Figure 3 As shown, the calibration process includes steps S301 to S302:
[0064] S301: Obtain N groups of feature points, where N is a positive integer greater than or equal to 4.
[0065] A feature point is the coordinate position information representing a target in a set of radar data and image data. A set of radar data and image data includes a frame of radar data and a frame of image data that are time-synchronized. The following takes any target S in any set of radar data and image data as an example to illustrate the feature point.
[0066] Assume that the position coordinates of target S in the radar coordinate system are [x r ,y r ], the target detection box of target S in the image data is [u 1 ,v1 ,u 2 ,v 2 ], where [u 1 ,v 1 ] is the coordinate of the upper left corner of the detection box, [u 2 ,v 2 ] is the coordinate of the lower right corner of the detection frame; the coordinate of the center point of the detection frame is [u, v] as the position coordinate of the target S in the coordinate system of the short-focus camera, where Therefore, the feature point corresponding to the target S in this set of radar data and image data is [x r ,y r ,u,v].
[0067] Each set of radar data and image data may include multiple targets, so each set of radar data and image data may correspond to multiple feature points; each target may appear in multiple sets of radar data and image data, that is, each target may also correspond to multiple feature points. The N sets of feature points may include feature points of one or more targets, or may include feature points of one or more sets of radar data and image data, and this application does not impose any restrictions on this.
[0068] S302: Solve the homography transformation matrix according to the N groups of feature points.
[0069] It can be understood that the first transformation relationship between the short-focus camera and the millimeter-wave radar calibration using homography transformation refers to the mapping relationship between the millimeter-wave radar acquisition plane (i.e., the plane where the road is located) and the coordinate system plane of the short-focus camera. The specific mapping relationship is shown in formula (1):
[0070]
[0071] In formula (1), H is the homography matrix between the millimeter wave radar acquisition plane and the coordinate system plane of the short-focus camera, that is, it represents the first transformation relationship and is a 3×3 matrix; s is a constant.
[0072] Expanding the homography matrix in equation (1) yields equation (2):
[0073]
[0074] Expanding formula (2) yields formula (3):
[0075]
[0076] Substituting N feature points into formula (3), we get formula (4):
[0077]
[0078]
[0079] First, the RANSAC (full name Random Sample Consensus) algorithm is used to form a small point set for every four feature point pairs. Assume that the point set is Ω = [p 1 ,p 2 ,…p n ]; Then, all sets in Ω are solved by the least squares method to obtain the initial solution set of the homography matrix Q = [q 1 ,q 2 ,…q n ]; by optimizing, find Q so that formula (5) e i The smallest initial solution q i As the initial solution, the LM (full name of Levenberg-Marquardt) algorithm is then used to further optimize the final homography matrix H.
[0080] It is understandable that the target detection frame in the image data can be obtained by performing target detection on the image using a target detection algorithm (such as the YOLOV7 algorithm), and this application does not impose any specific restrictions on this.
[0081] In the embodiment of the present application, the coordinates between the radar data of the millimeter wave radar and the image data of the short-focus camera are converted into a first conversion relationship, which can be expressed as 1 To represent; the coordinates between the radar data of the millimeter wave radar and the image data of the telephoto camera are converted into the second conversion relationship, which can be expressed by H 2 To indicate. 1 and H 2 All of them can be obtained by the above methods, and this application will not go into details.
[0082] It is understandable that in the embodiments of the present application, the spatial calibration may adopt the homography transformation as described above, or any other available spatial calibration method, without specific limitation. In addition, the spatial calibration of the millimeter wave radar and the short-focus camera, and the spatial calibration of the millimeter wave radar and the long-focus camera may adopt the same spatial calibration method or different spatial calibration methods, and the present application does not limit this.
[0083] After introducing time synchronization and space synchronization, the following is an introduction based on Figure 1 The target detection method is shown in the schematic diagram of the application scenario, and the example provided in one embodiment of the present application is Figure 4 The target detection method shown in FIG. Figure 1 Taking the roadside fusion perception system shown in the figure as an example, the target detection method is explained. Figure 4 The method shown may include S401 to S404. Each step is described below.
[0084] Step S401: acquiring image data of a first field of view captured by a short-focus camera, image data of a second field of view captured by a long-focus camera, and radar data of a third field of view captured by a millimeter-wave radar.
[0085] It should be understood that the image data of the first field of view collected by the short-focus camera, the image data of the second field of view collected by the long-focus camera, and the radar data of the third field of view collected by the millimeter-wave radar in step S401 are data that are synchronized in time and space.
[0086] In some embodiments, the minimum value of the second viewing range S2 is smaller than the maximum value of the first viewing range S1. Figure 1 The first field of view range S1 and the second field of view range S2 have a common field of view area, that is, since there is a common field of view area between the telephoto camera and the short focal camera, missed detection caused by missing areas in the image data can be further avoided.
[0087] Step S402: Perform fusion detection of the target in the coordinate system of the millimeter-wave radar according to the radar data and the image data in the first field of view to obtain a first fusion detection result.
[0088] Step S403: Perform fusion detection of the target in the coordinate system of the telephoto camera according to the radar data and the image data of the second field of view to obtain a second fusion detection result.
[0089] In some embodiments, when performing fusion detection of targets in the coordinate system of the millimeter-wave radar, the radar data used is the first radar data, which is the radar data whose distance from the millimeter-wave radar is less than the first threshold value; and when performing fusion detection of targets in the coordinate system of the telephoto camera, the radar data used is the second radar data, which is the radar data whose distance from the millimeter-wave radar is greater than the first threshold value. By dividing the radar data into the first radar data and the second radar data, and fusing the first radar data with the image data of the short-focus camera, and fusing the second radar data with the image data of the telephoto camera, it is avoided to fuse all radar data with the short-focus camera and the telephoto camera respectively, thereby reducing the repeated processing of radar data in the fusion detection process and improving the fusion detection efficiency.
[0090] In some embodiments, when the minimum value of the second field of view is less than or equal to the maximum value of the first field of view, the first threshold is greater than or equal to the minimum value of the second field of view, and the first threshold is less than or equal to the maximum value of the first field of view. The first radar data and the second radar data are determined according to the first threshold, so that the first radar data and the image data of the short-focus camera, and the second radar data and the image data of the long-focus camera have good correspondence in the field of view, which improves the efficiency of fusion detection and avoids data omission.
[0091] For example, Figure 1 As shown, the minimum value of the second visual field range S2 is smaller than the maximum value of the first visual field range S1. Figure 1 The dividing line 102 shown in FIG. 1 is different from the millimeter wave radar (i.e. Figure 1 The distance between the roadside fusion perception system 101 in the image is taken as the first threshold. That is, the radar data between the roadside fusion perception system 101 and the dividing line 102 is taken as the first radar data, and the radar data outside the dividing line 102 is taken as the second radar data.
[0092] In some embodiments, when the minimum value of the second field of view is less than the maximum value of the first field of view, and the first threshold is greater than or equal to the minimum value of the second field of view, and the first threshold is less than or equal to the maximum value of the first field of view, after obtaining the first fusion detection result and the second fusion detection result, it is also necessary to perform target deduplication on the first fusion detection result and the second fusion detection result. Since the first field of view and the second field of view have a common field of view area, and the first threshold is within the common field of view area, there may be duplicate targets between the image data of the telephoto camera and the image data of the short-focus camera at this time. Therefore, through target deduplication, repeated detection of targets can be avoided to ensure the accuracy of the detection results.
[0093] Step S404: Determine a target detection result according to the first fusion detection result and the second fusion detection result.
[0094] In the embodiment of the present application, after obtaining the first fusion detection result and the second fusion detection result, it is necessary to merge the first fusion detection result and the second fusion detection result to obtain a final target detection result.
[0095] Exemplarily, the first fusion detection result and the second fusion detection result may include three types of targets, namely, unfused image targets, unfused radar targets, and successfully fused targets. In the target detection result, the three types of targets may be merged into three types of targets.
[0096] In some embodiments, the target detection method further includes: tracking the target according to the target detection result. By adopting the strategy of first fusion and then tracking, it is not necessary to track the target separately for each sensor, but only to do an overall tracking after completing the target fusion detection, which is a simple and efficient process.
[0097] Exemplarily, a sort algorithm can be used to track the targets in the target detection results (for example, including successfully fused targets, unfused image targets and / or unfused radar targets) as a whole, and output the information of each target. For example, the output target information may include target ID, target category, confidence, width, length, height, lateral distance, longitudinal distance, etc.
[0098] The target detection method in the above embodiment can realize fusion detection of the target in both the first field of view and the second field of view, that is, the fusion of millimeter-wave radar data and camera data can be realized in a larger field of view; in addition, the target detection method in the above embodiment selects different coordinate systems for fusion detection of the target according to the different distances of the field of view, and makes full use of the characteristics of cameras with different focal lengths and millimeter-wave radar data, which can improve the accuracy of target detection.
[0099] For ease of understanding, the process of target fusion detection is exemplarily described below.
[0100] It should be understood that there are three levels of fusion between millimeter-wave radar and camera, including data-level fusion, feature-level fusion and decision-level fusion. The fusion timing is different based on the fusion methods at different levels. Data-level fusion is to fuse the radar data of the millimeter-wave radar and the image data of the camera; feature-level fusion is to extract the radar feature information in the radar data and then fuse it with the image features in the image data; decision-level fusion is to fuse the target detection results of the millimeter-wave radar and the target detection results of the camera.
[0101] It is understandable that the three levels of fusion methods can all be applied to the fusion detection of the target in the embodiment of the present application. The following takes the decision-level fusion as an example to exemplarily illustrate the process of obtaining the first fusion detection result and the second fusion detection result in the embodiment of the present application.
[0102] Figure 5 A flowchart of the process of obtaining the first fusion detection result in the target detection method provided in one embodiment of the present application. Figure 5 As shown, in the target detection method, the process of obtaining the first fusion detection result includes steps S501 to S503.
[0103] Step S501: performing target recognition on the image data of the first field of view and the first radar data respectively, and obtaining detection frame information of each image target and detection frame information of each radar target.
[0104] In an embodiment of the present application, the detection frame may be a rectangular frame, and the detection frame information may include coordinate information of four corner points of the detection frame; the detection frame information may also include coordinate information of the center of the detection frame.
[0105] It is understandable that the process of performing target recognition on the first radar data to obtain the detection frame information of each radar target may include: first performing target recognition on the first radar data to obtain the coordinates of each radar target in the radar coordinate system; then constructing the detection frame of each radar target in the radar coordinate system, thereby obtaining the detection frame information of each radar target. Among them, the process of performing target recognition on the first radar data and constructing the detection frame may adopt any feasible method in the prior art, and this application does not limit this.
[0106] In addition, in some embodiments, target recognition may be performed on all radar data, and then radar targets whose distance to the millimeter-wave radar is less than a first threshold are taken as radar targets corresponding to the first radar data, and then a detection frame is constructed according to the radar targets.
[0107] It should be understood that the method for performing target recognition on the image data in the first field of view may be any feasible method in the prior art, such as a convolutional neural network model, a YOLO algorithm, etc., and the embodiments of the present application are not limited to this.
[0108] Step S502: using the first conversion relationship, projecting the detection frame information of each image target into the coordinate system of the millimeter wave radar.
[0109] In the embodiment of the present application, the first conversion relationship is the conversion relationship between the coordinate system of the millimeter wave radar and the coordinate system of the short-focus camera. The first conversion relationship can be obtained according to the spatial calibration method described above, or according to other spatial calibration methods in the prior art. This application does not elaborate on other spatial calibration methods.
[0110] Exemplarily, the four corner points of the detection box of the image target may be projected to the radar coordinate system using the first transformation relationship.
[0111] Step S503: Determine a first fusion detection result according to the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter wave radar.
[0112] In some embodiments, in the coordinate system of the millimeter wave radar, the detection frame information of each image target and the detection frame information of each radar target are used to fuse the targets, and an association cost matrix such as IOU (Intersection over Union), GIOU (Generalized Intersection over Union), DIOU (Distance Intersection over Union) or CIOU (Complete Intersection over Union) can be used to determine the first fusion detection result.
[0113] The meanings of IOU, GIOU, DIOU and CIOU are explained below with reference to the accompanying drawings. Figure 6 As shown, it is assumed that there are two rectangular first target detection frames 601 and second target detection frames 602 , and a minimum circumscribed rectangle 603 of the first target detection frames 601 and the second target detection frames 602 .
[0114] IOU represents the ratio of the area of the intersection of the first target detection frame 601 and the area of the second target detection frame 602 to the area of the union, and the value range of IOU is [0,1]. The specific calculation method of IOU is shown in formula (6):
[0115]
[0116] Wherein: A∩B represents the area of the intersection of the first target detection box 601 and the second target detection box 602, and A∪B represents the area of the union of the first target detection box 601 and the second target detection box 602.
[0117] GIOU considers the area of the minimum circumscribed rectangle of two target detection boxes based on IOU, and the value range of GIOU is [-1, 1]. The specific calculation method of GIOU is shown in formula (7):
[0118]
[0119] Wherein: A∪B represents the area of the intersection of the first target detection frame 601 and the second target detection frame 602, and C represents the area of the minimum circumscribed rectangle 603.
[0120] DIOU takes into account the distance between the center points of the two target detection boxes and the diagonal length of the minimum circumscribed rectangle based on IOU. The value range of DIOU is [-1, 1]. The specific calculation method of DIOU is shown in formula (8):
[0121]
[0122] Wherein: ρ represents the Euclidean distance between the center points of the first target detection frame 601 and the second target detection frame 602, and c represents the length of the diagonal of the minimum circumscribed rectangle 603.
[0123] CIOU takes into account the distance between the center points of the two target detection frames, the diagonal length of the minimum circumscribed rectangle, and the aspect ratio of the two target detection frames based on IOU. The specific calculation method is shown in formula (8):
[0124]
[0125] Where: ρ represents the Euclidean distance between the center points of the first target detection frame 601 and the second target detection frame 602; c represents the length of the diagonal of the minimum circumscribed rectangle 603; υ represents the similarity of the aspect ratio of the first target detection frame 601 and the second target detection frame 602 and w 1 and h 1 denote the width and height of the first object detection frame 601, w 2 and h 2 denote the width and height of the second target detection frame 602 respectively; α denotes a weight function and
[0126] In some embodiments, the first fusion detection result is obtained in the coordinate system of the millimeter wave radar, and the coordinate system of the radar pays more attention to the distance parameter and has a more accurate expression of the distance parameter. Therefore, the correlation matrix of DIOU that fuses the center point distance of the two detection frames and the length of the diagonal of the minimum circumscribed frame can be used to make the first fusion detection result more accurate.
[0127] Exemplarily, the process of determining the first fusion detection result may include: determining the minimum bounding rectangle of each detection frame pair, a detection frame pair including a detection frame of an image target and a detection frame of a radar target; using the minimum bounding rectangles of all detection frame pairs to construct a DIOU association cost matrix; according to the DIOU association cost matrix, matching each image target and each radar target to obtain the first fusion detection result.
[0128] In some embodiments, according to the DIOU association cost matrix, a KM (Kuhn-Munkras, bipartite graph best matching) algorithm is used to match each image target with each radar target, thereby obtaining a first fusion detection method.
[0129] For ease of understanding, the process of matching each image target with each radar target according to the DIOU association cost matrix is exemplarily described below.
[0130] Assume that the image data of the first field of view identifies three image targets C1, C2 and C3, and the detection frame information of the three image targets C1, C2 and C3 has been projected into the coordinate system of the millimeter wave radar; the first radar data identifies two radar targets R1 and R2, and the detection frames of the two radar targets R1 and R2 have been constructed.
[0131] First, the DIOU values between each image target and each radar target are calculated respectively, and a total of 6 DIOU values are obtained, namely, D C1-R1 , D C1-R2 , D C2-R1 , D C2-R2 , D C3-R1 and D C3-R2 , as shown in Table 1.
[0132] Then, the loss function L corresponding to the DIOU value is determined according to formula (10): DIOU , and construct the associated cost matrix as shown in Table 1.
[0133] L DIOU =1-DIOU (10)
[0134] Table 1
[0135] <![CDATA[L DIOU Value]]> Radar Target R1 Radar Target R2 Image Target C1 <![CDATA[1-D C1-R1 ]]> <![CDATA[1-D C1-R2 ]]> Image Target C2 <![CDATA[1-D C2-R1 ]]> <![CDATA[1-D C2-R2 ]]> Image Target C3 <![CDATA[1-D C3-R1 ]]> <![CDATA[1-D C3-R2 ]]>
[0136] Finally, according to L DIOU The first fusion detection result is determined by comparing the values. It can be understood that L DIOU The larger the value, the higher the matching degree between the corresponding image target and radar target.
[0137] The following is an exemplary description of the process of determining the first fusion detection result:
[0138] (1) For radar target R1, determine the three L DIOU The maximum value among the values and determine the L DIOU value is greater than the second threshold; for radar target R2, determine the three L DIOU The maximum value among the values and determine the L DIOU Whether the value is greater than the second threshold.
[0139] (2) If both maximum values are greater than the second threshold and the target objects corresponding to the two maximum values are different, the image target-radar target combination corresponding to the two maximum values is determined as a successfully fused target, and the remaining image targets are unfused image targets.
[0140] If both maximum values are greater than the second threshold and the target objects corresponding to the two maximum values are the same, then the larger L of the two maximum values is determined. DIOUThe image target-radar target combination corresponding to the value is the successfully fused target, the remaining image targets are unfused image targets, and the remaining radar targets are unfused radar targets.
[0141] If one of the two maximum values is greater than the second threshold and the other maximum value is less than or equal to the second threshold, the image target-radar target combination corresponding to the maximum value greater than the second threshold is determined to be a successfully fused target, and the remaining image targets are unfused image targets, and the remaining radar targets are unfused radar targets.
[0142] If the two maximum values are both smaller than or equal to the second threshold, it is determined that the three image targets are all unfused image targets and the two radar targets are all unfused radar targets.
[0143] It should be understood that the above-mentioned DIOU The process of comparing the values to determine the first fusion detection result is only an example. Those skilled in the art may adopt other comparison methods to determine the first fusion detection result as needed, which will not be elaborated here.
[0144] Figure 7 FIG. 1 is a flow chart of a process of obtaining a second fusion detection result in a target detection method provided in an embodiment of the present application. Figure 7 As shown, in the target detection method, the process of obtaining the second fusion detection result includes steps S701 to S703.
[0145] Step S701: performing target recognition on the image data of the second field of view and the second radar data respectively, and obtaining detection frame information of each image target and detection frame information of each radar target.
[0146] Step S702: Project the detection frame information of each radar target into the coordinate system of the telephoto camera using a second transformation relationship, where the second transformation relationship is a transformation relationship between the coordinate system of the millimeter wave radar and the coordinate system of the telephoto camera.
[0147] Step S703: Determine a second fusion detection result according to the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera.
[0148] like Figure 7 As shown, the process of obtaining the second fusion detection result is basically the same as the process of obtaining the first fusion detection result. For the sake of simplicity, only the differences are described below. Other contents not mentioned can refer to the previous description of the process of obtaining the first fusion detection result.
[0149] In some embodiments, in the coordinate system of the millimeter wave radar, the detection frame information of each image target and the detection frame information of each radar target are used to fuse the targets, and an association cost matrix such as IOU (Intersection over Union), GIOU (Generalized Intersection over Union), DIOU (Distance Intersection over Union) or CIOU (Complete Intersection over Union) can be used to determine the first fusion detection result.
[0150] In some embodiments, the second fusion detection result is obtained in the coordinate system of the telephoto camera, and the coordinate system of the telephoto camera pays more attention to parameters such as the aspect ratio of the specific shape of the target and has a more accurate expression of the specific shape of the target. Therefore, the second fusion detection result can be more accurate by using a correlation matrix of CIOU that fuses the center point distance of the two detection frames, the minimum circumscribed frame, and the aspect ratio.
[0151] Exemplarily, the process of determining the second fusion detection result may include: determining the minimum bounding rectangle of each detection frame pair, a detection frame pair including a detection frame of an image target and a detection frame of a radar target; using the minimum bounding rectangles of all detection frame pairs to construct a CIOU association cost matrix; according to the CIOU association cost matrix, matching each image target and each radar target to obtain the second fusion detection result.
[0152] In some embodiments, according to the DIOU association cost matrix, a KM (Kuhn-Munkras, bipartite graph best matching) algorithm is used to match each image target with each radar target, thereby obtaining a first fusion detection method.
[0153] It can be understood that the process of matching each image target and each radar target according to the CIOU association cost matrix is similar to the process of matching each image target and each radar target according to the DIOU association cost matrix, and will not be elaborated on this.
[0154] It should be understood that performing target identification on the first radar data and performing target identification on the second radar data respectively may be performing target identification on the radar data and then determining whether the target corresponds to the first radar data or the second radar data based on the distance between the identified target and the millimeter wave radar.
[0155] Exemplarily, if the distance between the radar target and the millimeter-wave radar is less than a first threshold, it is determined that the radar target corresponds to the first radar data; if the distance between the radar target and the millimeter-wave radar is greater than or equal to the first threshold, it is determined that the radar target corresponds to the second radar data.
[0156] The present application also improves the method for identifying the target of image data. The method for identifying the target of image data is exemplarily described below.
[0157] In some embodiments, target recognition is performed on image data of a first field of view, or target recognition is performed on image data of a second field of view, including: inputting the image data of the first field of view or the image of the second field of view into a preset image detection model to obtain detection frame information of each image target, wherein the preset image detection model is obtained by training using a preset training data set, and the ratio of the number of images of a telephoto camera to the number of images of a short-focus camera in the preset training data set is 1:1. In this method, the ratio of the number of images of a telephoto camera to the number of images of a short-focus camera in the preset training data set is 1:1, so that the detection accuracy of the obtained image detection model is high.
[0158] In some embodiments, the image data of the first field of view and the image data of the second field of view may be input into a preset image detection model separately or simultaneously.
[0159] Exemplarily, the image data of the first field of view and the image data of the second field of view are time-synchronized data, the image data of the first field of view and the image data of the second field of view are grouped into a batch, and then the grouped batch is pre-processed; the pre-processed data is input into a preset image detection model to obtain output data; finally, the output data is post-processed using NMS (non-maximum suppression algorithm) to obtain two sets of target detection results (i.e., the detection box information of the targets corresponding to the two image data).
[0160] Exemplarily, the image detection model is a convolutional neural network model, for example, a YOLOV series model, which is not limited in this application.
[0161] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0162] Corresponding to a target detection method in the above embodiment, Figure 8 A structural block diagram of a target detection device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0163] Reference Figure 8 , the target detection device 800 includes: an acquisition unit 801, a first fusion detection unit 802, a second fusion detection unit 803 and a result determination unit 804, wherein:
[0164] An acquisition unit 801 is used to acquire image data of a first field of view collected by a short-focus camera, image data of a second field of view collected by a long-focus camera, and radar data of a third field of view collected by a millimeter-wave radar, wherein a minimum value of the second field of view is greater than a minimum value of the first field of view and a maximum value of the second field of view is greater than a maximum value of the first field of view, and a common field of view area exists in the third field of view, the first field of view, and the second field of view;
[0165] A first fusion detection unit 802 is used to perform fusion detection of the target in the coordinate system of the millimeter wave radar according to the radar data and the image data in the first field of view, and obtain a first fusion detection result;
[0166] The second fusion detection unit 803 is used to perform fusion detection of the target in the coordinate system of the telephoto camera according to the radar data and the image data in the second field of view to obtain a second fusion detection result;
[0167] The result determination unit 804 is used to determine the target detection result according to the first fusion detection result and the second fusion detection result.
[0168] In one embodiment, the minimum value of the second viewing range is less than or equal to the maximum value of the first viewing range.
[0169] In one embodiment, the first fusion detection unit 802 is used to perform fusion detection of the target in the coordinate system of the millimeter wave radar according to the radar data and the image data of the first field of view to obtain a first fusion detection result, including: performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the first radar data and the image data of the first field of view to obtain the first fusion detection result, wherein the first radar data includes radar data whose distance from the millimeter wave radar is less than a first threshold in the radar data;
[0170] The second fusion detection unit 803 is used to perform fusion detection of the target in the coordinate system of the telephoto camera according to the radar data and the image data of the second field of view to obtain a second fusion detection result, including: performing fusion detection of the target in the coordinate system of the telephoto camera according to the second radar data and the image data of the second field of view to obtain a second fusion detection result, the second radar data includes radar data whose distance to the millimeter-wave radar is greater than or equal to the first threshold in the radar data.
[0171] In one embodiment, the minimum value of the second field of view is less than or equal to the maximum value of the first field of view, the first threshold is greater than or equal to the minimum value of the second field of view, and the first threshold is less than or equal to the maximum value of the first field of view.
[0172] In one embodiment, the target detection device 800 also includes a deduplication unit. If the minimum value of the second field of view is less than the maximum value of the first field of view, the deduplication unit is used to perform target deduplication on the first fusion detection result and the second fusion detection result before the result determination unit 804 determines the target detection result based on the first fusion detection result and the second fusion detection result.
[0173] In one embodiment, the first fusion detection unit 802 performs fusion detection of the target in the coordinate system of the millimeter wave radar according to the first radar data and the image data of the first field of view, and obtains a first fusion detection result, including:
[0174] Performing target recognition on the image data of the first field of view and the first radar data respectively, and obtaining detection frame information of each image target and detection frame information of each radar target;
[0175] Using a first conversion relationship, projecting the detection frame information of each image target into the coordinate system of the millimeter wave radar, the first conversion relationship being a conversion relationship between the coordinate system of the millimeter wave radar and the coordinate system of the short-focus camera;
[0176] A first fusion detection result is determined based on the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter wave radar.
[0177] In one embodiment, the first fusion detection unit 802 determines the first fusion detection result according to the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter wave radar, including:
[0178] Determine the minimum bounding rectangle of each detection frame pair, where a detection frame pair includes a detection frame of an image target and a detection frame of a radar target;
[0179] Using the minimum bounding rectangle of all detection box pairs, the DIOU association cost matrix is constructed;
[0180] According to the DIOU association cost matrix, each image target and each radar target are matched to obtain the first fusion detection result.
[0181] In one embodiment, the second fusion detection unit 803 performs fusion detection of the target in the coordinate system of the telephoto camera according to the second radar data and the image data in the second field of view, and obtains a second fusion detection result, including:
[0182] Performing target recognition on the image data and the second radar data in the second field of view respectively, and obtaining detection frame information of each image target and detection frame information of each radar target;
[0183] Projecting the detection frame information of each radar target into the coordinate system of the telephoto camera using a second conversion relationship, where the second conversion relationship is a conversion relationship between the coordinate system of the millimeter wave radar and the coordinate system of the telephoto camera;
[0184] A second fusion detection result is determined according to the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera.
[0185] In one embodiment, the second fusion detection unit 803 determines the second fusion detection result according to the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera, including:
[0186] Determine the minimum bounding rectangle of each detection frame pair, where a detection frame pair includes a detection frame of an image target and a detection frame of a radar target;
[0187] Construct the CIOU association cost matrix based on the minimum bounding rectangle of all detection box pairs;
[0188] According to the CIOU correlation cost matrix, each image target and each radar target are matched to obtain the second fusion detection result.
[0189] In one embodiment, the first conversion relationship is obtained by spatially calibrating the millimeter wave radar and the short-focus camera using homography transformation; or the second conversion relationship is obtained by spatially calibrating the millimeter wave radar and the long-focus camera using homography transformation.
[0190] In one embodiment, the first fusion detection unit 802 performs target recognition on the image data in the first field of view, or the second fusion detection unit 803 performs target recognition on the image data in the second field of view, including:
[0191] The image data of the first field of view or the image of the second field of view is input into a preset image detection model to obtain the detection frame information of each image target. The preset image detection model is trained using a preset training data set. In the preset training data set, the ratio of the number of images of the telephoto camera to the number of images of the short-focus camera is 1:1.
[0192] In one embodiment, the target detection device 800 further includes a tracking unit, and the tracking unit is used to track the target according to the target detection result.
[0193] Fig. 9A schematic diagram of the structure of a computer device 9 provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the computer device 9 of this embodiment includes: at least one processor 900 ( Fig. 9 Only one processor is shown in the figure), a memory 901, and a computer program 902 stored in the memory 901 and executable on the at least one processor 900, wherein the processor 900 implements the steps in the target detection method embodiment of any of the above-mentioned computer devices when executing the computer program 902.
[0194] The computer device may include, but is not limited to, a processor 900 and a memory 901. Those skilled in the art will appreciate that Fig. 9 It is only an example of the computer device 9 and does not constitute a limitation on the computer device 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0195] The processor 900 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0196] The memory 901 may be an internal storage unit in some embodiments, such as a hard disk or a memory. The memory 901 may also be an external storage device in other embodiments, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 901 may also include both an internal storage unit and an external storage device. The memory 901 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 901 may also be used to temporarily store data that has been output or is to be output.
[0197] Those skilled in the art will understand that Fig. 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0198] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: acquiring image data of a first field of view collected by a short-focus camera, image data of a second field of view collected by a long-focus camera, and radar data of a third field of view collected by a millimeter-wave radar, wherein a minimum value of the second field of view is greater than a minimum value of the first field of view and a maximum value of the second field of view is greater than a maximum value of the first field of view, and a common field of view exists between the third field of view and the first field of view and the second field of view; performing fusion detection of a target in a coordinate system of the millimeter-wave radar according to the radar data and the image data of the first field of view, and obtaining a first fusion detection result; performing fusion detection of a target in a coordinate system of the long-focus camera according to the radar data and the image data of the second field of view, and obtaining a second fusion detection result; and determining a target detection result according to the first fusion detection result and the second fusion detection result.
[0199] In one embodiment, the minimum value of the second viewing range is less than or equal to the maximum value of the first viewing range.
[0200] In one embodiment, performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the radar data and the image data of the first field of view to obtain a first fusion detection result includes: performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the first radar data and the image data of the first field of view to obtain the first fusion detection result, wherein the first radar data includes radar data whose distance from the millimeter wave radar is less than a first threshold in the radar data;
[0201] According to the radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera, including: according to the second radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera to obtain a second fusion detection result, the second radar data includes radar data in the radar data whose distance from the millimeter wave radar is greater than or equal to the first threshold.
[0202] In one embodiment, the minimum value of the second field of view is less than or equal to the maximum value of the first field of view, the first threshold is greater than or equal to the minimum value of the second field of view, and the first threshold is less than or equal to the maximum value of the first field of view.
[0203] In one embodiment, if the minimum value of the second field of view is smaller than the maximum value of the first field of view, before determining the target detection result based on the first fusion detection result and the second fusion detection result, the method also includes: deduplicating the first fusion detection result and the second fusion detection result.
[0204] In one embodiment, a fusion detection of a target is performed in the coordinate system of a millimeter-wave radar based on the first radar data and the image data of the first field of view to obtain a first fusion detection result, including: performing target recognition on the image data of the first field of view and the first radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; using a first conversion relationship to project the detection frame information of each image target into the coordinate system of the millimeter-wave radar, the first conversion relationship being a conversion relationship between the coordinate system of the millimeter-wave radar and the coordinate system of the short-focus camera; determining the first fusion detection result based on the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter-wave radar.
[0205] In one embodiment, a first fusion detection result is determined based on detection frame information of each image target and detection frame information of each radar target projected into a coordinate system of a millimeter wave radar, including: determining a minimum bounding rectangle of each detection frame pair, a detection frame pair including a detection frame of an image target and a detection frame of a radar target; constructing a DIOU association cost matrix using the minimum bounding rectangles of all detection frame pairs; matching each image target and each radar target according to the DIOU association cost matrix to obtain a first fusion detection result.
[0206] In one embodiment, a fusion detection of the target is performed in the coordinate system of the telephoto camera based on the second radar data and the image data of the second field of view to obtain a second fusion detection result, including: performing target recognition on the image data of the second field of view and the second radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; using a second conversion relationship to project the detection frame information of each radar target into the coordinate system of the telephoto camera, the second conversion relationship being the conversion relationship between the coordinate system of the millimeter wave radar and the coordinate system of the telephoto camera; and determining the second fusion detection result based on the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera.
[0207] In one embodiment, a second fusion detection result is determined based on the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera, including: determining the minimum bounding rectangle of each detection frame pair, a detection frame pair including a detection frame of an image target and a detection frame of a radar target; constructing a CIOU association cost matrix based on the minimum bounding rectangles of all detection frame pairs; matching each image target and each radar target based on the CIOU association cost matrix to obtain a second fusion detection result.
[0208] In one embodiment, the first conversion relationship is obtained by spatially calibrating the millimeter wave radar and the short-focus camera using homography transformation; or the second conversion relationship is obtained by spatially calibrating the millimeter wave radar and the long-focus camera using homography transformation.
[0209] In one embodiment, target recognition is performed on image data of a first field of view, or target recognition is performed on image data of a second field of view, including: inputting the image data of the first field of view or the image data of the second field of view into a preset image detection model to obtain detection frame information of each image target, wherein the preset image detection model is trained using a preset training data set, and in the preset training data set, the ratio of the number of images of a telephoto camera to the number of images of a short-focus camera is 1:1.
[0210] In one embodiment, the method further includes: performing target tracking according to the target detection result.
[0211] The implementation principles and technical effects of the steps implemented when the processor executes the computer program in this embodiment are similar to the principles of the above-mentioned target detection method and will not be repeated here.
[0212] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0213] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0214] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: image data of a first field of view collected by a short-focus camera, image data of a second field of view collected by a long-focus camera, and radar data of a third field of view collected by a millimeter-wave radar, wherein a minimum value of the second field of view is greater than a minimum value of the first field of view and a maximum value of the second field of view is greater than a maximum value of the first field of view, and a common field of view exists between the third field of view and the first field of view and the second field of view; based on the radar data and the image data of the first field of view, a fusion detection of the target is performed in the coordinate system of the millimeter-wave radar to obtain a first fusion detection result; based on the radar data and the image data of the second field of view, a fusion detection of the target is performed in the coordinate system of the long-focus camera to obtain a second fusion detection result; and a target detection result is determined based on the first fusion detection result and the second fusion detection result.
[0215] In one embodiment, the minimum value of the second viewing range is less than or equal to the maximum value of the first viewing range.
[0216] In one embodiment, performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the radar data and the image data of the first field of view to obtain a first fusion detection result includes: performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the first radar data and the image data of the first field of view to obtain the first fusion detection result, wherein the first radar data includes radar data whose distance from the millimeter wave radar is less than a first threshold in the radar data;
[0217] According to the radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera, including: according to the second radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera to obtain a second fusion detection result, the second radar data includes radar data in the radar data whose distance from the millimeter wave radar is greater than or equal to the first threshold.
[0218] In one embodiment, the minimum value of the second field of view is less than or equal to the maximum value of the first field of view, the first threshold is greater than or equal to the minimum value of the second field of view, and the first threshold is less than or equal to the maximum value of the first field of view.
[0219] In one embodiment, if the minimum value of the second field of view is smaller than the maximum value of the first field of view, before determining the target detection result based on the first fusion detection result and the second fusion detection result, the method also includes: deduplicating the first fusion detection result and the second fusion detection result.
[0220] In one embodiment, a fusion detection of a target is performed in the coordinate system of a millimeter-wave radar based on the first radar data and the image data of the first field of view to obtain a first fusion detection result, including: performing target recognition on the image data of the first field of view and the first radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; using a first conversion relationship to project the detection frame information of each image target into the coordinate system of the millimeter-wave radar, the first conversion relationship being a conversion relationship between the coordinate system of the millimeter-wave radar and the coordinate system of the short-focus camera; determining the first fusion detection result based on the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter-wave radar.
[0221] In one embodiment, a first fusion detection result is determined based on detection frame information of each image target and detection frame information of each radar target projected into a coordinate system of a millimeter wave radar, including: determining a minimum bounding rectangle of each detection frame pair, a detection frame pair including a detection frame of an image target and a detection frame of a radar target; constructing a DIOU association cost matrix using the minimum bounding rectangles of all detection frame pairs; matching each image target and each radar target according to the DIOU association cost matrix to obtain a first fusion detection result.
[0222] In one embodiment, a fusion detection of the target is performed in the coordinate system of the telephoto camera based on the second radar data and the image data of the second field of view to obtain a second fusion detection result, including: performing target recognition on the image data of the second field of view and the second radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; using a second conversion relationship to project the detection frame information of each radar target into the coordinate system of the telephoto camera, the second conversion relationship being the conversion relationship between the coordinate system of the millimeter wave radar and the coordinate system of the telephoto camera; and determining the second fusion detection result based on the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera.
[0223] In one embodiment, a second fusion detection result is determined based on the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera, including: determining the minimum bounding rectangle of each detection frame pair, a detection frame pair including a detection frame of an image target and a detection frame of a radar target; constructing a CIOU association cost matrix based on the minimum bounding rectangles of all detection frame pairs; matching each image target and each radar target based on the CIOU association cost matrix to obtain a second fusion detection result.
[0224] In one embodiment, the first conversion relationship is obtained by spatially calibrating the millimeter wave radar and the short-focus camera using homography transformation; or the second conversion relationship is obtained by spatially calibrating the millimeter wave radar and the long-focus camera using homography transformation.
[0225] In one embodiment, target recognition is performed on image data of a first field of view, or target recognition is performed on image data of a second field of view, including: inputting the image data of the first field of view or the image data of the second field of view into a preset image detection model to obtain detection frame information of each image target, wherein the preset image detection model is trained using a preset training data set, and in the preset training data set, the ratio of the number of images of a telephoto camera to the number of images of a short-focus camera is 1:1.
[0226] In one embodiment, the method further includes: performing target tracking according to the target detection result.
[0227] The implementation principles and technical effects of the steps implemented when the computer program in this embodiment is executed by the processor are similar to the principles of the above-mentioned target detection method and will not be repeated here.
[0228] An embodiment of the present application provides a computer program product. When the computer program product is executed on a computer device, the computer device implements the steps in the above-mentioned method embodiments.
[0229] An embodiment of the present application further provides a chip, including: a processor, configured to call and run a computer program from a memory, so that a computer device equipped with the chip executes the steps in the above-mentioned method embodiments.
[0230] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0231] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0232] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0233] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0234] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0235] If the integrated module / unit is implemented in the form of 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 present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0236] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A target detection method, It is characterized in that The method comprises: Acquire image data of a first field of view collected by a short-focus camera, image data of a second field of view collected by a long-focus camera, and radar data of a third field of view collected by a millimeter-wave radar, wherein a minimum value of the second field of view is greater than a minimum value of the first field of view and a maximum value of the second field of view is greater than a maximum value of the first field of view, and a common field of view area exists between the third field of view and both the first field of view and the second field of view; According to the radar data and the image data of the first field of view, performing fusion detection of the target in the coordinate system of the millimeter wave radar to obtain a first fusion detection result; According to the radar data and the image data of the second field of view, performing fusion detection of the target in the coordinate system of the telephoto camera to obtain a second fusion detection result; A target detection result is determined according to the first fusion detection result and the second fusion detection result.
2. The method according to claim 1, It is characterized in that The minimum value of the second visual field is less than or equal to the maximum value of the first visual field.
3. The method according to claim 1, It is characterized in that The step of performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the radar data and the image data of the first field of view to obtain a first fusion detection result includes: performing fusion detection of the target in the coordinate system of the millimeter-wave radar according to the first radar data and the image data of the first field of view to obtain the first fusion detection result, wherein the first radar data includes radar data of which the distance from the millimeter-wave radar is less than a first threshold value in the radar data; The method of performing fusion detection of the target in the coordinate system of the telephoto camera according to the radar data and the image data in the second field of view includes: According to the second radar data and the image data of the second field of view, fusion detection of the target is performed in the coordinate system of the telephoto camera to obtain the second fusion detection result, wherein the second radar data includes radar data in the radar data whose distance from the millimeter-wave radar is greater than or equal to the first threshold.
4. The method according to claim 3, It is characterized in that The minimum value of the second visual field is less than or equal to the maximum value of the first visual field, the first threshold is greater than or equal to the minimum value of the second visual field, and the first threshold is less than or equal to the maximum value of the first visual field.
5. The method according to claim 4, It is characterized in that If the minimum value of the second field of view is less than the maximum value of the first field of view, before determining the target detection result according to the first fusion detection result and the second fusion detection result, the method further includes: The first fusion detection result and the second fusion detection result are subjected to target deduplication.
6. The method according to any one of claims 3 to 5, It is characterized in that The performing fusion detection of the target in the coordinate system of the millimeter wave radar according to the first radar data and the image data of the first field of view to obtain the first fusion detection result includes: Performing target recognition on the image data of the first field of view and the first radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; Projecting the detection frame information of each image target into the coordinate system of the millimeter-wave radar by using a first conversion relationship, wherein the first conversion relationship is a conversion relationship between the coordinate system of the millimeter-wave radar and the coordinate system of the short-focus camera; The first fusion detection result is determined according to the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter wave radar.
7. The method according to claim 6, It is characterized in that The determining the first fusion detection result according to the detection frame information of each image target and the detection frame information of each radar target projected into the coordinate system of the millimeter wave radar includes: Determine the minimum bounding rectangle of each detection frame pair, where a detection frame pair includes a detection frame of an image target and a detection frame of a radar target; Using the minimum bounding rectangle of all detection box pairs, the DIOU association cost matrix is constructed; According to the DIOU association cost matrix, each image target and each radar target are matched to obtain a first fusion detection result.
8. The method according to any one of claims 3 to 5, It is characterized in that The performing fusion detection of the target in the coordinate system of the telephoto camera according to the second radar data and the image data of the second field of view to obtain the second fusion detection result includes: Performing target recognition on the image data of the second field of view and the second radar data respectively to obtain detection frame information of each image target and detection frame information of each radar target; Projecting the detection frame information of each radar target into the coordinate system of the telephoto camera by using a second conversion relationship, where the second conversion relationship is a conversion relationship between the coordinate system of the millimeter wave radar and the coordinate system of the telephoto camera; The second fusion detection result is determined according to the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera.
9. The method according to claim 8, It is characterized in that The determining the second fusion detection result according to the detection frame information of each radar target and the detection frame information of each image target projected into the coordinate system of the telephoto camera includes: Determine the minimum bounding rectangle of each detection frame pair, where a detection frame pair includes a detection frame of an image target and a detection frame of a radar target; Construct the CIOU association cost matrix based on the minimum bounding rectangle of all detection box pairs; According to the CIOU association cost matrix, each image target and each radar target are matched to obtain a second fusion detection result.
10. The method according to claim 6 or 8, It is characterized in that The first conversion relationship is obtained by spatially calibrating the millimeter wave radar and the short-focus camera using homography transformation; or The second conversion relationship is obtained by spatially calibrating the millimeter-wave radar and the telephoto camera using homography transformation.
11. The method according to claim 6 or 8, It is characterized in that Performing target recognition on the image data in the first field of view, or performing target recognition on the image data in the second field of view, includes: The image data of the first field of view or the image of the second field of view is input into a preset image detection model to obtain detection frame information of each image target, wherein the preset image detection model is trained using a preset training data set, and in the preset training data set, the ratio of the number of images of the telephoto camera to the number of images of the short-focus camera is 1:
1.
12. The method according to any one of claims 1 to 11, It is characterized in that The method further comprises: Target tracking is performed according to the target detection result.
13. A target detection device, It is characterized in that The device comprises means for performing the steps of the method according to any one of claims 1 to 12.
14. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 12 is implemented.
15. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
