A method for stepless dimming and anti-glare of automobile headlights based on intelligent perception
Through the intelligent perception system combined with lightweight object detection model and RNN regression model, the brightness of the car headlights is adjusted in real time, solving the problem of anti-glare means in the existing technology to reduce the lighting effect, and achieving high safety while preventing glare Lighting effect.
Patent Information
- Application Number
- CN202411650716.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The existing anti-glare methods of car headlights will significantly reduce the lighting effect while reducing glare, threatening driving safety.
The intelligent perception-based automotive headlights are used to collect road conditions and target data through vehicle-mounted cameras and lidars, and the headlight brightness is adjusted in real time using lightweight target detection model and RNN regression model to realize infinite dimming.
While preventing glare, it provides maximum safe lighting, improves driving safety, and quickly responds to road conditions through intelligent sensing systems.
Smart Images

Figure CN119142246B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automobile headlamp control, and in particular relates to an automobile headlamp stepless dimming and anti-glare method based on intelligent perception. Background Art
[0002] Vehicle lighting safety is an important part of driving safety, and ensuring adequate lighting effects is of great significance to driving safety. However, when a vehicle is driving, there may be oncoming vehicles and pedestrians on the road. At this time, the strong light generated by the vehicle lighting equipment can easily cause visual discomfort or decreased vision to the oncoming vehicle driver or pedestrian, which is called glare.
[0003] The current anti-glare methods for headlights mainly include manually adjusting the high and low beams, anti-glare design of headlights, and anti-glare films for headlights, etc. Although these methods can prevent glare, they will greatly reduce the lighting effect of the headlights, thus threatening driving safety. Summary of the invention
[0004] The purpose of the present invention is to provide a method for stepless dimming and anti-glare of automobile headlights based on intelligent perception to solve the problems raised in the above background technology. The present invention provides a method for stepless dimming and anti-glare of automobile headlights based on intelligent perception, which has the characteristics of stepless dimming control of automobile headlights, so that the vehicle can provide safe lighting to the maximum extent while preventing glare to oncoming vehicles and pedestrians.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for stepless dimming and anti-glare of automobile headlights based on intelligent perception, comprising the following steps:
[0006] S1: simulate the nighttime vehicle driving conditions, collect road condition images fm(o) through the vehicle camera, and form an image set F={fm(o)} with the collected images, where o is the image number, o=1,2,3,...;
[0007] S2: label the set F={fm(o)} in step S1 and make it into an image dataset D to train a lightweight object detection model m, and deploy the model to the vehicle server;
[0008] S3: Use the on-board laser radar to collect the distance l(o) and relative speed s(o) of the target in the corresponding image fm(o), and record the maximum headlight brightness control parameter q(o) that does not produce glare. The collected information is used to form an information set RA={l(o),s(o),q(o)};
[0009] S4: Combine the target category c(o) and target position b(o) in the image dataset D with the data set RA in step S3 to create a radar dataset RD, design an RNN regression model to fit the radar dataset RD, and deploy the fitted regression model k in the vehicle server;
[0010] S5: Use the vehicle camera to take a real-time road condition image fm(t) of the vehicle driving process at night, where t is the image sequence number, and transmit the image fm(t) to the vehicle server. The server receives the image and detects the image using the target detection model m to obtain the detection result r(t);
[0011] S6: If there is a vehicle or pedestrian target in the detection result r(t), the on-board laser radar is used to perceive the distance l(t) and relative speed s(t) between the vehicle and the target in real time. The target category c(t) and target position b(t) in the detection result are combined with the distance l(t) and relative speed s(t) and input into the RNN regression model k to obtain the real-time headlight brightness parameter q(t);
[0012] S7: Input the parameter q(t) into the vehicle headlight control system in real time to realize stepless dimming of the headlight.
[0013] In the present invention, further, the method of forming the image set F={fm(o)} in step S1 comprises the following steps:
[0014] S1.1: Simulate the nighttime vehicle driving environment and use the vehicle-mounted camera to collect the road condition image fm(o) of the vehicle;
[0015] S1.2: Use the FreeImage image processing library in Python to save the image fm(o) to the hard disk to form an image set F={fm(o)}.
[0016] In the present invention, further, in step S2, the method for obtaining the target detection model m comprises the following steps:
[0017] S2.1: Label the object category and position of each frame in the image set F = {fm(o)}, and then classify the image set F according to the training set, test set and validation set to obtain the night vehicle target detection image dataset D;
[0018] S2.2: Build the NanoDet target detection model and use the image dataset D for training to obtain the target detection model m;
[0019] S2.3: Deploy the target detection model m in the vehicle server and configure the running script.
[0020] In the present invention, further, in step S3, the method for obtaining the information set RA={l(o), s(o), q(o)} comprises the following steps:
[0021] S3.1: Use the on-board laser radar to collect the distance l(o) and relative speed s(o) between the vehicle and the target in front, and at the same time, record the maximum headlight brightness control parameter q(o) that does not produce glare;
[0022] S3.2: Use the NumPy library in Python to save the distance l(o), relative speed s(o), and headlight brightness control parameter q(o) in the hard disk in the npz format file to form an information set RA={l(o),s(o),q(o)}.
[0023] In the present invention, further, in step S4, the method for obtaining the fitted RNN regression model k comprises the following steps:
[0024] S4.1: The target distance l(o), relative speed s(o), brightness control parameter q(o), corresponding target category c(o) and target position b(o) in the information set RA are used according to the ten-fold cross validation method to create a radar data set RD, where b(o)=[x(o), y(o), w(o), h(o)], x is the horizontal coordinate of the upper left corner of the target, y is the vertical coordinate of the upper left corner of the target, w is the width of the target box, and h is the height of the target box;
[0025] S4.2: Design the RNN regression model and fit it on the basis of the data set RD to obtain the regression model k, whose formula is as follows:
[0026] ;
[0027] ;
[0028] Among them, h(o) is the hidden state when the sequence number is o, W xh , W hh and W ho is the weight matrix, b xh , b hh and b ho is the bias term, f(o) is the input parameter when the sequence number is o, f(o)=[l(o),s(o),b(o),c(o)], h(o) is the hidden state when the previous sequence number is o-1, is the headlight brightness control parameter predicted when the serial number is o; during the fitting process, the loss function needs to be used to evaluate the effect of the model in real time. The loss function formula is as follows:
[0029] ;
[0030] Among them, L is the value of the loss function. The loss function L is transmitted backward using the gradient descent algorithm to update the RNN model parameters. After training, the fitted RNN regression model k is obtained, and the fitted RNN regression model k is deployed in the vehicle server.
[0031] In the present invention, further, in step S5, the method for obtaining the detection result r(t) comprises the following steps:
[0032] S5.1: Use the vehicle camera to collect the road condition image fm(t) of the vehicle driving at night in real time, and transmit fm(t) to the vehicle server;
[0033] S5.2: Call the target detection model m to detect pedestrians or vehicles in the image fm(t) and obtain the detection result r(t).
[0034] In step S6, the method for obtaining the real-time control parameter q(t) of the headlamp brightness includes the following steps:
[0035] S6.1: Determine whether there is a pedestrian or a vehicle in the detection result r(t). If so, call the laser radar to detect the distance l(t) and relative speed s(t) between the front target and the vehicle itself;
[0036] S6.2: Input the target distance l(t), target relative speed s(t), target category c(t) and target position b(t) into the RNN regression model k to obtain the real-time control parameter q(t) of the headlight brightness.
[0037] Further in the present invention, in step S7, the method for realizing stepless dimming of the headlight is: the parameter q(t) is transmitted to the automobile headlight control system in real time, and the headlight brightness control system will be adjusted according to the parameter q(t) obtained at each moment, thereby realizing stepless dimming of the headlight.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. The present invention uses a lightweight target detection model to perceive road conditions, which has stronger perception timeliness, so that the system can respond faster and ensure driving safety;
[0040] 2. The present invention uses the RNN regression model to fit the headlight brightness control parameters. The model can comprehensively utilize the recognition features of the previous moment and the current moment for calculation and has stability in the time domain. At the same time, the RNN model has efficient fitting ability and can fit the optimal headlight brightness control parameters through different target categories (pedestrians, motor vehicles, non-motor vehicles), directions, distances, speeds and other parameters;
[0041] 3. The present invention uses the road conditions obtained by intelligent perception to perform stepless dimming of the headlights. The difference from other methods is that it can prevent glare while gradually reducing the lighting effect during driving to improve safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of the present invention;
[0043] Figure 2 It is a schematic diagram of the change of the headlamp brightness over time according to the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Example
[0046] See also Figure 1-Figure 2 The present invention provides the following technical solution: a method for stepless dimming and anti-glare of automobile headlights based on intelligent perception, comprising the following steps:
[0047] S1: Simulate the driving conditions of vehicles at night with oncoming vehicles or pedestrians. Collect the road condition image fm(o) through the on-board camera with an image resolution of 1920*1080. Then use the FreeImage image processing library in Python to save the image fm(o) to the hard disk and construct the image set F={fm(o)}.
[0048] S2: Label the image set F={fm(o)} obtained in step S1 using LabelImage software, and establish an image dataset D according to the three sets of training set, test set and validation set, where the training set data accounts for 60%, the test set accounts for 20%, and the validation set accounts for 20%; build a lightweight target detection model NanoDet, use the image dataset D for 500 rounds of training, and obtain the trained target detection model m; deploy the target detection model m in the vehicle server, configure the running script, and start calling the model to detect the road condition when the car turns on the headlights;
[0049] S3: While collecting images, the vehicle-mounted laser radar is used to collect the distance l(o) and relative speed s(o) between the vehicle itself and the corresponding target in the image. In addition, the maximum headlight brightness control parameter q(o) that does not cause glare to the target at the corresponding moment is recorded; then, the NumPy library in Python is used to save the distance l(o), relative speed s(o) and headlight brightness control parameter q(o) in the hard disk in the form of an npz format file to form an information set RA={l(o),s(o),q(o)};
[0050] S4: The target distance l(o), relative speed s(o), brightness control parameter q(o) and corresponding target category c(o), target position b(o) in the information set RA are prepared as a radar data set RD according to the ten-fold cross validation method; then, the RNN regression model is trained using the radar data set RD to obtain a regression model k, and the fitted RNN regression model k is deployed in the vehicle-mounted server;
[0051] S5: Run the script, call the vehicle camera to collect the case image fm(305), input the image fm(305) into the target detection model m, detect the target therein, and obtain the detection result r(305)=[c(305),b(305)]=[“Motor Vehicle”,171,571,192,83];
[0052] S6: According to the detection results in the case, there is an oncoming motor vehicle on the road at this time. The script calls the laser radar to detect that the distance between the motor vehicle in front and the vehicle itself is l(305)=63m, and the relative speed is s(305)=10m / s. c(305), b(305), l(305) and s(305) are input into the regression model k to obtain the real-time headlight brightness parameter q(305)=396 lumens;
[0053] S7: Transmit the parameter q (305) to the vehicle AFS system, and the headlight control system adjusts the headlight brightness to 396 lumens according to q (305).
[0054] In summary, the present invention uses a lightweight target detection model to perceive road conditions, which has a stronger perception timeliness, so that the system can respond faster and ensure driving safety; the present invention uses an RNN regression model to fit the headlight brightness control parameters, and the model can comprehensively utilize the recognition features of the previous moment and the current moment for calculation, and has stability in the time domain; at the same time, the RNN model has efficient fitting capabilities, and can fit the optimal headlight brightness control parameters through parameters such as different categories of targets (pedestrians, motor vehicles, non-motor vehicles), directions, distances, and speeds; the present invention uses the road conditions obtained by intelligent perception to perform stepless dimming of the headlights. The difference from other methods is that while preventing glare, it can gradually reduce the lighting effect during driving to improve safety.
[0055] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for stepless dimming and anti-glare of automobile headlights based on intelligent perception, characterized in that: The following steps are involved: S1: simulate the nighttime vehicle driving conditions, collect road condition images fm(o) through the vehicle camera, and form an image set F={fm(o)} with the collected images, where o is the image number, o=1,2,3,...; S2: label the set F={fm(o)} in step S1 and make it into an image dataset D to train a lightweight object detection model m, and deploy the model to the vehicle server; S3: Use the on-board laser radar to collect the distance l(o) and relative speed s(o) of the target in the corresponding image fm(o), and record the maximum headlight brightness control parameter q(o) that does not produce glare. The collected information is used to form an information set RA={l(o),s(o),q(o)}; S4: Combine the target category c(o) and target position b(o) in the image dataset D with the data set RA in step S3 to create a radar dataset RD, design an RNN regression model to fit the radar dataset RD, and deploy the fitted regression model k in the vehicle server; S5: Use the vehicle camera to take a real-time road condition image fm(t) of the vehicle driving process at night, where t is the image sequence number, and transmit the image fm(t) to the vehicle server. The server receives the image and detects the image using the target detection model m to obtain the detection result r(t); S6: If there is a vehicle or pedestrian target in the detection result r(t), the on-board laser radar is used to perceive the distance l(t) and relative speed s(t) between the vehicle and the target in real time. The target category c(t) and target position b(t) in the detection result are combined with the distance l(t) and relative speed s(t) and input into the RNN regression model k to obtain the real-time headlight brightness parameter q(t); S7: Input the parameter q(t) into the vehicle headlight control system in real time to realize stepless dimming of the headlight.
2. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: The method for forming the image set F={fm(o)} in step S1 comprises the following steps: S1.1: Simulate the nighttime vehicle driving environment and use the vehicle-mounted camera to collect the road condition image fm(o) of the vehicle; S1.2: Use the FreeImage image processing library in Python to save the image fm(o) to the hard disk to form an image set F={fm(o)}.
3. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: In step S2, the method for obtaining the target detection model m comprises the following steps: S2.1: Label the object category and position of each frame in the image set F = {fm(o)}, and then classify the image set F according to the training set, test set and validation set to obtain the night vehicle target detection image dataset D; S2.2: Build the NanoDet target detection model and use the image dataset D for training to obtain the target detection model m; S2.3: Deploy the target detection model m in the vehicle server and configure the running script.
4. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: In step S3, the method for obtaining the information set RA={l(o), s(o), q(o)} comprises the following steps: S3.1: Use the on-board laser radar to collect the distance l(o) and relative speed s(o) between the vehicle and the target in front, and at the same time, record the maximum headlight brightness control parameter q(o) that does not produce glare; S3.2: Use the NumPy library in Python to save the distance l(o), relative speed s(o), and headlight brightness control parameter q(o) in the hard disk in the npz format file to form an information set RA={l(o),s(o),q(o)}.
5. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: In step S4, the method for obtaining the fitted RNN regression model k comprises the following steps: S4.1: The target distance l(o), relative speed s(o), brightness control parameter q(o), corresponding target category c(o) and target position b(o) in the information set RA are used according to the ten-fold cross validation method to create a radar data set RD, where b(o)=[x(o), y(o), w(o), h(o)], x is the horizontal coordinate of the upper left corner of the target, y is the vertical coordinate of the upper left corner of the target, w is the width of the target box, and h is the height of the target box; S4.2: Design the RNN regression model and fit it on the basis of the data set RD to obtain the regression model k, whose formula is as follows: ; ; Among them, h(o) is the hidden state when the sequence number is o, W xh , W hh and W ho is the weight matrix, b xh 、b hh and b ho is the bias term, f(o) is the input parameter when the sequence number is o, f(o)=[l(o),s(o),b(o),c(o)], h(o-1) is the hidden state at the previous sequence number o-1, is the headlight brightness control parameter predicted when the serial number is o; during the fitting process, the loss function needs to be used to evaluate the effect of the model in real time. The loss function formula is as follows: ; Among them, L is the value of the loss function. The loss function L is transmitted backward using the gradient descent algorithm to update the RNN model parameters. After training, the fitted RNN regression model k is obtained, and the fitted RNN regression model k is deployed in the vehicle server.
6. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: In step S5, the method for obtaining the detection result r(t) comprises the following steps: S5.1: Use the vehicle camera to collect the road condition image fm(t) of the vehicle driving at night in real time, and transmit fm(t) to the vehicle server; S5.2: Call the target detection model m to detect pedestrians or vehicles in the image fm(t) and obtain the detection result r(t).
7. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: In step S6, the method for obtaining the real-time control parameter q(t) of the headlamp brightness comprises the following steps: S6.1: Determine whether there is a pedestrian or a vehicle in the detection result r(t). If so, call the laser radar to detect the distance l(t) and relative speed s(t) between the front target and the vehicle itself; S6.2: Input the target distance l(t), target relative speed s(t), target category c(t) and target position b(t) into the RNN regression model k to obtain the real-time control parameter q(t) of the headlight brightness.
8. The method for stepless dimming and anti-glare of automobile headlights based on intelligent perception according to claim 1, characterized in that: In step S7, the method for realizing stepless dimming of the headlight is: the parameter q(t) is transmitted to the automobile headlight control system in real time, and the headlight brightness control system will adjust according to the parameter q(t) obtained at each moment, thereby realizing stepless dimming of the headlight.
Citation Information
Patent Citations
Control method, device and system for intelligent headlamp
CN108819830A
Automobile self-adaptive front lighting system and method based on wolf pack algorithm
CN112208433A