Vehicle light status detection method, device, computer equipment and readable storage medium

The vehicle light status detection method enhances efficiency and accuracy by using a headlight classification model to analyze a single frame, reducing data processing and computing resources while accurately identifying turn signal status.

CN112699781BActive Publication Date: 2024-12-17刘丽
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011594588.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2024-12-17
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

Existing vehicle light status detection methods require significant data calculation and computing resources due to the need to analyze multiple consecutive frames, leading to low efficiency and accuracy.

Method used

A method that utilizes a headlight on/off classification model to determine the status of vehicle lights by analyzing a single frame, characterizing the similarity between headlight features on each side of the vehicle and detecting whether the similarity meets a preset condition to identify if the turn signal is on.

Benefits of technology

Reduces data processing and computing resource usage while improving detection efficiency and accuracy by determining the turn signal status based on a single frame, without needing to analyze multiple consecutive frames.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112699781B_ABST
    Figure CN112699781B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and readable storage medium for detecting the status of vehicle lights. The method comprises: obtaining a vehicle light image corresponding to a target vehicle, and obtaining the vehicle light usage status of the target vehicle based on the vehicle light image, wherein the vehicle light usage status is used to characterize the on / off status of the opposite vehicle light of the target vehicle in the vehicle light image; detecting whether the vehicle light usage status meets a preset condition, wherein the preset condition is related to at least one of the similarity between the vehicle light features corresponding to the vehicle light on each side in the vehicle light image and the on / off status of the vehicle light on each side in the vehicle light image; if the vehicle light usage status meets the preset condition, determining that the turn signal of the target vehicle is turned on. The use of this method can improve the efficiency of detecting the vehicle light status.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a vehicle light status detection method, device, computer equipment and readable storage medium. Background Art

[0002] With the continuous increase in the number of cars, traffic accidents occur frequently. Detecting illegal behaviors during vehicle driving is of great significance to reducing the occurrence of traffic accidents. Illegal behaviors include running red lights, illegal guidance, crossing the line, turning without turning on the turn signal, illegal lane change, illegal parking, occupying the emergency lane, etc.

[0003] At present, thanks to the rapid development of artificial intelligence technology, it is becoming more and more common to detect vehicle violations by combining artificial intelligence technology. For example, based on computer vision technology, multiple consecutive frames in the video data of a turning section are identified, and the status of the vehicle lights on the turning section is detected through the time sequence changes of multiple consecutive frames, such as whether the turn signal is turned on.

[0004] However, the above-mentioned method for detecting the status of vehicle lights has a large amount of data calculation during the detection process, occupies a large amount of computing resources, and has a low efficiency in detecting the status of vehicle lights. Summary of the invention

[0005] Based on this, it is necessary to provide a vehicle light status detection method, device, computer equipment and readable storage medium that can improve the detection efficiency of the vehicle light status in order to solve the above technical problems.

[0006] In a first aspect, an embodiment of the present application provides a method for detecting a vehicle light status, the method comprising:

[0007] Acquire a headlight image corresponding to a target vehicle, and acquire a headlight usage status of the target vehicle based on the headlight image, wherein the headlight usage status is used to characterize the on / off status of the headlight on the opposite side of the target vehicle in the headlight image;

[0008] Detecting whether the use state of the vehicle lights meets a preset condition, wherein the preset condition is related to at least one of the similarity between vehicle light features corresponding to the vehicle lights on each side in the vehicle light image and the on / off state of the vehicle lights on each side in the vehicle light image;

[0009] If the vehicle light usage status meets the preset condition, it is determined that the turn signal of the target vehicle is turned on.

[0010] In one embodiment, the headlights on the opposite side of the target vehicle include a first headlight and a second headlight, and obtaining the headlight usage status of the target vehicle according to the headlight image includes:

[0011] Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0012] The first headlight image and the second headlight image are respectively input into a headlight on-off classification model to obtain a usage status of the first headlight and a usage status of the second headlight, and the usage status of the first headlight and the usage status of the second headlight are determined as the headlight usage status.

[0013] In one embodiment, the headlights on the opposite side of the target vehicle include a first headlight and a second headlight, and obtaining the headlight usage status of the target vehicle according to the headlight image includes:

[0014] Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0015] Inputting the first headlight image into a headlight on / off classification model to obtain a usage status of the first headlight;

[0016] determining whether the first headlight is in a light-on state according to the use state of the first headlight;

[0017] If the first headlight is in the on state, the second headlight image is input into the headlight on-off classification model to obtain the usage state of the second headlight, and the usage state of the first headlight and the usage state of the second headlight are determined as the headlight usage state.

[0018] In one embodiment, the detecting whether the use status of the vehicle light meets a preset condition includes:

[0019] Determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight;

[0020] If the first headlight is in the on state and the second headlight is in the off state, it is determined that the headlight usage state meets the preset condition.

[0021] In one embodiment, after determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight, the method further includes:

[0022] If both the first headlight and the second headlight are in the on state, a preset feature extraction layer of the headlight on-off classification model is used to extract a first headlight feature corresponding to the first headlight from the first headlight image, and a second headlight feature corresponding to the second headlight from the second headlight image;

[0023] Detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold;

[0024] If the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold, it is determined that the headlight usage status meets the preset condition.

[0025] In one embodiment, the detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold comprises:

[0026] Calculating a characteristic distance between the first headlight characteristic and the second headlight characteristic;

[0027] Detecting whether the characteristic distance is greater than a preset distance threshold;

