Vehicle headlamp control method, system and equipment and storage medium

By directly processing real-time image data, using the improved YOLO network and CLIP model to generate binary coded vectors, combined with LSTM and PPO algorithm optimization model training, real-time lighting control of the ADB system is realized, solving the problems of slow response and insufficient intelligence in traditional ADB systems, and improving the flexibility and security of the system.

CN120481850APending Publication Date: 2025-08-15CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510596928.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Traditional ADB systems have low response time and intelligence, and cannot adjust the high beam according to the front state of the vehicle in real time. Relying on complex rules systems leads to insufficient flexibility and versatility.

Method used

By directly processing real-time image data, the improved YOLO network and CLIP model are used to generate binary coded vectors, and the LED lights are turned on and off in real time. Combined with LSTM and PPO algorithms to optimize model training, reduce the delay in the intermediate links, and realize end-to-end lighting control.

Benefits of technology

It greatly improves the response speed and intelligence of the ADB system, simplifies the development process, reduces costs, improves the universality and scalability of the system, and ensures safety and comfort in complex driving environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120481850A_ABST
    Figure CN120481850A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle headlamp control method, system and device and a storage medium. A real-time image in front of a vehicle is divided into a plurality of logic areas; the logic area at least comprises a high beam area and a low beam area; performing target detection on the real-time image in front of the vehicle by using a target detection algorithm, and determining a logic area where the detected target is located; according to the types and the number of the detected targets in the different logic regions, generating a preliminary binary coding vector; wherein each coding bit corresponds to the state of the LED lamp; and controlling the high beam of the vehicle by using the generated preliminary binary coding vector. By directly processing real-time image data, the system can adjust LED illumination in real time, the response speed and the intelligent degree of the ADB system are greatly improved, and delay of intermediate links is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to vehicle management, and in particular relates to a vehicle headlight control method, system, device and storage medium. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Traditional adaptive high-beam (ADB) headlights use image processing algorithms to process signals, then transmit the processed signals to the headlights, where the LEDs are turned on and off using the headlight control algorithm. The traditional ADB algorithm process is as follows: The ADB (Adaptive Driving Beam) headlight system adjusts the high-beam illumination range by monitoring the road ahead in real time. Specific implementation steps: 1. Vehicle-mounted cameras collect signals to detect obstacles such as vehicles, pedestrians, and road signs. 2. Image processing and analysis: The camera-captured images are analyzed using an image processing algorithm to identify the vehicle ahead and its direction of travel. 3. Intelligent control module: Based on the image analysis results, the intelligent control module calculates the high-beam area that needs to be blocked to avoid dazzling the driver of the vehicle ahead. 4. The ADB system controls the matrix LED headlights, with each LED unit independently controlled. When the system detects a vehicle ahead, the LED units in the corresponding area automatically turn off, creating a dynamic blocking area. 5. Real-time adjustment: As the vehicle moves and road conditions change, the ADB system adjusts the blocking area in real time to ensure optimal lighting and driving safety.

[0004] Traditional ADB systems need to define many rules, which is equivalent to a rule-based system. For example, traditional ADB systems need to set working distance and range: the system working range includes the detection distance and angle of oncoming vehicles and same-direction following vehicles. Requirements for dark zone avoidance / non-avoidance road conditions: the types of vehicles that need to avoid dark zones and objects that should not be misidentified. Traditional ADB systems need to define the light distribution area: describe the distribution area of ADB lights and the range of dark zones. The response time of the image processor and the system reaction time of traditional ADB systems are relatively long: traditional ADB systems can only drive according to rules, and the rules cannot be applied to all scenarios. Traditional ADB headlights cannot be adjusted in real time according to the status of the vehicle in front of them, and the degree of intelligence is low. Summary of the Invention

[0005] To overcome the deficiencies of the above-mentioned prior art, the present invention provides a vehicle headlamp control method, system, device and storage medium. By directly processing real-time image data, LED lighting can be adjusted in real time, greatly improving the response speed and intelligence of the ADB system and reducing delays in intermediate links.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a vehicle headlamp control method, comprising:

[0008] Acquire a real-time image in front of the vehicle, and divide the real-time image in front of the vehicle into a plurality of logical areas; wherein the logical areas include at least a high-beam area and a low-beam area, and each logical area corresponds to a high-beam LED light or a low-beam LED light;

