Vehicle light control method and device, terminal equipment and computer program product

The vehicle light control method uses the light recognition and positioning model to output images and determine the position of the lights of surrounding vehicles, solving the problem of multiple devices and complex control, and achieving simplified light status control and improved safety.

CN120735684APending Publication Date: 2025-10-03SHENZHEN STREAMING VIDEO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510733962.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

The existing technology for vehicle lighting control involves a large number of devices and a complex control process, making it difficult to effectively reduce glare for oncoming drivers and improve safety.

Method used

By acquiring road condition images while the vehicle is driving, the pre-trained headlight recognition and positioning model is used to output headlight heat maps, headlight vector maps, and headlight offset maps. Based on these images, the positions of the headlights of surrounding vehicles are determined, and the lighting status of the vehicle is controlled accordingly.

Benefits of technology

The number of devices is reduced, the complexity of the lighting control process is lowered, and the safety of oncoming drivers and the visibility of the driving environment are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120735684A_ABST
    Figure CN120735684A_ABST
Patent Text Reader

Abstract

The invention provides a light control method and device of a vehicle, terminal equipment and a computer program product. The light control method comprises the steps that a road condition image in the driving process of the vehicle is obtained; inputting the road condition image into a pre-trained vehicle lamp recognition and positioning model, and outputting a vehicle lamp thermodynamic diagram, a vehicle lamp vector diagram and a vehicle lamp offset diagram by using the vehicle lamp recognition and positioning model; determining vehicle lamp positions of surrounding vehicles based on the vehicle lamp thermodynamic diagram, the vehicle lamp vector diagram and the vehicle lamp offset diagram; and controlling the light state of the vehicle according to the vehicle lamp position. According to the method, the vehicle lamp thermodynamic diagram, the vehicle lamp vector diagram and the vehicle lamp offset diagram can be determined according to the road condition image only by collecting the road condition image, and the position of the vehicle lamp is determined by integrating the position and confidence of the vehicle lamp in the road condition image, the feature vector of the vehicle lamp and the offset of the center point of the vehicle lamp relative to the peak value of the thermodynamic diagram. And controlling the light state of the vehicle according to the vehicle lamp position. According to the method, in the process of controlling the light state of the vehicle, the number of needed devices can be reduced, and the complexity of the control process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent driving technology, and in particular to a vehicle lighting control method, apparatus, terminal device, and computer program product. Background Art

[0002] When driving in challenging conditions like nighttime and fog, high beams help drivers see the road ahead clearly. With the increasing popularity of new energy vehicles, many drivers frequently and extensively use high beams, regardless of the actual conditions. This misuse of high beams can dazzle oncoming drivers and easily create blind spots in the illuminated vehicles' field of view, impairing their perception of oncoming vehicles' speed and distance, and their ability to judge the width of oncoming vehicles. Furthermore, high beams from vehicles behind can create a large halo in the rearview mirror of the vehicle ahead, reducing the vehicle ahead's visibility and posing a significant safety hazard.

[0003] Current technical solutions generally involve installing onboard radar and cameras on vehicles to collect radar and image data. These are then combined with computer vision technology to monitor the road ahead in real time. 2D or 3D object detection algorithms are used to identify the position and distance of targets such as vehicles ahead, pedestrians, and traffic signs. Light spot extraction techniques are then used to determine the positions of surrounding vehicles, thereby determining the real-time distance between the surrounding vehicles and the vehicle itself. This allows the vehicle's high and low beams to be controlled based on the real-time distance. However, this technical solution requires multiple devices to be installed on the vehicle itself, making the process of controlling the vehicle's lights complex.

[0004] Therefore, how to reduce the number of devices used in the vehicle lighting control process and reduce the complexity of the control process is a technical problem that those skilled in the art currently need to solve. Summary of the Invention

[0005] The purpose of this application is to provide a vehicle lighting control method, apparatus, terminal device, computer-readable storage medium and computer program product, aiming to reduce the number of devices required to control the lighting of the vehicle and reduce the complexity of the control process.

[0006] In a first aspect, the present application provides a vehicle lighting control method. The method comprises:

[0007] Acquire road condition images during the vehicle's driving process;

[0008] Inputting the road condition image into a pre-trained headlight recognition and positioning model, and using the headlight recognition and positioning model to output a headlight heat map, a headlight vector map, and a headlight offset map;

[0009] Determining positions of headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map;

[0010] The lighting state of the vehicle is controlled according to the position of the vehicle lights.

[0011] In one embodiment, determining the positions of the headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map includes:

[0012] Traversing each coordinate point in the headlight heat map, determining the coordinate points whose heat values ​​are greater than a confidence threshold as candidate points, and obtaining a candidate point set;

[0013] Determining, from the vehicle light vector map, feature vectors corresponding to each of the candidate points in the candidate point set;

[0014] Performing clustering processing on each of the feature vectors, and determining at least one headlight set based on the clustering result; wherein each headlight set includes at least one candidate point, and one headlight set corresponds to the headlights of the same surrounding vehicles;

[0015] For each of the headlight sets, the offset values ​​corresponding to the candidate points in the headlight set are determined from the headlight offset map, and the candidate points are corrected using the corresponding offset values ​​to obtain the headlight position corresponding to at least one of the candidate points in the headlight set.

[0016] In one embodiment, controlling the lighting state of the vehicle according to the position of the vehicle lights includes:

[0017] Determining the real-time vehicle position of the corresponding surrounding vehicles according to at least one of the vehicle light positions;

[0018] Determine whether the surrounding vehicles are within a preset range based on the real-time vehicle position;

[0019] If the surrounding vehicles are beyond the preset range, control the vehicle to turn on the high beam;

[0020] If the surrounding vehicles are within the preset range, the vehicle is controlled to reduce the brightness of its lights.

[0021] In one embodiment, controlling the vehicle to reduce light brightness includes:

[0022] Switching the high beam of the vehicle to a low beam;

[0023] Or, obtaining the relative angle between the vehicle and the surrounding vehicles;

[0024] The brightness of the corresponding light beam in the high beam of the vehicle is adjusted according to the relative angle.

[0025] In one embodiment, the process of training the vehicle light recognition and positioning model includes:

[0026] Acquire a training sample set; the training samples in the training sample set include sample image data of surrounding vehicles and sample output maps corresponding to the sample image data; the sample output maps include a sample headlight heat map, a sample headlight vector map, and a sample headlight offset map;

[0027] Determine an initial deep neural network; the initial deep neural network includes an encoder, a spatial transformation module and a decoder;

