Target detection method based on millimeter wave radar and camera fusion
By integrating data from millimeter wave radar and cameras in space and time, and combining it with improved detection algorithms, the problem of detection limitations of a single sensor in complex environments is solved, achieving accurate detection of road targets and improving environmental adaptability. , ensuring driving safety.
Patent Information
- Application Number
- CN202410613690.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-23
AI Technical Summary
Existing single sensors have limitations in detecting road targets. Cameras have poor detection accuracy in complex environments. Millimeter-wave radars are weak in resolving obstacles and cannot effectively ensure driving safety.
Adopting a fusion method based on millimeter wave radar and camera, through space and time data fusion, combined with the improved SSD algorithm and K-means clustering, using the joint IOU strategy and NMS non-maximum suppression method to achieve accurate detection of road targets .
It effectively identifies the environment and potential safety risks around the vehicle, improves driving safety, and enhances environmental adaptability through multi-sensor real-time monitoring and warning mechanisms.
Smart Images

Figure CN118537826A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of driver training and driving test, and in particular to a target detection method based on the fusion of millimeter wave radar and camera. Background Art
[0002] In the social road training of the third subject of the driving test, it is very important to ensure the safety of the students. Today, the target detection scheme in the intelligent driving of automobiles is developing rapidly. Through the real-time data returned by various sensors, the environmental information around the vehicle can be quickly judged, so as to make decisions. At present, the commonly used sensors in the road target detection application are cameras, lidars and millimeter wave radars: (1) The camera can make judgments on the target obstacles with high-definition pixel information. The YOLO series of real-time target detection algorithms are used to simultaneously predict the bounding boxes and category probabilities of all targets in the image in a single forward pass. However, it is greatly affected by lighting conditions, has low environmental adaptability, and has poor detection accuracy in complex environments; (2) Millimeter wave radar can detect targets by emitting millimeter waves and receiving echo signals, and obtain information such as distance, angle, and speed. By establishing a motion state model of the front target based on the vehicle-mounted radar motion coordinate system and using an adaptive Kalman filter algorithm, the motion state of the front target such as the lateral longitudinal speed and lateral longitudinal position can be estimated in real time, but the target resolution ability of the millimeter wave radar is weak for obstacles. It can be seen that the use of a single sensor for road target detection has certain limitations, and the road target detection that uses the fusion of camera and millimeter-wave radar data is not only low-cost, but the disadvantages of the two can complement each other, which can achieve accurate detection of targets and has strong adaptability to the environment.
[0003] Based on the above, the present invention will develop a target detection method based on the fusion of millimeter-wave radar and camera. Summary of the invention
[0004] The present invention aims to provide a target detection method based on the fusion of millimeter-wave radar and camera, so as to achieve the purpose of improving the driving safety of trainees.
[0005] In order to achieve the above object, the present invention provides a target detection method based on millimeter wave radar and camera fusion, comprising the following steps:
[0006] S1. First, the spatial fusion of millimeter-wave radar point cloud data and image data must be completed. The millimeter-wave radar coordinate system and the camera pixel coordinate system must be converted into the world coordinate system, so as to more accurately realize the fusion of millimeter-wave radar and camera data;
[0007] S2. By setting the scanning period of the camera and the scanning period of the millimeter wave radar, the two can have the same time interval, and one frame is selected as the marked frame in each corresponding time segment to achieve time fusion of the two sensors;
[0008] S3. The millimeter-wave radar data after time-space fusion represents the target in the form of points in the image. In order to make the radar points have the meaning of representing the target in the image, the appropriate vehicle aspect ratio parameters are selected to generate the millimeter-wave radar ROI area;
[0009] S4, using the K-means clustering algorithm based on the improved SSD, using the minimum distance IOU to perform bounding box clustering, and performing ROI area detection on the camera image to obtain the camera ROI area;
[0010] S5. Use the joint IOU strategy association method to select a suitable target bounding box in the millimeter-wave radar ROI area and the image ROI area;
[0011] S6. After the millimeter-wave radar and camera strategies are integrated through the joint IOU strategy, multiple detection frames will be generated for one target. In order to select the optimal detection frame, the NMS non-maximum suppression method will be used to filter out the redundant detection frames, and the fusion confidence will be used to screen them, and finally the target frame and category of the target to be detected will be determined;
[0012] Optionally, S4 specifically includes the following sub-steps:
[0013] S41, use MobileNetV2 network to replace the VGG16 feature extraction part in the SSD detection algorithm;
[0014] S42, generating a clustering result list R using the bounding box list L and the number of cluster centers K obtained by the SSD algorithm;
[0015] S43, randomly select K points as initial cluster centers and put them into the result list R;
[0016] S44, calculating the distance IOU from each bounding box to the cluster center, and sorting them from small to large according to the distance IOU, and according to the sorting result, classifying the current box into the category with the smallest distance IOU;
[0017] S45. Recalculate new cluster centers based on the classification results, and update the result list R to determine whether the cluster centers no longer change or reach the maximum number of updates. If so, return the result list R, otherwise continue to iterate.
[0018] Optionally, S5 specifically includes the following sub-steps:
[0019] S51, w c,h c Indicates the width and height of the camera ROI area, w r ,h r The width and height of the millimeter-wave radar ROI area are represented by the formula (1):
[0020]
[0021] From formula (1), we can see that the value range of IOU is 0 to 1. The larger the IOU is, the greater the overlap between the detection results of the millimeter-wave radar and the detection results of the camera, and the higher the confidence. When the IOU is between 0.5 and 1, it means that the detection results of the two are consistent. All millimeter-wave radar detection frames within this range are retained, and the camera detection category is added to these frames;
[0022] S52. Since there may be deviations in the camera detection, based on the above IOU, the confidence of the target detected by the camera is combined and the confidence of the fusion between the two is calculated by formula (2):
[0023] conf all =ξIOU+μconf cam (2)
[0024] In the formula, conf cam Represents the confidence of the camera detecting the target; ξ and μ represent the proportion of the joint IOU and camera detection confidence respectively, and the value range is 0 to 1;
[0025] Optionally, the S6 specifically includes the following sub-steps:
[0026] S61. After the joint IOU strategy is adopted, in order to select the optimal detection frame, the NMS non-maximum suppression method is used for processing. First, the input is obtained: the prediction frame list L, the fusion confidence threshold α, the non-maximum suppression threshold β, and the number of detection categories C;
[0027] S62. Obtain the fusion confidence conf of each prediction box from the prediction box list in turn all , determine whether the camera confidence is greater than 0.7, and add the detection boxes greater than 0.7 to the result sequence R;
[0028] S63, sorting the predicted sequence in descending order according to the fusion confidence, and filtering out the detection boxes whose threshold is less than α;
[0029] S64, obtaining all detection frames of each type of object, denoted as M, obtaining the detection frame A with the maximum confidence and adding it to the result sequence R, and removing the detection frame from M;
[0030] S65, calculating the overlap degree λ between A and the candidate box list M, removing those with overlap degree λ greater than the non-maximum suppression threshold β from the M sequence, and finally returning the result sequence R.
[0031] Beneficial Effects
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention combines millimeter-wave radar and camera sensors, and can monitor the environment around the trainee during driving in real time through multiple sensors, including objects around the vehicle, pedestrians, vehicles and other road conditions, and can effectively identify potential safety risks and issue warnings in time, thereby ensuring the trainee's driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a specific flow chart of the target detection method;
[0034] Figure 2 Schematic diagram for installation of millimeter wave radar and camera; Specific implementation plan
[0035] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with specific implementation methods. It should be understood that the specific implementation methods described here are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0036] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings:
[0037] Example 1
[0038] This embodiment provides a target detection method, and the specific flow chart is as follows Figure 1 The following steps are involved:
[0039] (1) First, the spatial fusion of millimeter-wave radar point cloud data and image data must be completed. The millimeter-wave radar coordinate system must be converted into the world coordinate system, and then converted into the pixel coordinate system, so as to more accurately realize the fusion of millimeter-wave radar and camera data;
[0040] The world coordinate system is composed of O W -X W Y W Z W It is used to describe the radar coordinate system and the spatial position of the target. R -X R Y R Z R is the radar coordinate system, point P is the target point, Z1 is the distance between the two coordinate systems in the Z-axis direction, and the distance between the two origins in the Y-axis is H;
[0041] In order to facilitate the determination of the positional relationship between the target in the radar coordinate system and the world coordinate system, it is projected onto the XOZ plane, with the direction facing the radar as the positive direction of the Z axis. The angle to the right of the positive direction of the Z axis is positive, and the angle to the left is negative. When the radar detects a road target P in an area, which is L away from the radar and has an angle α with the positive Z axis, its coordinates in the radar coordinate system are (L, α). The coordinates converted to the world coordinate system can be obtained by formula (3):
[0042]
[0043] Conversion of pixel coordinate system to image coordinate system: The corresponding pixel coordinates in the pixel coordinate system are (u1, v1), and the corresponding coordinates in the image coordinate system are (x, y). dx and dy represent the unit length of each pixel on the x-axis and y-axis of the image coordinate system. The conversion relationship between the two coordinate systems is:
[0044]
[0045] Formula (4) can be expressed in the form of secondary coordinates and matrix as follows:
[0046]
[0047] The image coordinate system is converted to the visual sensor coordinate system: the image coordinate system is O I -X I Y I , which is actually projecting the real object in space onto the projection plane through the small hole. Projection plane X I O I Y I Parallel to the center plane X of the optical lens C O C Y C , O I O C is the focal length F of the camera. Assume that the coordinates of point T in the visual sensor coordinate system are (X C ,Y C ,Z C ), its projection point in the image coordinate system is T I The coordinates are (X I ,Y I ), the line connecting the two points Q I Q C Passing through the origin Q of the visual sensor coordinate system C , from similar triangles we can get:
[0048]
[0049] The matrix relationship of formula (6) is as follows:
[0050]
[0051] Visual sensor coordinate system converted to world coordinate system: Both the visual sensor coordinate system and the world coordinate system exist in reality and can be converted by rotation and translation. Suppose the coordinates of point T in the two coordinate systems are (X C ,Y C ,Z C ), (X W ,Y W ,Z W ), Formula (8)-Formula (10) are the transformation formulas of the road target between these two coordinates:
[0052] First, the object coordinates are transformed around the X-axis of the visual sensor:
[0053]
[0054] The object coordinates are transformed around the Y axis of the visual sensor:
[0055]
[0056] The object coordinates are transformed around the Z axis of the visual sensor:
[0057]
[0058] Combining equations (8) to (10), the transformation relationship between the two coordinate systems is:
[0059]
[0060] In formula (11), R is a 3×3 rotation matrix, t represents a 3×1 translation vector, and 0 T represents the vector [0,0,0], and M1 is a 4×4 transformation matrix, that is, a rotation and translation matrix.
[0061] Pixel coordinate system is converted to world coordinate system: Combining the above formulas, the world coordinate (X W ,Y W ,Z W ) and the pixel coordinates (u,v) are:
[0062]
[0063] In formula (12), λ x =f / dx,λ y =f / dy, M1 represents the internal parameter of the sensor, and M2 represents the external parameter of the sensor.
[0064] (2) The camera scanning frequency cycle is 12 Hz, and the millimeter wave radar scanning frequency cycle is 13 Hz, which is very close to the camera scanning period. In the scanning frame, one frame is selected as the annotation frame every 0.5 seconds, thus realizing the time fusion of the two sensors;
[0065] (3) After the coordinate transformation, the millimeter-wave radar point is represented as (x1, y1) in the pixel coordinate system. The value range of the aspect ratio coefficient χ of the W / H of the common vehicle is [0.7, 1.3]. In order to cover all vehicles, the selection of the ROI area is appropriately increased. The vehicle aspect ratio coefficient χ = 1.3 is selected, the vehicle width is 2.2 meters, and the height is 1.7 meters, so as to obtain a rectangular frame of W×H = 2.2×1.7 meters to represent the target vehicle detected by the radar. Then, according to the pinhole imaging principle and formula (13), the position coordinates of the rectangular frame generated by the millimeter-wave radar in the image are obtained.
[0066]
[0067] Wherein, w, h represent the width and height of the vehicle ROI rectangular area generated in the pixel coordinate system after conversion; (x2, y2) represents the pixel coordinates of the upper left corner of the ROI rectangular area; R is the distance of the target; θ is the angle of the target; f represents the focal length of the camera; α, β represent the scaling factors in the coordinate axis direction when the camera coordinate system is converted to the pixel coordinate system.
[0068] (4) The K-means clustering algorithm based on the improved SSD is used to perform bounding box clustering using the minimum distance IOU, and the ROI area detection is performed on the camera image to obtain the camera ROI area:
[0069] First, the MobileNetV2 network is used to replace the VGG16 feature extraction part in the SSD detection algorithm;
[0070] The bounding box list L and the number of cluster centers K obtained by the SSD algorithm are used to generate the clustering result list R;
[0071] Then randomly select K points as the initial cluster centers and put them into the result list R;
[0072] Calculate the IOU distance from each bounding box to the cluster center, and sort them from small to large according to the IOU distance. According to the sorting result, the current box is classified into the category with the smallest IOU distance.
[0073] Finally, the new cluster center is recalculated based on the classification results, and the result list R is updated to determine whether the cluster center no longer changes or reaches the maximum number of updates. If so, the result list R is returned, otherwise the iteration continues.
[0074] (5) Using the joint IOU strategy association method, a suitable target bounding box is selected in the millimeter-wave radar ROI area and the image ROI area:
[0075] w c ,h c Indicates the width and height of the camera ROI area, w r ,h r represents the width and height of the millimeter-wave radar ROI area. The association between the millimeter-wave radar and camera ROI areas can be expressed by formula (14):
[0076]
[0077] From formula (14), we can see that the range of IOU is 0 to 1. The larger the IOU is, the greater the overlap between the detection results of the millimeter-wave radar and the detection results of the camera, and the higher the confidence. When the IOU is between 0.5 and 1, it means that the detection results of the two are consistent. All millimeter-wave radar detection frames within this range are retained, and the camera detection category is added to these frames;
[0078] Since the camera detection may have deviations, based on the above IOU, the target confidence detected by the camera is combined and the confidence of the fusion between the two is calculated by formula (15):
[0079] conf all =ξIOU+μconf cam (15)
[0080] In the formula, conf cam Represents the confidence of the camera detecting the target; ξ and μ represent the proportion of the joint IOU and camera detection confidence respectively, and the value range is 0 to 1;
[0081] (6) After the millimeter-wave radar and camera strategies are integrated through the joint IOU strategy, multiple detection frames will be generated for a target. In order to select the optimal detection frame, the NMS non-maximum suppression method will be used to filter out the redundant detection frames, and the fusion confidence will be used to screen them, and finally determine the target frame and category of the target to be detected:
[0082] After the joint IOU strategy is adopted, in order to select the optimal detection box, the NMS non-maximum suppression method is used for processing. First, the input is obtained: the prediction box list L, the fusion confidence threshold α, the non-maximum suppression threshold β, and the number of detection categories C;
[0083] Get the fusion confidence conf of each prediction box from the prediction box list in turn all , determine whether the camera confidence is greater than 0.7, and add the detection boxes greater than 0.7 to the result sequence R;
[0084] Arrange the predicted sequence in descending order according to the fusion confidence, and filter out the detection boxes with a threshold less than α;
[0085] Get all the detection boxes of each type of object, denoted as M, get the detection box A with the maximum confidence and add it to the result sequence R, and remove the detection box from M;
[0086] Calculate the overlap degree λ between A and the candidate box list M, remove those with overlap degree λ greater than the non-maximum suppression threshold β from the M sequence, and finally return the result sequence R.
[0087] Example 2
[0088] The millimeter wave radar adopts 5 long-range millimeter wave radars, which use frequency modulated continuous waves to independently measure distance and speed within one cycle. The installation positions are respectively located at the connection between the middle of the front hood and the bumper, the intersection of the front hood and the left and right front wheels, and the left and right sides of the top of the vehicle rear end; the camera adopts 6 cameras, which are respectively installed at the left and right sides and the middle of the top of the front windshield, the left and right sides of the top of the vehicle B-pillar, and the middle of the top of the rear windshield. The specific installation positions are shown in Figure (2).
[0089] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A target detection method based on millimeter wave radar and camera fusion, It is characterized in that The target detection method comprises the following steps: S1. First, the spatial fusion of millimeter-wave radar point cloud data and image data must be completed. The millimeter-wave radar coordinate system and the camera pixel coordinate system must be converted into the world coordinate system, so as to more accurately realize the fusion of millimeter-wave radar and camera data; S2. By setting the scanning period of the camera and the scanning period of the millimeter wave radar, the two can have the same time interval, and one frame is selected as the marked frame in each corresponding time segment to achieve time fusion of the two sensors; S3. The millimeter-wave radar data after time-space fusion represents the target in the form of points in the image. In order to make the radar points have the meaning of representing the target in the image, the appropriate vehicle aspect ratio parameters are selected to generate the millimeter-wave radar ROI area; S4, using the K-means clustering algorithm based on the improved SSD, using the minimum distance IOU to perform bounding box clustering, and performing ROI area detection on the camera image to obtain the camera ROI area; S5. Use the joint IOU strategy association method to select a suitable target bounding box in the millimeter-wave radar ROI area and the image ROI area; S6. After the millimeter-wave radar and camera strategies are integrated through the joint IOU strategy, multiple detection frames will be generated for a target. In order to select the optimal detection frame, the NMS non-maximum suppression method will be used to filter out the redundant detection frames, and the fusion confidence will be used to screen them, and finally the target frame and category of the target to be detected will be determined.
2. According to claim 1, a target detection method based on millimeter wave radar and camera fusion, It is characterized in that The step S4 comprises the following sub-steps: S41, use MobileNetV2 network to replace the VGG16 feature extraction part in the SSD detection algorithm; S42, generating a clustering result list R using the bounding box list L and the number of cluster centers K obtained by the SSD algorithm; S43, randomly select K points as initial cluster centers and put them into the result list R; S44, calculating the distance IOU from each bounding box to the cluster center, and sorting them from small to large according to the distance IOU, and according to the sorting result, classifying the current box into the category with the smallest distance IOU; S45. Recalculate new cluster centers based on the classification results, and update the result list R to determine whether the cluster centers no longer change or reach the maximum number of updates. If so, return the result list R, otherwise continue to iterate.
3. According to claim 1, a target detection method based on millimeter wave radar and camera fusion, It is characterized in that The step S5 comprises the following sub-steps: S51, w c ,h c Indicates the width and height of the camera ROI area, w r ,h r The width and height of the millimeter-wave radar ROI area are represented by the formula (1): From formula (1), we can see that the value range of IOU is 0 to 1. The larger the IOU is, the greater the overlap between the detection results of the millimeter-wave radar and the detection results of the camera, and the higher the confidence. When the IOU is between 0.5 and 1, it means that the detection results of the two are consistent. All millimeter-wave radar detection frames within this range are retained, and the camera detection category is added to these frames; S52. Since there may be deviations in the camera detection, based on the above IOU, the confidence of the target detected by the camera is combined and the confidence of the fusion between the two is calculated by formula (2): conf all =ξIOU+μconf cam (2) In the formula, conf cam Represents the confidence of the camera detecting the target; ξ and μ represent the proportion of the joint IOU and camera detection confidence respectively, and the value range is 0 to 1.
4. According to claim 1, a target detection method based on millimeter wave radar and camera fusion, It is characterized in that The step S6 comprises the following sub-steps: S61. After the joint IOU strategy is adopted, in order to select the optimal detection frame, the NMS non-maximum suppression method is used for processing. First, the input is obtained: the prediction frame list L, the fusion confidence threshold α, the non-maximum suppression threshold β, and the number of detection categories C; S62. Obtain the fusion confidence conf of each prediction box from the prediction box list in turn all , determine whether the camera confidence is greater than 0.7, and add the detection boxes greater than 0.7 to the result sequence R; S63, sorting the predicted sequence in descending order according to the fusion confidence, and filtering out the detection boxes whose threshold is less than α; S64, obtaining all detection frames of each type of object, denoted as M, obtaining the detection frame A with the maximum confidence and adding it to the result sequence R, and removing the detection frame from M; S65, calculating the overlap degree λ between A and the candidate box list M, removing those with overlap degree λ greater than the non-maximum suppression threshold β from the M sequence, and finally returning the result sequence R.