[0009] Use the target detection algorithm to detect targets in the real-time image in front of the vehicle and determine the logical area where the detected target is located;

[0010] Based on the type and number of targets detected in different logic areas, the CLIP model generates a preliminary binary code vector, where each code bit corresponds to the state of the LED light.

[0011] The generated preliminary binary code vector is used to control the high beam or low beam of the vehicle.

[0012] As an implementation method, the target detection algorithm uses an improved YOLO network to perform target detection on the real-time image in front of the vehicle using the target detection algorithm, specifically:

[0013] The acquired real-time image is divided into multiple grid cells, and the backbone network is used to extract the multi-scale features of each grid cell;

[0014] Compressing the multi-scale features into a temporal feature vector by global average pooling;

[0015] Based on the temporal feature vector, a long short-term memory network is used to capture the temporal dependency of the vehicle's driving state, and the hidden state vector output by the long short-term memory network is concatenated with the multi-scale feature. The concatenated feature is then dynamically weighted for key areas through an attention mechanism and a neck network.

[0016] The weighted feature map is input into the detection head to recalibrate the feature channels.

[0017] As an implementation method, the acquired real-time image is divided into multiple grid cells, and each grid cell predicts multiple bounding boxes and their position information and confidence scores; wherein the confidence score reflects the possibility of containing the target in the bounding box; by comparing the coordinates of the target center point with the coordinates of the grid cell, it is determined whether the corresponding grid cell is responsible for predicting the target.

[0018] As an implementable method, a preliminary binary encoding vector is generated through the CLIP model, specifically:

[0019] Detect the target area and corresponding target category of the real-time image in front of the vehicle according to the target detection algorithm, and pre-process each target area;

[0020] The preprocessed target region and the corresponding target category are input into the CLIP model to obtain the image feature vector and text feature vector of each region, and calculate the similarity score between the image text vector and the text feature vector;

[0021] The binary code of each target region is determined according to the calculated similarity score.

[0022] As an implementation method, the generated preliminary binary code vector is used to control the high beam or low beam of the vehicle, specifically:

[0023] Determine a binary code corresponding to the high beam area or the low beam area according to a correspondence between each target area and the high beam area or the low beam area;

[0024] According to the binary code corresponding to the high beam area or the low beam area, the vehicle's high beam or low beam is controlled to be turned on or off; wherein the binary code is 1 or 0, wherein 1 indicates that the LED light is on, and 0 indicates that the LED light is off.

[0025] As an implementation method, the object detection network is trained using a proximal strategy optimization algorithm, specifically:

[0026] Obtain vehicle nighttime driving data, manually assign corresponding labels to LED lights in different driving scenarios, and construct a training set;

[0027] Using the training set to train a supervised learning model, so that the supervised learning model predicts the LED light state that meets the manual annotation;

[0028] Set a penalty term based on the difference between the output of the supervised learning model and the output of the proximal policy optimization algorithm model;

[0029] Set the KL divergence term based on the difference between the output distribution of the current proximal strategy optimization algorithm model and the output distribution of the initial supervised learning model;

[0030] The penalty term and the KL divergence term are used to optimize model parameters.

[0031] As an implementation option, the proximal policy optimization algorithm optimizes the policy gradient by clipping the policy ratio and maximizing the product of the advantage function.

[0032] In a second aspect, the present invention provides a vehicle headlamp control system, comprising:

[0033] An acquisition module is used to acquire a real-time image in front of the vehicle and divide the real-time image in front of the vehicle into multiple logical areas; wherein the logical areas include at least a high beam area and a low beam area, and each logical area corresponds to a group of LED lights;

[0034] The target detection module is used to detect targets in the real-time image in front of the vehicle using a target detection algorithm and determine the logical area where the detected target is located;

[0035] The encoding module is used to generate a preliminary binary encoding vector based on the type and number of objects detected in different logical areas through a classification neural network, where each encoding bit corresponds to the state of the LED light;

[0036] A control module is configured to control the high beam of the vehicle using the generated preliminary binary code vector.

[0037] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.

[0039] One or more of the above technical solutions have the following beneficial effects:

[0040] In this invention, a real-time image of the vehicle ahead is divided into multiple logical regions; the logical regions include at least a high-beam zone and a low-beam zone, each corresponding to a group of LED lights. A target detection algorithm is used to detect targets in the real-time image ahead of the vehicle and determine the logical regions where the detected targets are located. Based on the type and number of targets detected in different logical regions, a preliminary binary code vector is generated, where each code bit corresponds to the state of an LED light. The generated preliminary binary code vector is used to control the vehicle's high-beam lights. By directly processing real-time image data, the system can adjust LED lighting in real time, significantly improving the response speed and intelligence of the ADB system and reducing delays in intermediate links.

[0041] The present invention adapts to the LED arrays and lighting requirements of different vehicle models through a deep learning model, eliminating the need for manual setting of complex rules. This simplifies the development and adjustment process of the ADB system, reducing development costs while also improving the system's versatility and scalability.

[0042] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0044] Figure 1 This is a schematic diagram of a vehicle's high beam;

[0045] Figure 2 This is a schematic diagram of a model optimized using a proximal strategy in an embodiment of the present invention;

[0046] Figure 3 This is a diagram of the improved YOLO network structure in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0048] It should be noted that the terms used herein are for describing particular embodiments only and are not intended to limit the exemplary embodiments according to the present invention.

[0049] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0050] This embodiment discloses a vehicle headlight control method, including:

[0051] Step 101: Acquire a real-time image in front of the vehicle, and divide the real-time image in front of the vehicle into a plurality of logical areas; wherein the logical areas include at least a high-beam area and a low-beam area, and each logical area corresponds to a high-beam LED light or a low-beam LED light;

[0052] Step 102: Detect objects in the real-time image ahead of the vehicle using an object detection algorithm and determine the logical regions where the detected objects are located. Based on the types and numbers of objects detected in different logical regions, a preliminary binary encoding vector is generated using the CLIP model. Each encoding bit corresponds to the state of an LED light.

[0053] Step 103: Use the generated preliminary binary code vector to control the high beam or low beam of the vehicle

[0054] like Figure 1-Figure 3As shown, the target detection algorithm of this embodiment is mainly divided into two parts: positioning and classification. The method used in positioning is to divide the input real-time image into multiple grid cells, and each grid cell is responsible for predicting the target contained in the cell.

[0055] The target detection algorithm of this embodiment uses an improved YOLO network. The YOLO network is divided into a backbone network, a neck network, and a detection head. This embodiment improves the YOLO network by adding an attention mechanism to the feature extraction layer to enhance key features and replacing the original detection head with a long short-term memory network to process sequence information.

[0056] The positioning phase consists of the following two parts:

[0057] Bounding Box Prediction: The input real-time image is divided into multiple grid cells, each of which is responsible for predicting the target contained within the cell. For each grid cell, multiple bounding boxes are predicted. Each bounding box contains location information, namely the offset (x, y) of the center point relative to the upper left corner of the grid cell, as well as the ratio of the width w and height h of the bounding box relative to the entire input real-time image. In addition, each bounding box also predicts a confidence score, which reflects the likelihood of containing the target in the bounding box.

[0058] Grid cell and object association: Each grid cell is responsible for predicting only the objects contained in its area. This is achieved by comparing the coordinates of the object center point with the coordinates of the grid cell. If the object center point falls within a grid cell, the grid cell is considered responsible for predicting the object.

[0059] In the classification stage, the category to which each bounding box belongs is predicted at the same time. This is achieved by predicting a category vector for each bounding box, where each element in the vector corresponds to a possible category.

[0060] The backbone network outputs multi-scale feature maps for each grid unit. These multi-scale feature maps are compressed into time series feature vectors after global average pooling. The time series feature vectors are input into the LSTM network, and its gating mechanism captures the temporal dependency of the vehicle's driving state, such as the continuity of the turn signal state change. The hidden state vector output by the LSTM network is concatenated with the spatial features extracted by the backbone network, and the concatenated features are used as the input of the channel attention mechanism. The output of the channel attention mechanism is used as the input of the neck network. By adding an attention mechanism in the front channel of the neck network, the key areas can be dynamically weighted.