[0028] If the characteristic distance is greater than the preset distance threshold, it is determined that the similarity between the first headlight characteristic and the second headlight characteristic is less than the preset similarity threshold.

[0029] In one embodiment, the training process of the vehicle light on / off classification model includes:

[0030] Acquire a plurality of sample vehicle light images, each of the sample vehicle light images comprising a first sample vehicle light image and a second sample vehicle light image, wherein the first sample vehicle light image and the second sample vehicle light image both comprise a corresponding vehicle light usage status label and a category relationship label, wherein the category relationship label is used to indicate whether the first sample vehicle light image and the second sample vehicle light image correspond to the same type of vehicle light;

[0031] An initial classification model is trained according to the plurality of sample vehicle light images to obtain the vehicle light on / off classification model.

[0032] In a second aspect, an embodiment of the present application provides a vehicle light state detection device, the device comprising:

[0033] A first acquisition module is used to acquire a headlight image corresponding to a target vehicle, and acquire a headlight usage status of the target vehicle according to the headlight image, wherein the headlight usage status is used to characterize a light-off status of the headlight on the opposite side of the target vehicle in the headlight image;

[0034] a detection module, used to detect whether the use state of the headlights meets a preset condition, wherein the preset condition is related to at least one of the similarity between headlight features corresponding to the headlights on each side in the headlight image and the on / off state of the headlights on each side in the headlight image;

[0035] The determination module is used to determine whether the turn signal of the target vehicle is turned on if the vehicle light usage status meets the preset condition.

[0036] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.

[0037] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method of the first aspect described above are implemented.

[0038] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0039] By acquiring a headlight image corresponding to a target vehicle, and based on the headlight image, acquiring the headlight usage status of the target vehicle, the headlight usage status is used to characterize the on and off status of the headlight on the opposite side of the target vehicle in the headlight image; detecting whether the headlight usage status meets a preset condition, the preset condition is related to at least one of the similarity between the headlight features corresponding to the headlights on each side in the headlight image and the on and off status of the headlights on each side in the headlight image; if the headlight usage status meets the preset condition, determining that the turn signal of the target vehicle is turned on; thus, acquiring the headlight usage status of the target vehicle based on the headlight image, and by detecting whether the headlight usage status meets the preset condition, determining whether the turn signal of the target vehicle is turned on, without having to identify multiple consecutive frames in the video data to detect whether the vehicle's turn signal is turned on, reducing the amount of image data processing in the headlight status detection process, thereby reducing the amount of data calculation in the headlight status detection process, avoiding occupying too many computing resources, and improving the detection efficiency of the headlight status. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a schematic diagram of a flow chart of a vehicle light status detection method in one embodiment;

[0041] Figure 2 It is a schematic diagram of some detailed steps of step S100 in another embodiment;

[0042] Figure 3 It is a schematic diagram of some detailed steps of step S100 in another embodiment;

[0043] Figure 4 is a schematic diagram of detailed steps of step S200 in another embodiment;

[0044] Figure 5 is a schematic diagram of detailed steps of step S200 in another embodiment;

[0045] Figure 6 A schematic diagram of a network structure of an initial classification model in another embodiment;

[0046] Figure 7 is a schematic diagram of detailed steps of step S204 in another embodiment;

[0047] Figure 8 is a structural block diagram of a vehicle light status detection device in one embodiment;

[0048] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] The vehicle light status detection method, device, computer equipment and readable storage medium provided in the embodiments of the present application are intended to solve the technical problems in the traditional technology that, due to the need to identify multiple consecutive frames in the video data, the timing changes of multiple consecutive frames are used to detect whether the vehicle's turn signal is on, resulting in a large amount of data calculation in the detection process, a large amount of computing resources occupied, and low efficiency in detecting the vehicle light status. The technical solution of the present application will be described in detail below through embodiments and in conjunction with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0051] It should be noted that the execution subject of the vehicle light status detection method provided in the embodiment of the present application may be a vehicle light status detection device, and the vehicle light status detection device may be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware, and the computer device may be a server. In the following method embodiments, the execution subject is a computer device as an example for explanation. It is understandable that the vehicle light status detection method provided in the following method embodiments may also be applied to a terminal, and may also be applied to a system including a terminal and a server, and may be implemented through the interaction between the terminal and the server.

[0052] In one embodiment, Figure 1 As shown, a method for detecting a vehicle light status is provided, comprising the following steps:

[0053] Step S100, obtaining a headlight image corresponding to a target vehicle, and obtaining a headlight usage status of the target vehicle according to the headlight image.

[0054] In the embodiment of the present application, the vehicle light image can be acquired by the computer device based on the monitoring image corresponding to the turning section. As an implementation mode, the computer device can acquire a single-frame monitoring image of the turning section acquired by the image acquisition component, or the computer device can acquire a monitoring video of the turning section acquired by the video acquisition component and extract a single-frame image from the monitoring video to obtain the monitoring image.

[0055] The computer device can use a target detection algorithm, such as the SSD (Single Shot MultiBox Detector) algorithm or the YOLO (You Only Look Once) algorithm, to perform target detection on the monitoring image and obtain the position frame coordinates of the vehicle in the monitoring image. The computer device captures the vehicle image corresponding to the position frame coordinates in the monitoring image based on the position frame coordinates. It can be understood that if the monitoring image includes multiple vehicles, multiple vehicle images are captured, and the target vehicle can be any one of the multiple vehicles.

