Traffic light status recognition method, system, electronic device and storage medium

By acquiring vehicle information and signal light image information, determining the first signal light status based on the number of vehicles and vehicle speed, and performing weighted calculations, the problem of low accuracy of signal light recognition in autonomous driving is solved, and the accuracy of recognition is improved.

CN115393827BActive Publication Date: 2025-08-12CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211049985.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2025-08-12
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

Among the existing autonomous driving technologies, the identification accuracy of traffic lights is low and cannot meet the reliability and timeliness requirements of autonomous driving.

Method used

By acquiring the vehicle information and signal light image information of the current road, the first signal light state is determined using the number of vehicles and vehicle speed, and the second signal light state is obtained in combination with the signal light image recognition algorithm, and weighted calculations are performed to determine the final signal light state.

Benefits of technology

The reference range for signal light recognition has been expanded and the accuracy of recognition has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393827B_ABST
    Figure CN115393827B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of autonomous driving technology, and discloses a traffic light state recognition method, system, electronic device and storage medium. The method obtains vehicle information and traffic light image information of the current road, determines the number of target vehicles and traveling vehicles in any driving direction of the current road according to the vehicle information, and then determines a first traffic light state in the driving direction. At the same time, traffic light recognition is performed on the traffic light image information to obtain a second traffic light state. A final traffic light state is obtained by performing a weighted calculation on the first traffic light state and the second traffic light state. The number of target vehicles and traveling vehicles in the driving direction is used as a new determination parameter, thereby determining the final traffic light state through the first traffic light state and the second traffic light state, expanding the reference range, and thus improving the recognition accuracy of the traffic light.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a traffic light state recognition method, system, electronic device, and storage medium. Background Art

[0002] As the automotive industry continues to develop, autonomous driving technology is also steadily advancing, reaching increasingly higher levels. As autonomous driving gradually advances toward Level 3 and Level 4, a major challenge for autonomous vehicles is how to accurately detect and identify traffic lights while driving.

[0003] Since autonomous driving has high requirements for the reliability, accuracy and timeliness of traffic light recognition, the recognition of traffic light images through recognition algorithms, training models, etc. has a single recognition parameter, resulting in low accuracy of traffic light recognition results, which cannot meet the requirements of autonomous driving. Summary of the Invention

[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0005] In view of the above-mentioned shortcomings of the prior art, the present invention discloses a method, system, electronic device and storage medium for identifying the state of a traffic light, so as to improve the accuracy of identifying the traffic light.

[0006] The present invention discloses a method for identifying the state of a traffic light, comprising: obtaining vehicle information and signal light image information of a current road, wherein the current road includes at least one driving lane corresponding to a driving direction, and the vehicle information includes a target vehicle on the driving lane and a current speed of the target vehicle; determining a driving vehicle from the target vehicles based on a comparison result between the current speed and a preset speed threshold, and determining a first number and a second number corresponding to the driving direction, wherein the number of target vehicles is determined as the first number, and the number of driving vehicles is determined as the second number; calculating a traffic index corresponding to the driving direction based on the first number and the second number, and determining a first signal light state corresponding to the driving direction based on a comparison result between the traffic index and a preset index threshold; performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state; performing weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state.

[0007] Optionally, the vehicle information of the current road is obtained by the following method: collecting multiple scene image information of the current road through a preset vehicle-mounted camera; performing road sign recognition on the scene image information according to a preset road recognition algorithm to obtain road sign information in the first scene information, dividing the current road based on the road sign information to obtain at least one driving lane in the current road and the driving direction corresponding to each driving lane; performing vehicle recognition on the driving lane in the scene image information according to the preset vehicle detection to obtain the target vehicle on the driving lane; calculating the target vehicle in the scene image information according to the optical flow algorithm to obtain the current speed of the target vehicle.

[0008] Optionally, the traffic index corresponding to the driving direction is calculated based on the first number and the second number, including any one of the following: determining the difference between the first number and the second number as the traffic index corresponding to the driving direction; determining the ratio between the first number and the second number as the traffic index corresponding to the driving direction.

[0009] Optionally, the first signal light state corresponding to the driving direction is determined based on the comparison result between the traffic index and the preset index threshold, including: obtaining the corresponding preset quantity threshold and preset index threshold according to the driving direction; if the driving direction meets the first preset condition and the second preset condition, then determining that the first signal light state corresponding to the driving direction is the green light state, wherein the first preset condition includes that the first quantity corresponding to the driving direction is greater than or equal to the preset quantity threshold, and the second preset condition includes that the traffic index corresponding to the driving direction is greater than or equal to the preset index threshold; if the driving direction does not meet the first preset condition or the second preset condition, then determining that the first signal light state corresponding to the driving direction is the red light state.