[0028] The initial deep neural network is trained using the training sample set, a loss function value is determined based on a predicted output graph output by the initial deep neural network and the sample output graph, and the model parameters in the initial deep neural network are updated and optimized using the loss function value until the training goal is achieved, thereby obtaining the headlight recognition and positioning model; the predicted output graph includes a predicted headlight thermal map, a predicted headlight vector map, and a predicted headlight offset map.

[0029] In one embodiment, the decoder includes a BEV decoding module; the BEV decoding module includes multiple deconvolution layers for upsampling the BEV features output by the encoder and outputting a predicted headlight heat map, a predicted headlight vector map, and a predicted headlight offset map.

[0030] In one embodiment, the decoder further includes a 2D decoding module, which is used to upsample the 2D features generated by the encoder and decode them to generate a predicted headlight heat map and a predicted headlight vector map on a 2D image plane.

[0031] In one embodiment, the method of using the training sample set to train the initial deep neural network, determining a loss function value based on a predicted output graph and the sample output graph output by the initial deep neural network, and using the loss function value to update and optimize model parameters in the initial deep neural network until a training goal is achieved, thereby obtaining the vehicle light recognition and positioning model, includes:

[0032] Inputting the training sample set into the initial deep neural network;

[0033] Determining a mean square error loss function value of the headlight heat map according to the predicted headlight heat map output by the initial deep neural network and the sample headlight heat map;

[0034] Determining a clustering loss function value of the headlight vector image according to the predicted headlight vector image output by the initial deep neural network and the sample headlight vector image;

[0035] Determining a mean square error loss function value of the headlight offset map based on the predicted headlight offset map output by the initial deep neural network and the sample headlight offset map;

[0036] The model parameters in the initial deep neural network are updated and optimized using the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map, and the mean square error loss function value of the headlight offset map respectively until the training target is achieved, thereby obtaining the headlight recognition and positioning model.

[0037] In a second aspect, the present application also provides a vehicle lighting control device. The device comprises:

[0038] An acquisition module is used to acquire road condition images during the vehicle's driving process;

[0039] a model output module, configured to input the road condition image into a pre-trained headlight recognition and positioning model, and output a headlight heat map, a headlight vector map, and a headlight offset map using the headlight recognition and positioning model;

[0040] a determination module, configured to determine positions of headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map;

[0041] A control module is used to control the lighting status of the vehicle according to the position of the vehicle lights.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which implements the steps of the above method when executed by a processor.

[0043] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0044] The present application provides a vehicle lighting control method, which includes acquiring a road image of the vehicle while it is traveling; inputting the road image into a pre-trained headlight recognition and positioning model, and utilizing the headlight recognition and positioning model to output a headlight heat map, a headlight vector map, and a headlight offset map; determining the headlight positions of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map; and controlling the vehicle's lighting state based on the headlight positions. As can be seen, the present method only requires acquiring a road image of the vehicle while it is traveling, and can then determine the headlight heat map, the headlight vector map, and the headlight offset map based on the road image. The method then determines the headlight positions of surrounding vehicles by combining the positions and confidence levels of the headlights in the road image, the headlight feature vectors, and the offset of the headlight center point relative to the peak of the heat map. The method then detects and locates the headlight positions of surrounding vehicles, distinguishes between different headlight instances, and thereby controls the vehicle's lighting state based on the headlight positions. Therefore, the present method can reduce the amount of equipment required and the complexity of the control process in controlling the vehicle's lighting state.

[0045] It can be understood that the vehicle lighting control device, terminal device, computer-readable storage medium and computer program product provided in the embodiments of the present application have the same beneficial effects as the above-mentioned vehicle lighting control method, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0047] Figure 1 A flowchart of a vehicle lighting control method provided in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of controlling the vehicle to reduce the light brightness according to the high and low beam switching mode provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of controlling the vehicle to reduce the light brightness according to the high beam adaptive beam mode provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of a process for training a vehicle headlight recognition and positioning model provided in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of a clustering loss function provided in an embodiment of the present application;

[0052] Figure 6A schematic structural diagram of a vehicle lighting control device provided in an embodiment of the present application;

[0053] Figure 7 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0056] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0057] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0059] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of the present application include a particular feature, structure, or characteristic described in conjunction with that embodiment. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized. "Multiple" means "two or more."

[0060] An embodiment of the present application provides a vehicle lighting control method that can be executed by a processor of a terminal device when running a corresponding computer program.

[0061] Figure 1 This is a flowchart of a vehicle lighting control method provided in an embodiment of the present application. For ease of illustration, only the portion relevant to this embodiment is shown. The method provided in this embodiment includes the following steps:

[0062] S100: Acquire a road condition image during the vehicle's driving process.

[0063] Specifically, a camera pre-installed on the vehicle can be used to capture road condition images during the vehicle's travel. This embodiment does not limit the specific type of the camera, which can be a monocular camera, a binocular camera, etc.

[0064] In one example, the real-time driving speed of the vehicle is obtained and compared with a preset speed threshold. If the real-time driving speed is greater than the preset speed threshold, it indicates that the vehicle is in a driving state. Therefore, a camera is used to obtain road condition images during the driving process of the vehicle.

[0065] S200: Inputting the road condition image into a pre-trained headlight recognition and positioning model, and using the headlight recognition and positioning model to output a headlight heat map, a headlight vector map, and a headlight offset map.

[0066] In this step, the road condition image is input into the pre-trained headlight recognition and positioning model, and the headlight recognition and positioning model is used to output the headlight heat map, headlight vector map, and headlight offset map. Since the road condition image includes surrounding vehicles, the output is a headlight heat map, headlight vector map, and headlight offset map that include information about surrounding vehicles. Surrounding vehicles refer to other vehicles traveling around the vehicle. The headlight heat map is a two-dimensional heat distribution map used to represent the position and confidence of the headlights in the road condition image. The heat value corresponding to each coordinate point in the headlight heat map reflects the possibility of the existence of headlights at that location; the high-value area of ​​the heat map usually corresponds to the location of the headlights.