[0056] The computer device uses a target detection algorithm to perform target detection on the vehicle image corresponding to the target vehicle, determines the position of the headlights of the target vehicle in the vehicle image, and captures the image corresponding to the position of the headlights from the vehicle image to obtain the headlight image.

[0057] In a possible implementation, the vehicle light image may include the opposite side vehicle lights of the target vehicle. The opposite side vehicle lights may be, for example, a pair of tail lights of the target vehicle or a pair of headlights of the target vehicle, which is not specifically limited herein.

[0058] The computer device obtains the headlight usage status of the target vehicle based on the headlight image, which can be done by inputting the headlight image into a pre-trained headlight on / off classification model to obtain the headlight usage status of the target vehicle, which is used to characterize the on / off status of the opposite headlight of the target vehicle in the headlight image.

[0059] Since the vehicle lights are a combination of brake lights, turn signals, fog lights, etc., and there are many types of light styles and shapes, it is almost impossible to train a model for the on and off of turn signals. The embodiment of the present application uses a light on and off classification model to greatly reduce the difficulty of model training, thereby reducing the difficulty of implementing the light status detection method.

[0060] In a possible implementation, the vehicle light usage status may include the vehicle lights on one side being on and the vehicle lights on the other side being off, or the vehicle light usage status may include the vehicle lights on both sides being off, or the vehicle light usage status may include the vehicle lights on both sides being on, and no specific limitation is made herein.

[0061] Step S200, detecting whether the vehicle light usage status meets a preset condition.

[0062] The computer device detects whether the usage status of the headlights meets a preset condition, which can be determined based on the characteristics of the headlight image corresponding to the turn signal of the target vehicle when it is turned on. The preset condition is related to at least one of the similarity between the headlight characteristics corresponding to the headlights on each side in the headlight image and the on and off status of the headlights on each side in the headlight image.

[0063] When the target vehicle is driving, the turn signal is turned on only when the lights on one side are on. The computer device detects whether the use status of the lights meets the preset conditions. For example, it can detect whether the use status of the lights is that the lights on one side are on and the lights on the other side are off, or it can detect whether the use status of the lights is that the lights on both sides are on.

[0064] Step S300: If the vehicle light usage status meets the preset condition, it is determined that the turn signal of the target vehicle is turned on.

[0065] If the computer device detects that the usage status of the vehicle lights meets the preset conditions, for example, if it detects that the usage status of the vehicle lights is that one side of the vehicle lights are on and the other side of the vehicle lights are off, it determines that the usage status of the vehicle lights meets the preset conditions, thereby determining that the turn signal of the target vehicle is on.

[0066] In another possible implementation, if the computer device detects that the headlight usage status is that both sides of the headlights are on, then the similarity between the headlight features corresponding to the headlights on one side and the headlight features corresponding to the headlights on the other side in the headlight image is detected, and the similarity can be achieved by calculating the distance between the headlight features corresponding to the headlights on both sides; if the computer device detects that the similarity between the headlight features corresponding to the headlights on both sides is large, then it is characterized that the headlights on one side and the headlights on the other side in the headlight image are not of the same type, for example, one side may be a turn signal and the other side may be a brake light, etc., thereby determining that the turn signal of the target vehicle is turned on.

[0067] As an implementation mode, in other embodiments, if the computer device detects that the vehicle lights on both sides are in the off state, it is determined that the turn signal of the target vehicle is not turned on.

[0068] This embodiment obtains a headlight image corresponding to the target vehicle, and obtains the headlight usage status of the target vehicle based on the headlight image, the headlight usage status being used to characterize the on and off status of the headlights on the opposite side of the target vehicle in the headlight image; detects whether the headlight usage status meets a preset condition, the preset condition is related to at least one of the similarity between the headlight features corresponding to the headlights on each side in the headlight image and the on and off status of the headlights on each side in the headlight image; if the headlight usage status meets the preset condition, it is determined that the turn signal of the target vehicle is turned on; thus, the headlight usage status of the target vehicle is obtained based on the headlight image, and by detecting whether the headlight usage status meets the preset condition, it can be determined whether the turn signal of the target vehicle is turned on, without having to identify multiple consecutive frames in the video data to detect whether the vehicle's turn signal is turned on, thereby reducing the amount of image frame processing in the headlight status detection process, thereby reducing the amount of data calculation in the headlight status detection process, avoiding occupying too many computing resources, and improving the detection efficiency of the headlight status.

[0069] In addition, in the traditional headlight state detection method, the time series model based on computer vision is difficult to train, and the actual trained model for detecting the time series changes of multiple consecutive frames often has poor results, resulting in low detection accuracy of the headlight state. In the embodiment of the present application, it is not necessary to identify and detect multiple consecutive frames to find the time series change information. It is only necessary to process the monitoring image of a single frame, that is, to detect the headlight image of a single frame, without detecting multiple time series continuous headlight images, to determine whether the turn signal of the target vehicle is turned on, so there is no need to use a model for detecting the time series changes of multiple consecutive frames, so the accuracy of the headlight state detection can be improved.

[0070] In one embodiment, in the above Figure 1 On the basis of the illustrated embodiment, this embodiment relates to a process of how a computer device acquires the headlight usage status of a target vehicle according to a headlight image.

[0071] In one possible implementation, see Figure 2 , the computer device can execute Figure 2 Steps S101 and S102 shown in the figure are used to realize the process of obtaining the headlight usage status of the target vehicle according to the headlight image:

[0072] Step S101: acquiring a first headlight image corresponding to a first headlight and a second headlight image corresponding to a second headlight according to the headlight image.