[0010] Optionally, after obtaining the vehicle information and signal light image information of the current road, and before performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm, the method further includes at least one of the following: adjusting the image size of the signal light image information according to a preset magnification ratio; adjusting the resolution of the signal light image information according to a bilinear interpolation technique; determining the image exposure state of the signal light image information according to a comparison result between the exposure parameters of the signal light image information and a preset exposure threshold, matching a corresponding exposure adjustment method according to the image exposure state, and adjusting the exposure parameters of the signal light image information based on the matched exposure adjustment method.

[0011] Optionally, signal light recognition is performed on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state, including: the number of the signal light image information includes one or more; if the number of the signal light image information includes one, signal light recognition is performed on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state; if the number of the signal light image information includes more than one, signal light recognition is performed on each of the signal light image information according to the signal light image recognition algorithm to obtain a third signal light state corresponding to each of the signal light image information, and the number of identical third signal light states is counted, and the second signal light state is determined from the third signal light states based on the statistical results.

[0012] Optionally, a weighted calculation is performed on the first signal light state and the second signal light state to obtain a final signal light state, including: obtaining a first weight corresponding to the first signal light state and a second weight corresponding to the second signal light state; counting the number of target vehicles in all driving directions to obtain a total number of vehicles; if the total number of vehicles is greater than or equal to a preset total number threshold, calculating the first weight according to a preset increase ratio to obtain a third weight corresponding to the first signal light state, and performing a weighted calculation on the first signal light state and the second signal light state according to the third weight and the second weight to obtain a final signal light state; if the total number of vehicles is less than the preset total number threshold, performing a weighted calculation on the first signal light state and the second signal light state according to the first weight and the second weight to obtain a final signal light state.

[0013] The present invention discloses a traffic light state recognition system, comprising: an acquisition module, configured to acquire vehicle information and signal light image information of a current road, wherein the current road includes at least one driving lane corresponding to a driving direction, and the vehicle information includes a target vehicle on the driving lane and the current speed of the target vehicle; a quantity determination module, configured to determine a driving vehicle from the target vehicles based on a comparison result between the current speed and a preset speed threshold, and to determine a first quantity and a second quantity corresponding to the driving direction, wherein the quantity of the target vehicles is determined as the first quantity, and the quantity of the driving vehicles is determined as the second quantity; a first state determination module, configured to calculate a traffic index corresponding to the driving direction based on the first quantity and the second quantity, and to determine a first signal light state corresponding to the driving direction based on a comparison result between the traffic index and a preset index threshold; a second state determination module, configured to perform signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state; and a calculation module, configured to perform weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state.

[0014] The present invention discloses an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.

[0015] The present invention discloses a computer-readable storage medium, on which a computer program is stored: when the computer program is executed by a processor, the method described above is implemented.

[0016] Beneficial effects of the present invention:

[0017] By acquiring vehicle information and signal light image information on the current road, the number of target vehicles and vehicles traveling in any direction of travel on the current road is determined based on the vehicle information, thereby determining a first signal light state in that direction. Simultaneously, signal light recognition is performed on the signal light image information to obtain a second signal light state. A weighted calculation is then performed on the first and second signal light states to obtain a final signal light state. This method, compared to obtaining the second signal light state through signal light image recognition, uses the number of target vehicles and vehicles traveling in the direction of travel as new determination parameters to determine the first signal light state in that direction. The final signal light state is then determined based on the first and second signal light states, expanding the reference range and thereby improving signal light recognition accuracy.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0020] Figure 1 is a flow chart of a method for identifying a traffic light state in an embodiment of the present invention;

[0021] Figure 2 is a flow chart of another method for identifying the state of a traffic light according to an embodiment of the present invention;

[0022] Figure 3 is a schematic structural diagram of a traffic light status recognition system according to an embodiment of the present invention;

[0023] Figure 4 It is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other unless there is a conflict.

[0025] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0026] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.

[0027] In the description and claims of the embodiments of the present disclosure, as well as in the accompanying drawings, the terms "first," "second," and the like are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate to describe the embodiments of the present disclosure herein. In addition, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions.