[0067] The headlight embedding map is a feature embedding map. Feature vectors represent the characteristics of headlights, such as the type of headlight (headlight, taillight, etc.), the relative position of the headlight (relative to the vehicle's outline), or the shape of the headlight. The feature vector for each headlight position can be used to distinguish different headlight instances.

[0068] The headlight offset map represents the offset of the headlight center relative to the heat map peak. While the approximate location of the headlight can be determined in the headlight heat map, the actual center of the headlight may deviate from the heat map peak. The offset map provides an offset vector for each coordinate point, allowing for more precise center location.

[0069] S300: Determine positions of headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map.

[0070] After determining the headlight heat map, headlight vector map, and headlight offset map, the headlight locations of surrounding vehicles are determined by combining these three maps. The positions and confidence scores of the headlights in the road image, the headlight feature vectors, and the offset of the headlight center point relative to the peak of the heat map are used to determine the positions of surrounding vehicle headlights. This allows for accurate detection and location of surrounding vehicle headlights, while distinguishing between different headlight instances, thereby improving detection robustness and accuracy.

[0071] S400: Control the vehicle's lighting status according to the vehicle's lighting position.

[0072] It is understandable that the position of the headlights also indicates the position of the corresponding surrounding vehicles.

[0073] In a specific embodiment, the real-time vehicle distance between the vehicle and surrounding vehicles is calculated based on the position of the vehicle lights and the real-time position of the vehicle. The real-time vehicle distance is then compared with a preset range; the preset range refers to the area around the vehicle that is pre-set based on driving safety and lighting requirements and is used to determine whether the vehicle's high beam will affect the safe driving of surrounding vehicles. If it is determined that the real-time vehicle distance exceeds the preset range, that is, the surrounding vehicles are outside the preset range, then the vehicle's high beam will not affect the safe driving of surrounding vehicles, and the vehicle is controlled to turn on the high beam. If the real-time vehicle distance is less than the preset range, that is, the surrounding vehicles are within the preset range, then the vehicle's high beam will affect the safe driving of surrounding vehicles, and the vehicle's lighting status needs to be adjusted.

[0074] The embodiment of the present application provides a vehicle lighting control method, which acquires a road condition image of the vehicle while it is traveling; inputs the road condition image into a pre-trained headlight recognition and positioning model, and uses the headlight recognition and positioning model to output a headlight heat map, a headlight vector map, and a headlight offset map; determines the headlight positions of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map; and controls the vehicle's lighting state based on the headlight positions. It can be seen that the method only needs to acquire a road condition image of the vehicle while it is traveling, and can then determine the headlight heat map, the headlight vector map, and the headlight offset map based on the road condition image. The method then determines the headlight positions of surrounding vehicles by combining the positions and confidence levels of the headlights in the road condition image, the headlight feature vectors, and the offset of the headlight center point relative to the peak of the heat map. The method detects and locates the headlight positions of surrounding vehicles, distinguishes different headlight instances, and thereby controls the vehicle's lighting state based on the headlight positions. Therefore, the method can reduce the amount of equipment required and the complexity of the control process in the process of controlling the vehicle's lighting state.

[0075] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the positions of the headlights of surrounding vehicles are determined based on the headlight heat map, the headlight vector map, and the headlight offset map, including:

[0076] Step 1: Traverse each coordinate point in the headlight heat map, determine the coordinate points whose heat value is greater than the confidence threshold as candidate points, and obtain a set of candidate points.

[0077] Among them, the confidence threshold refers to the confidence critical value used to determine whether the position corresponding to the coordinate point is a car light; when the thermal value corresponding to the coordinate point is greater than the confidence threshold, it means that the coordinate point is more likely to be a car light, so the coordinate point is determined as a candidate point; otherwise, it means that the coordinate point is less likely to be a car light.

[0078] In this embodiment, after determining the headlight heat map, headlight vector map, and headlight offset map for the BEV plane, each coordinate point in the headlight heat map is traversed to determine whether the heat value of each coordinate point is greater than a confidence threshold. If so, the coordinate point is identified as a candidate point and added to the candidate point set. Otherwise, the coordinate point is not processed and the determination continues for the next coordinate point. After comparing each coordinate point with the confidence threshold, a candidate point set is obtained. In other words, the candidate point set consists of coordinate points whose heat value is greater than the confidence threshold.

[0079] In a specific example, after determining the headlight heat map, the headlight vector map, and the headlight offset map, if the confidence threshold corresponding to the headlight heat map is 0.5; traverse the heat values ​​of each coordinate point in the headlight heat map, determine the coordinate points with heat values ​​greater than 0.5 as candidate points, and obtain a candidate point set; assume that the candidate point set includes 3 candidate points, namely (100, 200), (150, 250), and (200, 300).

[0080] Step 2: Determine the feature vector corresponding to each candidate point in the candidate point set from the vehicle light vector map.

[0081] Specifically, after determining the candidate point set, for each candidate point in the candidate point set, based on the position (coordinate point) corresponding to the candidate point, the feature vector corresponding to the coordinate point is searched in the vehicle light vector map to obtain the feature vector corresponding to the candidate point.

[0082] Step 3: Clustering is performed on each feature vector, and at least one headlight set is determined based on the clustering result; wherein each headlight set includes at least one candidate point, and a headlight set corresponds to the headlights of the same surrounding vehicles.

[0083] In this step, after determining the feature vectors corresponding to each candidate point in the candidate point set, each feature vector is clustered to obtain a corresponding clustering result. The clustering result indicates that the feature vectors with high similarity are grouped together in a classification cluster. Then, based on the clustering results, the candidate points corresponding to the feature vectors in the same classification cluster are grouped together into a set, resulting in a headlight set. Each headlight set contains at least one candidate point, and a headlight set corresponds to the headlights of the same surrounding vehicles.

[0084] Specifically, the process of clustering each feature vector can be as follows: presetting a preset distance threshold; calculating the distance between any two feature vectors and comparing whether the distance is less than the preset distance threshold; when the distance between two feature vectors is less than the preset distance threshold, it indicates that the two feature vectors are highly similar, which means that the candidate points corresponding to the two feature vectors belong to the headlights of the same surrounding vehicle, and therefore the two feature vectors are placed in the same classification cluster. After calculating the distance between each pair of feature vectors and comparing it with the preset distance threshold, the clustering result is obtained.

[0085] In a specific example, feature vectors corresponding to each candidate point in a candidate point set are obtained from a headlight vector map; it is assumed that the feature vectors are determined to be: feature vector A, feature vector B, and feature vector C; for each feature vector, the distance between the feature vector and each other feature vector is calculated; and the distance is compared with a preset distance threshold; if the distance between feature vector A and feature vector B is less than the preset distance threshold, and the distance between feature vector B and feature vector C is greater than the preset distance threshold, feature vector A and feature vector B are set in a classification cluster; then the candidate points corresponding to feature vector A and feature vector B in a classification cluster are divided into the same set to obtain a headlight set.

[0086] Step 3: For each headlight set, determine the offset values ​​corresponding to each candidate point in the headlight set from the headlight offset map, and use the corresponding offset values ​​to correct the candidate points to obtain the headlight position corresponding to at least one candidate point in the headlight set.

[0087] Specifically, for each headlight set, obtain the offset value corresponding to each candidate point in the headlight set. Assume that the offset value corresponding to the candidate point (100,200) is (2,3), and the offset value corresponding to the candidate point (150,250) is (1,2); use the offset value to correct the candidate point to obtain the headlight position. For example, suppose the grid coordinates corresponding to the candidate point are (x g ,y g ), the offset value corresponding to the grid coordinate of the candidate point is Therefore, the corrected light coordinates (x, y) are: For example, after correcting the candidate point (100, 200), the obtained position of the headlight is (102, 203).

[0088] It can be seen that according to the method of this embodiment, the position of the headlights of surrounding vehicles can be determined based on the headlight heat map, the headlight vector map and the headlight offset map, comprehensively considering the position and confidence of the headlights in the road condition image, the characteristic vector of the headlights and the offset of the center point of the headlights relative to the peak of the heat map, so as to more accurately detect and locate the position of the headlights of surrounding vehicles and distinguish different headlight instances.

[0089] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, controlling the lighting state of the vehicle according to the position of the vehicle lights includes:

[0090] Determining a real-time vehicle position of a corresponding surrounding vehicle based on at least one vehicle light position;

[0091] Determine whether surrounding vehicles are within the preset range based on the real-time vehicle position;

[0092] If the surrounding vehicles exceed the preset range, the vehicle will be controlled to turn on the high beam;

[0093] If the surrounding vehicles are within the preset range, the vehicle will be controlled to lower the brightness of the lights.

[0094] Specifically, the preset range can be the lateral distance and longitudinal distance range centered on the vehicle, such as the range corresponding to the lateral distance within 40 meters and the longitudinal distance within 150 meters of the vehicle; it can also be a circular area centered on the vehicle, and its radius can be set according to actual needs, such as a radius of 50 meters.

[0095] In actual application, for at least one headlight position, the real-time vehicle position of the surrounding vehicles is determined according to the at least one headlight position, and the real-time vehicle distance between the corresponding surrounding vehicles and the vehicle is calculated, that is, the real-time vehicle distance corresponding to the headlights of the surrounding vehicles and the real-time position of the vehicle is calculated; then the real-time vehicle distance is compared with a preset range; if the real-time vehicle distance is greater than the preset range, that is, the surrounding vehicles exceed the preset range, it means that the high beam of the vehicle will not affect the safe driving of the surrounding vehicles, so the vehicle is controlled to turn on the high beam; otherwise, that is, the real-time vehicle distance is less than or equal to the preset range, and the surrounding vehicles are within the preset range, it means that the high beam of the vehicle will affect the safe driving of the surrounding vehicles, so the vehicle is controlled to reduce the brightness of the lights to avoid the drivers of the surrounding vehicles from being dizzy due to the high beam, thereby ensuring the driving safety of the surrounding vehicles.

[0096] It can be understood that since the surrounding vehicles and this vehicle are all in the process of driving, the real-time vehicle positions of the surrounding vehicles and the real-time vehicle positions of this vehicle are constantly changing. Therefore, it is necessary to determine the real-time vehicle positions of the surrounding vehicles based on at least one headlight position updated in real time, and calculate the corresponding real-time vehicle distance, and then control the headlight status according to the real-time vehicle distance.

[0097] According to the method of this embodiment, whether the surrounding vehicles are within the preset range is determined by the real-time vehicle positions of the surrounding vehicles, and then based on the relationship between the surrounding vehicles and the preset range, the vehicle is controlled to turn on the high beam or reduce the brightness of the lights, which can efficiently and conveniently control the status of the lights.

[0098] In a specific embodiment, controlling the vehicle to reduce the light brightness includes:

[0099] Switch your vehicle's high beam to low beam.

[0100] Figure 2 This is a schematic diagram of controlling the vehicle to reduce the light brightness according to the high and low beam switching mode provided in the embodiment of the present application. Figure 2 As shown in the figure, after determining the positions of the two headlights of the surrounding vehicles as (x1, y1) and (x2, y2), when the vehicle needs to control the headlight brightness to be lowered, the current headlight status of the vehicle is obtained; if the current headlight status is high beam, the high beam status is maintained; if the current headlight status is low beam, the vehicle is controlled to switch from low beam to high beam. If the surrounding vehicles are within the preset range, it means that the high beam of the vehicle will affect the safe driving of the surrounding vehicles; the current headlight status of the vehicle is obtained; if the current headlight status is low beam, the low beam status is maintained; if the current headlight status is high beam, the vehicle is controlled to switch from high beam to low beam.

[0101] In actual applications, if the low beam and high beam are controlled by different lamps, that is, the headlights include low beam filaments and high beam filaments, when controlling the vehicle to switch from low beam to high beam, the current path between the low beam filaments and the high beam filaments is changed, and the current is controlled to flow to the high beam filament, and the high beam filament emits light to produce a high beam.

[0102] For vehicles using multiple light source systems, such as LED lights with lenses and light-guiding technology, the vehicle can switch from low beam to high beam by changing the lighting status of different light sources. For example, when the low beam is on, only some LED beads will emit light, and the light will be focused by the lens to form the low beam pattern; when the high beam is on, all LED beads will be lit, or additional LED beads will be added to provide stronger light intensity.

[0103] The method provided in this embodiment for controlling the vehicle's headlight brightness to be reduced is based on a high-beam and low-beam switching mode. Specifically, when it is determined that the real-time vehicle distance between the vehicle and surrounding vehicles is less than a preset distance range, the high beam is switched to the low beam, i.e., the high beam is turned off and the low beam is turned on, to prevent drivers of surrounding vehicles from feeling dizzy due to the high beam, thereby ensuring the driving safety of surrounding vehicles.

[0104] In another specific embodiment, controlling the vehicle to reduce light brightness includes:

[0105] Get the relative angle between the vehicle and surrounding vehicles;

[0106] Adjust the brightness of the corresponding beam in the vehicle's high beam according to the relative angle.

[0107] The relative angle refers to the angle between the vehicle and the surrounding vehicles. Using the vehicle's direction as a reference, the angles between the surrounding vehicles and the vehicle are determined to obtain the relative angle. For example, when the surrounding vehicle is directly in front of the vehicle, the relative angle is 0 degrees; when the surrounding vehicle is directly to the left of the vehicle, the relative angle is 90 degrees; and when the surrounding vehicle is directly to the right of the vehicle, the relative angle is 270 degrees.

[0108] Figure 3 This is a schematic diagram of controlling the vehicle to reduce the light brightness according to the high beam adaptive beam mode provided in the embodiment of the present application. Figure 3 As shown in the figure, after determining that the positions of the two headlights of the surrounding vehicles are (x1, y1) and (x2, y2), when it is necessary to control the vehicle to reduce the brightness of the lights, the relative angle between the vehicle and the surrounding vehicles is determined based on the position of the lights and the real-time position of the vehicle; then, the light beam area of ​​the vehicle headlight that needs to be adjusted is determined based on the real-time vehicle distance and the relative angle, and then the brightness of the corresponding light beam area of ​​the vehicle headlight is adjusted.

[0109] For vehicles that use a multi-light source system, such as LED lights with lenses and light-guiding technology, each LED lamp bead (light source) can also be divided into multiple areas, and the lighting status of the LED lamp beads in each area can be adjusted independently. When the current lighting status of the vehicle is high beam and it is necessary to control the vehicle to reduce the light brightness, after determining the relative angle between the vehicle and the surrounding vehicles, the target area where the light source adjustment is required is determined, and the LED lamp beads in the target area are turned off or the brightness of the LED lamp beads in the target area is reduced. In a specific example, if the surrounding vehicles are on the right side of the vehicle, only the brightness of the LED lamp beads in the target area on the right can be reduced, while the brightness of the LED lamp beads on the left remains unchanged.

[0110] When surrounding vehicles exceed the preset range, the brightness of the LED lamp beads corresponding to the target area is adjusted to the same brightness as the LED lamp beads in other areas. Therefore, in this mode, the high beam can always be turned on, creating a glare-free zone only for surrounding vehicles. This can not only prevent glare for drivers of surrounding vehicles, but also improve the safety of the vehicle's night driving without disturbing other traffic participants.

[0111] The method provided in this embodiment for controlling the brightness reduction of the vehicle's headlights is based on the adaptive high-beam mode. Specifically, when the real-time distance between the vehicle and the surrounding vehicles is determined to be less than a preset distance range, the relative angle between the vehicle and the surrounding vehicles is further determined. The brightness of the corresponding beam in the vehicle's headlights is adjusted based on the relative angle, thereby enabling flexible and precise control of the headlight brightness.

[0112] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the process of training the headlight recognition and positioning model includes:

[0113] Obtaining a training sample set; the training samples in the training sample set include sample image data of surrounding vehicles and sample output maps corresponding to the sample image data; the sample output maps include a sample headlight heat map, a sample headlight vector map, and a sample headlight offset map;

[0114] Determine an initial deep neural network; the initial deep neural network includes an encoder, a spatial transformation module, and a decoder;

[0115] The initial deep neural network is trained using the training sample set. The loss function value is determined based on the predicted output graph and sample output graph of the initial deep neural network. The model parameters in the initial deep neural network are updated and optimized using the loss function value until the training goal is achieved, thereby obtaining a headlight recognition and positioning model. The predicted output graph includes a predicted headlight thermal map, a predicted headlight vector map, and a predicted headlight offset map.

[0116] The training sample set refers to a set of samples used for model training. In this embodiment, the process of determining the training samples includes:

[0117] A camera and lidar are installed on a sample vehicle, and sample image data and radar data are collected synchronously while the sample vehicle is driving. The taillights, headlights, and headlight status of other vehicles are annotated in the sample image data; headlight status includes on and off states. Sample radar data corresponding to the sample image data is obtained, and the sample coordinate values ​​of the headlights of other vehicles in the world coordinate system are determined based on the sample radar data. The annotated sample image data, sample radar data, and headlight sample coordinate values ​​are organized to form training samples in a unified format. The training samples include sample image data of surrounding vehicles and sample output maps corresponding to the sample image data. The sample output maps include sample headlight heat maps, sample headlight vector maps, and sample headlight offset maps. After collecting a large number of training samples, a training sample set is obtained.

[0118] The initial deep neural network may be a deep neural network (DNN), a convolutional neural network (CNN), etc. This embodiment does not limit the specific type of the initial neural network.

[0119] Figure 4 This is a schematic diagram of the process of training a vehicle light recognition and positioning model provided in an embodiment of the present application. Figure 4As shown, in this embodiment, the initial deep neural network includes an encoder, a spatial transformation module and a decoder.

[0120] Specifically, the encoder is composed of multiple convolutional layers, which is used to encode the input sample image data into small-resolution features to obtain a 2D feature map; the encoder can be a lightweight model such as MobileNet and ShuffleNet.

[0121] The Spatial Transform module includes several fully connected layers and convolutional layers to transform the input 2D feature map from 2D space to the bird's-eye view (BEV) space and convert 2D features into BEV features.

[0122] The decoder consists of multiple deconvolution layers that upsample the BEV features to a higher resolution and output prediction maps, including a predicted headlight heatmap, a predicted headlight embedding, and a predicted headlight offset. Each prediction map is represented by a grid with an H×W resolution, where each grid represents 1 meter.

[0123] Each training sample in the training sample set is input into the initial deep neural network; the initial deep neural network extracts 2D features through the encoder, converts the 2D features into BEV features through the spatial conversion module, and outputs the predicted output maps of the headlight heat map, the headlight vector map, and the headlight offset map through the decoder, that is, outputs the predicted headlight heat map, the predicted headlight vector map, and the predicted headlight offset map;

[0124] Based on the predicted output map and the true value of the training sample annotation (sample output map), the loss function values ​​corresponding to the headlight heat map, headlight vector map, and headlight offset map are calculated respectively;

[0125] Based on the loss function values ​​corresponding to the headlight heat map, headlight vector map, and headlight offset map, the optimizer is used to update and optimize the model parameters in the initial deep neural network to reduce the difference between the predicted output map and the true value (sample output map);

[0126] After repeating the operations of forward propagation, loss calculation, backpropagation, and parameter update, the model parameters in the initial deep neural network are continuously adjusted until the training goal is achieved, such as the loss function value converges to a preset threshold or reaches a preset number of training rounds, to obtain a headlight recognition and positioning model.

[0127] According to the method of this embodiment, a vehicle headlight recognition and positioning model can be efficiently trained.

[0128] Based on the above embodiments, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the decoder includes a BEV decoding module; the BEV decoding module includes multiple deconvolution layers, which is used to upsample the BEV features output by the encoder and output a predicted headlight heat map, a predicted headlight vector map, and a predicted headlight offset map.

[0129] It should be noted that the BEV decoding module is the Bird's Eye View decoding module;

[0130] The BEV decoding module converts the low-resolution features processed by the encoder from the 2D image space to the bird's-eye view space, constructing a 3D spatial representation that better reflects the actual road scene. This allows subsequent analysis of headlight and vehicle positions to better align with the physical spatial relationship, improving positioning accuracy. Deconvolution is used to upsample the features in the bird's-eye view space, gradually restoring their detailed information and providing richer spatial and semantic details for final headlight recognition and positioning.

[0131] During the training process, the BEV decoding module outputs a predicted headlight heatmap, a predicted headlight embedding, and a predicted headlight offset. When the headlight recognition and positioning model is applied for light control, the module outputs a headlight heatmap, a headlight embedding, and a headlight offset corresponding to the road condition image.

[0132] According to the method of this embodiment, a vehicle headlight recognition and positioning model can be efficiently trained.

[0133] Based on the above embodiments, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the decoder also includes a 2D decoding module, which is used to upsample the 2D features generated by the encoder and decode them to generate a predicted headlight heat map and a predicted headlight vector map on the 2D image plane.

[0134] Combine Figure 4 As shown, the decoder in this embodiment is based on the BEV decoding module and adds a 2D decoding module. The 2D decoding module is used to upsample the 2D features generated by the encoder and decode them to generate the predicted output images of the headlight heat map and the headlight vector map on the 2D image plane (predicted headlight heat map and predicted headlight vector map). In addition, after outputting the predicted output images of the headlight heat map and the headlight vector map (predicted headlight heat map and predicted headlight vector map), the corresponding loss function value is determined, and the loss function value is used to update and optimize the parameters of the 2D decoding module.

[0135] In this embodiment, the headlight recognition and positioning model is trained simultaneously using both the BEV decoding module and the 2D decoding module. Model parameters are then updated and optimized based on the output of the predicted headlight heat map and predicted headlight vector map. In actual applications, however, only the BEV decoding module can be used to output the headlight heat map, headlight vector map, and headlight offset map corresponding to real-time road imagery.

[0136] According to the method of this embodiment, model training is performed by combining the BEV decoding module and the 2D decoding module. The 2D decoding module provides multi-perspective feature learning for the headlight recognition and positioning model, enabling the headlight recognition and positioning model to simultaneously extract feature information from two-dimensional images and bird's-eye view spaces, thereby more efficiently training the headlight recognition and positioning model and improving the robustness of the headlight recognition and positioning model.

[0137] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the initial deep neural network is trained using a training sample set, a loss function value is determined based on the predicted output graph and the sample output graph output by the initial deep neural network, and the model parameters in the initial deep neural network are updated and optimized using the loss function value until the training goal is achieved, thereby obtaining a headlight recognition and positioning model, including:

[0138] Input the training sample set into the initial deep neural network;

[0139] Determine the mean square error loss function value of the headlight heat map based on the predicted headlight heat map and the sample headlight heat map output by the initial deep neural network;

[0140] Determine the clustering loss function value of the headlight vector image based on the predicted headlight vector image output by the initial deep neural network and the sample headlight vector image;

[0141] Determine the mean square error loss function value of the headlight offset map based on the predicted headlight offset map and the sample headlight offset map output by the initial deep neural network;

[0142] The model parameters in the initial deep neural network are updated and optimized using the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map, and the mean square error loss function value of the headlight offset map until the training goal is achieved, and a headlight recognition and positioning model is obtained.

[0143] It should be noted that, in this embodiment, the process of determining the loss function values ​​corresponding to the headlight heat map, the headlight vector map, and the headlight offset map is as follows:

[0144] Specifically, the headlight heatmap of the headlight recognition and localization model is optimized using the mean square error loss function as a supervisory signal. The clustering loss function value of the headlight heatmap is determined based on the predicted output image (predicted headlight heatmap) of the headlight vector image output by the initial deep neural network and the sample headlight heatmap.

[0145] Among them, the formula of the mean square error loss function is as follows:

[0146]

[0147] Where N is the number of grids in the headlight heat map, and i is the index of the grid; H is the predicted headlight heat map output by the headlight recognition and positioning model. i This is the heat map of the sample car lights.

[0148] Specifically, the clustering loss function is used as a supervisory signal to optimize the headlight vector image (HVG) of the headlight recognition and positioning model. The clustering loss function value of the HVG is determined based on the predicted output image (predicted HVG) of the initial deep neural network and the sample HVG.

[0149] Among them, the formula of the clustering loss function is as follows:

[0150] Loss cluster =Loss var +Loss dist ;

[0151]

[0152] Figure 5 A schematic diagram of a clustering loss function provided in an embodiment of the present application. Different classification clusters represent sets of headlights, red represents the mean center, and blue represents the eigenvector. var Apply a pulling force to each eigenvector (embedding) to make the eigenvector (embedding) gather towards its mean center. When the distance between the eigenvector (embedding) and the center is greater than σ v When the tension takes effect; Loss dist Apply a thrust to each eigenvector (embedding) to move the mean centers of the eigenvectors (embedding) away from each other. When the distance between the two class centers is less than σ d When , the thrust takes effect. c represents the number of clusters (headlight sets), N c represents the number of candidate points in the headlight set, e i Represents the feature vector of the grid (embedding), u c represents the mean of the feature vector (embedding), [x]+ =max(0,x).

[0153] It should be noted that based on the calculated clustering loss function value, the model parameters are updated through backpropagation, so that the feature vectors of the same headlight are closer in the embedding space, and the feature vectors of different headlights are farther apart; the above process is repeated until the model achieves satisfactory clustering performance on the training samples, that is, the headlight vector graph can accurately cluster the features of the same headlight together while distinguishing different headlights.

[0154] Specifically, the mean square error loss function is used as a supervisory signal to optimize the headlight offset map of the headlight recognition and positioning model.

[0155] The mean square error loss function value of the headlight offset map is determined according to the predicted output map (predicted headlight offset map) of the headlight offset map output by the initial deep neural network and the sample headlight offset map.

[0156] Specifically, the mean square error loss function is mainly used to recover the discretization error caused by the output grid resolution. The offset value range is (-0.5m, 0.5m), and a local offset is predicted for each headlight point. The true value deviation is (Δx i ,Δy i ), the formula is as follows:

[0157]

[0158] It should be noted that the mean square error loss function (supervisory signal) only works when there is light obj The grid is affected and other locations are ignored.

[0159] Specifically, after determining the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map, and the mean square error loss function value of the headlight offset map, the model parameters in the initial deep neural network are updated and optimized using the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map, and the mean square error loss function value of the headlight offset map, respectively, until the training goal is achieved, and a headlight recognition and positioning model is obtained.

[0160] In this embodiment, the corresponding loss function values ​​are calculated for the headlight heat map, the headlight vector map and the headlight offset map, and the model parameters in the initial deep neural network are updated and optimized using the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map and the mean square error loss function value of the headlight offset map to obtain a headlight recognition and positioning model, which can further improve the model accuracy of the headlight recognition and positioning model.

[0161] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0162] It should be noted that the information collection process (such as the facial image collection process, fingerprint information collection process, etc.) / feature extraction process involved in this application is performed with the user's knowledge and permission, that is, the information collection process / feature extraction process complies with the requirements of laws and regulations and does not constitute an act that harms the public interest.