[0073] In an embodiment of the present application, as an implementation manner, the opposite side headlights of the target vehicle may include a first headlight and a second headlight. The opposite side headlights may be, for example, a pair of taillights of the target vehicle, and the first headlight and the second headlight may be the taillights of one side respectively.

[0074] As an implementation mode, a computer device obtains a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight based on the headlight image, and can use a target detection algorithm to perform target detection on the headlight image to determine the position of the first headlight and the position of the second headlight of the target vehicle in the headlight image, and intercepts an image corresponding to the position of the first headlight from the headlight image to obtain the first headlight image, and intercepts an image corresponding to the position of the second headlight from the headlight image to obtain the second headlight image.

[0075] Step S102, inputting the first headlight image and the second headlight image into the headlight on-off classification model respectively, obtaining the usage status of the first headlight and the usage status of the second headlight, and determining the usage status of the first headlight and the second headlight as the headlight usage status.

[0076] The computer device inputs the first headlight image and the second headlight image into the headlight on-off classification model respectively to obtain the usage status of the first headlight and the usage status of the second headlight, the usage status of the first headlight is such as the first headlight is in the on state or the off state, and the usage status of the second headlight is such as the second headlight is in the on state or the off state.

[0077] The computer device determines the usage status of the first headlight and the usage status of the second headlight as the headlight usage status, then the headlight usage status can be that the first headlight is in the on state and the second headlight is in the off state, or the headlight usage status can be that both the first headlight and the second headlight are in the off state, or the headlight usage status can be that both the first headlight and the second headlight are in the on state.

[0078] In another possible implementation, see Figure 3 , the computer device can execute Figure 3 Steps S101, S103, S104 and S105 shown in the figure implement the process of obtaining the headlight usage status of the target vehicle according to the headlight image:

[0079] Step S101: acquiring a first headlight image corresponding to a first headlight and a second headlight image corresponding to a second headlight according to the headlight image.

[0080] In the embodiment of the present application, the opposite side headlights of the target vehicle include a first headlight and a second headlight. The computer device obtains the first headlight image corresponding to the first headlight and the second headlight image corresponding to the second headlight based on the headlight image. Please refer to the above embodiment and will not repeat it here.

[0081] Step S103: input the first vehicle light image into a vehicle light on / off classification model to obtain the use status of the first vehicle light.

[0082] The computer device inputs the first headlight image into the headlight on-off classification model to obtain the use status of the first headlight, such as the first headlight being in the on state or the first headlight being in the off state.

[0083] Step S104: determining whether the first headlight is in a light-on state according to the use state of the first headlight.

[0084] In the embodiment of the present application, taking the application scenario of a left turn scenario as an example, the computer device can intercept the vehicle image of the target vehicle from the monitoring image corresponding to the left turn section, and then intercept the headlight image from the vehicle image, thereby obtaining a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight, the first headlight can be the left headlight, and the second headlight can be the right headlight. It can be understood that if the application scenario is a right turn scenario, the first headlight can be the right headlight, and the second headlight can be the left headlight.

[0085] When the target vehicle is driving, the turn signal is turned on only when one side of the headlight is on. Therefore, the computer device in the embodiment of the present application first determines whether the first headlight is in the on state according to the usage status of the first headlight. If the first headlight is in the off state, there is no need to detect the usage status of the second headlight, and it can be directly determined that the turn signal of the target vehicle is not turned on, thereby further improving the efficiency of the headlight status detection.

[0086] Step S105, if the first headlight is in the on state, the second headlight image is input into the headlight on-off classification model to obtain the use state of the second headlight, and the use state of the first headlight and the use state of the second headlight are determined as the headlight use state.

[0087] If the computer device detects that the first headlight is in the on state, the computer device will input the second headlight image into the headlight on-off classification model to detect whether the second headlight is in the on state or the off state, and determine the usage state of the first headlight and the usage state of the second headlight as the headlight usage state, and then determine whether the turn signal of the target vehicle is turned on by detecting whether the headlight usage state meets the preset conditions. Therefore, there is no need to identify multiple consecutive frames in the video data to detect whether the vehicle's turn signal is turned on. Whether the target vehicle turns on the turn signal can be determined based on only a single frame of the headlight image, thereby reducing the amount of image frame processing in the headlight state detection process, thereby reducing the amount of data calculation in the headlight state detection process, avoiding excessive computing resources, and improving the detection efficiency of the headlight state.

[0088] In this embodiment, according to the actual application scenario, the computer device first detects the headlight on the side that matches the application scenario, that is, the usage status of the first headlight. If the first headlight is off, the computer device does not need to detect the headlight on the other side, that is, there is no need to detect the usage status of the second headlight. It can be directly determined that the target vehicle has not turned on the turn signal, thereby improving the detection efficiency of the headlight status detection.

[0089] In one embodiment, in the above Figure 3 Based on the embodiment shown, see Figure 4 , this embodiment relates to a process of how a computer device detects whether the use status of a vehicle light meets a preset condition. Figure 4 As shown, step S200 may include step S201 and step S202:

[0090] Step S201, determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight.

[0091] In an embodiment of the present application, in a possible implementation manner, the computer device obtains the usage status of the first headlight and the usage status of the second headlight through a headlight on and off classification model, which may be a classification result of the on and off status of the first headlight and a classification result of the on and off status of the second headlight.

[0092] For example, if the classification result of the on / off state of the first headlight is "1", the computer device determines that the first headlight is in the on state, and if the classification result of the on / off state of the second headlight is "0", the computer device determines that the first headlight is in the off state.

