CN112699781A - Vehicle lamp state detection method and device, computer equipment and readable storage medium - Google Patents

Vehicle lamp state detection method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN112699781A
CN112699781A CN202011594588.XA CN202011594588A CN112699781A CN 112699781 A CN112699781 A CN 112699781A CN 202011594588 A CN202011594588 A CN 202011594588A CN 112699781 A CN112699781 A CN 112699781A
Authority
CN
China
Prior art keywords
lamp
vehicle
vehicle lamp
state
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011594588.XA
Other languages
Chinese (zh)
Inventor
申影影
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Eye Control Technology Co Ltd
Original Assignee
Shanghai Eye Control Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Eye Control Technology Co Ltd filed Critical Shanghai Eye Control Technology Co Ltd
Priority to CN202011594588.XA priority Critical patent/CN112699781A/en
Publication of CN112699781A publication Critical patent/CN112699781A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • G06V20/42Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items of sport video content
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to a vehicle lamp state detection method and device, a computer device and a readable storage medium. The method comprises the following steps: acquiring a lamp image corresponding to a target vehicle, and acquiring a lamp use state of the target vehicle according to the lamp image, wherein the lamp use state is used for representing the on-off state of a lamp on the opposite side of the target vehicle in the lamp image; detecting whether the using state of the car lights meets a preset condition, wherein the preset condition is related to at least one of similarity between car light features corresponding to each side car light in the car light image and on-off state of each side car light in the car light image; and if the using state of the car lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on. By adopting the method, the detection efficiency of the state of the vehicle lamp can be improved.

Description