[0163] Figure 6 FIG. 1 is a schematic diagram of the structure of a vehicle lighting control device provided by an embodiment of the present application. Figure 6 As shown, the vehicle lighting control device of this embodiment includes an acquisition module 610, a model output module 620, a determination module 630, and a control module 640; wherein,

[0164] An acquisition module 610 is used to acquire road condition images during the vehicle's driving process;

[0165] The model output module 620 is used to input the road condition image into the pre-trained headlight recognition and positioning model, and use the headlight recognition and positioning model to output the headlight heat map, headlight vector map, and headlight offset map;

[0166] a determination module 630 for determining the positions of the headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map;

[0167] The control module 640 is used to control the lighting status of the vehicle according to the position of the vehicle lights.

[0168] A vehicle lighting control device provided in an embodiment of the present application has the same beneficial effects as the above-mentioned vehicle lighting control method.

[0169] In one embodiment, the determination module 630 includes:

[0170] The candidate point set determination submodule is used to traverse each coordinate point in the headlight heat map, determine the coordinate points whose heat value is greater than the confidence threshold as candidate points, and obtain a candidate point set;

[0171] A feature vector determination submodule is used to determine the feature vectors corresponding to each candidate point in the candidate point set from the vehicle light vector map;

[0172] A headlight set determination submodule is configured to perform clustering processing on each feature vector and determine at least one headlight set based on the clustering results; wherein each headlight set includes at least one candidate point, and a headlight set corresponds to the headlights of the same surrounding vehicles;