[0093] Step S202: If the first headlight is in the on state and the second headlight is in the off state, it is determined that the headlight usage state meets the preset condition.

[0094] If the computer device determines, based on the usage status of the first headlight and the usage status of the second headlight, that the on / off status of the first headlight is the light-on state and the on / off status of the second headlight is the light-off state, since during the turning process of the target vehicle, only one side of the headlight is on to indicate that the turn signal is on, it is determined that the usage status of the headlights meets the preset conditions.

[0095] In the above Figure 4 Based on the embodiment shown, see Figure 5 In another possible implementation manner of step S200, after step S201, step S200 further includes step S203, step S204 and step S205:

[0096] Step S203, if the first headlight and the second headlight are both in the on state, a preset feature extraction layer of the headlight on-off classification model is used to extract a first headlight feature corresponding to the first headlight from the first headlight image, and to extract a second headlight feature corresponding to the second headlight from the second headlight image.

[0097] In an embodiment of the present application, if the computer device detects that the first headlight and the second headlight are both in the on state, the preset feature extraction layer of the pre-trained headlight on-off classification model is used to extract the first headlight feature corresponding to the first headlight from the first headlight image, and extract the second headlight feature corresponding to the second headlight from the second headlight image.

[0098] As an implementation method, the training process of the vehicle light on / off classification model may include step A1 and step A2:

[0099] Step A1, obtaining a plurality of sample vehicle headlight images.

[0100] The computer device acquires a plurality of sample vehicle light images, each of which includes a first sample vehicle light image and a second sample vehicle light image. The first sample vehicle light image and the second sample vehicle light image included in each sample vehicle light image may be, for example, a pair of taillight images of the same vehicle.

[0101] The first sample headlight image and the second sample headlight image both include manually annotated corresponding headlight usage status labels and category relationship labels, and the category relationship labels are used to characterize whether the first sample headlight image and the second sample headlight image correspond to the same type of headlight. For example, for a sample headlight image including a first sample headlight image and a second sample headlight image, the first sample headlight image includes a light on label or a light off label and labels indicating whether the first sample headlight image and the second sample headlight image correspond to the same type of headlight, and the second sample headlight image includes a light on label or a light off label and labels indicating whether the second sample headlight image and the first sample headlight image correspond to the same type of headlight. For example, the same type of headlights are both turn signals or both brake lights.

[0102] Step A2: training an initial classification model based on a plurality of sample vehicle headlight images to obtain a vehicle headlight on / off classification model.

[0103] In an embodiment of the present application, the initial classification model may be a deep learning network GoogLeNet with an auxiliary loss layer added, where the aux loss may be a hole convolution layer or a deformable convolution layer, thereby making it easier for the initial classification model to learn headlight features from sample headlight images.

[0104] In one possible approach, the network structure diagram of the initial classification model can be as follows Figure 6 As shown. Figure 6As shown in Figure 1, the initial classification model adds aux loss based on GoogLeNet.

[0105] The computer device inputs a plurality of sample headlight images as "input" into the initial classification model, iteratively trains the initial classification model, and obtains a headlight on / off classification model after the training.

[0106] If the computer device detects that the first headlight and the second headlight are both in the on state, the first headlight image and the second headlight image are input into the headlight on and off classification model to obtain a preset feature extraction layer (aux loss) to extract the first headlight feature corresponding to the first headlight from the first headlight image, and to extract the second headlight feature corresponding to the second headlight from the second headlight image.

[0107] Step S204: detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold.

[0108] The computer device detects the similarity between the first headlight feature and the second headlight feature, which may be to calculate the distance between the first headlight feature and the second headlight feature, such as calculating the Euclidean distance or the cosine distance.

[0109] In a possible implementation of step S204, see Figure 7 , step S204 may include step S2041, step S2042 and step S2043:

[0110] Step S2041, calculating a feature distance between the first headlight feature and the second headlight feature.

[0111] Step S2042, detecting whether the feature distance is greater than a preset distance threshold.

[0112] Step S2043: if the feature distance is greater than a preset distance threshold, it is determined that the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold.

[0113] The computer device calculates a characteristic distance between the first headlight characteristic and the second headlight characteristic, such as a cosine distance, and detects whether the characteristic distance is greater than a preset distance threshold.

[0114] If the characteristic distance is greater than the preset distance threshold, it indicates that the difference between the first headlight characteristic and the second headlight characteristic is large, that is, the similarity between the first headlight characteristic and the second headlight characteristic is small.

[0115] In another possible implementation, if the characteristic distance is not greater than a preset distance threshold, it indicates that the difference between the first headlight feature and the second headlight feature is small, that is, the similarity between the first headlight feature and the second headlight feature is relatively large, thereby determining that the similarity between the first headlight feature and the second headlight feature is not less than a preset similarity threshold.

[0116] Step S205: If the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold, it is determined that the headlight usage state meets a preset condition.

[0117] When the target vehicle is driving, the turn signal is turned on only when one side of the headlight is on. If the first headlight and the second headlight are both in the on state, and the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold, it means that the similarity between the first headlight feature and the second headlight feature is very small, and the first headlight and the second headlight are not the same type of headlights. For example, the first headlight may be the turn signal and the second headlight may be the brake light, etc. Therefore, it is determined that the headlight usage status meets the preset conditions, that is, the turn signal of the target vehicle is turned on.