[0061] The temporal features of the LSTM network output LSTM(GAP(F backbone The formula for concatenating the spatial features of the network and the backbone network is expressed as:

[0062] F fusion =Concat(LSTM(GAP(F backbone )),F backbone )

[0063] Among them, F backbone represents the spatial features extracted by the backbone network, GAP represents global average pooling, and Concat represents concatenation.

[0064] A spatial attention mechanism is added to the output of the feature pyramid network (FPN). Different regions of the feature map are dynamically weighted through learnable weights. The weighted feature map is input to the prediction head, and finally an encoding vector with a dimension of N is output to recalibrate the feature channels.

[0065] By integrating the YOLO network and the long short-term memory (LSTM) network, a neural network capable of dynamically adjusting the vehicle lighting system is provided. This framework can not only detect multiple objects in an image in real time, but also use LSTM to track the direction of movement of obstacles ahead.

[0066] The fusion of the YOLO network and the Long Short-Term Memory (LSTM) network can improve the accuracy and consistency of object detection models when processing video sequences or continuous image frames. The core idea of this fusion is to use the sequence processing capabilities and memory properties of the LSTM to correct and optimize the immediate output of the YOLO detection. This can achieve more accurate object detection and tracking, especially when processing data containing time series information.

[0067] The YOLO network is known for its fast and efficient object detection capabilities and can process multiple targets in an image in real time. By improving the YOLO network, this embodiment can more accurately detect obstacles ahead and generate corresponding bounding boxes and confidence scores. Combining the YOLO network with LSTM significantly improves the accuracy and consistency of the target detection model when processing video sequences or continuous image frames. The sequence processing capabilities and memory characteristics of LSTM can correct and optimize YOLO's immediate output, especially when processing data containing time series information such as video streams, which can achieve more accurate target detection and tracking. The introduction of the attention mechanism enables the model to focus on key areas and enhance the detection accuracy of important targets such as pedestrians and vehicles. The attention mechanism helps the model filter out the most important information in a complex driving environment and improve the overall detection performance.

[0068] In the target detection network training, the training samples are processed and enhanced by the CutMix algorithm and Mixup enhancement: the mathematical principle of smooth interpolation of feature space:

[0069] Generate new samples based on linear interpolation:

[0070] xnew=lambda1*xi+(1–lambda1)*xj

[0071] ynew=lambda2*yi+(1–lambda2)*yj

[0072] Here, xnew is the new image after mixing, and ynew is the new label after mixing. lambda1 represents a binary mask with the same shape as the image and a value of 0 or 1, where 1 represents the area of image xi retained and 0 represents the corresponding area of image xj replaced. lambda2 represents the area ratio of the cut region. Lambda~Beta(alpha,alpha) controls the mixing ratio using the Beta distribution. This operation forms a gradient transition region in the complex plane, reducing the model's sensitivity to label noise. The combination ratio between two data points is sampled from the beta distribution.

[0073] The target detection algorithm outputs the target area and the corresponding target category, regards the feature vector corresponding to the target area as a point on the complex plane, transforms it using the complex variable function, that is, the exponential function, and maps the output time series features to the complex plane z = x + iy, z∈C^D, where C represents the complex space and D is the feature dimension. The complex exponential function is applied for nonlinear transformation z_tilde = e^z = e^x (cos y + isin y. This transformation uses the Euler formula to achieve feature rotation and scaling in the complex plane. The introduction of complex functions enhances the nonlinear expressiveness of features, thereby better capturing the inherent structure and patterns of image features. By adjusting the parameters of the complex function, the distribution of features can be optimized, making them more suitable for subsequent binarization. The feature vectors transformed by the complex function and the corresponding target categories are input into the CLIP model. Through comparative learning, the model learns the image features and the headlight control instructions. Based on the output of the CLIP model, the binary encoding corresponding to each target region is determined. The text encoder of the pre-trained CLIP model is used to generate a text embedding of the headlight control instructions. This is then compared with the image feature z, and an encoding vector V∈{0,1} is generated through thresholding. Specifically, when the output is 0, the LED is on; when the output is 1, the LED is off. This encoding method ensures that the headlight system can automatically adjust the LED state based on the signals collected by the camera to adapt to different driving scenarios.

[0074] When training the CLIP model, image data with high-beam area labels is fed into the model for training. During the training process, the CLIP model learns the mapping relationship between various features in the image and the text.

[0075] For example, the collected front image is divided into a high-beam area and a low-beam area. Each area is divided sequentially to correspond to the LEDs arranged in the high-beam or low-beam areas. Based on the actual vehicle image environment, each area corresponding to each LED is labeled with the target type and number. The target type and number determine whether the corresponding area is illuminated. If two vehicles are detected in the high-beam area, the corresponding LED group's coding bits V3 and V4 are set to 1, and the remaining bits are dynamically adjusted based on the obstacle type (pedestrian / vehicle).

[0076] The target detection network and the CLIP model constitute an end-to-end neural network. During the training of the end-to-end neural network, the output results of the neural network need to meet human expectations. At the same time, because there are too many scenarios and it is impossible to cover all of them, this embodiment refers to the PPO algorithm of the large model during the training of the neural network, making the training results of the neural network more intelligent.

[0077] The training process using the PPO algorithm is divided into the following steps:

[0078] Step 1021: The model is trained based on the hundreds of millions of collected data and the actual measured data of the real vehicle at night.

[0079] Hundreds of millions of data points were collected from actual vehicles driving at night, covering a wide range of road and environmental conditions. This data was used to train the initial supervised learning model and ensure its adaptability to real-world driving scenarios. Specifically, the data included camera images, vehicle speed, weather conditions, and other relevant sensor information such as ultrasonic and infrared sensors. This rich dataset provided a solid foundation for subsequent training.

[0080] Step 1022: Certain scenarios are manually labeled, such as which LEDs are on and which are off. Because different vehicle models have different styling and the width of matrix LED headlights varies, different labels are manually assigned to certain scenarios and headlight styles. A supervised learning model is trained on these scenarios. Experts manually label which LEDs should be on and which should be off for different vehicle models and specific driving scenarios, such as urban roads, highways, and rural roads. These labels reflect the optimal lighting configuration for different vehicle models in different scenarios.

[0081] Based on the above labeled data, a supervised learning model is trained. The supervised learning model can predict the LED light status that meets the manual annotation based on the input image and other sensor data.

[0082] Step 1023: Calculate the difference between the output results of the two models and set a penalty term.

[0083] Calculate the difference between the output of the model generated by the PPO algorithm and the output of the supervised learning model. This step aims to measure the consistency of the prediction results of the two models and set the corresponding penalty term according to the size of the difference. A larger difference will result in a higher penalty value, prompting the model generated by the PPO algorithm to adjust its parameters to reduce output deviation.

[0084] Utilizing LSTM's gating mechanism to adjust penalty intensity, LSTM can dynamically adjust penalty intensity based on historical information, ensuring model stability and accuracy in different scenarios. For example, in rapidly changing traffic conditions, LSTM can more strictly penalize incorrect predictions, while appropriately relaxing penalties in relatively stable environments. The neural network trained using this entire framework can dynamically adjust the lighting system based on obstacles ahead.

[0085] Step 1024: The KL divergence term is used in a penalty strategy to generate a supervised learning model that deviates significantly from the initial one in each training batch, so that the probability of these deviated data appearing in the subsequent output results of the model is lower, ensuring a more reasonable encoding method for the model output.

[0086] In each training batch, the KL divergence between the output distribution of the current PPO algorithm model and the output distribution of the initial supervised learning model is calculated. The KL divergence measures the difference between the two probability distributions. Incorporating the KL divergence term into the loss function as a penalty term ensures that the probability of data deviating from the initial model in subsequent outputs is low, resulting in more reasonable and stable model outputs.

[0087] The process of applying PPO algorithm optimization, π θ (a t s t ) represents the priority model 1 strategy, A policy representing the output of the lower priority model 2.

[0088] The strategy ratio is calculated as:

[0089]

[0090] The advantage function is calculated as:

[0091] A t =Q(s t ,a t )-V(s t )

[0092] Among them, Q(s t ,a t ) is the value function of the state-action pair, predicted by the Critic network; V(s t ) is the state value function, which is output through the Critic network.

[0093] Set the strategy ratio r t (θ) and advantage function A t Multiplication is used as the optimization strategy, directly optimizing the strategy by maximizing the product of the advantage function and the strategy ratio. The pruning mechanism limits the strategy update range to ensure training stability.

[0094] In the process of training neural networks, the PPO algorithm is introduced. Through this efficient policy gradient method, stable performance improvement can be achieved under limited sample complexity.

[0095] The PPO algorithm enhances training performance by introducing techniques such as clipped probability ratios, which improves model stability and generalization. The PPO algorithm helps neural networks make more informed decisions in complex driving environments, ensuring that the lighting system operates in compliance with regulatory requirements.

[0096] In order to prevent the neural network from having to meet the minimum lighting requirements of the corresponding regulations for headlights when dealing with certain scenarios, this embodiment uses rules at the end of the program to judge and correct the output results of the neural network to ensure that the final output meets expectations and meets the requirements of headlight regulations. Specifically, priority rules are used to ensure pedestrian protection first. According to the improved YOLO algorithm, when the camera detects the head of a pedestrian / cyclist (0.5-1.8 meters high), the system will immediately activate protection, mainly prompting the driver on the display to prevent interference from oncoming headlights. If oncoming headlights are detected, the system automatically switches to protection mode. The improved YOLO algorithm detects the taillight warning of the vehicle in front. When the taillights of the vehicle in front are seen, the system will use a trapezoidal light mask to cover the rear 60 meters to maintain sufficient brightness for the following vehicles to see the road conditions clearly. To further ensure safety, the system will collect camera + radar signals on the CAN bus for double confirmation. If a problem is detected in the main system, it will automatically switch to the backup plan. The original ADB system plan has no neural network intervention and is forced to downgrade when all systems fail. Special protection for children: when an object with a height of less than 1.2 meters and slow movement is detected, or when it is raining or visibility is less than 50 meters, the driver will be prompted on the display.

[0097] During neural network training, a penalty term is introduced to correct incorrect predictions, and the LSTM gating mechanism is used to adjust the penalty strength, improving the model's robustness and accuracy. The neural network trained using this framework is capable of dynamically adjusting the lighting system during real-time driving. Specifically, the YOLO family of algorithms can quickly and accurately detect multiple obstacles ahead; the introduction of LSTM enables the model to effectively track the movement of obstacles, providing consistent object detection results. Combining an attention mechanism with a classification neural network generates coded signals that comply with vehicle lighting regulations and automatically adjust the LED light's on / off state. The introduction of a penalty term and LSTM gating mechanism enhances the model's robustness and accuracy in complex driving environments. This fusion framework not only improves object detection performance but also ensures intelligent adjustment of the lighting system, thereby enhancing driving safety and comfort.

[0098] Because the classification output is a probability value, the improved YOLO network can output the probability value information of various categories collected by the camera. The output of the neural network is a probability value, so the accuracy needs to be judged. The priority calculation path is: Basic weight: Generally, the target existence probability multiplied by the category prediction probability is used as the initial weight; Spatial correction: The weight coefficient of the center area of the image is 1.2 times; Semantic weighting: Pedestrians and children will be set with high priority, and the weights of pedestrians and children are very large; Motion compensation: When pedestrians are blocked, compensation is required during training; Occlusion penalty.

[0099] Step 103: Use the generated preliminary binary code vector to control the high beam of the vehicle.

[0100] This embodiment implements an end-to-end solution from camera signal acquisition to ADB headlight response. By directly processing real-time image data and adjusting LED lighting in real time, the ADB system's response speed and intelligence are significantly improved. This overcomes the issues of long image processor and system response times in traditional ADB systems, enabling faster and more accurate lighting adjustments. It also implements an end-to-end solution from camera signal acquisition to ADB (Adaptive High Beam) headlight response. By directly processing real-time image data, the system can adjust LED lighting in real time, significantly improving the ADB system's response speed and intelligence. Compared to traditional ADB systems, the present invention overcomes the issues of long image processor and system response times, enabling faster and more accurate lighting adjustments. By directly acquiring image data from the camera and processing it in real time using a deep learning model, delays in intermediate links are reduced. The system can complete the entire process from image acquisition to LED lighting adjustment within seconds, ensuring timely response to changes in road conditions ahead.

[0101] This embodiment integrates the YOLO family of algorithms, LSTM, and an attention mechanism, and trains the model using the Proximal Policy Optimization (PPO) algorithm. The trained model is found to be able to adjust LED lighting in real time based on the dynamic changes of obstacles ahead, without relying on a fixed rule-based system. This enables the ADB headlights to intelligently adapt to various complex scenarios, including but not limited to oncoming vehicles and following vehicles in the same direction. This improves the system's intelligence and flexibility, addressing the problem of traditional ADB headlights' inability to cover specific scenarios with their rules. By integrating the YOLO family of algorithms, LSTM (Long Short-Term Memory) networks, and an attention mechanism, and training the model using the Proximal Policy Optimization (PPO) algorithm, this embodiment achieves intelligent scene adaptability for ADB headlights. The trained model is able to adjust LED lighting in real time based on the dynamic changes of obstacles ahead, without relying on a fixed rule-based system. This enables the ADB headlights to intelligently adapt to various complex scenarios, including but not limited to oncoming vehicles and following vehicles in the same direction, significantly improving the system's intelligence and flexibility. The system can dynamically adjust LED lighting based on the real-time detected obstacle position and movement direction to ensure optimal lighting effects. Through the adaptive capabilities of the deep learning model, the system can flexibly respond to different scenarios, solving the problem that traditional ADB headlights cannot cover the rules in specific scenarios.

[0102] Unlike traditional ADB systems that need to customize rules according to different models and styles, this embodiment uses a neural network to adapt to the LED arrays and lighting requirements of different models, eliminating the need to manually set complex rules and simplifying the development and adjustment process of the ADB system. This not only reduces development costs, but also improves the versatility and scalability of the system. Unlike traditional ADB systems that need to customize rules according to different models and styles, this embodiment uses a neural network to adapt to the LED arrays and lighting requirements of different models, simplifying the development and adjustment process of the ADB system. This not only reduces development costs, but also improves the versatility and scalability of the system. The model can adaptively adjust LED lighting according to different models and driving environments without the need for additional rule settings. It reduces reliance on complex rule systems, reduces development and maintenance costs, and improves the flexibility and scalability of the system.

[0103] This embodiment uses LSTM to track the moving direction of the obstacle ahead and the attention mechanism to optimize the classification output, which can achieve real-time dynamic adjustment of LED lighting, effectively avoiding glare for oncoming vehicle drivers, while ensuring the best lighting effect and improving nighttime driving safety. This embodiment uses LSTM to track the moving direction of the obstacle ahead and the attention mechanism to optimize the classification output, which can achieve real-time dynamic adjustment of LED lighting. Specifically: LSTM can capture the movement trajectory of the obstacle, ensuring that the system can predict and adjust the lighting in advance, avoiding the discomfort caused by sudden changes. The attention mechanism helps the model focus on key areas, ensuring priority treatment of important targets such as oncoming vehicles and pedestrians, thereby effectively avoiding glare for oncoming vehicle drivers, while ensuring the best lighting effect and improving nighttime driving safety.

[0104] This embodiment ensures the rationality of the neural network output results and avoids excessive deviation of the model by introducing penalty terms and KL divergence control strategies during the training process, thereby improving the overall robustness and stability of the system and ensuring the stable performance of the ADB headlights in various complex environments.

[0105] In a nighttime road test, the present embodiment was found to have a response speed improved by approximately 30% compared to a conventional ADB system.

[0106] The purpose of this embodiment is to provide a vehicle headlight control system, including:

[0107] An acquisition module is used to acquire a real-time image in front of the vehicle and divide the real-time image in front of the vehicle into multiple logical areas; wherein the logical areas include at least a high beam area and a low beam area, and each logical area corresponds to a group of LED lights;

[0108] The target detection module is used to detect targets in the real-time image in front of the vehicle using a target detection algorithm and determine the logical area where the detected target is located;

[0109] The encoding module is used to generate a preliminary binary encoding vector based on the type and number of targets detected in different logical areas, wherein each encoding bit corresponds to the state of the LED light;

[0110] A control module is used to control the high beam of the vehicle using the generated preliminary binary code vector.

[0111] In further embodiments, there is also provided:

[0112] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed by the processor. When the computer instructions are executed by the processor, the method described in Example 1 is performed. For the sake of brevity, no further details are given here.

[0113] It should be understood that in this embodiment, the processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0114] The memory may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0115] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in embodiment 1 is performed.

[0116] The method in Example 1 can be directly implemented as being executed by a hardware processor, or by a combination of hardware and software modules within the processor. The software module can be located in a storage medium well-established in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not given here.

[0117] A computer program product includes a computer program, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.

[0118] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer-executable instructions, such as instructions contained in program modules, which are executed in a device on a real or virtual processor of a target to perform the process / method described above. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or divided between program modules as needed. The machine-executable instructions for the program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.

[0119] The computer program code for implementing the method of the present invention can be written in one or more programming languages. These computer program codes can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the computer or other programmable data processing device, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.

[0120] In the context of the present invention, computer program code or related data can be carried by any appropriate carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.

[0121] Those skilled in the art will appreciate that the units and algorithm steps of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0122] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.