[0173] The headlight position determination submodule is used to determine, for each headlight set, the offset values ​​corresponding to each candidate point in the headlight set from the headlight offset map, and to correct the candidate points using the corresponding offset values ​​to obtain the headlight position corresponding to at least one candidate point in the headlight set.

[0174] In one embodiment, the control module 640 includes:

[0175] A real-time vehicle position determination submodule, configured to determine the real-time vehicle position of corresponding surrounding vehicles based on the position of at least one headlight;

[0176] The range judgment submodule is used to judge whether the surrounding vehicles are within the preset range based on the real-time vehicle position;

[0177] The first control submodule is used to control the vehicle to turn on the high beam if the surrounding vehicles are beyond the preset range;

[0178] The second control submodule is used to control the vehicle to reduce the light brightness if the surrounding vehicles are within a preset range.

[0179] In one embodiment, the second control submodule includes:

[0180] The first mode control unit is used to switch the high beam of the vehicle to the low beam.

[0181] In one embodiment, the second control submodule includes:

[0182] The second mode control unit is used to obtain the relative angle between the vehicle and surrounding vehicles; and adjust the brightness of the corresponding light beam in the vehicle's high beam according to the relative angle.

[0183] In one embodiment, the model output module 620 includes:

[0184] The training sample set acquisition submodule is used to acquire a training sample set; the training samples in the training sample set include sample image data of surrounding vehicles and sample output maps corresponding to the sample image data; the sample output maps include sample headlight heat maps, sample headlight vector maps, and sample headlight offset maps;

[0185] An initial deep neural network determination submodule is used to determine an initial deep neural network; the initial deep neural network includes an encoder, a spatial transformation module, and a decoder;

[0186] The model training submodule is used to use the training sample set to learn and train the initial deep neural network, determine the loss function value based on the predicted output map and sample output map output by the initial deep neural network, and use the loss function value to update and optimize the model parameters in the initial deep neural network until the training goal is achieved, thereby obtaining a headlight recognition and positioning model; the predicted output map includes a predicted headlight thermal map, a predicted headlight vector map, and a predicted headlight offset map.

[0187] In one embodiment, the decoder includes a BEV decoding module; the BEV decoding module includes multiple deconvolution layers for upsampling the BEV features output by the encoder and outputting a predicted headlight heat map, a predicted headlight vector map, and a predicted headlight offset map.

[0188] In one embodiment, the decoder further includes a 2D decoding module, which is used to upsample the 2D features generated by the encoder and decode them to generate a predicted headlight heat map and a predicted headlight vector map on a 2D image plane.

[0189] In one embodiment, the model training submodule includes:

[0190] A sample input unit, used to input the training sample set into the initial deep neural network;

[0191] A first loss function value determining unit, configured to determine a mean square error loss function value of the headlight heat map based on the predicted headlight heat map output by the initial deep neural network and the sample headlight heat map;