Vehicle lamp state detection method and device, computer equipment and readable storage medium
Technical Field
The present application relates to the field of intelligent traffic technologies, and in particular, to a method and an apparatus for detecting a state of a vehicle lamp, a computer device, and a readable storage medium.
Background
With the continuous rising of the automobile holding capacity and frequent traffic accidents, the detection of the violation behaviors in the driving process of the automobile has great significance for reducing the occurrence of the traffic accidents. The illegal behaviors comprise behaviors of running red light, illegal guidance, pressing line, turning to turn off no turn light, illegal lane change, illegal parking, emergency lane occupation and the like of the vehicle.
At present, the detection of violation behaviors of vehicles by combining the artificial intelligence technology is becoming more and more common thanks to the rapid development of the artificial intelligence technology. For example, a plurality of frames of continuous frames in video data of a turning road section are identified based on computer vision technology, and the state of a lamp of a vehicle of the turning road section, such as whether a turn signal is turned on or not, is detected through the time sequence change of the plurality of frames of continuous frames.
However, the above method for detecting the state of the vehicle lamp has a large amount of data calculation in the detection process, occupies a large amount of computing resources, and has low efficiency in detecting the state of the vehicle lamp.
Disclosure of Invention
In view of the above, it is necessary to provide a vehicle lamp state detection method, a vehicle lamp state detection device, a computer device, and a readable storage medium, which can improve detection efficiency of a vehicle lamp state.
In a first aspect, an embodiment of the present application provides a vehicle lamp state detection method, where the method includes:
acquiring a lamp image corresponding to a target vehicle, and acquiring a lamp use state of the target vehicle according to the lamp image, wherein the lamp use state is used for representing the on-off state of a lamp on the opposite side of the target vehicle in the lamp image;
detecting whether the using state of the car lights meets a preset condition, wherein the preset condition is related to at least one of similarity between car light features corresponding to each side car light in the car light image and on-off state of each side car light in the car light image;
and if the using state of the car lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on.
In one embodiment, the obtaining of the lamp use state of the target vehicle according to the lamp image includes:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
respectively inputting the first vehicle lamp image and the second vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp and the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps.
In one embodiment, the obtaining of the lamp use state of the target vehicle according to the lamp image includes:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
inputting the first vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp;
determining whether the first vehicle lamp is in a lamp lighting state or not according to the using state of the first vehicle lamp;
and if the first vehicle lamp is in a lamp on state, inputting the second vehicle lamp image into the vehicle lamp on-off classification model to obtain the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use state of the vehicle lamp.
In one embodiment, the detecting whether the usage state of the vehicle lamp meets a preset condition includes:
determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the use state of the first vehicle lamp and the use state of the second vehicle lamp;
and if the first vehicle lamp is in a lamp on state and the second vehicle lamp is in a lamp off state, determining that the service state of the vehicle lamp meets the preset condition.
In one embodiment, after determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the use state of the first vehicle lamp and the use state of the second vehicle lamp, the method further includes:
if the first vehicle lamp and the second vehicle lamp are both in a lamp-on state, extracting a first vehicle lamp feature corresponding to the first vehicle lamp from the first vehicle lamp image by using a preset feature extraction layer of the vehicle lamp on-off classification model, and extracting a second vehicle lamp feature corresponding to the second vehicle lamp from the second vehicle lamp image;
detecting whether the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than a preset similarity threshold value or not;
and if the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than the preset similarity threshold, determining that the vehicle lamp use state meets the preset condition.
In one embodiment, the detecting whether the similarity between the first lamp feature and the second lamp feature is smaller than a preset similarity threshold includes:
calculating a characteristic distance between the first light characteristic and the second light characteristic;
detecting whether the characteristic distance is larger than a preset distance threshold value or not;
if the characteristic distance is larger than the preset distance threshold, determining that the similarity between the first vehicle lamp characteristic and the second vehicle lamp characteristic is smaller than the preset similarity threshold.
In one embodiment, the training process of the classification model for turning on and off the vehicle lamp includes:
the method comprises the steps of obtaining a plurality of sample car lamp images, wherein each sample car lamp image comprises a first sample car lamp image and a second sample car lamp image, the first sample car lamp image and the second sample car lamp image respectively comprise a corresponding car lamp use state label and a category relation label, and the category relation label is used for representing whether the first sample car lamp image and the second sample car lamp image correspond to the same car lamp or not;
and training an initial classification model according to the plurality of sample car light images to obtain the car light on-off classification model.
In a second aspect, an embodiment of the present application provides a vehicle lamp state detection device, where the device includes:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a car light image corresponding to a target vehicle and acquiring a car light use state of the target vehicle according to the car light image, and the car light use state is used for representing the on-off state of the opposite car light of the target vehicle in the car light image;
the detection module is used for detecting whether the using state of the car lamp meets a preset condition, wherein the preset condition is related to at least one of the similarity between the car lamp features corresponding to the car lamps on each side in the car lamp image and the on-off state of the car lamps on each side in the car lamp image;
and the determining module is used for determining that the steering lamp of the target vehicle is turned on if the using state of the vehicle lamp meets the preset condition.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method according to the first aspect as described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
acquiring a car light image corresponding to a target vehicle, and acquiring a car light use state of the target vehicle according to the car light image, wherein the car light use state is used for representing the on-off state of a car light opposite to the target vehicle in the car light image; detecting whether the using state of the car lamp meets a preset condition, wherein the preset condition is related to at least one of the similarity between the car lamp features corresponding to the side car lamps in the car lamp image and the on-off state of the side car lamps in the car lamp image; if the using state of the vehicle lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on; therefore, the using state of the car lamp of the target car is obtained according to the car lamp image, whether the using state of the car lamp meets the preset condition or not is detected, whether the steering lamp of the target car is turned on or not can be determined, whether the steering lamp of the car is turned on or not is detected without identifying multi-frame continuous frames in the video data, the processing amount of image data in the detection process of the car lamp state is reduced, the data calculation amount in the detection process of the car lamp state is reduced, excessive calculation resources are avoided being occupied, and the detection efficiency of the car lamp state is improved.
Drawings
FIG. 1 is a schematic flow chart of a method for detecting a state of a vehicle lamp according to an embodiment;
FIG. 2 is a schematic diagram of a partial refinement of step S100 in another embodiment;
FIG. 3 is a schematic diagram of a partial refinement of step S100 in another embodiment;
FIG. 4 is a diagram illustrating a detailed step of step S200 in another embodiment;
FIG. 5 is a diagram illustrating a detailed step of step S200 in another embodiment;
FIG. 6 is a diagram of a network structure of an initial classification model in another embodiment;
FIG. 7 is a diagram illustrating a detailed step of step S204 in another embodiment;
FIG. 8 is a block diagram showing the structure of a vehicular lamp state detecting device according to an embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method, the device, the computer equipment and the readable storage medium for detecting the state of the vehicle lamp aim to solve the technical problems that in the prior art, because multi-frame continuous frames in video data need to be identified, whether a steering lamp of a vehicle is turned on or not is detected through time sequence change of the multi-frame continuous frames, the data calculation amount in the detection process is large, the occupied calculation resources are large, and the detection efficiency of the state of the vehicle lamp is low. The technical solution of the present application will be specifically described below by way of examples with reference to the accompanying drawings. The following specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
It should be noted that, in the method for detecting a vehicle lamp state provided in the embodiment of the present application, an execution subject may be a vehicle lamp state detection device, the vehicle lamp state detection device may be implemented as part or all of a computer device in a 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. It can be understood that the car light state detection method provided by the following method embodiments can also be applied to a terminal, can also be applied to a system comprising the terminal and a server, and is implemented through interaction between the terminal and the server.
In one embodiment, as shown in fig. 1, there is provided a vehicle lamp state detection method including the steps of:
and S100, acquiring a lamp image corresponding to the target vehicle, and acquiring the lamp use state of the target vehicle according to the lamp image.
In the embodiment of the application, the car light image can be obtained by the computer device based on the monitoring image corresponding to the turning road section. As an embodiment, the computer device may obtain a single-frame monitoring image of the turning road section acquired by the image acquisition component, or the computer device may obtain a monitoring video of the turning road section acquired by the video acquisition component, and extract the single-frame image from the monitoring video to obtain the monitoring image.
The computer device may perform target detection on the monitored image by using a target detection algorithm, such as an ssd (single Shot multi box detector) algorithm or a yolo (young Only Look once) algorithm, to obtain a position frame coordinate of the vehicle in the monitored image, and intercept, by the computer device, the vehicle image corresponding to the position frame coordinate in the monitored image according to the position frame coordinate.
The computer equipment adopts a target detection algorithm to carry out target detection on a vehicle image corresponding to a target vehicle, determines the position of a vehicle lamp of the target vehicle in the vehicle image, and intercepts an image corresponding to the position of the vehicle lamp from the vehicle image to obtain the vehicle lamp image.
In one possible embodiment, the headlight image may include a pair of headlights of the target vehicle, and the pair of headlights 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 particularly limited herein.
The computer device obtains the car light use state of the target vehicle according to the car light image, and the car light use state can be obtained by inputting the car light image into a pre-trained car light on-off classification model, and the car light use state is used for representing the on-off state of the opposite car light of the target vehicle in the car light image.
Because the car light of vehicle is the combination that forms by brake light, indicator, fog lamp etc to car light style and form are various, consequently, training is almost impossible to realize to the model that the indicator lights go on and off, and this application embodiment can greatly reduced the degree of difficulty of model training through the categorised model that the car light goes on and off, thereby has reduced the implementation degree of difficulty of car light state detection method.
In a possible embodiment, the lamp use state may include that one side lamp is in a light-on state and the other side lamp is in a light-off state, or the lamp use state may include that both side lamps are in a light-on state, which is not limited herein.
And step S200, detecting whether the using state of the vehicle lamp meets a preset condition.
The computer device detects whether the usage state of the vehicle lights satisfies a preset condition, wherein the preset condition can be determined according to the characteristics of the corresponding vehicle light images when the steering lights of the target vehicle are turned on, and the preset condition is related to at least one of the similarity between the vehicle light characteristics corresponding to each side vehicle light in the vehicle light images and the on-off state of each side vehicle light in the vehicle light images.
In the driving process of the target vehicle, the turning lamp is turned on only when the lamp of the single side is on, and the computer device detects whether the using state of the lamp meets the preset condition, for example, whether the using state of the lamp is the lamp on state of the one side and the lamp of the other side is the lamp off state, or whether the using state of the lamp is the lamp on state of the two sides.
And step S300, if the using state of the vehicle lamp meets the preset condition, determining that the steering lamp of the target vehicle is turned on.
If the computer device detects that the using state of the vehicle lamps meets the preset condition, for example, if the using state of the vehicle lamps is detected to be that the vehicle lamps on one side are in a lamp on state and the vehicle lamps on the other side are in a lamp off state, the using state of the vehicle lamps is determined to meet the preset condition, and therefore the turn lamps of the target vehicle are determined to be turned on.
In another possible implementation manner, if it is detected that the using state of the vehicle lamps is that the vehicle lamps on both sides are in a lamp-on state, the computer device detects a similarity between the vehicle lamp feature corresponding to the vehicle lamp on one side and the vehicle lamp feature corresponding to the vehicle lamp on the other side in the vehicle lamp image, and the similarity can be realized by calculating a distance between the vehicle lamp features corresponding to the vehicle lamps on both sides; if the computer device detects that the similarity between the car light characteristics corresponding to the car lights on the two sides is larger, the car light on one side and the car light on the other side in the car light image are not of the same type, for example, one side may be a steering light and the other side may be a brake light, and the like, so that the steering light of the target vehicle is determined to be turned on.
As an implementation manner, in other embodiments, if the computer device detects that the lamp use state is that both lamps are off, it determines that the steering lamp of the target vehicle is not turned on.
According to the method, a lamp image corresponding to a target vehicle is obtained, and a lamp use state of the target vehicle is obtained according to the lamp image, wherein the lamp use state is used for representing the on-off state of a lamp opposite to the target vehicle in the lamp image; detecting whether the using state of the car lamp meets a preset condition, wherein the preset condition is related to at least one of the similarity between the car lamp features corresponding to the side car lamps in the car lamp image and the on-off state of the side car lamps in the car lamp image; if the using state of the vehicle lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on; therefore, the using state of the car lamp of the target car is obtained according to the car lamp image, whether the using state of the car lamp meets the preset condition or not is detected, whether the steering lamp of the target car is turned on or not can be determined, whether the steering lamp of the car is turned on or not is detected without identifying multi-frame continuous frames in video data, the processing amount of image frames in the detection process of the car lamp state is reduced, the data calculation amount in the detection process of the car lamp state is reduced, excessive calculation resources are avoided being occupied, and the detection efficiency of the car lamp state is improved.
In addition, in the conventional vehicle lamp state detection method, a time sequence model based on computer vision is difficult to train, and the actually trained model for detecting the time sequence change of multiple continuous frames is often poor in effect, so that the detection precision of the vehicle lamp state is low. In the embodiment of the application, the identification and detection of multi-frame continuous frames are not needed, the time sequence change information is searched, only the monitoring image of a single frame is needed to be processed, namely, the car light image of the single frame is detected, the detection of the car light image of multi-frame time sequence continuous is not needed, whether the steering lamp of the target vehicle is turned on or not can be determined, and therefore a model for detecting the time sequence change of the multi-frame continuous frames is not needed to be used, and therefore the accuracy of car light state detection can be improved.
In one embodiment, on the basis of the embodiment shown in fig. 1, the present embodiment relates to a process of how a computer device acquires a lamp use state of a target vehicle according to a lamp image.
In one possible embodiment, referring to fig. 2, the computer device may implement a process of acquiring a lamp use state of a target vehicle from a lamp image by performing steps S101 and S102 as shown in fig. 2:
step S101, a first vehicle lamp image corresponding to a first vehicle lamp and a second vehicle lamp image corresponding to a second vehicle lamp are obtained according to the vehicle lamp images.
In the embodiment of the present application, as an implementation manner, the opposite side lamps of the target vehicle may include a first lamp and a second lamp, and the opposite side lamps may be, for example, a pair of tail lamps of the target vehicle, and then the first lamp and the second lamp may be respectively a side tail lamp.
As an implementation manner, the computer device obtains a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images, may perform target detection on the vehicle lamp images by using a target detection algorithm, determine a position where the first vehicle lamp of the target vehicle is located and a position where the second vehicle lamp is located in the vehicle lamp images, and intercept an image corresponding to the position where the first vehicle lamp is located from the vehicle lamp images, to obtain the first vehicle lamp image, and intercept an image corresponding to the position where the second vehicle lamp is located from the vehicle lamp images, to obtain the second vehicle lamp image.
Step S102, inputting the first vehicle lamp image and the second vehicle lamp image into the vehicle lamp on-off classification model respectively to obtain the using state of the first vehicle lamp and the using state of the second vehicle lamp, and determining the using state of the first vehicle lamp and the using state of the second vehicle lamp as the using state of the vehicle lamps.
The computer equipment respectively inputs the first vehicle lamp image and the second vehicle lamp image into the vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp and the use state of the second vehicle lamp, wherein the use state of the first vehicle lamp is the on-lamp state or the off-lamp state if the first vehicle lamp, and the use state of the second vehicle lamp is the on-lamp state or the off-lamp state if the second vehicle lamp.
The computer device determines the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps, and the use states of the vehicle lamps can be that the first vehicle lamp is in a light-on state and the second vehicle lamp is in a light-off state, or the use states of the vehicle lamps can be that the first vehicle lamp and the second vehicle lamp are both in a light-on state.
In another possible embodiment, referring to fig. 3, the computer device may implement a process of acquiring a lamp use state of the target vehicle from the lamp image by performing step S101, step S103, step S104, and step S105 as shown in fig. 3:
step S101, a first vehicle lamp image corresponding to a first vehicle lamp and a second vehicle lamp image corresponding to a second vehicle lamp are obtained according to the vehicle lamp images.
In this embodiment, the opposite-side vehicle lights of the target vehicle include a first vehicle light and a second vehicle light, and the computer device obtains a first vehicle light image corresponding to the first vehicle light and a second vehicle light image corresponding to the second vehicle light according to the vehicle light images, which can be referred to in the above embodiments and is not repeated herein.
Step S103, inputting the first vehicle lamp image into the vehicle lamp on-off classification model to obtain the service state of the first vehicle lamp.
The computer equipment inputs the first vehicle lamp image into the vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp, and if the first vehicle lamp is in the on-state or the off-state, the use state of the first vehicle lamp is obtained.
And step S104, determining whether the first vehicle lamp is in a lamp-on state or not according to the using state of the first vehicle lamp.
In this embodiment, taking the application scenario of a left-turn scenario as an example, the computer device may capture a vehicle image of the target vehicle from the monitoring image corresponding to the left-turn road segment, and then capture a vehicle lamp image from the vehicle image, so as to obtain a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp, where the first vehicle lamp may be a left-side vehicle lamp, and the second vehicle lamp may be a right-side vehicle lamp. It is understood that if the application scene is a right turn scene, the first vehicle light may be a right side vehicle light and the second vehicle light may be a left side vehicle light.
In the driving process of the target vehicle, only when the lamp of the one side is on, the turn signal lamp is turned on, so that the computer device determines whether the first lamp is in the on state or not according to the use state of the first lamp, and if the first lamp is in the off state, the computer device does not need to detect the use state of the second lamp, and can directly determine that the turn signal lamp is not turned on by the target vehicle, and therefore the efficiency of detecting the lamp state can be further improved.
And step S105, if the first vehicle lamp is in the lamp on state, inputting the second vehicle lamp image into the vehicle lamp on-off classification model to obtain the using state of the second vehicle lamp, and determining the using state of the first vehicle lamp and the using state of the second vehicle lamp as the using state of the vehicle lamp.
If the computer device detects that the first vehicle lamp is in a lamp-on state, the computer device inputs the second vehicle lamp image into the vehicle lamp on-off classification model, thereby detecting whether the second vehicle lamp is in a lamp on state or a lamp off state, determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps, determining whether the steering lamp of the target vehicle is turned on by detecting whether the use states of the vehicle lamps meet preset conditions, therefore, whether the steering lamp of the vehicle is turned on or not is detected without identifying multi-frame continuous frames in the video data, whether the steering lamp of the target vehicle is turned on or not can be determined only based on a single-frame vehicle lamp image, the processing amount of the image frames in the vehicle lamp state detection process is reduced, therefore, the data calculation amount in the vehicle lamp state detection process is reduced, excessive calculation resources are avoided being occupied, and the vehicle lamp state detection efficiency is improved.
In this embodiment, according to an actual application scenario, the computer device first detects the vehicle lamp on the side matched with the application scenario, that is, the use state of the first vehicle lamp, and if the first vehicle lamp is in the off state, the computer device does not need to detect the vehicle lamp on the other side, that is, the use state of the second vehicle lamp, and then can directly determine that the target vehicle does not turn on the turn signal lamp, thereby improving the detection efficiency of the vehicle lamp state detection.
In one embodiment, on the basis of the embodiment shown in fig. 3, referring to fig. 4, the present embodiment relates to a process of how a computer device detects whether a usage state of a vehicle lamp satisfies a preset condition. As shown in fig. 4, step S200 may include step S201 and step S202:
step S201, determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the using state of the first vehicle lamp and the using state of the second vehicle lamp.
In this embodiment, in a possible implementation manner, the computer device obtains the use state of the first vehicle lamp and the use state of the second vehicle lamp through the vehicle lamp on/off classification model, which may be a classification result for the on/off state of the first vehicle lamp and a classification result for the on/off state of the second vehicle lamp.
For example, the classification result of the on-off state of the first lamp is "1", the computer device determines that the first lamp is in the on-state, the classification result of the on-off state of the second lamp is "0", and the computer device determines that the first lamp is in the off-state.
Step S202, if the first vehicle lamp is in a lamp-on state and the second vehicle lamp is in a lamp-off state, determining that the using state of the vehicle lamp meets a preset condition.
If the computer equipment determines that the on-off state of the first vehicle lamp is the on-state and the on-off state of the second vehicle lamp is the off-state according to the use state of the first vehicle lamp and the use state of the second vehicle lamp, and the target vehicle only turns on the turn signal lamp when the one-side vehicle lamp is turned, the use state of the vehicle lamps is determined to meet the preset condition.
On the basis of the above embodiment shown in fig. 4, referring to fig. 5, in another possible implementation manner of step S200, after step S201, step S200 further includes step S203, step S204, and step S205:
step S203, if the first vehicle lamp and the second vehicle lamp are both in a lamp-on state, a preset feature extraction layer of a vehicle lamp on-off classification model is adopted, first vehicle lamp features corresponding to the first vehicle lamp are extracted from the first vehicle lamp image, and second vehicle lamp features corresponding to the second vehicle lamp are extracted from the second vehicle lamp image.
In this application embodiment, if it is detected that the first car light and the second car light are both in a light-on state, the computer device extracts a first car light feature corresponding to the first car light from the first car light image by using a pre-set feature extraction layer of a pre-trained car light on/off classification model, and extracts a second car light feature corresponding to the second car light from the second car light image.
As an embodiment, the training process of the classification model for turning on and off the lights may include steps a1 and a 2:
step a1, a plurality of sample vehicle light images are acquired.
The computer device obtains a plurality of sample headlight images, each sample headlight image including a first sample headlight image and a second sample headlight image, and the first sample headlight image and the second sample headlight image included in each sample headlight image may be, for example, a pair of taillight images of the same vehicle.
The first sample vehicle lamp image and the second sample vehicle lamp image both comprise a vehicle lamp use state label and a category relation label which are manually marked and correspond to each other, and the category relation label is used for representing whether the first sample vehicle lamp image and the second sample vehicle lamp image correspond to the same type of vehicle lamp or not. For example, for a sample vehicle light image including a first sample vehicle light image including a light-on label or a light-off label and whether the first sample vehicle light image and a second sample vehicle light image correspond to labels of the same type of vehicle lights, and a second sample vehicle light image including a light-on label or a light-off label and whether the second sample vehicle light image and the first sample vehicle light image correspond to labels of the same type of vehicle lights, the first sample vehicle light image is a vehicle light image. The same type of vehicle lights are, for example, all turn lights or all brake lights, etc.
And step A2, training an initial classification model according to the multiple sample car light images to obtain a car light on-off classification model.
In the embodiment of the application, the initial classification model may be formed by adding an auxiliary loss (aux loss) layer on the basis of a deep learning network google net, where the aux loss may be a void convolutional layer or a deformable convolutional layer, so that the initial classification model is more favorable for learning the car light features from the sample car light images.
In one possible approach, a schematic of the network structure of the initial classification model may be as shown in fig. 6. As shown in fig. 6, the initial classification model is augmented by aux loss based on google lenet.
And inputting the plurality of sample car lamp images as 'input' into the initial classification model by the computer equipment, performing iterative training on the initial classification model, and obtaining a car lamp on-off classification model after training.
If the computer device detects that the first vehicle lamp and the second vehicle lamp are both in a lamp-on state, the first vehicle lamp image and the second vehicle lamp image are input into a vehicle lamp on-off classification model, a preset feature extraction layer (aux loss) is obtained, a first vehicle lamp feature corresponding to the first vehicle lamp is extracted from the first vehicle lamp image, and a second vehicle lamp feature corresponding to the second vehicle lamp is extracted from the second vehicle lamp image.
Step S204, detecting whether the similarity between the first vehicle light characteristic and the second vehicle light characteristic is smaller than a preset similarity threshold value.
The computer device detects the similarity between the first lamp feature and the second lamp feature, and may calculate a distance between the first lamp feature and the second lamp feature, for example, calculate an euclidean distance or a cosine distance.
In one possible implementation of step S204, referring to fig. 7, step S204 may include step S2041, step S2042, and step S2043:
step S2041, a characteristic distance between the first lamp characteristic and the second lamp characteristic is calculated.
Step S2042, detecting whether the characteristic distance is greater than a preset distance threshold.
Step S2043, if the characteristic distance is greater than the preset distance threshold, determining that the similarity between the first vehicle light characteristic and the second vehicle light characteristic is less than the preset similarity threshold.
The computer device calculates a characteristic distance, such as a cosine distance, between the first and second light characteristics and detects whether the characteristic distance is greater than a preset distance threshold.
If the characteristic distance is greater than the preset distance threshold, the difference between the first lamp characteristic and the second lamp characteristic is characterized to be large, namely the similarity between the first lamp characteristic and the second lamp characteristic is small.
In another possible implementation, if the characteristic distance is not greater than the preset distance threshold, it is determined that the similarity between the first lamp characteristic and the second lamp characteristic is not less than the preset similarity threshold.
In step S205, if the similarity between the first lamp characteristic and the second lamp characteristic is smaller than the preset similarity threshold, it is determined that the lamp usage status satisfies the preset condition.
In the driving process of the target vehicle, only when the lamp of the single side is turned on, the turn signal lamp is turned on, if the first lamp and the second lamp are both in the lamp turning state, and the similarity between the first lamp characteristic and the second lamp characteristic is smaller than a preset similarity threshold value, the similarity between the first lamp characteristic and the second lamp characteristic is small, the first lamp and the second lamp are not the same type of lamp, for example, the first lamp can be the turn signal lamp, the second lamp can be the brake lamp and the like, and therefore it is determined that the use state of the lamp meets the preset condition, namely, the turn signal lamp of the target vehicle is turned on.
In another possible implementation, if the first lamp and the second lamp are both in a lamp on state, and the similarity between the first lamp characteristic and the second lamp characteristic is not less than the preset similarity threshold, it is characterized that the similarity between the first lamp characteristic and the second lamp characteristic is greater, and the first lamp and the second lamp are the same type of lamp, for example, the first lamp and the second lamp are both steering lamps or both brake lamps, and the like, so as to determine that the use state of the lamps does not satisfy the preset condition, that is, the steering lamps of the target vehicle are not turned on.
As an implementation manner, the computer device may further obtain a real tag of whether the turn signal of the multiple frames of consecutive vehicle light images corresponding to the preset time period is turned on, and correspondingly compare the real tag of the multiple frames of consecutive vehicle light images with a prediction tag of whether the turn signal of the multiple frames of consecutive vehicle light images detected by the vehicle light state detection method is turned on, so as to obtain prediction accuracy. In the practical application process, through multiple verification, the prediction accuracy of the embodiment of the application can reach 96%, so that the accuracy of vehicle lamp state detection is greatly improved.
It should be understood that although the various steps in the flow charts of fig. 1-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-7 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 8, there is provided a vehicle lamp state detecting device including:
the first obtaining module 10 is configured to obtain a car light image corresponding to a target vehicle, and obtain a car light use state of the target vehicle according to the car light image, where the car light use state is used to represent a turning-on/off state of a car light opposite to the target vehicle in the car light image;
a detecting module 20, configured to detect whether the usage state of the vehicle lights meets a preset condition, where the preset condition is related to at least one of a similarity between vehicle light features corresponding to each side vehicle light in the vehicle light image and an on-off state of each side vehicle light in the vehicle light image;
and the determining module 30 is configured to determine that a turn signal of the target vehicle is turned on if the using state of the vehicle lamp meets the preset condition.
Optionally, the opposite-side lamps of the target vehicle include a first lamp and a second lamp, and the first obtaining module 10 includes:
the image acquisition unit is used for acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp image;
the first state obtaining unit is used for respectively inputting the first vehicle lamp image and the second vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp and the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps.
Optionally, the opposite-side lamps of the target vehicle include a first lamp and a second lamp, and the first obtaining module 10 includes:
the image acquisition unit is used for acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp image;
the input unit is used for inputting the first vehicle lamp image into a vehicle lamp on-off classification model to obtain the using state of the first vehicle lamp;
the first determining unit is used for determining whether the first vehicle lamp is in a lamp lighting state or not according to the using state of the first vehicle lamp;
and the second state acquisition unit is used for inputting the second vehicle lamp image into the vehicle lamp on-off classification model if the first vehicle lamp is in a lamp on state, obtaining the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps.
Optionally, the detection module 20 includes:
the second determining unit is used for determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the using state of the first vehicle lamp and the using state of the second vehicle lamp;
and the third determining unit is used for determining that the service state of the vehicle lamp meets the preset condition if the first vehicle lamp is in a lamp-on state and the second vehicle lamp is in a lamp-off state.
Optionally, the detection module 20 further includes:
the extraction unit is used for extracting a first vehicle lamp feature corresponding to the first vehicle lamp from the first vehicle lamp image and extracting a second vehicle lamp feature corresponding to the second vehicle lamp from the second vehicle lamp image by adopting a preset feature extraction layer of the vehicle lamp on-off classification model if the first vehicle lamp and the second vehicle lamp are both in a lamp on state;
the detection unit is used for detecting whether the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than a preset similarity threshold value or not;
a fourth determining unit, configured to determine that the usage state of the vehicle light meets the preset condition if the similarity between the first vehicle light feature and the second vehicle light feature is smaller than the preset similarity threshold.
Optionally, the detection unit is specifically configured to calculate a characteristic distance between the first lamp characteristic and the second lamp characteristic; detecting whether the characteristic distance is larger than a preset distance threshold value or not; if the characteristic distance is larger than the preset distance threshold, determining that the similarity between the first vehicle lamp characteristic and the second vehicle lamp characteristic is smaller than the preset similarity threshold.
Optionally, the apparatus further comprises:
the system comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring a plurality of sample car light images, each sample car light image comprises a first sample car light image and a second sample car light image, the first sample car light image and the second sample car light image respectively comprise a corresponding car light use state label and a category relation label, and the category relation label is used for representing whether the first sample car light image and the second sample car light image correspond to the same car light or not;
and the training module is used for training an initial classification model according to the plurality of sample car light images to obtain the car light on-off classification model.
For specific limitations of the vehicle lamp state detection device, reference may be made to the above limitations of the vehicle lamp state detection method, which are not described herein again. The various modules in the vehicle lamp state detection device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data of the vehicle lamp state detection method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a vehicle light state detection method.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a lamp image corresponding to a target vehicle, and acquiring a lamp use state of the target vehicle according to the lamp image, wherein the lamp use state is used for representing the on-off state of a lamp on the opposite side of the target vehicle in the lamp image;
detecting whether the using state of the car lights meets a preset condition, wherein the preset condition is related to at least one of similarity between car light features corresponding to each side car light in the car light image and on-off state of each side car light in the car light image;
and if the using state of the car lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on.
In one embodiment, the opposing vehicle lights of the target vehicle comprise a first vehicle light and a second vehicle light, the processor when executing the computer program further performs the steps of:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
respectively inputting the first vehicle lamp image and the second vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp and the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps.
In one embodiment, the opposing vehicle lights of the target vehicle comprise a first vehicle light and a second vehicle light, the processor when executing the computer program further performs the steps of:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
inputting the first vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp;
determining whether the first vehicle lamp is in a lamp lighting state or not according to the using state of the first vehicle lamp;
and if the first vehicle lamp is in a lamp on state, inputting the second vehicle lamp image into the vehicle lamp on-off classification model to obtain the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use state of the vehicle lamp.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the use state of the first vehicle lamp and the use state of the second vehicle lamp;
and if the first vehicle lamp is in a lamp on state and the second vehicle lamp is in a lamp off state, determining that the service state of the vehicle lamp meets the preset condition.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the first vehicle lamp and the second vehicle lamp are both in a lamp-on state, extracting a first vehicle lamp feature corresponding to the first vehicle lamp from the first vehicle lamp image by using a preset feature extraction layer of the vehicle lamp on-off classification model, and extracting a second vehicle lamp feature corresponding to the second vehicle lamp from the second vehicle lamp image;
detecting whether the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than a preset similarity threshold value or not;
and if the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than the preset similarity threshold, determining that the vehicle lamp use state meets the preset condition.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
calculating a characteristic distance between the first light characteristic and the second light characteristic;
detecting whether the characteristic distance is larger than a preset distance threshold value or not;
if the characteristic distance is larger than the preset distance threshold, determining that the similarity between the first vehicle lamp characteristic and the second vehicle lamp characteristic is smaller than the preset similarity threshold.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
the method comprises the steps of obtaining a plurality of sample car lamp images, wherein each sample car lamp image comprises a first sample car lamp image and a second sample car lamp image, the first sample car lamp image and the second sample car lamp image respectively comprise a corresponding car lamp use state label and a category relation label, and the category relation label is used for representing whether the first sample car lamp image and the second sample car lamp image correspond to the same car lamp or not;
and training an initial classification model according to the plurality of sample car light images to obtain the car light on-off classification model.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a lamp image corresponding to a target vehicle, and acquiring a lamp use state of the target vehicle according to the lamp image, wherein the lamp use state is used for representing the on-off state of a lamp on the opposite side of the target vehicle in the lamp image;
detecting whether the using state of the car lights meets a preset condition, wherein the preset condition is related to at least one of similarity between car light features corresponding to each side car light in the car light image and on-off state of each side car light in the car light image;
and if the using state of the car lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on.
In one embodiment, the opposing side lights of the target vehicle comprise a first light and a second light, the computer program when executed further implementing the steps of:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
respectively inputting the first vehicle lamp image and the second vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp and the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps.
In one embodiment, the opposing side lights of the target vehicle comprise a first light and a second light, the computer program when executed further implementing the steps of:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
inputting the first vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp;
determining whether the first vehicle lamp is in a lamp lighting state or not according to the using state of the first vehicle lamp;
and if the first vehicle lamp is in a lamp on state, inputting the second vehicle lamp image into the vehicle lamp on-off classification model to obtain the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use state of the vehicle lamp.
In one embodiment, the computer program when executed further performs the steps of:
determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the use state of the first vehicle lamp and the use state of the second vehicle lamp;
and if the first vehicle lamp is in a lamp on state and the second vehicle lamp is in a lamp off state, determining that the service state of the vehicle lamp meets the preset condition.
In one embodiment, the computer program when executed further performs the steps of:
if the first vehicle lamp and the second vehicle lamp are both in a lamp-on state, extracting a first vehicle lamp feature corresponding to the first vehicle lamp from the first vehicle lamp image by using a preset feature extraction layer of the vehicle lamp on-off classification model, and extracting a second vehicle lamp feature corresponding to the second vehicle lamp from the second vehicle lamp image;
detecting whether the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than a preset similarity threshold value or not;
and if the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than the preset similarity threshold, determining that the vehicle lamp use state meets the preset condition.
In one embodiment, the computer program when executed further performs the steps of:
calculating a characteristic distance between the first light characteristic and the second light characteristic;
detecting whether the characteristic distance is larger than a preset distance threshold value or not;
if the characteristic distance is larger than the preset distance threshold, determining that the similarity between the first vehicle lamp characteristic and the second vehicle lamp characteristic is smaller than the preset similarity threshold.
In one embodiment, the computer program when executed further performs the steps of:
the method comprises the steps of obtaining a plurality of sample car lamp images, wherein each sample car lamp image comprises a first sample car lamp image and a second sample car lamp image, the first sample car lamp image and the second sample car lamp image respectively comprise a corresponding car lamp use state label and a category relation label, and the category relation label is used for representing whether the first sample car lamp image and the second sample car lamp image correspond to the same car lamp or not;
and training an initial classification model according to the plurality of sample car light images to obtain the car light on-off classification model.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A vehicle lamp state detection method, characterized by comprising:
acquiring a lamp image corresponding to a target vehicle, and acquiring a lamp use state of the target vehicle according to the lamp image, wherein the lamp use state is used for representing the on-off state of a lamp on the opposite side of the target vehicle in the lamp image;
detecting whether the using state of the car lights meets a preset condition, wherein the preset condition is related to at least one of similarity between car light features corresponding to each side car light in the car light image and on-off state of each side car light in the car light image;
and if the using state of the car lamp meets the preset condition, determining that a steering lamp of the target vehicle is turned on.
2. The method of claim 1, wherein the opposing headlights of the target vehicle comprise a first headlight and a second headlight, and wherein obtaining the headlight usage status of the target vehicle from the headlight image comprises:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
respectively inputting the first vehicle lamp image and the second vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp and the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use states of the vehicle lamps.
3. The method of claim 1, wherein the opposing headlights of the target vehicle comprise a first headlight and a second headlight, and wherein obtaining the headlight usage status of the target vehicle from the headlight image comprises:
acquiring a first vehicle lamp image corresponding to the first vehicle lamp and a second vehicle lamp image corresponding to the second vehicle lamp according to the vehicle lamp images;
inputting the first vehicle lamp image into a vehicle lamp on-off classification model to obtain the use state of the first vehicle lamp;
determining whether the first vehicle lamp is in a lamp lighting state or not according to the using state of the first vehicle lamp;
and if the first vehicle lamp is in a lamp on state, inputting the second vehicle lamp image into the vehicle lamp on-off classification model to obtain the use state of the second vehicle lamp, and determining the use state of the first vehicle lamp and the use state of the second vehicle lamp as the use state of the vehicle lamp.
4. The method according to claim 2 or 3, wherein the detecting whether the use state of the vehicle lamp meets a preset condition comprises:
determining the on-off state of the first vehicle lamp and the on-off state of the second vehicle lamp according to the use state of the first vehicle lamp and the use state of the second vehicle lamp;
and if the first vehicle lamp is in a lamp on state and the second vehicle lamp is in a lamp off state, determining that the service state of the vehicle lamp meets the preset condition.
5. The method of claim 4, wherein after determining the on-off state of the first vehicle light and the on-off state of the second vehicle light based on the usage state of the first vehicle light and the usage state of the second vehicle light, further comprising:
if the first vehicle lamp and the second vehicle lamp are both in a lamp-on state, extracting a first vehicle lamp feature corresponding to the first vehicle lamp from the first vehicle lamp image by using a preset feature extraction layer of the vehicle lamp on-off classification model, and extracting a second vehicle lamp feature corresponding to the second vehicle lamp from the second vehicle lamp image;
detecting whether the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than a preset similarity threshold value or not;
and if the similarity between the first vehicle lamp feature and the second vehicle lamp feature is smaller than the preset similarity threshold, determining that the vehicle lamp use state meets the preset condition.
6. The method of claim 5, wherein the detecting whether the similarity between the first light feature and the second light feature is less than a preset similarity threshold comprises:
calculating a characteristic distance between the first light characteristic and the second light characteristic;
detecting whether the characteristic distance is larger than a preset distance threshold value or not;
if the characteristic distance is larger than the preset distance threshold, determining that the similarity between the first vehicle lamp characteristic and the second vehicle lamp characteristic is smaller than the preset similarity threshold.
7. The method of claim 5, wherein the training process of the classification model for turning on and off the vehicle light comprises:
the method comprises the steps of obtaining a plurality of sample car lamp images, wherein each sample car lamp image comprises a first sample car lamp image and a second sample car lamp image, the first sample car lamp image and the second sample car lamp image respectively comprise a corresponding car lamp use state label and a category relation label, and the category relation label is used for representing whether the first sample car lamp image and the second sample car lamp image correspond to the same car lamp or not;
and training an initial classification model according to the plurality of sample car light images to obtain the car light on-off classification model.
8. A vehicle lamp state detection device, characterized in that the device comprises:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a car light image corresponding to a target vehicle and acquiring a car light use state of the target vehicle according to the car light image, and the car light use state is used for representing the on-off state of the opposite car light of the target vehicle in the car light image;
the detection module is used for detecting whether the using state of the car lamp meets a preset condition, wherein the preset condition is related to at least one of the similarity between the car lamp features corresponding to the car lamps on each side in the car lamp image and the on-off state of the car lamps on each side in the car lamp image;
and the determining module is used for determining that the steering lamp of the target vehicle is turned on if the using state of the vehicle lamp meets the preset condition.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011594588.XA 2020-12-29 2020-12-29 Vehicle lamp state detection method and device, computer equipment and readable storage medium Pending CN112699781A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011594588.XA CN112699781A (en) 2020-12-29 2020-12-29 Vehicle lamp state detection method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011594588.XA CN112699781A (en) 2020-12-29 2020-12-29 Vehicle lamp state detection method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112699781A true CN112699781A (en) 2021-04-23