[0028] Unless otherwise stated, the term "plurality" means two or more.

[0029] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0030] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0031] Combine Figure 1 As shown, the embodiment of the present disclosure provides a method for identifying the state of a traffic light, including:

[0032] Step S101, obtaining vehicle information and traffic light image information on the current road;

[0033] The current road includes at least one driving lane corresponding to a driving direction, and the vehicle information includes a target vehicle on the driving lane and a current speed of the target vehicle;

[0034] Step S102, determining a moving vehicle from the target vehicles based on a comparison result between the current vehicle speed and a preset vehicle speed threshold, and determining a first quantity and a second quantity corresponding to the moving direction;

[0035] wherein the number of target vehicles is determined as a first number, and the number of traveling vehicles is determined as a second number;

[0036] Step S103, calculating a traffic index corresponding to the driving direction based on the first quantity and the second quantity, and determining a first signal light state corresponding to the driving direction based on a comparison result between the traffic index and a preset index threshold;

[0037] Step S104, performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state;

[0038] Step S105 : performing weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state.

[0039] The traffic light state recognition method provided by the embodiments of the present disclosure obtains vehicle information and signal light image information on the current road, determines the number of target vehicles and vehicles traveling in any direction of travel on the current road based on the vehicle information, and then determines the first signal light state in the direction of travel. Simultaneously, signal light recognition is performed on the signal light image information to obtain a second signal light state. A weighted calculation is performed on the first signal light state and the second signal light state to obtain the final signal light state. Thus, compared to obtaining the second signal light state by performing image recognition on the signal light image, the number of target vehicles and vehicles traveling in the direction of travel is used as a new determination parameter to determine the first signal light state in that direction. The final signal light state is determined based on the first and second signal light states, thereby expanding the reference range and improving signal light recognition accuracy.

[0040] Optionally, the driving direction includes one or more of a left turn direction, a right turn direction, a straight direction, a U-turn direction, etc.

[0041] Optionally, if the driving direction is a straight direction, the target vehicles in the driving direction include same-direction vehicles and opposite-direction vehicles.

[0042] Optionally, the vehicle information of the current road is obtained by the following method: collecting multiple scene image information of the current road through a preset vehicle-mounted camera; performing road sign recognition on the scene image information according to a preset road recognition algorithm to obtain road sign information in the first scene information, dividing the current road based on the road sign information to obtain at least one driving lane in the current road and the driving direction corresponding to each driving lane; performing vehicle recognition on the driving lane in the scene image information according to the preset vehicle detection to obtain the target vehicle on the driving lane; calculating the target vehicle in the scene image information according to the optical flow algorithm to obtain the current speed of the target vehicle.

[0043] In some embodiments, the optical flow algorithm includes defining the instantaneous rate of change of grayscale at a specific coordinate point on a two-dimensional image plane as an optical flow vector, and using the change of pixels in the time domain in the image sequence and the correlation between adjacent frames to find the correspondence between the previous frame and the current frame, thereby calculating the motion information of the object between adjacent frames. Among them, the optical flow is the instantaneous rate, which is equivalent to the displacement of the target point when the time interval is very small (such as between two consecutive frames of a video).

[0044] Optionally, the vehicle information of the current road is obtained by the following method: collecting multiple scene image information of the current road through a preset vehicle-mounted camera; performing road sign recognition on the scene image information according to a preset road recognition algorithm to obtain road sign information in the first scene information, dividing the current road based on the road sign information to obtain at least one driving lane in the current road and the driving direction corresponding to each driving lane; collecting the target vehicle on the driving lane and the current speed of the target vehicle through a preset vehicle-mounted radar.

[0045] Optionally, a moving vehicle is determined from the target vehicles based on a comparison result between the current vehicle speed and a preset speed threshold, including: determining a target vehicle whose current vehicle speed is greater than or equal to the preset speed threshold as a moving vehicle; and determining a target vehicle whose current vehicle speed is less than the preset speed threshold as a parked vehicle.

[0046] Optionally, the preset vehicle speed threshold includes 5 km / h to 15 km / h, for example, the preset vehicle speed threshold is 5 km / h.

[0047] Optionally, the traffic index corresponding to the driving direction is calculated based on the first quantity and the second quantity, including any one of the following: determining the difference between the first quantity and the second quantity as the traffic index corresponding to the driving direction; determining the ratio between the first quantity and the second quantity as the traffic index corresponding to the driving direction.