[0192] a second loss function value determining unit, configured to determine a clustering loss function value of the headlight vector image based on the predicted headlight vector image output by the initial deep neural network and the sample headlight vector image;

[0193] a third loss function value determining unit, configured to determine a mean square error loss function value of the headlight offset map based on the predicted headlight offset map output by the initial deep neural network and the sample headlight offset map;

[0194] The model parameter optimization unit is used to update and optimize the model parameters in the initial deep neural network using the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map, and the mean square error loss function value of the headlight offset map until the training target is achieved, thereby obtaining a headlight recognition and positioning model.

[0195] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0196] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0197] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 7 As shown, the terminal device 700 of this embodiment includes a memory 701, a processor 702, and a computer program 703 stored in the memory 701 and executable on the processor 702; when the processor 702 executes the computer program 703, the steps of the above-mentioned vehicle lighting control method embodiments are implemented; or when the processor 702 executes the computer program 703, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0198] Exemplarily, the computer program 703 may be divided into one or more modules / units, one or more modules / units being stored in the memory 701 and executed by the processor 702 to implement the method of the embodiment of the present application. One or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 703 in the terminal device 700. For example, the computer program 703 may be divided into an acquisition module, a model output module, a determination module, and a control module, and the specific functions of each module are as follows:

[0199] An acquisition module is used to acquire road condition images during the vehicle's driving process;

