Method for determining vehicle heading angle and computer device
By extracting feature information from multiple detection areas of the vehicle and adjusting adaptive weights, the problem of insufficient real-time performance and accuracy of single frames in existing technologies is solved, and real-time and accurate estimation of the vehicle heading angle is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NULLMAX INC
- Filing Date
- 2026-03-09
- Publication Date
- 2026-05-12
AI Technical Summary
Existing methods for determining vehicle heading angle cannot meet the real-time requirements of a single frame, and cannot accurately estimate the heading angle for stationary or slow-moving vehicles, affecting the accuracy of trajectory prediction and collision prediction.
By extracting feature information from multiple detection areas of the target vehicle (such as the vehicle body frame, dual headlights, single taillight, and license plate), the heading angle and confidence information of each area are determined, and the weights are adaptively adjusted to finally determine the target heading angle.
It enables accurate and real-time determination of vehicle heading angles in single-frame traffic environment images, improving the accuracy and robustness of heading angle estimation and adapting to heading angle estimation in different scenarios.
Smart Images

Figure CN121777945B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle control technology, and in particular to a method for determining the heading angle of a vehicle and a computer device thereof. Background Technology
[0002] With the development of vehicle-assisted driving technology, the demand for vehicle trajectory prediction, collision prediction, and planning and control is increasing. Currently, vehicles typically need to determine the heading angles of target vehicles in front of or around them in order to predict the target vehicle's trajectory, predict collisions between the vehicle and the target vehicle, and formulate planning and control strategies based on the determined heading angles. Therefore, the accuracy of the target vehicle's heading angle will affect the accuracy of vehicle trajectory prediction, collision prediction, and planning and control.
[0003] In existing technologies, the heading angle of a target vehicle is mostly estimated based on its motion direction over multiple consecutive frames. This approach has two drawbacks. First, it cannot predict the heading angle in a single frame, failing to meet real-time requirements. Second, for stationary or slowly moving vehicles, the change in motion direction over multiple consecutive frames is minimal or nonexistent, making it impossible to estimate an effective heading angle and affecting its accuracy.
[0004] Therefore, existing methods for determining the heading angle of a target vehicle have limitations in meeting the real-time requirements of a single frame and influencing the accuracy of the heading angle. Summary of the Invention
[0005] This application provides a method and computer device for determining the heading angle of a vehicle. Based on the original traffic environment image corresponding to the traffic environment in which the target vehicle is located, feature information of multiple detection areas of the target vehicle is determined. The heading angle information and confidence information corresponding to each detection area are determined based on the feature information of each detection area. Based on the confidence information corresponding to each detection area, the weights corresponding to each heading angle information can be adaptively adjusted. Therefore, the target heading angle information of the target vehicle is obtained based on the heading angle information corresponding to each detection area and its corresponding weights. Thus, for a single frame of the original traffic environment image, the heading angle information corresponding to multiple detection areas of the vehicle can be obtained based on the feature information of multiple detection areas, thereby obtaining the target heading angle of the vehicle, which can meet real-time requirements. Furthermore, because the heading angle information corresponding to different areas of the vehicle is considered, and the weights corresponding to each heading angle information can be adaptively adjusted based on the confidence information corresponding to each detection area, the final target heading angle information is more accurate, improving the accuracy of the vehicle's heading angle.
[0006] In a first aspect, embodiments of this application provide a method for determining the heading angle of a vehicle. The method includes: acquiring an original traffic environment image corresponding to the traffic environment in which the target vehicle is located; performing detection and normalization processing on the original traffic environment image to determine the vehicle image region of the target vehicle from the original traffic environment image; determining feature information of multiple target detection regions on the target vehicle based on the vehicle image region; determining heading angle information corresponding to each target detection region and confidence information corresponding to each heading angle information based on the feature information of each target detection region; determining the weight corresponding to each heading angle information based on the confidence information corresponding to each heading angle information; and determining the target heading angle information of the target vehicle based on the heading angle information corresponding to each target detection region and the weight corresponding to each heading angle information.
[0007] By employing the above technical solution, the original traffic environment image corresponding to the traffic environment where the target vehicle is located is detected and normalized to obtain the vehicle image region of the target vehicle. Based on the vehicle image region, feature information of multiple target detection regions on the target vehicle is determined. Based on the feature information of each target detection region, the heading angle information and confidence information corresponding to each target detection region are determined. Based on the confidence information corresponding to each target detection region, the weight corresponding to each heading angle information is determined. Finally, based on the heading angle information corresponding to each region and the weight corresponding to each heading angle information, the target heading angle information of the target vehicle is determined. Thus, for a single frame of original traffic environment image, the heading angle information corresponding to multiple target detection regions of the vehicle can be obtained based on the feature information of multiple target detection regions, thereby obtaining the target heading angle of the vehicle, which can meet real-time requirements. Furthermore, because the heading angle information corresponding to different detection regions of the vehicle is considered, and the weight corresponding to each heading angle information can be adaptively adjusted based on the confidence information corresponding to each detection region, the final target heading angle information is a more accurate heading angle, improving the accuracy of the vehicle's heading angle.
[0008] In one possible implementation of the first aspect mentioned above, the multiple target detection regions include regions corresponding to the vehicle body frame, hazard lights, single taillight, and license plate, respectively. The feature information corresponding to the multiple target detection regions includes vehicle body frame feature information, hazard light feature information, single taillight feature information, and license plate feature information. Based on the feature information of each target detection region, the heading angle information corresponding to each target detection region and the confidence information corresponding to each heading angle information are determined, including: based on the vehicle body frame feature information, determining the first heading angle information corresponding to the vehicle body frame and the vehicle body frame confidence information corresponding to the first heading angle information; based on the hazard light feature information, determining the second heading angle information corresponding to the hazard lights and the hazard light confidence information corresponding to the second heading angle information; based on the single taillight feature information, determining the third heading angle information corresponding to the single taillight and the single taillight confidence information corresponding to the third heading angle information; and based on the license plate feature information, determining the fourth heading angle information corresponding to the license plate and the license plate confidence information corresponding to the fourth heading angle information.
[0009] By adopting the above technical solution, the heading angle information and confidence information of multiple target detection areas such as vehicle body frame, dual headlights, single taillight, and license plate are determined. In this way, multiple heading angle information can be obtained based on the feature information of different detection areas of the vehicle. This ensures that there is a corresponding heading angle support for the corresponding area in scenarios such as vehicle obstruction, long distance, and nighttime. The target heading angle information can be obtained based on the heading angle information corresponding to different areas, which is more robust.
[0010] In one possible implementation of the first aspect described above, the vehicle frame feature information includes a set of vehicle outline pixels. Based on the vehicle frame feature information, determining the first heading angle information corresponding to the vehicle frame and the vehicle frame confidence information corresponding to the first heading angle information includes: determining the centroid coordinate information of the target vehicle based on the set of vehicle outline pixels; determining the covariance matrix based on the set of vehicle outline pixels and the centroid coordinate information; determining the minimum eigenvalue, the maximum eigenvalue, and the eigenvector corresponding to the maximum eigenvalue of the covariance matrix; determining the first heading angle information based on the eigenvector; and determining the vehicle frame confidence information based on the ratio of the maximum eigenvalue to the minimum eigenvalue.
[0011] By adopting the above technical solution, the first heading angle information and the confidence information of the vehicle frame corresponding to the first heading angle information are determined based on the vehicle frame feature information. Under strong perspective and large visual conditions, the target heading angle is determined based on the heading angle information corresponding to the vehicle frame, which has better stability and is more accurate.
[0012] In one possible implementation of the first aspect described above, the dual-lamp feature information includes headlight color information, headlight brightness information, and headlight symmetry information. The method further includes: determining the headlight category information of the dual-lamp based on the headlight color information, headlight brightness information, and headlight symmetry information; the headlight category information of the dual-lamp includes whether the dual-lamp is a headlight or a taillight; the dual-lamp feature information also includes first headlight position information, second headlight position information, headlight detection confidence, headlight symmetry confidence, and headlight color confidence; and determining the second heading angle information corresponding to the dual-lamp based on the dual-lamp feature information. The second heading angle information corresponds to the dual headlight confidence information, including: determining the headlight connection vector based on the first headlight position information and the second headlight position information; determining the second heading angle information corresponding to the direction perpendicular to the headlight connection vector based on the headlight connection vector, wherein if the dual headlight is a headlight, the second heading angle information is the second heading angle information corresponding to the headlight, and if the dual headlight is a taillight, the second heading angle information is the second heading angle information corresponding to the taillight; and determining the dual headlight confidence information corresponding to the second heading angle information based on the headlight detection confidence, headlight symmetry confidence, and headlight color confidence.
[0013] By adopting the above technical solution, based on the characteristic information of the dual lights, the second heading angle information corresponding to the dual lights and the confidence information of the dual lights corresponding to the second heading angle information are determined, which makes the direction of the vehicle's heading angle more distinguishable in nighttime, front, and rear scenarios.
[0014] In one possible implementation of the first aspect described above, the single taillight feature information includes a taillight pixel region. Based on the single taillight feature information, the third heading angle information corresponding to the single taillight and the single taillight confidence information corresponding to the third heading angle information are determined, including: obtaining the long side direction vector of the taillight based on the taillight pixel region using an image detection method; determining the third heading angle information corresponding to the direction perpendicular to the long side direction vector of the taillight based on the long side direction vector of the taillight; and determining the single taillight confidence information corresponding to the third heading angle information based on the taillight pixel region.
[0015] By adopting the above technical solution, the third heading angle information corresponding to the single taillight and the confidence information of the single taillight corresponding to the third heading angle information are determined based on the single taillight feature information. This enables the target heading angle to be determined based on the third heading angle information corresponding to the single taillight in nighttime scenarios, resulting in stronger robustness.
[0016] In one possible implementation of the first aspect mentioned above, the license plate feature information includes the position information of the four corner points of the license plate, the license plate detection confidence information, and the occlusion mark information. Based on the license plate feature information, the fourth heading angle information corresponding to the license plate and the license plate confidence information corresponding to the fourth heading angle information are determined, including: determining the first length information and the second length information of the license plate based on the position information of the four corner points; determining the perspective ratio of the license plate based on the first length information and the second length information; determining the fourth heading angle information based on the perspective ratio; and determining the license plate confidence information corresponding to the fourth heading angle information based on the license plate detection confidence information and the occlusion mark information.
[0017] By adopting the above technical solution, the fourth heading angle information corresponding to the license plate and the license plate confidence information corresponding to the fourth heading angle information are determined based on the license plate feature information. This enables the target heading angle information to be obtained based on the heading angle information corresponding to the license plate even when the vehicle body is obscured, thus providing effective heading angle information and improving the accuracy of the heading angle.
[0018] In one possible implementation of the first aspect described above, the feature information of multiple target detection regions on the target vehicle is determined based on the vehicle image region, including: performing edge detection processing on the vehicle image region to obtain the body frame feature information on the target vehicle, or performing semantic segmentation processing on the vehicle image region based on a semantic segmentation model to obtain the body frame feature information of the body frame; performing dual headlight keypoint detection processing on the vehicle image region based on a keypoint detection model to obtain the dual headlight feature information corresponding to the dual headlights; performing single taillight detection processing on the vehicle image region based on an image detection model or a semantic segmentation model to obtain the single taillight feature information corresponding to the single taillight; and performing license plate detection processing on the vehicle image region based on a license plate detection model to obtain the license plate feature information corresponding to the license plate.
[0019] In one possible implementation of the first aspect above, the method further includes: determining the scene type corresponding to the traffic environment in which the target vehicle is located based on the original traffic environment image; performing geometric verification on the heading angle information corresponding to each target detection area to determine the geometric consistency verification result of the heading angle information corresponding to each target detection area; and determining the weight corresponding to each heading angle information based on the confidence information corresponding to each heading angle information, including: determining the weight corresponding to each heading angle information based on the confidence information corresponding to each heading angle information, as well as the scene type and the geometric consistency verification result.
[0020] By adopting the above technical solution, the weight of each heading angle is determined based on the confidence information corresponding to each heading angle, as well as the scene type and geometric consistency verification results. This allows for adaptive adjustment of the weight of each heading angle to adjust the degree of influence of each heading angle on the final heading angle, resulting in higher accuracy of the final target heading angle.
[0021] In one possible implementation of the first aspect above, detecting and normalizing the original traffic environment image to determine the vehicle image region of the target vehicle from the original traffic environment image includes: performing image detection processing on the original traffic environment image based on an image detection model to determine the detection box of the target vehicle from the original traffic environment image; and performing size normalization processing on the detection box of the target vehicle to determine the vehicle image region of the target vehicle from the original traffic environment image.
[0022] Secondly, this application also discloses a computer device for executing the method for determining the vehicle heading angle disclosed in any of the implementations of the first aspect.
[0023] Thirdly, this application also discloses a vehicle for executing the method for determining the vehicle heading angle disclosed in any of the implementations of the first aspect.
[0024] The relevant beneficial effects of the second and third aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0025] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0026] Figure 1 A schematic flowchart illustrating a method for determining the heading angle of a vehicle provided in an embodiment of this application;
[0027] Figure 2 A flowchart illustrating the determination of a first heading angle and vehicle frame confidence level provided in this application embodiment;
[0028] Figure 3 A schematic flowchart illustrating the determination of the second heading angle and dual headlight confidence level provided in an embodiment of this application;
[0029] Figure 4 A flowchart illustrating the determination of the third heading angle and single taillight confidence level provided in an embodiment of this application;
[0030] Figure 5 A flowchart illustrating the determination of the fourth heading angle and license plate confidence level provided in this application embodiment;
[0031] Figure 6 A schematic diagram illustrating the principle of a method for determining the vehicle heading angle provided in an embodiment of this application;
[0032] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0033] With the development of vehicle-assisted driving technology, the demand for vehicle trajectory prediction, collision prediction, and planning and control is increasing. Currently, vehicles typically need to determine the heading angles of target vehicles in front, behind, or around them in order to predict the target vehicle's trajectory, predict collisions between the vehicle and the target vehicle, and formulate planning and control strategies based on the determined heading angles. Therefore, the accuracy of the target vehicle's heading angle will affect the accuracy of vehicle trajectory prediction, collision prediction, and planning and control.
[0034] In the existing technology, there are three main methods for estimating the heading angle:
[0035] The first method is a heading angle estimation method based on multi-frame trajectories, which mainly estimates the heading angle of the target vehicle based on its motion direction over multiple consecutive frames. This method has several drawbacks. First, it cannot predict the heading angle in a single frame, failing to meet real-time requirements. Second, for stationary or slowly moving vehicles, the change in motion direction over multiple frames is minimal or nonexistent, leading to an inability to estimate a valid heading angle and affecting its accuracy. Third, if the target vehicle's trajectory is lost due to occlusion, heading angle estimation becomes impossible, further impacting its accuracy.
[0036] The second approach is a heading angle estimation method based on 3D bounding box regression. This method primarily uses Convolutional Neural Networks (CNNs) to output the 3D bounding box and heading angle of the target vehicle from the input vehicle image. However, because CNNs are sensitive to image lighting, vehicle occlusion, and shooting angle, the requirements for the input vehicle image are relatively high. Insufficient lighting or blurry images directly affect the CNN's detection results, impacting the accuracy of the heading angle. Furthermore, the accuracy of the heading angle calculation depends on the CNN's generalization ability; instability in the CNN-based heading angle estimation will also affect its accuracy. Additionally, in low-viewpoint, small-target, and long-distance scenarios, the position and size of the target vehicle in the image will affect the CNN's detection performance, potentially leading to larger errors in the estimated heading angle and affecting its accuracy.
[0037] The third method is to geometrically calculate the heading angle based on the vehicle's length-to-width ratio. This method primarily involves estimating the target vehicle's length-to-width ratio to obtain its heading angle information. While this method is relatively accurate when based on side-view images of the target vehicle, it becomes almost impossible to distinguish the heading angle if the target vehicle is directly in front or behind, resulting in an inaccurate heading angle. Furthermore, for vehicles with significant shape differences, such as SUVs, vans, and trucks, the difference in front and rear dimensions leads to errors in the length-to-width ratio, further affecting the accuracy of the heading angle.
[0038] Therefore, existing methods for determining vehicle heading angles have limitations in meeting the real-time requirements of single frames and affecting the accuracy of heading angles, making it difficult to obtain robust and accurate heading angles in a single-frame image.
[0039] Based on this, this application proposes a method for determining the heading angle of a vehicle. Based on the original traffic environment image corresponding to the traffic environment in which the target vehicle is located, feature information of multiple detection areas of the target vehicle is determined. The heading angle information and confidence level information corresponding to each detection area are determined based on the feature information of each detection area. Based on the confidence level information of each detection area, the weights corresponding to each heading angle information can be adaptively adjusted. Therefore, the target heading angle information of the target vehicle is obtained based on the heading angle information of each detection area and its corresponding weights. Thus, for a single frame of the original traffic environment image, the heading angle information corresponding to multiple detection areas of the vehicle can be obtained based on the feature information of multiple detection areas, thereby obtaining the target heading angle of the vehicle, which can meet real-time requirements. Furthermore, because the heading angle information corresponding to different areas of the vehicle is considered, and the weights corresponding to each heading angle information can be adaptively adjusted based on the confidence level information of each detection area, the final target heading angle information is more accurate, improving the accuracy of the vehicle heading angle.
[0040] Next, with reference to the accompanying drawings, the method for determining the vehicle heading angle provided in this application will be explained.
[0041] The method for determining the vehicle heading angle provided in this application can be applied to vehicles, such as... Figure 1 As shown, the specific steps include the following.
[0042] S100: Acquire the original traffic environment image corresponding to the traffic environment where the target vehicle is located, and perform detection and normalization processing on the original traffic environment image to determine the vehicle image region of the target vehicle from the original traffic environment image.
[0043] S200 determines the feature information of multiple target detection areas on the target vehicle based on the vehicle image area.
[0044] S300 determines the heading angle information corresponding to each target detection area and the confidence information corresponding to each heading angle information based on the feature information of each target detection area.
[0045] S400 determines the weight of each heading angle based on the confidence information corresponding to each heading angle.
[0046] S500 determines the target heading angle information of the target vehicle based on the heading angle information corresponding to each target detection area and the weight corresponding to each heading angle information.
[0047] The method for determining the vehicle heading angle provided in this application involves detecting and normalizing the original traffic environment image corresponding to the traffic environment where the target vehicle is located to obtain the vehicle image region of the target vehicle. Based on the vehicle image region, feature information of multiple target detection regions on the target vehicle is determined. Based on the feature information of each target detection region, the heading angle information and confidence information corresponding to each target detection region are determined. Based on the confidence information corresponding to each target detection region, the weight corresponding to each heading angle information is determined. Finally, based on the heading angle information corresponding to each region and the weight corresponding to each heading angle information, the target heading angle information of the target vehicle is determined. Thus, for a single frame of original traffic environment image, the heading angle information corresponding to multiple target detection regions of the vehicle can be obtained based on the feature information of multiple target detection regions, thereby obtaining the target heading angle of the vehicle, which can meet real-time requirements. Furthermore, because the heading angle information corresponding to different detection regions of the vehicle is considered, and the weights corresponding to each heading angle information can be adaptively adjusted based on the confidence information corresponding to each detection region, the final target heading angle information is more accurate, improving the accuracy of the vehicle heading angle.
[0048] In the implementation of this application, firstly, the original traffic environment image is detected and normalized to determine the vehicle image region of the target vehicle from the original traffic environment image. This includes: performing image detection processing on the original traffic environment image based on an image detection model to determine the detection box of the target vehicle from the original traffic environment image, and performing size normalization processing on the detection box of the target vehicle to determine the vehicle image region of the target vehicle from the original traffic environment image.
[0049] For example, the vehicle acquires a raw traffic environment image of the traffic environment in which the target vehicle is located. The image coordinate system of the raw traffic environment image is:
[0050]
[0051] in, Horizontal pixel coordinates Here, W represents the vertical pixel coordinates, W represents the width of the image, and H represents the height of the image.
[0052] Furthermore, the original traffic environment image is input into the target detection model, which outputs a detection box for at least one target vehicle. ,in, The coordinates of the top-left corner pixel of the detection box. These are the pixel coordinates of the bottom right corner.
[0053] The original traffic environment images can be images captured by vehicle cameras (front-view cameras, surround-view cameras, side cameras), or images captured by roadside equipment (such as roadside cameras) and sent to the vehicle.
[0054] In this application, the detection confidence level of each target vehicle can also be output, and only the detection frames of target vehicles with a detection confidence level greater than or equal to 0.5 can be retained, thus filtering out false detections or target vehicles with low confidence levels.
[0055] Furthermore, based on the detection bounding box B of each target vehicle, pixel regions containing only the target vehicles are cropped from the original traffic environment image, wherein the cropping range is: .
[0056] Furthermore, the pixel regions of each target vehicle after cropping are normalized and scaled to a fixed size to obtain the vehicle image region (i.e., region of interest (ROI)) of each target vehicle.
[0057] In the implementation method of this application, the size normalization process can be carried out by proportional scaling and adding black edges to avoid stretching and deformation of the vehicle shape and ensure that the geometric relationship of features such as outline / headlights is not destroyed.
[0058] It should be noted that the normalized size is matched with the input size of the model used for subsequent feature extraction.
[0059] In this application, the object detection model can be any of the models such as YOLOv8, CenterNet, or Faster R-CNN.
[0060] Next, based on the vehicle image region, the feature information of multiple target detection regions on the target vehicle is determined, and based on the feature information of each target detection region, the heading angle information corresponding to each target detection region and the confidence information corresponding to each heading angle information are determined.
[0061] In the implementation method of this application, the multiple target detection areas include the areas corresponding to the vehicle body frame, dual headlights, single taillight, and license plate, and the feature information corresponding to the multiple target detection areas includes vehicle body frame feature information, dual headlight feature information, single taillight feature information, and license plate feature information.
[0062] In the implementation method of this application, such as Figure 2 As shown, the extraction of body frame feature information and the calculation of heading angle and confidence level corresponding to the body frame include the following steps.
[0063] S211, perform edge detection processing on the vehicle image region to obtain the body frame feature information of the target vehicle, or perform semantic segmentation processing on the vehicle image region based on the semantic segmentation model to obtain the body frame feature information of the body frame.
[0064] In the implementation of this application, the body frame feature information includes a set of body outline pixels.
[0065] For example, Canny edge detection processing is performed on the vehicle image region (e.g., vehicle mask or edge) to obtain a binary map of the vehicle edges, which in turn yields a set of vehicle body contour pixels: N represents the total number of vehicle pixels.
[0066] Alternatively, based on a semantic segmentation model, semantic segmentation can be performed on vehicle image regions (such as vehicle masks or edges) to output a pixel set of the vehicle pixel-level mask, that is, a pixel set of the vehicle body outline: N represents the total number of vehicle pixels.
[0067] Among them, semantic segmentation models include Mask R-CNN, UNet, and other models.
[0068] Furthermore, based on the vehicle frame feature information, the first heading angle information corresponding to the vehicle frame and the vehicle frame confidence information corresponding to the first heading angle information are determined.
[0069] S212, Determine the centroid coordinates of the target vehicle based on the pixel set of the vehicle body outline.
[0070] For example, the centroid is the geometric center of the vehicle profile, used to eliminate the influence of vehicle position offset on orientation calculation.
[0071] The formula for calculating the centroid coordinates of the target vehicle based on the pixel set of the vehicle body contour is as follows:
[0072]
[0073]
[0074] in, Let the horizontal coordinates of the centroid be... The coordinates are perpendicular to the centroid.
[0075] S213, determine the covariance matrix based on the pixel set of the vehicle body outline and the centroid coordinate information.
[0076] For example, a covariance matrix is constructed, which is used to describe the distribution characteristics of vehicle body contour pixels in the uv coordinate system.
[0077] Specifically, based on the centroid coordinate information and the pixel set of the vehicle body outline, the horizontal pixel variance, the vertical pixel variance, and the horizontal and vertical covariance are obtained, resulting in a covariance matrix.
[0078] The horizontal pixel variance is obtained as follows:
[0079]
[0080] in, denoted as the horizontal pixel variance.
[0081] The vertical pixel variance is obtained as follows:
[0082]
[0083] in, denoted as the vertical pixel variance.
[0084] The horizontal and vertical covariances are obtained as follows:
[0085]
[0086] in, This represents the covariance in the horizontal and vertical directions.
[0087] The covariance matrix is obtained as follows:
[0088]
[0089] in, Let represent the covariance matrix.
[0090] S214, determine the minimum eigenvalue, the maximum eigenvalue, and the eigenvector corresponding to the maximum eigenvalue of the covariance matrix, and determine the first heading angle information based on the eigenvector.
[0091] For example, based on principal component analysis (PCA) or the Hough transform, the covariance matrix... Perform eigenvalue decomposition to obtain the largest eigenvalue. and minimum eigenvalue and the eigenvector corresponding to the largest eigenvalue. , This refers to the main axis direction of the vehicle body outline, where the direction with the longest pixel distribution corresponds to the length direction of the vehicle body.
[0092] Furthermore, the feature vector is converted into an angle using the arctangent function to obtain the first heading angle information.
[0093] The first heading angle information is obtained in the following way:
[0094]
[0095] in, This is the first heading angle information. It is the arctangent function. This is the eigenvector corresponding to the largest eigenvalue.
[0096] It should be noted that the use The function can distinguish angles in four quadrants, thus avoiding 0 / Ambiguity, output range This is consistent with the definition of heading angle.
[0097] S215, determine the confidence information of the vehicle frame based on the ratio of the maximum eigenvalue to the minimum eigenvalue.
[0098] For example, confidence is used for quantification The reliability of the vehicle depends on its slenderness. The more reliable the vehicle, the more square it is. The less reliable it is.
[0099] The shape anisotropy ratio can be obtained from the ratio of the largest eigenvalue and the smallest eigenvalue. :
[0100]
[0101] in, For the anisotropy ratio of shapes, The larger the size, the more slender the vehicle's silhouette.
[0102] Set threshold ,in, Based on engineering experience, the value can be set to 2~3. The confidence information of the vehicle frame is determined based on the anisotropy ratio of the shape and the threshold, using the minimum value function.
[0103] The confidence information of the vehicle body frame was obtained in the following way:
[0104]
[0105] in, For vehicle body frame confidence information. This is the preset threshold. .
[0106] For example, =3、 =3, then =1, then Completely reliable, if =1.5、 =2, then =0.25, then Low reliability.
[0107] In the implementation method of this application, such as Figure 3 As shown, the extraction of dual-lamp feature information and the calculation of heading angle and confidence level for dual-lamp lights specifically include the following steps.
[0108] S221, Based on the key point detection model, perform dual-lamp key point detection processing on the vehicle image region to obtain the dual-lamp feature information corresponding to the dual lamps.
[0109] For example, fine directional features of paired headlights (i.e., dual headlights) are extracted to resolve the 180° heading angle from either directly in front or directly behind. It addresses ambiguity issues while providing fine-grained correction for heading angles.
[0110] Specifically, based on a keypoint detection network, keypoint detection processing is performed on the input vehicle image region to obtain dual headlight feature information. Dual headlights refer to the vehicle's left headlight (as an example of the first headlight) and right headlight (as an example of the second headlight).
[0111] In the implementation of this application, the dual headlight feature information output by the key point detection network includes the coordinates of the center point of the left headlight: ,in, The horizontal coordinate of the left headlight. The vertical coordinates of the left headlight (as an example of the first headlight's position information) and the coordinates of the center point of the right headlight are: ,in, The horizontal coordinate of the right headlight The vertical coordinates of the headlights (as an example of the second headlight position information), and the headlight color information. (e.g., white or red), headlight brightness information Headlight symmetry information Confidence information on vehicle headlight testing Symmetric confidence information and color confidence information .
[0112] Key point detection networks include, for example, HRNet and Hourglass Network.
[0113] S222, Based on the headlight color information, headlight brightness information, and headlight symmetry information, determine the headlight category information of the dual headlights. The headlight category information of the dual headlights includes whether the dual headlights are headlights or taillights.
[0114] For example, a discrimination score S is constructed by analyzing the color, brightness, and symmetry of the headlights to distinguish whether the current light pair is a headlight or a taillight, thus obtaining the headlight category information of the dual headlights.
[0115] The classification score for vehicle lights is as follows:
[0116]
[0117] Where S is the vehicle headlight category discrimination score, For headlight color information, For headlight brightness information, For headlight symmetry information, , , For their respective normalized weights, .
[0118] If the headlight color is determined to be white through RGB color gamut clustering, then If the value is 1, and the headlight color is determined to be red, then... It is -1.
[0119] The headlight brightness information is determined based on the ratio of the average brightness of the headlight area to the global brightness of the image, and the headlight brightness information is normalized to [-1, 1].
[0120] Determine the geometric symmetry of the first and second headlights, normalize it to [0, 1], and then map it to [-1, 1].
[0121] If S>0, it is determined to be the headlight, and the second heading angle indicates the direction of the front of the vehicle. If S<0, it is determined to be the taillight, and the second heading angle indicates the direction of the rear of the vehicle.
[0122] Furthermore, based on the dual-lamp feature information, the second heading angle information corresponding to the dual-lamp and the dual-lamp confidence information corresponding to the second heading angle information are determined.
[0123] S223, determine the headlight connection vector based on the first headlight position information and the second headlight position information.
[0124] For example, the headlight connection vector describes the vehicle's width direction, and is specifically calculated as follows:
[0125]
[0126] in, For the vector connecting the headlights, For vertical components, This is the horizontal component.
[0127] S224, Based on the headlight connection vector, determine the second heading angle information corresponding to the direction perpendicular to the headlight connection vector.
[0128] For example, both the front and rear directions of the vehicle are perpendicular to the width direction. Therefore, the angle value of the direction vector perpendicular to the headlight connection vector in the image coordinate system is determined based on the headlight connection vector to obtain the second heading angle information.
[0129] The second heading angle information is obtained in the following way:
[0130]
[0131] in, This is the second heading angle information. This is consistent with the definition of heading angle.
[0132] It should be noted that, based on the image coordinate system, if upwards in the image is determined to be the direction of the car's front, then a + value should be used. If it is determined that downwards in the image represents the direction the car is heading, then take - .
[0133] Specifically, if the hazard lights are headlights, the second heading angle information is the second heading angle information corresponding to the headlights; if the hazard lights are taillights, the second heading angle information is the second heading angle information corresponding to the taillights.
[0134] Furthermore, if the lateral lights are taillights, then the second heading angle... need The heading angle, corrected to correspond to the direction of the vehicle's front, is used as the second heading angle corresponding to the headlights and incorporated into the subsequent calculation of the target heading angle.
[0135] S225, based on the headlight detection confidence, headlight symmetry confidence, and headlight color confidence, determine the dual headlight confidence information corresponding to the second heading angle information.
[0136] For example, dual-lamp confidence information is used for quantification. Reliability.
[0137] The confidence information for dual-lamp illumination is determined as follows:
[0138]
[0139] in, For dual-lamp confidence information, To assess the confidence level of vehicle headlights, For the symmetry confidence level of the vehicle lights, Confidence level for headlight color.
[0140] Furthermore, in the implementation of this application, the confidence information of the dual lamps can also be normalized, for example... Divide by 3 to ensure To avoid confidence overflow.
[0141] For example, , =0.9、 =0.7, then =2.4, divided by 3 =0.8.
[0142] In the implementation method of this application, It relies on paired headlights and requires simultaneous detection of both left and right headlights to perform calculations. Furthermore, by classifying vehicle lights, it can be distinguished. Whether it's the direction of the front or the rear of the car, it can solve the 180-degree heading angle problem from a direct front / rear view. Ambiguity issues.
[0143] In the implementation method of this application, such as Figure 4 As shown, the extraction of single taillight feature information and the calculation of heading angle and confidence level for a single taillight include the following steps.
[0144] S231, Perform single taillight detection processing on the vehicle image region based on the image detection model or semantic segmentation model to obtain the single taillight feature information corresponding to the single taillight.
[0145] In the implementation of this application, the single taillight feature information includes the taillight pixel area.
[0146] For example, an object detection model or a semantic segmentation model can be used to output the detection box or mask region of the taillight to obtain the taillight pixel region.
[0147] Among them, object detection models or semantic segmentation models are, for example, the aforementioned YOLO and UNet.
[0148] In this application, the taillight can be a continuous light at the rear of the vehicle, a brake light, or one of the left or right taillights.
[0149] Furthermore, based on the single taillight feature information, the third heading angle information corresponding to the single taillight and the single taillight confidence information corresponding to the third heading angle information are determined.
[0150] S232, based on the image detection method, obtains the long side direction vector of the taillight according to the pixel region of the taillight.
[0151] S323, based on the direction vector of the long side of the taillight, determine the third heading angle information corresponding to the direction perpendicular to the direction vector of the long side of the taillight.
[0152] S324, determine the single taillight confidence information corresponding to the third heading angle information based on the taillight pixel area.
[0153] For example, based on a lightweight CNN network (as an example of an image detection method), the angle of the direction perpendicular to the long side direction vector of the taillight is output in the image coordinate system according to the cropped taillight pixel region. In order to obtain the third heading angle information, , It directly corresponds to the direction the rear of the car is facing.
[0154] Furthermore, the lightweight CNN network also outputs single taillight confidence information, representing... Reliability.
[0155] In this application's implementation, since taillights are mostly elongated strip designs, their shape is relatively stable and easy to handle, and their long side runs perpendicular to the rear of the vehicle, the CNN network can directly regress the heading angle by learning the shape and tilt features of the taillights. And single taillight confidence information .
[0156] In this application, the CNN network is, for example, a network model such as MobileNet or ResNet18.
[0157] Furthermore, image detection methods can also include morphological methods, scale-invariant feature transform (SIFT), etc.
[0158] In the implementation method of this application, such as Figure 5 As shown, the extraction of license plate feature information and the calculation of heading angle and confidence level for license plates include the following steps.
[0159] S241, Based on the license plate detection model, the vehicle image region is processed to detect the license plate and obtain the license plate feature information corresponding to the license plate.
[0160] For example, a license plate detection network (as an example of a license plate detection model) performs license plate detection processing based on the input vehicle image region to obtain license plate feature information.
[0161] The license plate feature information includes the four corner points of the license plate. , , , Location information License plate detection confidence information , and information about obscuring signs .
[0162] Whether a license plate is obscured is determined by the integrity of the four corner points and the texture of the license plate area. Indicates no obstruction. This indicates that there is occlusion.
[0163] In this application, the license plate detection model is, for example, the YOLO-LicensePlate model.
[0164] Furthermore, based on the license plate feature information, the fourth heading angle information corresponding to the license plate and the license plate confidence information corresponding to the fourth heading angle information are determined.
[0165] S242, determine the first length information and the second length information of the license plate based on the position information of the four corner points.
[0166] For example, the lengths of the top and bottom edges of the license plate are calculated to obtain the top edge length information (as an example of the first length information) and the bottom edge length information (as an example of the second length information).
[0167] The first length information is obtained in the following way:
[0168]
[0169] in, This is the first length information. This is the location information of the first corner point. , This is the location information of the second corner point. .
[0170] The second length information is obtained in the following way:
[0171]
[0172] in, This is the second length information. This is the location information of the third corner point. , This is the location information of the fourth corner point. .
[0173] S243, determine the perspective ratio of the license plate based on the first length information and the second length information.
[0174] Perspective proportions characterize the degree of perspective distortion of license plates and are strongly correlated with the heading angle.
[0175] The implementation method of this application determines the perspective ratio of the license plate in the following way:
[0176]
[0177] in, For perspective proportions, The license plate is not transparent and faces the camera directly. / The license plate is transparent.
[0178] S244, determine the fourth heading angle information based on the perspective ratio.
[0179] For example, the heading angle information is inversely derived based on a small-angle approximation of perspective geometry.
[0180] The fourth heading angle information is determined as follows:
[0181]
[0182] in, This is the fourth heading angle information. Camera calibration coefficients for cameras used to capture raw traffic environment images.
[0183] The camera calibration coefficients are obtained by calibrating the camera's intrinsic parameters, camera installation height, and camera installation angle.
[0184] S245, based on the license plate detection confidence information and the obstruction sign information, determine the license plate confidence information corresponding to the fourth heading angle information.
[0185] License plate confidence information is used for quantification Reliability.
[0186] The confidence information corresponding to the fourth heading angle is determined based on the license plate detection confidence information and occlusion sign information output by the license plate detection network.
[0187] The confidence level information for license plates is determined as follows:
[0188]
[0189] in, For license plate confidence information, For license plate detection confidence information, To obscure the sign information.
[0190] Step S400: Determine the weight of each heading angle information based on the confidence information corresponding to each heading angle information.
[0191] In this application, the first weight information corresponding to the first heading angle information is obtained in the following way:
[0192]
[0193] in, This is the first weight information corresponding to the first heading angle information.
[0194] The second weight information corresponding to the second heading angle information is obtained in the following way:
[0195]
[0196] in, This is the second weight information corresponding to the second heading angle information.
[0197] The third weight information corresponding to the third heading angle information is obtained in the following way:
[0198]
[0199] in, This is the third weight information corresponding to the third heading angle information.
[0200] The fourth weight information corresponding to the fourth heading angle information is obtained in the following way:
[0201]
[0202] in, This is the fourth weight information corresponding to the fourth heading angle information.
[0203] If the confidence level corresponding to a certain heading angle is 0, for example, no license plate was detected, Then the corresponding weight If the value is 0, it does not participate in the fusion.
[0204] Furthermore, in the implementation of this application, the scene type corresponding to the traffic environment in which the target vehicle is located is determined based on the original traffic environment image, and the heading angle information corresponding to each target detection area is geometrically verified to determine the geometric consistency verification result of the heading angle information corresponding to each target detection area. Then, based on the confidence information corresponding to each heading angle information, as well as the scene type and the geometric consistency verification result, the weight corresponding to each heading angle information is determined.
[0205] For example, the weight information corresponding to each heading angle, which is determined based on the confidence information corresponding to each heading angle, namely the aforementioned first weight information, second weight information, third weight information and fourth weight information, is used as the initial weight information corresponding to each heading angle.
[0206] Then, based on the image scene of the original traffic environment image, the scene type of the target vehicle is determined and the initial weight information corresponding to each heading angle is adjusted.
[0207] For example, if it is a nighttime / low-light scene type, then the second initial weight information is increased. and third initial weight information Reduce the initial weight information and the fourth initial weight information In scenarios with significant occlusion, the initial weight information is increased. and the fourth initial weight information Reduce the second initial weight information and third initial weight information If the view is directly in front or behind, then the second initial weight information is increased. and the fourth initial weight information Reduce the initial weight information and third initial weight information For scenes with strong perspective / side view, the initial weight information is increased. Second initial weight information Third initial weight information Fourth initial weight information .
[0208] After adjustment, the four weights are re-normalized to ensure that the adjusted result is accurate.
[0209] Furthermore, geometric consistency checks are performed on each heading angle information to reduce the weight information corresponding to abnormal heading angle information, thereby reducing the impact of abnormal heading angle information on the final target heading angle information.
[0210] For example, calculate the mean of the heading angles of the four heading angle information:
[0211]
[0212] in, This is the mean heading angle.
[0213] Calculate the absolute value of the difference between each heading angle and the mean heading angle:
[0214]
[0215] in, Let be the absolute value of the difference between the i-th heading angle information and the mean heading angle. .
[0216] Anomaly detection is performed on the absolute value of the difference between each heading angle and the mean heading angle to obtain the geometric consistency verification result. If the geometric consistency verification result is... Greater than or equal to a preset difference threshold (e.g.) If the heading angle information that is different is reduced, the weight of the corresponding heading angle information will be reduced, for example, by multiplying the weight by 0.1, in order to weaken the impact of abnormal heading angles.
[0217] For example, assuming the third heading angle information If the absolute value of the difference between the mean heading angle and the mean heading angle is greater than or equal to a preset difference threshold, then reduce the heading angle. To obtain the final .
[0218] In this way, based on the scene category and geometric consistency verification results, the weights corresponding to each heading angle information can be adaptively adjusted to obtain the final weights corresponding to each heading angle information. , , , .
[0219] Step S500: Determine the target heading angle information of the target vehicle based on the heading angle information corresponding to each target detection area and the weight corresponding to each heading angle information.
[0220] For example, based on the first heading angle information and the weights corresponding to the first heading angle information Second heading angle information and the weights corresponding to the second heading angle information Third heading angle information and the weights corresponding to the third heading angle information Fourth heading angle information and the weights corresponding to the fourth heading angle information The target heading angle information of the target vehicle is obtained.
[0221] In this application, the target heading angle information is obtained in the following manner:
[0222]
[0223] in, For target heading angle information.
[0224] Among them, if Then through Adjust the target heading angle information to Interval.
[0225] The vehicle heading angle determination method provided in this application is a single-frame heading angle estimation method based on the fusion of vehicle body contour and local directional features. It can estimate the heading angle based on a single frame image, even for stationary or slowly moving vehicles, without relying on multi-frame image data. Furthermore, in nighttime driving scenarios, it can estimate the heading angle based on local features of the headlights and adjust the corresponding weights to eliminate ambiguity, making the vehicle heading angle estimation more robust. Further, by combining the heading angle estimation corresponding to the vehicle body contour and the heading angle estimation corresponding to local vehicle regions (headlights, taillights, license plate), the target heading angle is obtained, significantly improving the accuracy of the heading angle estimation. This improves the accuracy and robustness of single-frame vehicle heading angle estimation in assisted driving scenarios. Moreover, feature extraction and confidence detection are achieved based on mature object detection models, semantic segmentation models, and keypoint detection models, eliminating the need for developing complex networks and making it easy to implement in engineering.
[0226] like Figure 6 As shown, in the implementation method of this application, the original traffic environment image corresponding to the traffic environment where the target vehicle is located is input into image detection models such as YOLO and CenterNet, so that the image detection models can detect and normalize the target vehicle in the original traffic environment image and output the region of interest (ROI) of the target vehicle (this process can be understood as step 1). Further, the main direction features of the vehicle body contour are extracted, and transformation processing is performed based on methods such as PCA / Hough to output the first candidate angle (i.e., the first heading angle). The first candidate angle is a rough estimate based on the vehicle body outline, without forward or backward heading angles (this process can be understood as step 2). Dual headlight directional features are extracted (e.g., front or rear dual headlights). Based on the key point detection model and brightness analysis method, the second candidate angle (i.e., the second heading angle) is output. The second candidate angle contains forward and backward information, meaning it carries information indicating whether the candidate angle corresponds to the headlight or taillight (this process can be understood as step 3). The taillight direction features are extracted, and a third candidate angle (i.e., the third heading angle) is output based on morphological methods such as SIFT and CNN. The third heading angle has advantages in nighttime / long-distance scenarios (this process can be understood as step 4). License plate tilt features are extracted, and a fourth candidate angle (i.e., the fourth heading angle) is output based on quadrilateral detection and perspective analysis. The fourth candidate angle is obtained based on small target regions such as license plates (this process can be understood as step 5). For stationary vehicles and slow-moving vehicles, more accurate heading angle information of the target vehicle can be obtained based on the candidate angle corresponding to the license plate, improving the robustness of determining the heading angle of the target vehicle in different scenarios. Furthermore, multiple feature weighted fusion is performed on the determined heading angles, and the weights corresponding to each heading angle are adaptively adjusted according to the determined confidence information, scene category, and geometric consistency verification results, finally outputting a high-precision target heading angle. (This process can be understood as step 6).
[0227] In the implementation of this application, the method for estimating the vehicle heading angle can be applied not only to vehicles to enable them to estimate the heading angle of the target vehicle, but also to cloud servers, roadside equipment, and roadside cameras to estimate the heading angle of the target vehicle based on the original traffic environment image of the traffic environment in which the target vehicle is located.
[0228] Furthermore, this application also provides a vehicle, including a method for determining the vehicle heading angle provided in this application.
[0229] Furthermore, this application also provides a computer device, which can be a vehicle, roadside equipment, roadside camera, remote terminal, etc., for executing the vehicle heading angle determination method provided in this application.
[0230] Please see Figure 7 , Figure 7 The diagram shown is a structural schematic of a computer device provided in an embodiment of this application. Figure 7 As shown, the computer device may include: transceiver 121, processor 122, and memory 123.
[0231] Processor 122 executes computer execution instructions stored in memory, causing processor 122 to perform the vehicle heading angle determination method in the above embodiments. Processor 122 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0232] The memory 123 is connected to the processor 122 via the system bus and completes communication between them. The memory 123 is used to store computer program instructions.
[0233] This application also provides a chip for executing instructions, which is used to implement the technical solution of the vehicle heading angle determination method in the above embodiments.
[0234] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a processor of a computer device, cause the processor of the computer device to perform the technical solution of the vehicle heading angle determination method of the above embodiments.
[0235] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the method for determining the vehicle heading angle in the above embodiments.
[0236] It should be noted that, in addition to the specific embodiments described above, those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Although the description of this application is presented in conjunction with preferred embodiments, this does not mean that the features of this application are limited to this implementation. On the contrary, the purpose of describing the application in conjunction with the implementation is to cover other options or modifications that may be derived from this application. To provide a thorough understanding of this application, many specific details are included in the above description, and this application may also be implemented without using these details. Furthermore, to avoid confusion or obscuring the focus of this application, some specific details will be omitted in the description. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0237] It should be noted that in this specification, similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0238] It should be noted that the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0239] It should be noted that some structural or methodological features may be shown in the accompanying drawings in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, including structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0240] Although this application has been illustrated and described with reference to certain preferred embodiments, those skilled in the art should understand that the above description is a further detailed explanation of the application in conjunction with specific implementations, and should not be construed as limiting the specific implementation of this application to these descriptions. Those skilled in the art can make various changes in form and detail, including some simple deductions or substitutions, without departing from the spirit and scope of this application.
Claims
1. A method for determining the heading angle of a vehicle, characterized in that, The method includes: The original traffic environment image corresponding to the traffic environment where the target vehicle is located is obtained, and the original traffic environment image is detected and normalized to determine the vehicle image region of the target vehicle from the original traffic environment image. Based on the vehicle image region, feature information of multiple target detection regions on the target vehicle is determined. The multiple target detection regions include regions corresponding to the vehicle body frame, hazard lights, single taillight, and license plate, respectively. The feature information corresponding to the multiple target detection regions includes vehicle body frame feature information, hazard light feature information, single taillight feature information, and license plate feature information. Based on the feature information of each target detection region, the heading angle information and the confidence information corresponding to each target detection region are determined. Specifically, determining the heading angle information and the confidence information corresponding to each target detection region based on the feature information of each target detection region includes: determining the first heading angle information and the vehicle frame confidence information corresponding to the first heading angle information based on the vehicle frame feature information; determining the second heading angle information and the confidence information corresponding to the second heading angle information based on the dual headlight feature information; determining the third heading angle information and the confidence information corresponding to the single taillight based on the single taillight feature information; and determining the fourth heading angle information and the confidence information corresponding to the license plate based on the license plate feature information. The weight corresponding to each heading angle information is determined based on the confidence information corresponding to each heading angle information. The target heading angle information of the target vehicle is determined based on the heading angle information corresponding to each target detection area and the weight corresponding to each heading angle information.
2. The method for determining the vehicle heading angle according to claim 1, characterized in that, The vehicle frame feature information includes a set of vehicle outline pixels. Based on the vehicle frame feature information, the first heading angle information corresponding to the vehicle frame and the vehicle frame confidence information corresponding to the first heading angle information are determined, including: Based on the set of pixels representing the vehicle body contour, determine the centroid coordinates of the target vehicle. The covariance matrix is determined based on the set of pixels of the vehicle body outline and the centroid coordinate information; Determine the minimum eigenvalue, the maximum eigenvalue, and the eigenvector corresponding to the maximum eigenvalue of the covariance matrix; Based on the feature vector, the first heading angle information is determined; and The confidence information of the vehicle frame is determined based on the ratio of the maximum eigenvalue to the minimum eigenvalue.
3. The method for determining the vehicle heading angle according to claim 1, characterized in that, The dual headlight feature information includes headlight color information, headlight brightness information, and headlight symmetry information; the method further includes: Based on the headlight color information, headlight brightness information, and headlight symmetry information, the headlight category information of the dual lights is determined, wherein the headlight category information of the dual lights includes whether the dual lights are headlights or taillights. The dual headlight feature information also includes first headlight position information, second headlight position information, headlight detection confidence level, headlight symmetry confidence level, and headlight color confidence level. Based on the dual headlight feature information, the second heading angle information corresponding to the dual headlights and the dual headlight confidence level information corresponding to the second heading angle information are determined, including: Based on the first headlight position information and the second headlight position information, determine the headlight connection vector; Based on the headlight connection vector, the second heading angle information corresponding to the direction perpendicular to the headlight connection vector is determined. Specifically, if the hazard lights are headlights, the second heading angle information is the second heading angle information corresponding to the headlights; if the hazard lights are taillights, the second heading angle information is the second heading angle information corresponding to the taillights. Based on the headlight detection confidence level, the headlight symmetry confidence level, and the headlight color confidence level, the dual headlight confidence level information corresponding to the second heading angle information is determined.
4. The method for determining the vehicle heading angle according to claim 1, characterized in that, The single taillight feature information includes the taillight pixel area. Based on the single taillight feature information, the third heading angle information corresponding to the single taillight and the single taillight confidence information corresponding to the third heading angle information are determined, including: Based on the image detection method, the long side direction vector of the taillight is obtained according to the taillight pixel region; Based on the direction vector of the long side of the taillight, determine the third heading angle information corresponding to the direction perpendicular to the direction vector of the long side of the taillight; and The confidence information of the single taillight corresponding to the third heading angle information is determined based on the taillight pixel area.
5. The method for determining the vehicle heading angle according to claim 1, characterized in that, The license plate feature information includes the position information of the four corner points of the license plate, the license plate detection confidence information, and the occlusion mark information. Based on the license plate feature information, the fourth heading angle information corresponding to the license plate and the license plate confidence information corresponding to the fourth heading angle information are determined, including: The first length information and the second length information of the license plate are determined based on the position information of the four corner points; The perspective ratio of the license plate is determined based on the first length information and the second length information; Based on the perspective scale, determine the fourth heading angle information; and Based on the license plate detection confidence information and the occlusion sign information, the license plate confidence information corresponding to the fourth heading angle information is determined.
6. The method for determining the vehicle heading angle according to claim 1, characterized in that, Based on the vehicle image region, feature information of multiple target detection regions on the target vehicle is determined, including: Edge detection processing is performed on the vehicle image region to obtain the body frame feature information of the target vehicle, or semantic segmentation processing is performed on the vehicle image region based on a semantic segmentation model to obtain the body frame feature information of the body frame. Based on the key point detection model, dual headlight key point detection processing is performed on the vehicle image region to obtain the dual headlight feature information corresponding to the dual headlights. Based on the image detection model or the semantic segmentation model, single taillight detection processing is performed on the vehicle image region to obtain the single taillight feature information corresponding to the single taillight. Based on the license plate detection model, license plate detection processing is performed on the vehicle image region to obtain the license plate feature information corresponding to the license plate.
7. The method for determining the vehicle heading angle according to claim 1, characterized in that, The method further includes: The scene type corresponding to the traffic environment in which the target vehicle is located is determined based on the original traffic environment image; Geometric verification is performed on the heading angle information corresponding to each target detection area to determine the geometric consistency verification result of the heading angle information corresponding to each target detection area. Based on the confidence information corresponding to each of the heading angle information, determine the weight corresponding to each of the heading angle information, including: The weights corresponding to each heading angle information are determined based on the confidence information corresponding to each heading angle information, the scene type, and the geometric consistency verification result.
8. The method for determining the vehicle heading angle according to any one of claims 1-7, characterized in that, The original traffic environment image is subjected to detection and normalization processing to determine the vehicle image region of the target vehicle from the original traffic environment image, including: Based on the image detection model, image detection processing is performed on the original traffic environment image to determine the detection box of the target vehicle from the original traffic environment image; The detection frame of the target vehicle is normalized in size to determine the vehicle image region of the target vehicle from the original traffic environment image.
9. A computer device, characterized in that, The computer device is used to execute the method for determining the vehicle heading angle as described in any one of claims 1-8.