Traffic light flicker identification method and device, electronic equipment and storage medium
By using on-board cameras to collect multi-frame traffic light images in autonomous driving vehicles and inputting target detection models to identify the flickering state of traffic lights, the problem of difficulty in accurately identifying complex traffic light flickering situations in the prior art is solved, and the control accuracy of the vehicle in the intersection environment is improved.
Patent Information
- Application Number
- CN202311100256.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art is difficult to accurately identify the flickering state in complex traffic lights through a single-frame image detection algorithm, which affects the acceleration, deceleration and start-stop control of autonomous vehicles when passing through intersections.
By acquiring the multi-frame traffic light images collected by the on-board camera during the identification period, inputting them into the target detection model separately, multiple target detection results are obtained, and by comparing the detection results of continuous frames, the flickering state of the traffic light is identified.
It realizes accurate identification of the flickering state of traffic lights, improves the control accuracy of autonomous driving vehicles in complex intersection environments, and ensures that the vehicle can reasonably plan acceleration, deceleration and start-stop strategies.
Smart Images

Figure CN119540907A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of image processing, and in particular, to a method, device, electronic device, storage medium, and computer program product for identifying flashing traffic lights. Background Art
[0002] In the current autonomous driving industry, urban cruising needs to deal with the problem of following vehicles at intersections in complex intersection environments. Traffic lights are an important influencing factor of the intersection road environment. It is not only necessary to solve the type of traffic lights at this moment, but also to understand the passable status of the flashing state at this time, so as to facilitate the planning and control of the vehicle's acceleration, deceleration, or start and stop.
[0003] At present, traffic light detection methods mostly use single-frame images from cameras, and use neural network target detection methods to perform traffic light target frame position regression and traffic light recognition.
[0004] However, for complex traffic light situations (such as when the green light will flash in the last three seconds), the state of the traffic light cannot be given by a single-frame image detection algorithm, which will directly affect the acceleration, deceleration, or start and stop control strategies of the autonomous vehicle when crossing the intersection. Summary of the invention
[0005] In view of this, embodiments of the present application provide a traffic light flashing recognition method, device, electronic device, storage medium and computer program product to at least solve some of the above problems.
[0006] According to a first aspect of an embodiment of the present application, a method for identifying a traffic light flicker is provided, comprising: acquiring a plurality of frames of traffic light images captured by a vehicle-mounted camera within an identification period, wherein the traffic light images include images of traffic lights, respectively inputting the plurality of frames of traffic light images into a target detection model, obtaining a plurality of target detection results output by the target detection model, wherein the target detection results are used to indicate a state of a traffic light corresponding to the traffic light image, and identifying the flicker of the traffic light based on the plurality of target detection results.
[0007] According to a second aspect of an embodiment of the present application, a traffic light flickering recognition device is provided, comprising: an acquisition module, used to acquire multiple frames of traffic light images captured by a vehicle-mounted camera within a recognition period, wherein the traffic light images include images of traffic lights. A target detection module, used to input the multiple frames of traffic light images into a target detection model respectively, and obtain multiple target detection results output by the target detection model, wherein the target detection results are used to indicate the state of the traffic light corresponding to the traffic light image. A recognition module, used to recognize the flickering of the traffic light according to the multiple target detection results.
[0008] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the traffic light flashing recognition method described in the first aspect above.
[0009] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for identifying flashing traffic lights as described in the first aspect above is implemented.
[0010] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, which is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, enable at least one processor to perform the method described in the first aspect above.
[0011] According to the above technical solution, the vehicle obtains multiple frames of traffic light images collected by the on-board camera during the recognition period, inputs the multiple frames of traffic light images into the target detection model respectively, and obtains multiple target detection results output by the target detection model. The multiple target detection results can reflect the state changes of the traffic lights over a period of time, and then the flashing of the traffic lights can be recognized. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 is a flow chart of traffic light flashing recognition provided by an embodiment of the present application;
[0014] Figure 2 is a schematic diagram of traffic light image preprocessing provided by an embodiment of the present application;
[0015] Figure 3 is a schematic diagram of a traffic light flashing recognition device provided by an embodiment of the present application;
[0016] Figure 4 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0017] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, and flows are not described in detail. In addition, the drawings are not necessarily drawn to scale.
[0018] Traffic light flashing method
[0019] The present application provides a method for identifying a traffic light flashing. The method for identifying a traffic light flashing is described in detail below through multiple embodiments.
[0020] Figure 1 FIG. 1 is a flow chart of a method for identifying traffic light flashing according to an embodiment of the present application. Figure 1 As shown, the traffic light flashing recognition method includes the following steps:
[0021] Step S102: acquiring multiple frames of traffic light images captured by the vehicle-mounted camera within a recognition period.
[0022] A car camera is a device installed inside or outside a car to record images and videos while the vehicle is driving. The car camera uses a built-in camera or lens to capture real-time images in front of the vehicle.
[0023] When the vehicle is about to pass through a traffic light intersection, the vehicle obtains a plurality of frames of traffic light images continuously captured by the on-board camera within a recognition cycle, where the traffic light images include images of the traffic lights.
[0024] Step S104: inputting multiple frames of traffic light images into the target detection model respectively to obtain multiple target detection results output by the target detection model.
[0025] The target detection model is used to identify the state of traffic lights. Specifically, the target detection model can adopt a two-stage deep learning model such as Faster R-CNN or YOLO, and this application does not impose any restrictions on this.
[0026] When using the target detection model for traffic light image detection, the target detection model creates the current frame detection frame information, predicts the current frame traffic light image through the Kalman filter, calculates the intersection and union ratio of the detection frame and the prediction frame in the current traffic light image, stores the ratio in the intersection and union two-dimensional result matrix, uses the Hungarian algorithm to match the coordinates of the detection frame with the largest intersection and union ratio, sorts and matches the current frame detection frame and prediction frame, saves all the same detection frames as the same ID, updates the matched detection frame information through the Kalman filter, appends the unmatched detection frame to the Kalman tracker, and saves the updated Kalman state matrix for output.
[0027] Before inputting multiple frames of traffic light images into the target detection model, the traffic light images can also be preprocessed. Figure 2 As shown, the traffic light image 200 can be cropped along the cropping dashed line 204 in the figure according to the fixed distance between the traffic light 202 and the ground, and the traffic light 202 and the image near it in the traffic light image 200 are retained to reduce computing power.
[0028] The target detection result is used to indicate the state of the traffic light in the corresponding traffic light image. For example, if the target detection result is a green light, it means that the traffic light is in a green light lighting state.
[0029] Step S106: According to the multiple target detection results, the traffic light flashing is recognized.
[0030] In view of the complex situation of flashing traffic lights, a single-frame traffic light image cannot determine whether the traffic light is flashing. By comparing the multiple target detection results of multiple consecutive frames of traffic light images, if it is detected that the state of the traffic light alternates between the lit state and the extinguished state of the same color, it indicates that the traffic light is flashing.
[0031] In an embodiment of the present application, a vehicle obtains multiple frames of traffic light images collected by an on-board camera within a recognition period, and inputs the multiple frames of traffic light images into a target detection model respectively to obtain multiple target detection results output by the target detection model. The multiple target detection results can reflect the state changes of the traffic light over a period of time, and thus the flashing of the traffic light can be identified.
[0032] In one possible implementation, the length of the identification cycle is greater than the maximum state holding time, wherein if the lighting duration of the traffic light in one flashing cycle is greater than or equal to the off duration, the maximum state holding time is equal to the lighting duration; if the lighting duration of the traffic light in one flashing cycle is less than the off duration, the maximum state holding time is equal to the off duration.
[0033] The length of the recognition cycle is greater than the maximum state holding time, so as to ensure that the target detection results of the multi-frame traffic light images collected within the recognition cycle can cover two traffic light states. For example, the multi-frame target detection results within the recognition cycle include the green light on state and the light off state.
[0034] A traffic light has two states in one flashing cycle, one on and one off. If the duration of the light on in one flashing cycle of the traffic light is greater than or equal to the duration of the off, the maximum state holding time is equal to the duration of the light on. For example, if the duration of the light on in one flashing cycle of the traffic light is 0.7s and the duration of the off is 0.3s, the maximum state holding time is equal to 0.7s, and the length of the identification cycle is set to be greater than 0.4s. If the duration of the light on in one flashing cycle of the traffic light is less than the duration of the off, the maximum state holding time is equal to the duration of the off. For example, if the duration of the light on in one flashing cycle of the traffic light is 0.4 and the duration of the off is 0.6, the maximum state holding time is equal to 0.6s, and the length of the identification cycle is set to be greater than 0.6s.
[0035] In an embodiment of the present application, by limiting the length of the recognition cycle to be greater than the maximum state maintenance time in a flashing cycle of a traffic light, it is ensured that multiple target detection results within the recognition cycle can cover the states of two traffic lights, so that the flashing of the traffic light can be identified.
[0036] In one possible implementation, the traffic light flickering is identified based on the multiple target detection results, including: for three frames of traffic light images that are captured adjacently in time sequence in the multiple frames of traffic light images, determining the status of the traffic light in the three frames of traffic light images based on the multiple target detection results; if the status of the traffic light in the first and third frames of the three frames of traffic light images is the same, and the status of the traffic light in the second frame of the traffic light image is different from that in the first frame of the traffic light image, then correcting the target detection result corresponding to the second frame of the traffic light image so that the target detection result corresponding to the second frame of the traffic light image after correction indicates the same traffic light status as the target detection result corresponding to the first frame of the traffic light image; and identifying the traffic light flickering based on the multiple corrected target detection results.
[0037] When the target detection model detects traffic light images, false detection may occur, such as identifying a green light as a yellow light. In order to improve the accuracy of model detection, three frames of traffic light images collected adjacently in time sequence are selected as a group. If the status of the traffic light in the first and third frames of traffic light images is the same, and the status of the traffic light in the second frame of traffic light image is different from that in the first frame of traffic light image, then the target detection result corresponding to the second frame of traffic light image is corrected. For example, the status of the traffic light in the first and third frames of traffic light images is both green, and the recognition result of the second frame of traffic light image is off. Then, the detection of the second frame of traffic light image is considered to be a false detection, and the target detection result corresponding to the second frame of traffic light image is corrected to green, and then the traffic light flashing is identified based on the corrected multiple target detection results.
[0038] In an embodiment of the present application, three frames of traffic light images that are collected adjacently in time sequence are selected as a group. If the states of the traffic lights in the first and third frames of traffic light images are the same, and the states of the traffic lights in the second frame of traffic light images are different from those in the first frame of traffic light images, the target detection result corresponding to the second frame of traffic light image is corrected, and the traffic light flickering is identified based on the corrected multiple target detection results. Then, the target detection result is corrected by using three frames of traffic light images as a group, thereby improving the accuracy of the target detection model in identifying the flickering of traffic lights.
[0039] In one possible implementation, if it is determined based on the revised multiple target detection results that the state change of the traffic light meets the requirements of converting from a first color lighting state to an off state and then from an off state to a first color lighting state, then the traffic light is determined to be flashing; if it is determined based on the revised multiple target detection results that the state change of the traffic light meets the requirements of converting from an off state to a first color lighting state and then from a first color lighting state to an off state, then the traffic light is determined to be flashing.
[0040] The flashing state of a traffic light is that the green light is on and off alternately. Therefore, as long as the multiple target detection results meet the conditions that the first color is on and then is off, then is converted to the first color. The traffic light is determined to be flashing; or the traffic light is determined to be flashing after the off state is converted to the first color. For example, if the multiple target detection results meet the conditions that the green light is on and then is off, then is converted to the green light. The traffic light is determined to be flashing.
[0041] In the embodiment of the present application, the traffic light flashing is determined based on the fact that the corrected multiple target detection results conform to the alternation of two states, thereby improving the accuracy of traffic light flashing recognition.
[0042] In one possible implementation, if it is determined based on the corrected multiple target detection results that the traffic light has changed from an off state to a first color lit state or from a first color lit state to an off state, then based on the state of the traffic light determined in the previous identification cycle, if the previous identification cycle determined that the traffic light is in the first color lit state, or there is a transition between the first color lit state and the off state, then it is determined that the traffic light is flashing.
[0043] When performing traffic light image detection in an identification cycle, there may be a situation where only the off state is converted to the on state or only the on state is converted to the off state. At this time, in order to accurately determine whether the traffic light is flashing, it is necessary to combine the traffic light state determined in the previous identification cycle. For example, if the traffic light is determined to be converted from the off state to the green light state based on the corrected multiple target detection results, it is necessary to combine the traffic light state determined in the previous identification cycle. If the traffic light state determined in the previous identification cycle is the green light state or there is a conversion between the green light state and the off state, it is determined that the traffic light is flashing.
[0044] In an embodiment of the present application, if multiple target detection results in the current recognition cycle cannot accurately determine whether the traffic light is flashing, the traffic light state determined in the previous recognition cycle is combined to determine whether the traffic light is flashing, thereby improving the accuracy of traffic light flashing recognition.
[0045] In one possible implementation, if it is determined that the traffic light is flashing, the distance between the vehicle where the vehicle camera is located and the traffic light is determined based on the vehicle camera parameters, the size of the traffic light in the traffic light image, and the actual size of the traffic light; and the vehicle is controlled by driving planning based on the distance between the vehicle and the traffic light.
[0046] When it is determined that the traffic light is flashing, the distance can be calculated using the principle of pinhole imaging and the principle of triangle similarity. For example, the actual height of the traffic light is H, the height of the traffic light in the traffic light image is h, the distance between the vehicle where the onboard camera is located and the traffic light is D, and the distance between the onboard camera and the pinhole is d. Then the distance between the vehicle where the onboard camera is located and the traffic light can be calculated using the following formula: D = (h / H)*d.
[0047] According to the distance between the vehicle where the on-board camera is located and the traffic light, the vehicle's driving planning control includes acceleration, deceleration, and straight driving. For example, when the traffic light is flashing green, it means that the traffic light is about to turn yellow. If the distance between the vehicle and the traffic light is far at this time, the vehicle needs to be controlled to slow down.
[0048] In an embodiment of the present application, when it is determined that a traffic light is flashing, the distance between the vehicle where the vehicle camera is located and the traffic light is determined based on the vehicle camera parameters, the size of the traffic light in the traffic light image, and the actual size of the traffic light. Based on the distance between the vehicle and the traffic light, the vehicle is controlled through driving planning to improve the efficiency of coordinated control of vehicle and traffic light information.
[0049] Traffic light flashing recognition device
[0050] Figure 3 is a schematic diagram of a traffic light flashing recognition device provided by an embodiment of the present application, such as Figure 3 As shown, the traffic light flashing recognition device 300 may include: an acquisition module 302 , a target detection module 304 and a recognition module 306 .
[0051] The acquisition module 302 is used to acquire multiple frames of traffic light images collected by the vehicle-mounted camera within a recognition period.
[0052] A car camera is a device installed inside or outside a car to record images and videos while the vehicle is driving. The car camera uses a built-in camera or lens to capture real-time images in front of the vehicle.
[0053] When the vehicle is about to pass through the traffic light intersection, the vehicle obtains multiple frames of traffic light images continuously captured by the vehicle-mounted camera within the recognition cycle through the acquisition module 302, and the traffic light images include images of traffic lights.
[0054] The target detection module 304 is used to input the multiple frames of traffic light images into the target detection model respectively to obtain multiple target detection results output by the target detection model.
[0055] The target detection model is used to identify the state of traffic lights. Specifically, the target detection model can adopt a two-stage deep learning model such as Faster R-CNN or YOLO, and this application does not impose any restrictions on this.
[0056] When performing traffic light image detection through the target detection module 304, the target detection module 304 creates the current frame detection frame information, predicts the current frame traffic light image through the Kalman filter, calculates the intersection and union ratio of the detection frame and the prediction frame in the current traffic light image, stores the ratio in the intersection and union two-dimensional result matrix, uses the Hungarian algorithm to match the coordinates of the detection frame with the largest intersection and union ratio, sorts and matches the current frame detection frame and the prediction frame, saves all the same detection frames as the same ID, updates the matched detection frame information through the Kalman filter, appends the unmatched detection frame to the Kalman tracker, and saves the updated Kalman state matrix for output.
[0057] Before inputting the multiple frames of traffic light images into the target detection model, the target detection module 406 may also pre-process the traffic light images, such as Figure 2 As shown, the traffic light image 200 can be cropped along the cropping dashed line 204 in the figure according to the fixed distance between the traffic light 202 and the ground, and the traffic light 202 and the image near it in the traffic light image 200 are retained to reduce computing power.
[0058] The target detection result is used to indicate the state of the traffic light in the corresponding traffic light image. For example, if the target detection result is a green light, it means that the traffic light is in a green light lighting state.
[0059] The recognition module 306 is used to perform flashing recognition on the traffic light according to the multiple target detection results.
[0060] In view of the complex situation of flickering traffic lights, a single frame of traffic light image cannot determine whether the traffic light is flickering. The recognition module 306 compares multiple target detection results of multiple consecutive frames of traffic light images. If it is detected that the state of the traffic light alternates between the lighting state and the extinguishing state of the same color, it indicates that the traffic light is flickering.
[0061] In the embodiment of the present application, the vehicle obtains multiple frames of traffic light images collected by the vehicle-mounted camera within the recognition period through the acquisition module 302, the target detection module 304 performs target detection on the multiple frames of traffic light images, and obtains multiple target detection results output by the target detection module 304. The recognition module 306 performs flickering recognition on the traffic light based on the multiple target detection results, and determines whether the traffic light is flickering by using the target detection results of the multiple frames of traffic light images within the recognition period, thereby improving the accuracy of traffic light flickering recognition.
[0062] In an embodiment of the present application, the vehicle obtains multiple frames of traffic light images collected by the vehicle-mounted camera within the identification period through the acquisition module 302, and the target detection module 304 performs target detection on the multiple frames of traffic light images to obtain multiple target detection results output by the target detection module 304. The multiple target detection results can reflect the state changes of the traffic light within a period of time, and thus the flashing of the traffic light can be identified.
[0063] Electronic devices
[0064] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device. Figure 4 As shown, the electronic device 400 may include: a processor 402, a communications interface 404, a memory 406, and a communication bus 408. Among them:
[0065] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0066] The communication interface 404 is used to communicate with other electronic devices or servers.
[0067] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in any of the aforementioned traffic light flashing recognition method embodiments.
[0068] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0069] The processor 402 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0070] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0071] The program 410 may be specifically used to enable the processor 402 to execute the traffic light flashing recognition method in any of the aforementioned embodiments.
[0072] The specific implementation of each step in program 410 can refer to the corresponding description of the corresponding steps and units in any of the aforementioned traffic light flashing recognition embodiments, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiments, which will not be repeated here.
[0073] The electronic device of the embodiment of the present application obtains multiple frames of traffic light images collected by the on-board camera of the vehicle within the recognition period, inputs the multiple frames of traffic light images into the target detection model respectively, and obtains multiple target detection results output by the target detection model. The multiple target detection results can reflect the state changes of the traffic light within a period of time, and then the flashing of the traffic light can be identified.
[0074] Storage Media
[0075] In this embodiment, a computer-readable storage medium is provided, which stores instructions for causing a machine to execute the traffic light flashing recognition method as described herein. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device is enabled to read and execute the program code stored in the storage medium.
[0076] In this case, the program code read from the storage medium itself can implement the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of the present application.
[0077] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0078] Computer program product
[0079] In the present embodiment, a computer program product is provided. The computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions. When the computer-executable instructions are executed, at least one processor executes the traffic light flashing recognition method according to the present invention.
[0080] It should be noted that in the description of this application, the terms "first" and "second" are only used to facilitate the description of different components or names, and cannot be understood as indicating or implying a sequential relationship, relative importance, or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features.
[0081] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0082] It should be noted that although the specific embodiments of the present application are described in detail in conjunction with the accompanying drawings, this should not be construed as limiting the scope of protection of the present application. Within the scope described in the claims, various modifications and variations that can be made by those skilled in the art without creative work still fall within the scope of protection of the present application.
[0083] The examples of the embodiments of the present application are intended to concisely illustrate the technical features of the embodiments of the present application so that those skilled in the art can intuitively understand the technical features of the embodiments of the present application, and are not intended to be improper limitations of the embodiments of the present application.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for identifying traffic light flashing, characterized in that: The method comprises: Acquire multiple frames of traffic light images collected by the vehicle-mounted camera within a recognition period, wherein the traffic light images include images of traffic lights; Inputting the multiple frames of traffic light images into a target detection model respectively to obtain multiple target detection results output by the target detection model, wherein the target detection results are used to indicate the state of the traffic light in the corresponding traffic light image; The traffic light is flashing identified according to the multiple target detection results.
2. The method according to claim 1, characterized in that The length of the identification cycle is greater than the maximum state holding time, wherein if the lighting duration of the traffic light in one flashing cycle is greater than or equal to the off duration, the maximum state holding time is equal to the lighting duration; if the lighting duration of the traffic light in one flashing cycle is less than the off duration, the maximum state holding time is equal to the off duration.
3. The method according to claim 2, characterized in that The step of identifying the flashing of the traffic light according to the multiple target detection results includes: For three frames of traffic light images collected adjacently in time sequence among the multiple frames of traffic light images, determine the states of the traffic lights in the three frames of traffic light images according to the multiple target detection results, if the states of the traffic lights in the first and third frames of traffic light images among the three frames of traffic light images are the same, and the states of the traffic lights in the second frame of traffic light image and the first frame of traffic light image are different, correct the target detection result corresponding to the second frame of traffic light image so that the target detection result corresponding to the second frame of traffic light image after correction indicates the same state of the traffic light as the target detection result corresponding to the first frame of traffic light image; The traffic light is flashing identified according to the corrected multiple target detection results.
4. The method according to claim 3, characterized in that The step of performing flashing recognition on the traffic light according to the corrected multiple target detection results includes: If it is determined according to the corrected detection results of the plurality of targets that the state change of the traffic light meets the condition that the state changes from the first color lighting state to the off state and then from the off state to the first color lighting state, then it is determined that the traffic light is flashing; If it is determined according to the corrected multiple target detection results that the state change of the traffic light meets the condition that the state changes from the off state to the first color lit state and then from the first color lit state to the off state, then it is determined that the traffic light is flashing.
5. The method according to claim 4, characterized in that The step of identifying the flashing of the traffic light according to the corrected multiple target detection results includes: If it is determined based on the corrected multiple target detection results that the traffic light has changed from the off state to the first color lit state or from the first color lit state to the off state, then based on the state of the traffic light determined in the previous identification cycle, if the previous identification cycle determined that the traffic light is in the first color lit state, or there is a transition between the first color lit state and the off state, then it is determined that the traffic light is flashing.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If it is determined that the traffic light is flashing, determining the distance between the vehicle where the vehicle camera is located and the traffic light according to the vehicle camera parameters, the size of the traffic light in the traffic light image, and the actual size of the traffic light; Driving planning control is performed on the vehicle according to the distance between the vehicle and the traffic light.
7. A traffic light flashing recognition device, characterized in that: The device comprises: An acquisition module, used to acquire multiple frames of traffic light images collected by the vehicle-mounted camera within a recognition period, wherein the traffic light images include images of traffic lights; A target detection module, used for inputting the multiple frames of traffic light images into a target detection model respectively, and obtaining multiple target detection results output by the target detection model, wherein the target detection results are used to indicate the state of the traffic light in the corresponding traffic light image; The recognition module is used to identify the flashing of the traffic light according to the multiple target detection results.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the traffic light flashing recognition method according to any one of claims 1-6.
9. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for identifying traffic light flashing as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product tangibly stored on a computer readable medium and comprising computer executable instructions which, when executed, cause at least one processor to perform the method according to any one of claims 1-6.