[0200] The model output module is used to input the road condition image into the pre-trained headlight recognition and positioning model, and use the headlight recognition and positioning model to output the headlight heat map, headlight vector map, and headlight offset map;

[0201] A determination module, configured to determine the positions of headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map;

[0202] The control module is used to control the lighting status of the vehicle according to the position of the lights.

[0203] In application, the terminal device 700 can be a computing device such as a vehicle controller, a body controller, a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device 700 can include but is not limited to a memory 701 and a processor 702. It will be understood by those skilled in the art that Figure 7 It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.; among them, the input and output devices may include cameras, audio acquisition / playback devices, display screens, etc.; the network access device may include a communication module for wireless communication with external devices.

[0204] In applications, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0205] In applications, memory can be an internal storage unit of a terminal device, such as a hard drive or memory; it can also be an external storage device, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, or a flash memory card. It can also include both internal and external storage units. Memory is used to store operating systems, applications, boot loaders, data, and other programs, such as computer program code. Memory can also be used to temporarily store data that has been output or is about to be output.

[0206] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0207] The present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0208] A computer-readable storage medium provided in an embodiment of the present application has the same beneficial effects as the above-mentioned vehicle lighting control method.

[0209] An embodiment of the present application further provides a computer program product, including a computer program, which can implement the steps in the above-mentioned method embodiments when executed by a processor.

[0210] A computer program product provided in an embodiment of the present application has the same beneficial effects as the above-mentioned vehicle lighting control method.

[0211] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0212] Those skilled in the art will appreciate that the devices and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0213] In the embodiments provided herein, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interface, or the devices may be indirectly coupled or communicated in some manner, whether electrical, mechanical, or other.

[0214] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A vehicle lighting control method, characterized in that: The method comprises: Acquire road condition images during the vehicle's driving process; Inputting the road condition image into a pre-trained headlight recognition and positioning model, and using the headlight recognition and positioning model to output a headlight heat map, a headlight vector map, and a headlight offset map; Determining positions of headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map; The lighting state of the vehicle is controlled according to the position of the vehicle lights.

2. The method according to claim 1, characterized in that The determining the positions of the headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map includes: Traversing each coordinate point in the headlight heat map, determining the coordinate points whose heat values ​​are greater than a confidence threshold as candidate points, and obtaining a candidate point set; Determining, from the vehicle light vector map, feature vectors corresponding to each of the candidate points in the candidate point set; Performing clustering processing on each of the feature vectors, and determining at least one headlight set based on the clustering result; wherein each headlight set includes at least one candidate point, and one headlight set corresponds to the headlights of the same surrounding vehicles; For each of the headlight sets, the offset values ​​corresponding to the candidate points in the headlight set are determined from the headlight offset map, and the candidate points are corrected using the corresponding offset values ​​to obtain the headlight position corresponding to at least one of the candidate points in the headlight set.

3. The method according to claim 2, characterized in that The controlling of the lighting state of the vehicle according to the position of the vehicle light includes: Determining the real-time vehicle position of the corresponding surrounding vehicles according to at least one of the vehicle light positions; Determine whether the surrounding vehicles are within a preset range based on the real-time vehicle position; If the surrounding vehicles are beyond the preset range, control the vehicle to turn on the high beam; If the surrounding vehicles are within the preset range, the vehicle is controlled to reduce the brightness of its lights.

4. The method according to claim 3, characterized in that The controlling the vehicle to reduce the light brightness includes: Switching the high beam of the vehicle to a low beam; Or, obtaining the relative angle between the vehicle and the surrounding vehicles; The brightness of the corresponding light beam in the high beam of the vehicle is adjusted according to the relative angle.

5. The method according to any one of claims 1 to 4, characterized in that The process of training the vehicle light recognition and positioning model includes: Acquire a training sample set; the training samples in the training sample set include sample image data of surrounding vehicles and sample output maps corresponding to the sample image data; the sample output maps include a sample headlight heat map, a sample headlight vector map, and a sample headlight offset map; Determine an initial deep neural network; the initial deep neural network includes an encoder, a spatial transformation module and a decoder; The initial deep neural network is trained using the training sample set, a loss function value is determined based on a predicted output graph output by the initial deep neural network and the sample output graph, and the model parameters in the initial deep neural network are updated and optimized using the loss function value until the training goal is achieved, thereby obtaining the headlight recognition and positioning model; the predicted output graph includes a predicted headlight thermal map, a predicted headlight vector map, and a predicted headlight offset map.

6. The method according to claim 5, characterized in that The decoder includes a BEV decoding module; the BEV decoding module includes multiple deconvolution layers, which is used to upsample the BEV features output by the encoder and output the predicted headlight heat map, the predicted headlight vector map and the predicted headlight offset map.

7. The method according to claim 6, characterized in that The decoder also includes a 2D decoding module, which is used to upsample the 2D features generated by the encoder and decode them to generate the predicted headlight heat map and the predicted headlight vector map on a 2D image plane.

8. The method according to claim 5, characterized in that The method includes: using the training sample set to train the initial deep neural network, determining a loss function value based on a predicted output graph and the sample output graph output by the initial deep neural network, and using the loss function value to update and optimize model parameters in the initial deep neural network until a training goal is achieved, thereby obtaining the vehicle light recognition and positioning model. Inputting the training sample set into the initial deep neural network; Determining a mean square error loss function value of the headlight heat map according to the predicted headlight heat map output by the initial deep neural network and the sample headlight heat map; Determining a clustering loss function value of the headlight vector image according to the predicted headlight vector image output by the initial deep neural network and the sample headlight vector image; Determining a mean square error loss function value of the headlight offset map based on the predicted headlight offset map output by the initial deep neural network and the sample headlight offset map; The model parameters in the initial deep neural network are updated and optimized using the mean square error loss function value of the headlight heat map, the clustering loss function value of the headlight vector map, and the mean square error loss function value of the headlight offset map respectively until the training target is achieved, thereby obtaining the headlight recognition and positioning model.

9. A vehicle lighting control device, characterized in that: The device comprises: An acquisition module is used to acquire road condition images during the vehicle's driving process; a model output module, configured to input the road condition image into a pre-trained headlight recognition and positioning model, and output a headlight heat map, a headlight vector map, and a headlight offset map using the headlight recognition and positioning model; a determination module, configured to determine positions of headlights of surrounding vehicles based on the headlight heat map, the headlight vector map, and the headlight offset map; A control module is used to control the lighting status of the vehicle according to the position of the vehicle lights.

10. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.