[0048] Optionally, the first signal light state corresponding to the driving direction is determined based on the comparison result between the traffic index and the preset index threshold, including: obtaining the corresponding preset quantity threshold and preset index threshold according to the driving direction; if the driving direction meets the first preset condition and the second preset condition, then determining that the first signal light state corresponding to the driving direction is the green light state, wherein the first preset condition includes that the first quantity corresponding to the driving direction is greater than or equal to the preset quantity threshold, and the second preset condition includes that the traffic index corresponding to the driving direction is greater than or equal to the preset index threshold; if the driving direction does not meet the first preset condition or the second preset condition, then determining that the first signal light state corresponding to the driving direction is the red light state.

[0049] In some embodiments, the green light state and the red light state are both confidence levels, wherein the green light state includes a first value as the confidence level that the signal light is green, and the red light state includes a second value as the confidence level that the signal light is green. The first value includes 70%-100%, and the second value includes 0%-30%. For example, the first value is 80% and the second value is 20%.

[0050] Optionally, the preset quantity threshold includes 2-5 vehicles, for example, the preset quantity threshold is 3 vehicles.

[0051] Optionally, if the traffic index includes a ratio between the first quantity and the second quantity, the preset index threshold includes 50% to 90%, for example, the preset index threshold is 60%.

[0052] In some embodiments, if the first number of target vehicles in the straight direction is greater than or equal to 3, and the number of target vehicles with a current speed greater than 5 km / h accounts for 60% of the number of all target vehicles, then the first signal light state in the straight direction is determined to be a green light state; otherwise, the first signal light state in the straight direction is determined to be a red light state.

[0053] In some embodiments, if the first number of target vehicles in the left direction is greater than or equal to 2, and the number of target vehicles with a current speed greater than 5 km / h accounts for 50% of the number of all target vehicles, then the first signal light state in the left direction is determined to be a green light state; otherwise, the first signal light state in the left direction is determined to be a red light state.

[0054] In some embodiments, a first number of target vehicles in the straight direction is counted; if the first number of target vehicles in the straight direction is greater than or equal to 3, the current speed of each target vehicle is calculated by an optical flow algorithm, and the traveling vehicle is determined based on the current speed; if the ratio between the second number of vehicles traveling in the straight direction and the first number of target vehicles in the straight direction is greater than 60%, the first signal light state in the straight direction is determined to be a green light state; if the first number of target vehicles in the straight direction is greater than or equal to 3, the first number of target vehicles in the left direction is counted; if the first number of target vehicles in the left direction is greater than or equal to 2, and the ratio between the second number of vehicles traveling in the left direction and the first number of target vehicles in the left direction is greater than 50%, the first signal light state in the straight direction is determined to be a red light state, and the first signal light state in the left direction is determined to be a green light state.

[0055] Optionally, the traffic light image information is determined by the following method: performing traffic light detection on the scene image information according to a preset traffic light detection model to obtain a traffic light detection frame, wherein the traffic light detection model is obtained by training a YOLO (You Only Look Once) V5 neural network model using traffic light detection samples with detection identification; and determining the traffic light detection frame as the traffic light image information.

[0056] Optionally, after obtaining the vehicle information and signal light image information of the current road, and before performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm, the method also includes at least one of the following: adjusting the image size of the signal light image information according to a preset magnification ratio; adjusting the resolution of the signal light image information according to a bilinear interpolation technique; determining the image exposure state of the signal light image information according to a comparison result between the exposure parameters of the signal light image information and a preset exposure threshold, matching the corresponding exposure adjustment method according to the image exposure state, and adjusting the exposure parameters of the signal light image information based on the matched exposure adjustment method.

[0057] Optionally, the magnification ratio includes 2-8 times, for example, the magnification ratio is 4 times.

[0058] Optionally, the bilinear interpolation technique includes first performing linear interpolation on a certain axis of the traffic light image information, then performing linear interpolation on another axis, and finally obtaining the value of the predicted point.

[0059] Optionally, the exposure parameter includes one of pixel brightness and pixel luminance; and the image exposure state of the signal light image information is determined by an exposure histogram of the signal light image information, wherein the image exposure state includes overexposure, dark exposure, and normal exposure.