Claims

1. A vehicle headlamp control method, characterized in that: include: Acquire a real-time image in front of the vehicle, and divide the real-time image in front of the vehicle into a plurality of logical areas; wherein the logical areas include at least a high-beam area and a low-beam area, and each logical area corresponds to a high-beam LED light or a low-beam LED light; Use the target detection algorithm to detect targets in the real-time image in front of the vehicle and determine the logical area where the detected target is located; Based on the type and number of targets detected in different logic areas, the CLIP model generates a preliminary binary code vector, where each code bit corresponds to the state of the LED light. The generated preliminary binary code vector is used to control the high beam or low beam of the vehicle.

2. A vehicle headlamp control method according to claim 1, characterized in that: The target detection algorithm uses an improved YOLO network to perform target detection on the real-time image in front of the vehicle using the target detection algorithm, specifically: The acquired real-time image is divided into multiple grid cells, and the backbone network is used to extract the multi-scale features of each grid cell; Compressing the multi-scale features into a temporal feature vector by global average pooling; Based on the temporal feature vector, a long short-term memory network is used to capture the temporal dependency of the vehicle's driving state, and the hidden state vector output by the long short-term memory network is concatenated with the multi-scale feature. The concatenated feature is then dynamically weighted for key areas through an attention mechanism and a neck network. The weighted feature map is input into the detection head to recalibrate the feature channels.

3. A vehicle headlamp control method according to claim 2, characterized in that: The acquired real-time image is divided into multiple grid cells, and each grid cell predicts multiple bounding boxes and their position information and confidence scores; the confidence score reflects the likelihood that the bounding box contains the target; by comparing the coordinates of the target center point with the coordinates of the grid cell, it is determined whether the corresponding grid cell is responsible for predicting the target.

4. The vehicle headlamp control method according to claim 1, wherein: Generate a preliminary binary encoding vector through the CLIP model, specifically: Detect the target area and corresponding target category of the real-time image in front of the vehicle according to the target detection algorithm, and pre-process each target area; The preprocessed target region and the corresponding target category are input into the CLIP model to obtain the image feature vector and text feature vector of each region, and calculate the similarity score between the image text vector and the text feature vector; The binary code of each target region is determined according to the calculated similarity score.

5. The vehicle headlamp control method according to claim 1, wherein: The generated preliminary binary code vector is used to control the high beam or low beam of the vehicle, specifically: Determine a binary code corresponding to the high beam area or the low beam area according to a correspondence between each target area and the high beam area or the low beam area; According to the binary code corresponding to the high beam area or the low beam area, the vehicle's high beam or low beam is controlled to be turned on or off; wherein the binary code is 1 or 0, wherein 1 indicates that the LED light is on, and 0 indicates that the LED light is off.

6. The vehicle headlamp control method according to claim 1, characterized in that: The target detection network is trained using a proximal strategy optimization algorithm, specifically: Obtain vehicle nighttime driving data, manually assign corresponding labels to LED lights in different driving scenarios, and construct a training set; Using the training set to train a supervised learning model, so that the supervised learning model predicts the LED light state that meets the manual annotation; Set a penalty term based on the difference between the output of the supervised learning model and the output of the proximal policy optimization algorithm model; Set the KL divergence term based on the difference between the output distribution of the current proximal strategy optimization algorithm model and the output distribution of the initial supervised learning model; The penalty term and the KL divergence term are used to optimize model parameters.

7. A vehicle headlamp control method according to claim 6, characterized in that: The proximal policy optimization algorithm optimizes the policy gradient by clipping the policy ratio and maximizing the product of the advantage function.

8. A vehicle headlight control system, characterized in that: include: An acquisition module is used to acquire a real-time image in front of the vehicle and divide the real-time image in front of the vehicle into multiple logical areas; wherein the logical areas include at least a high beam area and a low beam area, and each logical area corresponds to a group of LED lights; The target detection module is used to detect targets in the real-time image in front of the vehicle using a target detection algorithm and determine the logical area where the detected target is located; The encoding module is used to generate a preliminary binary encoding vector based on the type and number of targets detected in different logical areas, wherein each encoding bit corresponds to the state of the LED light; A control module is used to control the high beam of the vehicle using the generated preliminary binary code vector.

9. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 7 is completed.

10. A computer-readable storage medium, characterized in that Used to store computer instructions, which, when executed by a processor, complete the method according to any one of claims 1 to 7.