Family

ID=75511889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011594588.XA Pending CN112699781A (en) 2020-12-29 2020-12-29 Vehicle lamp state detection method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112699781A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113674329A (en) * 2021-08-13 2021-11-19 上海同温层智能科技有限公司 Vehicle driving behavior detection method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08241500A (en) * 1995-03-07 1996-09-17 Hitachi Ltd Front vehicle recognition device and alarm device on vehicle
CN106845453A (en) * 2017-02-24 2017-06-13 太原理工大学 Taillight detection and recognition methods based on image
CN106985819A (en) * 2017-03-31 2017-07-28 北京汽车集团有限公司 The determination methods and device of vehicle driving intention
CN108509907A (en) * 2018-03-30 2018-09-07 北京市商汤科技开发有限公司 Vehicle lamp detection method, method, apparatus, medium and the equipment for realizing intelligent driving
CN109308490A (en) * 2018-09-07 2019-02-05 北京字节跳动网络技术有限公司 Method and apparatus for generating information
CN110532990A (en) * 2019-09-04 2019-12-03 上海眼控科技股份有限公司 The recognition methods of turn signal use state, device, computer equipment and storage medium
CN111221342A (en) * 2020-03-12 2020-06-02 湖南汽车工程职业学院 Environment sensing system for automatic driving automobile
CN111383460A (en) * 2020-06-01 2020-07-07 浙江大华技术股份有限公司 Vehicle state discrimination method and device and computer storage medium
CN111931715A (en) * 2020-09-22 2020-11-13 深圳佑驾创新科技有限公司 Method and device for recognizing state of vehicle lamp, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08241500A (en) * 1995-03-07 1996-09-17 Hitachi Ltd Front vehicle recognition device and alarm device on vehicle
CN106845453A (en) * 2017-02-24 2017-06-13 太原理工大学 Taillight detection and recognition methods based on image
CN106985819A (en) * 2017-03-31 2017-07-28 北京汽车集团有限公司 The determination methods and device of vehicle driving intention
CN108509907A (en) * 2018-03-30 2018-09-07 北京市商汤科技开发有限公司 Vehicle lamp detection method, method, apparatus, medium and the equipment for realizing intelligent driving
CN109308490A (en) * 2018-09-07 2019-02-05 北京字节跳动网络技术有限公司 Method and apparatus for generating information
CN110532990A (en) * 2019-09-04 2019-12-03 上海眼控科技股份有限公司 The recognition methods of turn signal use state, device, computer equipment and storage medium
CN111221342A (en) * 2020-03-12 2020-06-02 湖南汽车工程职业学院 Environment sensing system for automatic driving automobile
CN111383460A (en) * 2020-06-01 2020-07-07 浙江大华技术股份有限公司 Vehicle state discrimination method and device and computer storage medium
CN111931715A (en) * 2020-09-22 2020-11-13 深圳佑驾创新科技有限公司 Method and device for recognizing state of vehicle lamp, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113674329A (en) * 2021-08-13 2021-11-19 上海同温层智能科技有限公司 Vehicle driving behavior detection method and system