[0060] In this way, by determining the image exposure status of the signal light image information and adjusting the exposure parameters of the signal light image information based on the exposure adjustment method corresponding to the image exposure status, the problem of overexposure or dark exposure due to the aperture being too large or too small caused by the aperture algorithm defects when shooting at night with a vehicle-mounted camera is solved, thereby improving the recognition accuracy of the signal light image information.

[0061] Optionally, signal light recognition is performed on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state, including: the number of signal light image information includes one or more; if the number of signal light image information includes one, signal light recognition is performed on the signal light image information according to the preset signal light image recognition algorithm to obtain the second signal light state; if the number of signal light image information includes multiple, signal light recognition is performed on each signal light image information separately according to the signal light image recognition algorithm to obtain a third signal light state corresponding to each signal light image information, and the number of identical third signal light states is counted, and the second signal light state is determined from the third signal light states based on the statistical results.

[0062] Optionally, the first signal light state and the second signal light state both include a confidence level of a red light state or a green light state.

[0063] Optionally, a weighted calculation is performed on the first signal light state and the second signal light state to obtain a final signal light state, including: obtaining a first weight corresponding to the first signal light state and a second weight corresponding to the second signal light state; counting the number of target vehicles in all driving directions to obtain a total number of vehicles; if the total number of vehicles is greater than or equal to a preset total number threshold, calculating the first weight according to a preset increase ratio to obtain a third weight corresponding to the first signal light state, and performing a weighted calculation on the first signal light state and the second signal light state according to the third weight and the second weight to obtain a final signal light state; if the total number of vehicles is less than the preset total number threshold, performing a weighted calculation on the first signal light state and the second signal light state according to the first weight and the second weight to obtain a final signal light state.

[0064] Optionally, the first weight and the second weight are both 50%.

[0065] Optionally, the preset total number threshold includes 4-8 vehicles, for example, the preset total number threshold is 5 vehicles; the preset increase ratio includes 1.4-1.6, for example, the preset increase ratio is 1.4, that is, the third weight is 70%.

[0066] Combine Figure 2 As shown, the embodiment of the present disclosure provides a method for identifying the state of a traffic light, including:

[0067] Step S201, obtaining vehicle information on the current road;

[0068] The current road includes at least one driving lane corresponding to a driving direction, and the vehicle information includes a target vehicle on the driving lane and a current speed of the target vehicle;

[0069] Step S202, determining a moving vehicle from target vehicles based on a comparison result between the current vehicle speed and a preset vehicle speed threshold;

[0070] Step S203: determining a first quantity and a second quantity corresponding to the driving direction, and calculating a traffic index corresponding to the driving direction based on the first quantity and the second quantity;

[0071] wherein the number of target vehicles is determined as a first number, and the number of traveling vehicles is determined as a second number;

[0072] Step S204, determining the state of the first signal light corresponding to the driving direction based on the comparison result between the traffic index and the preset index threshold;

[0073] Step S205, obtaining the traffic light image information of the current road;

[0074] Step S206, adjusting the image size of the traffic light image information according to a preset magnification ratio;

[0075] Step S207, adjusting the resolution of the traffic light image information according to a bilinear interpolation technique;

[0076] Step S208, determining the image exposure state of the signal light image information according to a comparison result between the exposure parameter of the signal light image information and a preset exposure threshold;

[0077] Step S209, matching a corresponding exposure adjustment method according to the image exposure state, and adjusting the exposure parameters of the traffic light image information based on the matched exposure adjustment method;

[0078] Step S210, performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state;

[0079] Step S211 : performing weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state.

[0080] The traffic light state recognition method provided by the embodiments of the present disclosure obtains vehicle information and signal light image information on the current road, determines the number of target vehicles and vehicles traveling in any direction of travel on the current road based on the vehicle information, and then determines the first signal light state in the direction of travel. Simultaneously, signal light recognition is performed on the signal light image information to obtain a second signal light state. A weighted calculation is performed on the first signal light state and the second signal light state to obtain the final signal light state. Thus, compared to obtaining the second signal light state by performing image recognition on the signal light image, the number of target vehicles and vehicles traveling in the direction of travel is used as a new determination parameter to determine the first signal light state in that direction. The final signal light state is determined based on the first and second signal light states, thereby expanding the reference range and improving signal light recognition accuracy.

[0081] Combine Figure 3 As shown, an embodiment of the present disclosure provides a traffic light state recognition system, including: an acquisition module 301 , a quantity determination module 302 , a first state determination module 303 , a second state determination module 304 and a calculation module 305 . The acquisition module 301 is used to obtain vehicle information and signal light image information of the current road, wherein the current road includes at least one driving lane corresponding to the driving direction, and the vehicle information includes the target vehicle on the driving lane and the current speed of the target vehicle; the number determination module 302 is used to determine the driving vehicle from the target vehicles based on the comparison result between the current speed and the preset speed threshold, and determine the first number and the second number corresponding to the driving direction, wherein the number of target vehicles is determined as the first number, and the number of driving vehicles is determined as the second number; the first state determination module 303 is used to calculate the traffic index corresponding to the driving direction based on the first number and the second number, and determine the first signal light state corresponding to the driving direction based on the comparison result between the traffic index and the preset index threshold; the second state determination module 304 is used to perform signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain the second signal light state; the calculation module 305 is used to perform weighted calculation on the first signal light state and the second signal light state to obtain the final signal light state.

[0082] The traffic light state recognition system provided by the embodiments of the present disclosure obtains vehicle information and signal light image information on the current road, determines the number of target vehicles and vehicles traveling in any direction of travel on the current road based on the vehicle information, and then determines the first signal light state in the direction of travel. Simultaneously, signal light recognition is performed on the signal light image information to obtain a second signal light state. A weighted calculation is performed on the first signal light state and the second signal light state to obtain the final signal light state. Thus, compared to obtaining the second signal light state through image recognition of the signal light image, the number of target vehicles and vehicles traveling in the direction of travel is used as a new determination parameter to determine the first signal light state in that direction. The final signal light state is determined based on the first and second signal light states, thereby expanding the reference range and improving signal light recognition accuracy.

[0083] Figure 4 The following is a schematic diagram showing the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application. Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0084] like Figure 4 As shown, computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 402 or programs loaded from storage unit 408 into random access memory (RAM) 403, such as executing the methods in the above embodiments. Various programs and data required for system operation are also stored in RAM 403. CPU 401, ROM 402, and RAM 403 are connected to each other via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.

[0085] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.

[0086] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the various functions defined in the system of the present application are executed.

[0087] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0088] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in the embodiments is implemented.

[0089] Regarding the computer-readable storage media in the embodiments of the present disclosure, those skilled in the art will understand that all or part of the steps in implementing the aforementioned method embodiments can be accomplished by hardware associated with the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the aforementioned method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0090] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program, so that the electronic device executes each step of the above method.

[0091] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0092] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0093] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible variations. Unless expressly required, individual components and functions are optional, and the order of operations may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the terms used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to also include the plural forms. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variations "comprises" and / or comprising refer to the presence of a stated subsample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other subsamples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method or device that includes the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments can be referenced to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can be found in the description of the method part.

[0094] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0095] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units can be merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. In addition, the functional units in the embodiments of the present disclosure can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0096] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for identifying the state of a traffic light, characterized in that: include: Acquiring vehicle information and signal light image information of a current road, wherein the current road includes at least one driving lane corresponding to a driving direction, and the vehicle information includes a target vehicle on the driving lane and a current speed of the target vehicle; Determining a traveling vehicle from the target vehicles based on a comparison result between the current vehicle speed and a preset vehicle speed threshold, and determining a first number and a second number corresponding to the traveling direction, wherein the number of target vehicles is determined as the first number, and the number of traveling vehicles is determined as the second number; Calculating a traffic index corresponding to the driving direction based on the first number and the second number, and determining a first signal light state corresponding to the driving direction based on a comparison result between the traffic index and a preset index threshold; performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state; Performing a weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state; Calculating a traffic index corresponding to the driving direction based on the first number and the second number, including determining a difference between the first number and the second number as the traffic index corresponding to the driving direction, or determining a ratio between the first number and the second number as the traffic index corresponding to the driving direction; The first signal light state corresponding to the driving direction is determined based on the comparison result between the traffic index and the preset index threshold, including obtaining the corresponding preset quantity threshold and preset index threshold according to the driving direction; if the driving direction meets the first preset condition and the second preset condition, the first signal light state corresponding to the driving direction is determined to be the green light state, wherein the first preset condition includes that the first quantity corresponding to the driving direction is greater than or equal to the preset quantity threshold, and the second preset condition includes that the traffic index corresponding to the driving direction is greater than or equal to the preset index threshold; if the driving direction does not meet the first preset condition or the second preset condition, the first signal light state corresponding to the driving direction is determined to be the red light state.

2. The method according to claim 1, characterized in that Get the vehicle information of the current road through the following methods: Collect multiple scene image information of the current road through a preset on-board camera; performing road sign recognition on the scene image information according to a preset road recognition algorithm to obtain road sign information in the scene image information, dividing the current road based on the road sign information to obtain at least one driving lane in the current road and a driving direction corresponding to each driving lane; Performing vehicle recognition on the driving lane in the scene image information according to a preset vehicle detection to obtain a target vehicle on the driving lane; The target vehicle in the scene image information is calculated according to an optical flow algorithm to obtain the current speed of the target vehicle.

3. The method according to claim 1, characterized in that After obtaining vehicle information and signal light image information of the current road, and before performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm, the method further includes at least one of the following: Adjusting the image size of the signal light image information according to a preset magnification ratio; adjusting the resolution of the signal light image information according to a bilinear interpolation technique; The image exposure state of the signal light image information is determined based on a comparison result between the exposure parameters of the signal light image information and a preset exposure threshold, a corresponding exposure adjustment method is matched according to the image exposure state, and the exposure parameters of the signal light image information are adjusted based on the matched exposure adjustment method.

4. The method according to claim 3, characterized in that Performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state includes: The number of the signal light image information includes one or more; If the number of the signal light image information includes one, performing signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state; If the number of the signal light image information includes multiple ones, signal light recognition is performed on each of the signal light image information according to the signal light image recognition algorithm to obtain the third signal light state corresponding to each of the signal light image information, and the number of the same third signal light states is counted. Based on the statistical results, the second signal light state is determined from the third signal light states.

5. The method according to any one of claims 1 to 4, characterized in that Performing a weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state includes: Obtaining a first weight corresponding to the first signal light state and a second weight corresponding to the second signal light state; Count the number of target vehicles in all driving directions to obtain the total number of vehicles; If the total number of vehicles is greater than or equal to a preset total number threshold, calculating the first weight according to a preset increase ratio to obtain a third weight corresponding to the first signal light state, and performing a weighted calculation on the first signal light state and the second signal light state according to the third weight and the second weight to obtain a final signal light state; If the total number of vehicles is less than a preset total number threshold, weighted calculation is performed on the first signal light state and the second signal light state according to the first weight and the second weight to obtain a final signal light state.

6. A traffic light status recognition system, characterized in that: include: an acquisition module, configured to acquire vehicle information and signal light image information of a current road, wherein the current road includes at least one driving lane corresponding to a driving direction, and the vehicle information includes a target vehicle on the driving lane and a current speed of the target vehicle; a number determination module, configured to determine a moving vehicle from the target vehicles based on a comparison result between the current vehicle speed and a preset vehicle speed threshold, and determine a first number and a second number corresponding to the moving direction, wherein the number of target vehicles is determined as the first number, and the number of moving vehicles is determined as the second number; a first state determination module, configured to calculate a traffic index corresponding to the driving direction based on the first number and the second number, and determine a first signal light state corresponding to the driving direction based on a comparison result between the traffic index and a preset index threshold; a second state determination module, configured to perform signal light recognition on the signal light image information according to a preset signal light image recognition algorithm to obtain a second signal light state; a calculation module, configured to perform a weighted calculation on the first signal light state and the second signal light state to obtain a final signal light state; The first state determination module calculates a traffic index corresponding to the driving direction based on the first number and the second number in the following manner, and determines a difference between the first number and the second number as the traffic index corresponding to the driving direction, or determines a ratio between the first number and the second number as the traffic index corresponding to the driving direction; The first state determination module determines the first signal light state corresponding to the driving direction based on the comparison result between the traffic index and the preset index threshold in the following manner, and obtains the corresponding preset quantity threshold and preset index threshold according to the driving direction matching; if the driving direction meets the first preset condition and the second preset condition, the first signal light state corresponding to the driving direction is determined to be the green light state, wherein the first preset condition includes that the first quantity corresponding to the driving direction is greater than or equal to the preset quantity threshold, and the second preset condition includes that the traffic index corresponding to the driving direction is greater than or equal to the preset index threshold; if the driving direction does not meet the first preset condition or the second preset condition, the first signal light state corresponding to the driving direction is determined to be the red light state.

7. An electronic device, characterized in that: include: processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Traffic light state assessment

    CN109949590A

  • Traffic signal lamp identification method, device and apparatus and storage medium

    CN112580460A