[0118] In another possible implementation, if the first headlight and the second headlight are both in the on state, and the similarity between the first headlight feature and the second headlight feature is not less than a preset similarity threshold, then it is characterized that the similarity between the first headlight feature and the second headlight feature is large, and the first headlight and the second headlight are the same type of headlights, for example, the first headlight and the second headlight are both turn lights or both are brake lights, etc., thereby determining that the headlight usage status does not meet the preset conditions, that is, the turn lights of the target vehicle are not turned on.

[0119] As an implementation method, the computer device can also obtain the real label of whether the turn signal of the multiple frames of continuous headlight images corresponding to the preset time period is turned on, and compare the real label of the multiple frames of continuous headlight images with the predicted label of whether the turn signal of the multiple frames of continuous headlight images detected by the headlight state detection method is turned on, so as to obtain the prediction accuracy. In the actual application process, after multiple verifications, the prediction accuracy of the embodiment of the present application can reach 96%, thereby greatly improving the accuracy of the headlight state detection.

[0120] It should be understood that although Figure 1-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-7At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0121] In one embodiment, Figure 8 As shown, a vehicle light state detection device is provided, comprising:

[0122] The first acquisition module 10 is used to acquire a headlight image corresponding to a target vehicle, and acquire a headlight usage status of the target vehicle according to the headlight image, wherein the headlight usage status is used to characterize a light-off status of the headlight on the opposite side of the target vehicle in the headlight image;

[0123] A detection module 20, configured to detect whether the use state of the headlights satisfies a preset condition, wherein the preset condition is related to at least one of the similarity between headlight features corresponding to the headlights on each side in the headlight image and the on / off state of the headlights on each side in the headlight image;

[0124] The determination module 30 is used to determine whether the turn signal of the target vehicle is turned on if the vehicle light usage status meets the preset condition.

[0125] Optionally, the headlight on the opposite side of the target vehicle includes a first headlight and a second headlight, and the first acquisition module 10 includes:

[0126] an image acquisition unit, configured to acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0127] The first state acquisition unit is used to input the first headlight image and the second headlight image into the headlight on-off classification model respectively, obtain the usage state of the first headlight and the usage state of the second headlight, and determine the usage state of the first headlight and the usage state of the second headlight as the headlight usage state.

[0128] Optionally, the headlight on the opposite side of the target vehicle includes a first headlight and a second headlight, and the first acquisition module 10 includes:

[0129] an image acquisition unit, configured to acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0130] An input unit, used to input the first headlight image into a headlight on / off classification model to obtain a usage status of the first headlight;

[0131] a first determining unit, configured to determine whether the first headlight is in a light-on state according to a use state of the first headlight;

[0132] The second state acquisition unit is used to input the second headlight image into the headlight on-off classification model if the first headlight is in the on state, obtain the usage state of the second headlight, and determine the usage state of the first headlight and the usage state of the second headlight as the headlight usage state.

[0133] Optionally, the detection module 20 includes:

[0134] a second determining unit, configured to determine the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight;

[0135] The third determination unit is used to determine that the use state of the headlights meets the preset condition if the first headlight is in the on state and the second headlight is in the off state.

[0136] Optionally, the detection module 20 further includes:

[0137] an extraction unit, configured to extract, if both the first headlight and the second headlight are in a light-on state, a first headlight feature corresponding to the first headlight from the first headlight image, and to extract a second headlight feature corresponding to the second headlight from the second headlight image, using a preset feature extraction layer of the headlight on-off classification model;

[0138] a detection unit, configured to detect whether a similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold;

[0139] The fourth determination unit is configured to determine that the vehicle headlight usage status satisfies the preset condition if the similarity between the first vehicle headlight feature and the second vehicle headlight feature is less than the preset similarity threshold.

[0140] Optionally, the detection unit is specifically used to calculate the characteristic distance between the first headlight feature and the second headlight feature; detect whether the characteristic distance is greater than a preset distance threshold; if the characteristic distance is greater than the preset distance threshold, determine that the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold.

[0141] Optionally, the device further comprises:

[0142] a second acquisition module, configured to acquire a plurality of sample vehicle light images, each of which includes a first sample vehicle light image and a second sample vehicle light image, each of which includes a corresponding vehicle light usage status label and a category relationship label, wherein the category relationship label is used to indicate whether the first sample vehicle light image and the second sample vehicle light image correspond to the same type of vehicle light;

[0143] The training module is used to train an initial classification model according to the plurality of sample headlight images to obtain the headlight on / off classification model.

[0144] The specific definition of the vehicle light state detection device can be found in the definition of the vehicle light state detection method above, which will not be repeated here. Each module in the above vehicle light state detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0145] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of a vehicle light status detection method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a vehicle light status detection method is implemented.

[0146] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0147] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0148] Acquire a headlight image corresponding to a target vehicle, and acquire a headlight usage status of the target vehicle based on the headlight image, wherein the headlight usage status is used to characterize the on / off status of the headlight on the opposite side of the target vehicle in the headlight image;

[0149] Detecting whether the use state of the vehicle lights meets a preset condition, wherein the preset condition is related to at least one of the similarity between vehicle light features corresponding to the vehicle lights on each side in the vehicle light image and the on / off state of the vehicle lights on each side in the vehicle light image;

[0150] If the vehicle light usage status meets the preset condition, it is determined that the turn signal of the target vehicle is turned on.

[0151] In one embodiment, the headlights on the opposite side of the target vehicle include a first headlight and a second headlight, and the processor further implements the following steps when executing the computer program:

[0152] Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0153] The first headlight image and the second headlight image are respectively input into a headlight on-off classification model to obtain a usage status of the first headlight and a usage status of the second headlight, and the usage status of the first headlight and the usage status of the second headlight are determined as the headlight usage status.

[0154] In one embodiment, the headlights on the opposite side of the target vehicle include a first headlight and a second headlight, and the processor further implements the following steps when executing the computer program:

[0155] Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0156] Inputting the first headlight image into a headlight on / off classification model to obtain a usage status of the first headlight;

[0157] determining whether the first headlight is in a light-on state according to the use state of the first headlight;

[0158] If the first headlight is in the on state, the second headlight image is input into the headlight on-off classification model to obtain the usage state of the second headlight, and the usage state of the first headlight and the usage state of the second headlight are determined as the headlight usage state.

[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0160] Determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight;

[0161] If the first headlight is in the on state and the second headlight is in the off state, it is determined that the headlight usage state meets the preset condition.

[0162] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0163] If both the first headlight and the second headlight are in the on state, a preset feature extraction layer of the headlight on-off classification model is used to extract a first headlight feature corresponding to the first headlight from the first headlight image, and a second headlight feature corresponding to the second headlight from the second headlight image;

[0164] Detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold;

[0165] If the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold, it is determined that the headlight usage status meets the preset condition.

[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0167] Calculating a characteristic distance between the first headlight characteristic and the second headlight characteristic;

[0168] Detecting whether the characteristic distance is greater than a preset distance threshold;

[0169] If the characteristic distance is greater than the preset distance threshold, it is determined that the similarity between the first headlight characteristic and the second headlight characteristic is less than the preset similarity threshold.

[0170] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0171] Acquire a plurality of sample vehicle light images, each of the sample vehicle light images comprising a first sample vehicle light image and a second sample vehicle light image, wherein the first sample vehicle light image and the second sample vehicle light image both comprise a corresponding vehicle light usage status label and a category relationship label, wherein the category relationship label is used to indicate whether the first sample vehicle light image and the second sample vehicle light image correspond to the same type of vehicle light;

[0172] An initial classification model is trained according to the plurality of sample vehicle light images to obtain the vehicle light on / off classification model.

[0173] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0174] Acquire a headlight image corresponding to a target vehicle, and acquire a headlight usage status of the target vehicle based on the headlight image, wherein the headlight usage status is used to characterize the on / off status of the headlight on the opposite side of the target vehicle in the headlight image;

[0175] Detecting whether the use state of the vehicle lights meets a preset condition, wherein the preset condition is related to at least one of the similarity between vehicle light features corresponding to the vehicle lights on each side in the vehicle light image and the on / off state of the vehicle lights on each side in the vehicle light image;

[0176] If the vehicle light usage status meets the preset condition, it is determined that the turn signal of the target vehicle is turned on.

[0177] In one embodiment, the opposite side headlight of the target vehicle includes a first headlight and a second headlight, and when the computer program is executed, the following steps are also implemented:

[0178] Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0179] The first headlight image and the second headlight image are respectively input into a headlight on-off classification model to obtain a usage status of the first headlight and a usage status of the second headlight, and the usage status of the first headlight and the usage status of the second headlight are determined as the headlight usage status.

[0180] In one embodiment, the opposite side headlight of the target vehicle includes a first headlight and a second headlight, and when the computer program is executed, the following steps are also implemented:

[0181] Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image;

[0182] Inputting the first headlight image into a headlight on / off classification model to obtain a usage status of the first headlight;

[0183] determining whether the first headlight is in a light-on state according to the use state of the first headlight;

[0184] If the first headlight is in the on state, the second headlight image is input into the headlight on-off classification model to obtain the usage state of the second headlight, and the usage state of the first headlight and the usage state of the second headlight are determined as the headlight usage state.

[0185] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0186] Determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight;

[0187] If the first headlight is in the on state and the second headlight is in the off state, it is determined that the headlight usage state meets the preset condition.

[0188] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0189] If both the first headlight and the second headlight are in the on state, a preset feature extraction layer of the headlight on-off classification model is used to extract a first headlight feature corresponding to the first headlight from the first headlight image, and a second headlight feature corresponding to the second headlight from the second headlight image;

[0190] Detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold;

[0191] If the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold, it is determined that the headlight usage status meets the preset condition.

[0192] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0193] Calculating a characteristic distance between the first headlight characteristic and the second headlight characteristic;

[0194] Detecting whether the characteristic distance is greater than a preset distance threshold;

[0195] If the characteristic distance is greater than the preset distance threshold, it is determined that the similarity between the first headlight characteristic and the second headlight characteristic is less than the preset similarity threshold.

[0196] In one embodiment, when the computer program is executed, the following steps are also implemented:

[0197] Acquire a plurality of sample vehicle light images, each of the sample vehicle light images comprising a first sample vehicle light image and a second sample vehicle light image, wherein the first sample vehicle light image and the second sample vehicle light image both comprise a corresponding vehicle light usage status label and a category relationship label, wherein the category relationship label is used to indicate whether the first sample vehicle light image and the second sample vehicle light image correspond to the same type of vehicle light;

[0198] An initial classification model is trained according to the plurality of sample vehicle light images to obtain the vehicle light on / off classification model.

[0199] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0200] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0201] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A vehicle light status detection method, characterized in that: The method comprises: Acquire a headlight image corresponding to the target vehicle, and acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image; Inputting the first headlight image and the second headlight image into a headlight on-off classification model respectively, obtaining a usage state of the first headlight and a usage state of the second headlight, and determining the usage state of the first headlight and the usage state of the second headlight as the headlight usage state; or Acquire a first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight according to the headlight image; Inputting the first headlight image into a headlight on / off classification model to obtain a usage status of the first headlight; determining whether the first headlight is in a light-on state according to the use state of the first headlight; If the first headlight is in the on state, inputting the second headlight image into the headlight on-off classification model to obtain the use state of the second headlight, and determining the use state of the first headlight and the use state of the second headlight as the headlight use state; The vehicle light usage state is used to characterize the on / off state of the vehicle light on the opposite side of the target vehicle in the vehicle light image; the vehicle light on the opposite side of the target vehicle includes a first vehicle light and a second vehicle light; Determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight; After determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight, the method further includes: If both the first headlight and the second headlight are in the on state, a preset feature extraction layer of the headlight on-off classification model is used to extract a first headlight feature corresponding to the first headlight from the first headlight image, and a second headlight feature corresponding to the second headlight from the second headlight image; Detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold; If the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold, determining that the headlight usage state meets a preset condition; If the first headlight is in the on state and the second headlight is in the off state, it is determined that the headlight usage state meets the preset condition, and the preset condition is related to at least one of the similarity between the headlight features corresponding to the headlights on each side in the headlight image and the on and off state of the headlights on each side in the headlight image; If the vehicle light usage status meets the preset condition, it is determined that the turn signal of the target vehicle is turned on.

2. The method according to claim 1, characterized in that The detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold comprises: Calculating a characteristic distance between the first headlight characteristic and the second headlight characteristic; Detecting whether the characteristic distance is greater than a preset distance threshold; If the characteristic distance is greater than the preset distance threshold, it is determined that the similarity between the first headlight characteristic and the second headlight characteristic is less than the preset similarity threshold.

3. The method according to claim 2, characterized in that The training process of the vehicle light on / off classification model includes: Acquire a plurality of sample vehicle light images, each of the sample vehicle light images comprising a first sample vehicle light image and a second sample vehicle light image, wherein the first sample vehicle light image and the second sample vehicle light image both comprise a corresponding vehicle light usage status label and a category relationship label, wherein the category relationship label is used to indicate whether the first sample vehicle light image and the second sample vehicle light image correspond to the same type of vehicle light; An initial classification model is trained according to the plurality of sample vehicle light images to obtain the vehicle light on / off classification model.

4. The method according to claim 3, characterized in that: The initial classification model includes a deep learning network augmented with an auxiliary loss layer.

5. The method according to claim 4, characterized in that The auxiliary loss layer includes a hole convolution layer or a deformable convolution layer.

6. A vehicle light status detection device, characterized in that: The device comprises: A first acquisition module is used to acquire a headlight image corresponding to a target vehicle, and acquire a first headlight image corresponding to a first headlight and a second headlight image corresponding to a second headlight according to the headlight image; input the first headlight image and the second headlight image into a headlight on / off classification model respectively to obtain a usage state of the first headlight and a usage state of the second headlight, and determine the usage state of the first headlight and the usage state of the second headlight as the headlight usage state; or A first headlight image corresponding to the first headlight and a second headlight image corresponding to the second headlight are acquired according to the headlight image; the first headlight image is input into a headlight on-off classification model to obtain a usage status of the first headlight; according to the usage status of the first headlight, whether the first headlight is in a light-on state is determined; if the first headlight is in a light-on state, the second headlight image is input into the headlight on-off classification model to obtain a usage status of the second headlight, and the usage status of the first headlight and the usage status of the second headlight are determined as the headlight usage status; the headlight usage status is used to characterize the on-off state of the headlight on the opposite side of the target vehicle in the headlight image; the headlight on the opposite side of the target vehicle includes a first headlight and a second headlight; a detection module, for determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight; after determining the on / off state of the first headlight and the on / off state of the second headlight according to the use state of the first headlight and the use state of the second headlight, further comprising: if the first headlight and the second headlight are both in the on state, extracting the first headlight feature corresponding to the first headlight from the first headlight image, and extracting the second headlight feature corresponding to the second headlight from the second headlight image using the preset feature extraction layer of the headlight on / off classification model; detecting whether the similarity between the first headlight feature and the second headlight feature is less than a preset similarity threshold; if the first headlight is in the on state and the second headlight is in the off state, determining that the headlight use state meets a preset condition, and the preset condition is related to at least one of the similarity between the headlight features corresponding to the headlights on each side in the headlight image and the on / off state of the headlights on each side in the headlight image; The determination module is used to determine whether the turn signal of the target vehicle is turned on if the vehicle light usage status meets the preset condition.

7. The device according to claim 6, characterized in that The detection module is also used to calculate the characteristic distance between the first headlight feature and the second headlight feature; detect whether the characteristic distance is greater than a preset distance threshold; if the characteristic distance is greater than the preset distance threshold, determine that the similarity between the first headlight feature and the second headlight feature is less than the preset similarity threshold.

8. The device according to claim 6, characterized in that The device further comprises: a second acquisition module, configured to acquire a plurality of sample vehicle light images, each of which includes a first sample vehicle light image and a second sample vehicle light image, each of which includes a corresponding vehicle light usage status label and a category relationship label, wherein the category relationship label is used to indicate whether the first sample vehicle light image and the second sample vehicle light image correspond to the same type of vehicle light; The training module is used to train an initial classification model according to the plurality of sample headlight images to obtain the headlight on / off classification model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, 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 5 are implemented.