Similar Documents

Publication Publication Date Title
US10642268B2 (en) Method and apparatus for generating automatic driving strategy
CN108334892B (en) Vehicle type identification method, device and equipment based on convolutional neural network
CN110163176B (en) Lane line change position identification method, device, equipment and medium
CN111199087B (en) Scene recognition method and device
CN111881739B (en) Automobile tail lamp state identification method
CN112001235A (en) Vehicle traffic information generation method and device and computer equipment
CN112785850A (en) Method and device for identifying vehicle lane change without lighting
CN114419552A (en) Illegal vehicle tracking method and system based on target detection
Jeon et al. A deep learning framework for robust and real-time taillight detection under various road conditions
CN112001269A (en) Vehicle identification method and device, computer equipment and storage medium
WO2023092982A1 (en) State detection method and apparatus, and computer device, storage medium and program product
CN114842432A (en) Automobile light control method and system based on deep learning
CN115546756A (en) Enhancing situational awareness within a vehicle
CN111724607A (en) Steering lamp use detection method and device, computer equipment and storage medium
CN111931715A (en) Method and device for recognizing state of vehicle lamp, computer equipment and storage medium
CN111967384A (en) Vehicle information processing method, device, equipment and computer readable storage medium
CN112699781A (en) Vehicle lamp state detection method and device, computer equipment and readable storage medium
CN116486472A (en) Group behavior identification method and system for monitoring video
CN113392812B (en) Road lane line detection method and system based on deep neural network
CN114495060A (en) Road traffic marking identification method and device
CN111310660A (en) Target detection false alarm suppression method and device for ADAS scene
CN114022848B (en) Control method and system for automatic illumination of tunnel
CN115273030A (en) Image detection method and device, computer equipment and storage medium
CN112926476B (en) Vehicle identification method, device and storage medium
CN115546744A (en) Lane detection using DBSCAN

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination