Traffic light sensing method, vehicle control method, device, medium and vehicle

Through 3D position grouping and color correction of traffic lights, the problem of single light identification error at multiple intersections is solved, safe control of autonomous vehicles is achieved, and traffic light perception and vehicle control processes are simplified.

WO2024179135A1PCT designated stage expired Publication Date: 2024-09-06ANHUI NIO AUTONOMOUS DRIVING TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/138996
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-02
Filing Date
2023-12-15
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing traffic light perception methods are prone to misidentification when identifying single lights at multiple intersections, and cannot accurately identify the color of each single light, which affects the driving safety of autonomous vehicles.

Method used

By grouping the 3D positions of traffic lights, combining single lights at the same intersection, and performing color correction on single lights of the same shape to ensure that the colors in each single light group are consistent, virtual lights are used to express the direction and color of traffic indications, achieving Autonomous driving control of vehicles.

Benefits of technology

It improves the accurate perception and identification of traffic lights, avoids color misidentification of single lights with the same lamp head shape at the same intersection, ensures safe driving of vehicles, and eliminates the need to rely on high-precision maps, reducing the cost of high-precision map annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023138996_06092024_PF_FP
    Figure CN2023138996_06092024_PF_FP
Patent Text Reader

Abstract

The present application relates to the technical field of autonomous driving. Specifically provided are a traffic light sensing method, a vehicle control method, a device, a medium and a vehicle, which aim to solve the problem of improving the accuracy of sensing the color of a traffic light. For this purpose, the traffic light sensing method provided in the present application comprises: performing sensing and identification on the current image frame of traffic lights, so as to acquire a light head shape, color and 3D location of each currently lighted individual light among the traffic lights; grouping the individual lights according to the 3D locations of the individual lights, so as to form an individual-light group from individual lights which are located at the same intersection; acquiring identically-shaped individual lights having the same light head shape within each individual-light group; and respectively correcting the color of each individual light among the identically-shaped individual lights within each individual-light group into the same color. By means of the method, it is possible to avoid identifying individual lights, which have the same light head shape and are at the same intersection, to have different colors, thereby ensuring the driving safety of a vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Traffic light sensing method, vehicle control method, device, medium and vehicle

[0001] This application claims priority to Chinese patent application No. 202310186921.0 filed on March 2, 2023, entitled “Traffic Light Perception Method, Vehicle Control Method, Device, Medium and Vehicle”. The entire contents of the above Chinese patent application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of autonomous driving technology, and specifically to a traffic light perception method, vehicle control method, equipment, medium and vehicle. Background Art

[0003] Traffic lights typically consist of red, green, and yellow lights. Red means no passage, green means passage is allowed, and yellow means a warning. When controlling a vehicle autonomously, it is necessary to accurately perceive the color of traffic lights on the road. This allows for safe and reliable driving control based on the color of the traffic lights, ensuring driving safety.

[0004] The same intersection on a road (such as an intersection) may contain multiple road junctions, each with its own traffic light, and each traffic light may contain multiple individual lights. Current conventional traffic light perception methods, when perceiving and recognizing traffic light image frames, can easily misidentify individual lights at different intersections as being at the same intersection, and cannot accurately identify the color displayed by each individual light.

[0005] Accordingly, this field requires a new technical solution to solve the above problems.

[0006] Summary of the Invention

[0007] In order to overcome the above-mentioned defects, the present application is proposed to provide a traffic light perception method, vehicle control method, device, medium and vehicle that solve or at least partially solve the technical problem of how to accurately perceive the color of traffic lights.

[0008] In a first aspect, a method for sensing a traffic light is provided, comprising:

[0009] Performing perception and recognition on a current image frame of a traffic light to obtain the shape, color, and 3D position of a lamp head of each currently lit single lamp in the traffic light;

[0010] Grouping the single lights according to their 3D positions, so as to form single lights located at the same intersection into a single light group;

[0011] Obtain the single lamps of the same shape and the same lamp head shape in each single lamp group;

[0012] The color of each single lamp in the single lamp group of the same shape is respectively corrected to the same color.

[0013] In one technical solution of the above-mentioned traffic light perception method, the step of "grouping the individual lights according to their 3D positions to form individual lights located at the same intersection into a single light group" specifically includes:

[0014] Traverse the 3D position of each single light and group the single lights;

[0015] Get multiple single light groups formed after traversing the 3D position of each single light;

[0016] The plurality of single lamp groups are merged in pairs to form a final single lamp group from the single lamps located at the same intersection.

[0017] In one technical solution of the above-mentioned traffic light perception method, the step of "traversing the 3D position of each single light and grouping the single lights" specifically includes:

[0018] Determining whether to add the single lamp to the formed single lamp group according to the 3D position of the single lamp and the center position of the formed single lamp group;

[0019] If yes, then add the single lamp to the formed single lamp group and update the center position of the formed single lamp group;

[0020] If not, create a new single-lamp group, add the single lamp to the new single-lamp group, and update the center position of the new single-lamp group.

[0021] In one technical solution of the above-mentioned traffic light perception method, the step of "merging the plurality of single light groups in pairs to form a final single light group from the single lights located at the same intersection" specifically includes:

[0022] Merging the plurality of single light groups in pairs according to the preset arrangement order of the single light group numbers to obtain preliminary merged single light groups;

[0023] According to the preset arrangement order of the single lamp group numbers, the single lamp groups that have been initially merged are merged again in pairs until the number of the single lamp groups no longer changes, so as to obtain the final single lamp groups.

[0024] In one technical solution of the above-mentioned traffic light perception method, the step of "merging the plurality of single light groups in pairs to form a final single light group from the single lights located at the same intersection" further includes merging two single light groups in the following manner:

[0025] Get the center distance between the center positions of two single light groups;

[0026] Get the radius of the two single light groups respectively;

[0027] Determine whether the center distance is less than the maximum value of the radius;

[0028] If so, the two single-lamp groups are merged;

[0029] If not, the two single light groups are not merged.

[0030] In one technical solution of the above-mentioned traffic light perception method, the method further includes updating the radius of the single light group by:

[0031] Obtaining the maximum distance between a single lamp in the single lamp group and the center position of the single lamp group;

[0032] Update the radius of the single lamp group according to the maximum distance.

[0033] In one technical solution of the above-mentioned traffic light perception method, the step of “correcting the color of each single light of the same shape in each single light group to the same color” specifically includes:

[0034] For each of the single lamps of the same shape, obtaining the confidence level of each different color displayed by the single lamp;

[0035] Selecting the color with the highest confidence from the confidence levels of all the single lights of the same shape displaying different colors;

[0036] The color of each single lamp in the single lamps of the same shape is corrected to the color with the highest confidence.

[0037] In one technical solution of the above-mentioned traffic light perception method, the step of "selecting the color with the highest confidence from the confidence levels of each different color displayed by all single lights of the same shape" specifically includes:

[0038] For each color, respectively obtain the confidence level of each single light displaying the color and sum the confidence levels to obtain a summed confidence level of the color;

[0039] Based on the summed confidence of each color, the color with the highest confidence is selected.

[0040] In one technical solution of the above-mentioned traffic light perception method, the step of "selecting the color with the highest confidence based on the summed confidence of each color" includes:

[0041] Normalize the summed confidence of each color separately to obtain the normalized confidence of each color;

[0042] Based on the normalized confidence of each color, the color with the highest confidence is selected.

[0043] In one technical solution of the above-mentioned traffic light perception method, after the step of "correcting the color of each of the single lights of the same shape in each single light group to the same color", the method further includes tracking and smoothing the color of the single light obtained from the current image frame in the following manner:

[0044] Acquire a plurality of continuous historical image frames before the current image frame;

[0045] respectively obtaining the color of the single light obtained through each of the historical image frames;

[0046] Voting is performed on the colors of the single light obtained through the current image frame and the historical image frames, and a color with the largest number of colors is selected as the final color of the single light obtained through the current image frame.

[0047] In a second aspect, a method for sensing a traffic light is provided, comprising:

[0048] Using the traffic light perception method provided in the first aspect, the shape and color of the lamp head of a currently lit single lamp in the traffic light and the single lamp group to which it belongs are obtained;

[0049] Determine the intersection where the single light is located according to the single light group to which the single light belongs;

[0050] Determining the traffic indication direction of the virtual light corresponding to the traffic light at the intersection according to the shape of the lamp head of the single lamp and the intersection at which it is located;

[0051] The color of the traffic indication direction is determined according to the color of the single light to form a virtual light.

[0052] In a third aspect, a vehicle control method is provided, the method comprising:

[0053] Acquire an image frame of a traffic light located in a forward direction of the vehicle;

[0054] Adopting the traffic light perception method provided in the second aspect, and obtaining a virtual light corresponding to the traffic light according to the image frame;

[0055] Determine the intersection where the virtual light is located;

[0056] The vehicle is automatically controlled at the intersection according to the color of each traffic indication direction of the virtual light.

[0057] In a fourth aspect, a computer device is provided, which includes a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute the method described in any one of the technical solutions of the above-mentioned traffic light perception method or vehicle control method.

[0058] In a fifth aspect, a computer-readable storage medium is provided, which stores a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned traffic light perception method or vehicle control method.

[0059] In a sixth aspect, a vehicle is provided, comprising the computer device described in the technical solution of the above-mentioned computer device.

[0060] The above one or more technical solutions of this application have at least one or more of the following beneficial effects:

[0061] In implementing the technical solution for the traffic light perception method provided in this application, the current image frame of the traffic light can first be perceived and identified to obtain the lamp head shape, color, and 3D position of each currently lit single lamp in the traffic light. The single lamps are then grouped according to their 3D positions to form a single lamp group for each lamp located at the same intersection. Within each single lamp group, single lamps with the same lamp head shape and shape are obtained, and the color of each single lamp within each single lamp group is corrected to the same color. This method can accurately determine the intersection where the single lamp is located, while also preventing single lamps with the same lamp head shape at the same intersection from being recognized as different colors, thereby ensuring vehicle driving safety.

[0062] In implementing another technical solution for a traffic light perception method provided in this application, the aforementioned traffic light perception method can first be used to obtain the shape, color, and light group of the lamp head of a currently lit single light in a traffic light. The intersection at which the single light is located is determined based on the light group in which the single light is located. The traffic direction of the virtual light corresponding to the traffic light at the intersection is determined based on the shape of the lamp head and the intersection at which it is located. The color of the traffic direction is determined based on the color of the single light to form a virtual light. Through the above method, any type of traffic light can be uniformly expressed as a virtual light formed by the traffic direction and its color. When controlling a vehicle, it is only necessary to query the color of the traffic direction from the virtual light.

[0063] In implementing the technical solution of the vehicle control method provided in this application, after acquiring an image frame of a traffic light located in the vehicle's forward direction, the aforementioned traffic light perception method can be used to obtain the virtual light corresponding to the traffic light based on the image frame, determine the intersection where the virtual light is located, and then automatically control the vehicle at the intersection based on the color of each traffic direction indicated by the virtual light. This method can accurately determine the status of traffic lights at each intersection without relying on high-precision maps, thereby enabling safe and reliable automatic driving control of the vehicle, improving vehicle driving safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The disclosure of this application will become more easily understood with reference to the accompanying drawings. Those skilled in the art will readily appreciate that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this application. Among them:

[0065] FIG1 is a flow chart showing the main steps of a method for sensing a traffic light according to an embodiment of the present application;

[0066] FIG2 is a flow chart showing the main steps of a method for grouping single lamps according to an embodiment of the present application;

[0067] FIG3 is a flow chart showing the main steps of a method for sensing a traffic light according to another embodiment of the present application;

[0068] FIG4 is a flow chart showing the main steps of a vehicle control method according to an embodiment of the present application;

[0069] FIG5 is a schematic diagram of the main structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0070] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the scope of protection of the present application.

[0071] In the description of this application, a "processor" may include hardware, software, or a combination of the two. A processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. A processor has data and / or signal processing capabilities. A processor may be implemented in software, hardware, or a combination of the two. Computer-readable storage media include any suitable medium capable of storing program code, such as a magnetic disk, a hard disk, an optical disk, flash memory, read-only memory, random access memory, and the like.

[0072] The following describes an embodiment of the traffic signal light perception method of the present application.

[0073] Referring to FIG1 , FIG1 is a flow chart illustrating the main steps of a method for sensing a traffic light according to an embodiment of the present application. As shown in FIG1 , the method for sensing a traffic light in the embodiment of the present application mainly includes the following steps S101 to S104 .

[0074] Step S101: Perceive and recognize the current image frame of the traffic light to obtain the shape, color, and 3D position of the lamp head of each single lamp currently lit in the traffic light.

[0075] Image frames can be obtained by capturing images of traffic lights using a vehicle's visual sensors (such as a camera). After obtaining these image frames, they can be input into a preset perception model, which then identifies information such as the shape and color of each individual light head in the image frame. This perception model can be constructed using conventional methods in the field of neural network technology. The embodiments of this application do not limit the specific structure and training methods of this perception model, as long as it has the ability to recognize the above information from the image frames. It should be noted that the vehicle-related operations mentioned in this application, such as capturing image frames using the vehicle's visual sensors and performing autonomous driving control of the vehicle, are all performed after full authorization by the user or all parties involved. In other words, the vehicle in this application is an authorized vehicle. In some embodiments, the vehicle computer or backend server can detect whether authorization information has been received. If authorization information is received, it indicates that the current vehicle is an authorized vehicle; otherwise, the current vehicle is an unauthorized vehicle. The authorization information can be issued by a terminal device, including but not limited to a mobile phone, tablet computer, and smartwatch.

[0076] A lit single light refers to a single light that displays a preset color. The preset color refers to a color that can be used for traffic guidance. For example, the preset colors may include green, red, and yellow. Green indicates that passage is allowed, red indicates that passage is prohibited, and yellow indicates a warning. By perceiving and identifying image frames, the color displayed by the single light in one or more image frames can be obtained. If the color displayed by the single light in one or more image frames is the preset color, it can be determined that the single light is in the lit state. In addition, it should be noted that in addition to the preset colors that can be used for traffic guidance, the color of the single light can also include colors that indicate that traffic guidance is not being performed. For example, when the single light is off, it can display black.

[0077] The shapes of the lamp head of a single lamp include but are not limited to a round shape, a straight arrow, a left turn arrow, a right turn arrow and a U-turn arrow, etc.

[0078] The 3D position of a single light refers to the position of the single light in a preset three-dimensional coordinate system. For example, in one embodiment, this three-dimensional coordinate system can be the body coordinate system of the vehicle. The following is a brief description of the method for obtaining the 3D position through perception and recognition. Specifically, after perceiving the image frame of the traffic light, the 2D position of the single light in the image coordinate system can be obtained, and then the 2D position is converted from the image coordinate system to the preset three-dimensional coordinate system through the coordinate system conversion method to obtain the 3D position of the single light. The 3D position of a single light can be expressed as (IDi, xi, yi, zi), where IDi represents the ID of the i-th single light, and xi, yi and zi represent the coordinates of the i-th single light on the X, Y and Z axes in the three-dimensional coordinate system, respectively.

[0079] Step S102: grouping the individual lights according to their 3D positions, so as to form individual lights located at the same intersection into a single light group.

[0080] The positions of single lights at the same intersection will be relatively close, while the positions of single lights at different intersections will be relatively far. This principle can be used to group single lights and put single lights at the same intersection into the same single light group.

[0081] Step S103: Obtain the same-shaped individual lamps with the same lamp cap shape within each individual lamp group. For example, a traffic light includes three illuminated individual lamps, one of which has a lamp cap shaped like a left-turn arrow, and the other two have lamp caps shaped like round discs. In this case, the traffic light includes a group of identically shaped individual lamps with round disc-shaped lamp caps, and each group includes two individual lamps.

[0082] Step S104: Correcting the color of each single lamp of the same shape in each single lamp group to the same color.

[0083] Different lamp head shapes can indicate different traffic directions. There may be multiple single lamps with the same lamp head shape in a traffic light. When these single lamps are subjected to color perception and recognition through step S101, these single lamps may be recognized as different colors due to reasons such as object reflection and poor ambient light. Therefore, by performing color correction on single lamps with the same lamp head shape, different colors can be avoided for the same traffic direction, which would affect the safe driving of vehicles.

[0084] Based on the method described in steps S101 to S104 above, the intersection where the single lamp is located can be accurately determined, and at the same time, single lamps with the same lamp head shape at the same intersection can be avoided from being identified as different colors, thereby ensuring the driving safety of vehicles.

[0085] The above steps S102 to S104 are further explained below.

[0086] 1. Explain step S102.

[0087] In order to group all the lit single lights at the same intersection into the same single light group as much as possible, the single lights can be grouped first and then the groups can be merged. Specifically, referring to FIG. 2 , in this embodiment of the application, the single lights can be grouped through the following steps S1021 to S1023 to form a single light group for the single lights at the same intersection.

[0088] Step S1021: Traverse the 3D position of each light and group the lights. The grouped lights can be represented as {(IDi, Gi)}, where IDi represents the ID of the i-th light and Gi represents the number of the light group to which the i-th light belongs.

[0089] In the embodiments of the present application, conventional clustering algorithms in the field of data processing can be used to cluster individual lamps according to their 3D positions, forming multiple clusters, where each cluster is a group of individual lamps. In some preferred embodiments, to ensure grouping accuracy, the number of clusters may not be limited, i.e., no number of clusters is set.

[0090] Step S1022: Acquire multiple single-lamp groups formed after traversing the 3D position of each single lamp.

[0091] Step S1023: performing pairwise merging processing on the plurality of single light groups, so as to form a final single light group from the single lights located at the same intersection.

[0092] Specifically, if the single lights in two single light groups may be located at the same intersection, the two single light groups are merged; otherwise, they are not merged.

[0093] In a preferred embodiment, the single-lamp groups can be merged based on the distance between their center positions and the radius of the single-lamp groups to ensure the accuracy of the merging. Specifically, the center distance between the center positions of two single-lamp groups can be obtained, and the radius of the two single-lamp groups can be obtained respectively. Then, it is determined whether the center distance is less than the maximum of the two radii. If the center distance is less than the maximum, the two single-lamp groups are merged; otherwise, the merging is not performed.

[0094] To ensure the accuracy of single-lamp group merging, during step S1021, the radius of the single-lamp group is dynamically updated based on the newly added single-lamp group. Specifically, the maximum distance between the single-lamp in the single-lamp group and the center of the single-lamp group can be obtained, and then the radius of the single-lamp group can be updated based on this maximum distance. For example, this maximum distance can be used as the radius of the single-lamp group, or it can be numerically adjusted and the adjusted distance used as the radius of the single-lamp group.

[0095] Based on the method described in steps S1021 to S1023 above, the accuracy of the single light group can be improved, and single lights of the same shape at different intersections can be avoided from being calibrated to the same color.

[0096] The above steps S1021 and S1023 are further explained below.

[0097] (1) Explain step S1021.

[0098] In the embodiment of the present application, the individual lamps can be grouped according to their 3D positions and the center positions of the individual lamp groups. Specifically, the individual lamps can be grouped by following steps 11 to 13.

[0099] Step 11: Based on the 3D position of the single light and the center position of the existing single light group, determine whether to add the single light to the existing single light group. If it can be added, go to step 12; if not, go to step 13.

[0100] In the embodiment of the present application, the distance between the 3D position of a single lamp and the center position of the single lamp group can be obtained, and based on this distance, it is determined whether to add the single lamp to a separate group. For example, the distance can be compared with a preset distance threshold. If the distance is less than the distance threshold, the single lamp is added to the single lamp group; otherwise, it is not added to the single lamp group.

[0101] Step 12: Add the single lamp to the single lamp group formed above and update the center position of the single lamp group formed.

[0102] Step 13: Create a new single-light group, add the single light to the new single-light group, and update the center position of the new single-light group. When the next single light is grouped, this newly created single-light group will be used as the "formed single-light group" for grouping judgment.

[0103] When traversing the 3D position of the first single light, a single light group can be created directly based on its 3D position to initialize the single light grouping. In other words, for the first single light, step 13 is directly executed, and for subsequent single lights, the method described in steps 11 to 13 is used to group them.

[0104] Based on the method described in steps 11 to 13 above, the single lamps can be grouped quickly and accurately using the center position of the single lamp group, while improving the accuracy and efficiency of the grouping.

[0105] (2) Explain step S1023.

[0106] In the embodiment of the present application, a single lamp group may be subjected to one round of merging processing, or multiple rounds of merging processing may be performed. In one round of merging processing, each two single lamp groups may be merged separately until the merging processing of all single lamp groups is completed.

[0107] When performing multiple rounds of merging, the number of rounds of merging can be pre-set, and then multiple rounds of merging are performed on the single lamp groups according to the number of rounds. In the first round of merging, the single lamp groups obtained in step S1022 are merged, and in non-first rounds of merging, the single lamp groups obtained after the previous round of merging are merged.

[0108] When performing multiple rounds of merging, the number of rounds of merging can be set without setting the number of rounds. In this case, each round of merging can be performed in sequence, and the merging process can be stopped when the number of single lamp groups no longer changes. In a preferred embodiment, the single lamp groups can be merged through the following steps 21 and 22 to ensure the accuracy of the merging.

[0109] Step 21: Merge multiple single light groups in pairs according to the preset order of the single light group numbers to obtain preliminary merged single light groups. This step is the first round of merging.

[0110] For example, the single light groups can be merged in pairs in ascending order of the single light group numbers to complete the first round of merging and obtain preliminary merged single light groups. Those skilled in the art can flexibly set the order of the single light group numbers according to actual needs, and this embodiment of the application does not specifically limit this.

[0111] Step 22: According to the preset arrangement order of the single light group numbers, the single light groups that have been initially merged are merged again in pairs until the number of single light groups no longer changes, so as to obtain the final single light groups.

[0112] For example, the single light groups initially merged can be merged again in pairs, in ascending order of the single light group numbers, to complete the second round of merging. If the number of single light groups obtained in the second round of merging is the same as that obtained in the first round of merging, no further merging is performed, and the result of the second round of merging is the final single light group. If the number of single light groups after the second round of merging is less than the number of single light groups merged in the first round, the single light groups obtained after the second round of merging will continue to be merged in pairs, in ascending order of the single light group numbers, until the number of single light groups no longer changes.

[0113] To ensure the accuracy of single-light group merging, the radius of the single-light group can be dynamically updated based on the individual lights in the group after each round of merging. Specifically, the maximum distance between a single light in the group and the center of the single-light group can be obtained, and then the radius of the single-light group can be updated based on this maximum distance. For example, this maximum distance can be used as the radius of the single-light group, or it can be numerically adjusted and the adjusted distance used as the radius of the single-light group.

[0114] Based on the method described in steps 21 to 22 above, the accuracy of merging single lamp groups can be improved, and the accuracy of grouping single lamps can be further improved.

[0115] 2. Explain step S103.

[0116] To improve the accuracy of color correction, the confidence level of each color can be displayed by lighting a single lamp, and the color with the highest confidence level can be selected for correction. Specifically, in some embodiments, the color of each lit single lamp in the same shape can be corrected through the following steps S1031 to S1033.

[0117] Step S1031: for each single lamp of the same shape, obtain the confidence level of each single lamp displaying each different color.

[0118] The confidence level of a color indicates the degree of trustworthiness of the color. When the color of a single light is perceived and recognized in step S101, the confidence level of each color displayed by the light can be obtained. For example, if a perception model constructed using a neural network is used for color perception and recognition, the perception model can output the probability of each light displaying each color. The color with the highest probability is then used as the color of the light. The probability of each color can then be used as the confidence level of each color.

[0119] Step S1032: Select the color with the highest confidence from the confidence levels of each color displayed by all single lights of the same shape.

[0120] For example, the same-shaped single lights include single light 1 and single light 2, and the colors include green and red. The confidence levels of single light 1 indicating green and red are 0.9 and 0.1, respectively. The confidence levels of single light 2 indicating green and red are 0.4 and 0.6, respectively. 0.9 is the maximum value, so green is selected.

[0121] Step S1033: Correct the color of each single light in the same shape to the color with the highest confidence. Continuing with the above example, the color of single light 2 is corrected to green.

[0122] Based on the method described in steps S1031 to S1033 above, the color confidence level can be used to obtain the accurate color of a single lamp of the same shape, thereby ensuring the accuracy of color correction.

[0123] Step S1032 is further explained below.

[0124] To quickly and accurately select the color with the highest confidence from the confidence levels of all the different colors displayed by a single light, the sum of the confidence levels of each color can be calculated first, and then the color can be selected based on the sum of the confidence levels. Specifically, the color with the highest confidence level can be selected by following steps 31 and 32.

[0125] Step 31: For each color, obtain the confidence level of each color displayed by each single light and sum the confidence levels to obtain the summed confidence level of the color.

[0126] Step 32: According to the summed confidence of each color, select the color with the highest confidence, that is, select the color with the highest summed confidence.

[0127] Taking the preset colors for traffic guidance, including green, red, and yellow, as an example, a single light can be represented as {(IDi, Ci, Pri, Pgi, Pyi)}, where IDi represents the ID of the i-th single light, Ci represents the color displayed when the i-th single light is currently lit, Pri, Pgi, and Pyi represent the confidence levels of the i-th single light displaying red, green, and yellow, respectively. The summed confidence levels of red, green, and yellow are represented as Qri, Qgi, and Qyi, respectively. The color with the highest summed confidence level is Csi = argmax(Qri, Qgi, Qyi). After color correction is completed based on this color, the single light can be represented as {IDi, Csi}}.

[0128] Furthermore, in some embodiments, to facilitate comparison of the summed confidences of different colors and select the highest confidence, the summed confidences of each color can be normalized to obtain a normalized confidence for each color. Then, based on the normalized confidences of each color, the color with the highest confidence can be selected. It should be noted that in the embodiments of the present application, conventional data normalization methods in the field of mathematical technology can be used to normalize the corrected confidences of each color, and this embodiment of the present application does not specifically limit this.

[0129] Based on the above steps 31 to 32, the efficiency and accuracy of selecting the color with the highest confidence can be improved, so that the color correction of a single lamp with the same shape can be completed quickly and accurately.

[0130] 3. Explain step S104.

[0131] After the color of each single lamp of the same shape in each single lamp group is corrected to the same color, the color of each single lamp in the single lamp group can be tracked and smoothed through the following steps S1041 to S1043 to improve the accuracy of the color of each single lamp.

[0132] Step S1041: Acquire a plurality of continuous historical image frames before the current image frame.

[0133] To conveniently and accurately acquire the aforementioned historical image frames, a sliding window of a preset size can be set. Image frames can then be selected based on the sliding window, in descending order of image frame acquisition moments. Image frames falling within the sliding window are then selected from these image frames to identify a number of consecutive historical image frames preceding the current image frame. Those skilled in the art can flexibly set the size of the sliding window based on actual needs, and this embodiment of the present application does not impose any specific limitations thereon. For example, the sliding window size can be 10 consecutive image frame acquisition moments.

[0134] Step S1042: Obtain the color of a single light from each historical image frame. The method for obtaining the color of a single light from historical image frames is the same as that used for the current image frame, that is, the related method described in the above method embodiment.

[0135] Step S1043: voting is performed on the colors of the single light obtained through the current image frame and the historical image frames, and the color with the largest number of votes is selected as the final color of the single light obtained through the current image frame.

[0136] For example, for a single light, the color obtained in the current image frame is green, and the colors obtained in the five consecutive historical image frames before the current image frame are all red, then the color obtained in the current image frame is corrected to red.

[0137] Based on the method described in steps S1041 to S1043 above, the problem of inaccurate color of a single light due to interference when capturing image frames can be avoided.

[0138] The following describes an embodiment of a method for sensing a traffic light as shown in FIG3. As shown in FIG3, the method for sensing a traffic light in the embodiment of the present application mainly includes the following steps S201 to S204.

[0139] Step S201: using a traffic light perception method, obtaining the shape and color of the lamp head of a currently lit single lamp in the traffic light and the single lamp group to which it belongs.

[0140] In this step, the sensing method embodiments shown in Figures 1 and 2 can be used to obtain the shape and color of a single lamp's head and the lamp group it belongs to. That is, the color of the single lamp in this step is the color corrected and / or tracked and smoothed using the aforementioned method embodiments, resulting in a more accurate color.

[0141] Step S202: Determine the intersection where the single light is located based on the single light group in which the single light is located.

[0142] Step S203: determining the traffic indication direction of the virtual light corresponding to the traffic light at the intersection according to the shape of the lamp head of the single light and the intersection at which it is located.

[0143] Different lamp head shapes can indicate different traffic directions. Therefore, the traffic direction of the virtual light corresponding to a traffic light can be determined based on the lamp head shapes of all individual lights in the traffic light. For example, if a traffic light has three individual lights and all three have circular lamp heads, the traffic directions of the virtual light corresponding to this traffic light include straight ahead, left turn, and U-turn.

[0144] It should be noted that those skilled in the art can flexibly set the traffic direction indicated by different lamp head shapes according to actual needs, and the embodiments of this application do not specifically limit this. For example, according to historical traffic regulations, a circle can represent two directions: straight ahead and left turn. However, according to the latest traffic regulations, a circle can represent three directions: straight ahead, left turn, and U-turn. In this case, the traffic direction indicated by the circle can be adjusted to straight ahead, left turn, and U-turn.

[0145] Step S204: Determine the color of the traffic indication direction according to the color of the single light to form a virtual light.

[0146] Based on the method described in steps S201 to S204 above, for traffic lights of any location and type, these traffic lights can be uniformly expressed as virtual lights formed by the fusion of traffic directions and their colors, that is, virtual lights are abstracted from traffic lights that exist in the physical world, and they are not lights that objectively exist in the physical world. When controlling the vehicle, it is only necessary to query the color of the corresponding traffic direction from the virtual light, and then automatic driving control of the corresponding traffic direction can be performed based on this color. In addition, the above method does not require the location and type of traffic lights to be marked on the high-precision map in advance, eliminating the dependence on the high-precision map and reducing the annotation cost of the high-precision map. At the same time, it also overcomes the problem that the existing technology can only perceive and identify traffic lights in the area covered by the high-precision map, and cannot accurately perceive and identify traffic lights when the information marked on the high-precision map is inconsistent with the actual information.

[0147] The following describes an embodiment of the vehicle control method provided in this application.

[0148] Referring to FIG4 , FIG4 is a flow chart showing the main steps of a vehicle control method according to an embodiment of the present application. As shown in FIG4 , the vehicle control method in the embodiment of the present application mainly includes the following steps S301 to S304 .

[0149] Step S301: Acquire an image frame of a traffic light in the forward direction of the vehicle.

[0150] Specifically, a visual sensor disposed on a vehicle and having a field of view in the forward direction of the vehicle may be used to collect image frames of traffic lights.

[0151] Step S302: using a traffic light perception method, and obtaining a virtual light corresponding to the traffic light according to the image frame.

[0152] The traffic light perception method in this step is the traffic light perception method described in the aforementioned method embodiment.

[0153] Step S303: Determine the intersection where the virtual light is located.

[0154] Step S304: Perform automatic driving control on the vehicle at the intersection according to the color of each traffic indication direction of the virtual light.

[0155] Specifically, based on the color of the traffic sign, it can determine whether each traffic direction at the intersection is permitted, and autonomous vehicle control can be performed based on the judgment result. For example, if a vehicle is traveling in the left lane of a road, which is a mixed left-turn and straight-ahead lane, and the vehicle's driving intention is to turn left at the intersection, the color of the left-turn direction in the virtual light can be obtained. If the color is red, the vehicle is controlled to stop and wait at the stop line. If the color is green, the vehicle is controlled to turn left and pass through the intersection.

[0156] Based on the method described in steps S301 to S304 above, accurate information such as the location and color of traffic lights can be obtained without using high-precision maps, and the vehicle can be safely and reliably controlled for automatic driving, thereby improving the safety of vehicle driving.

[0157] It should be pointed out that although the various steps are described in a specific order in the above embodiments, those skilled in the art will understand that in order to achieve the effect of the present application, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These adjusted solutions are equivalent to the technical solutions described in this application, and therefore will also fall within the scope of protection of this application.

[0158] It will be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment of the present application can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium can include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0159] Furthermore, the present application also provides a computer device.

[0160] Refer to Figure 5, which is a schematic diagram of the main structure of a computer device embodiment according to the present application. As shown in Figure 5, the computer device in the embodiment of the present application mainly includes a storage device and a processor. The storage device can be configured to store a program for executing the traffic light perception method or vehicle control method of the above-mentioned method embodiment, and the processor can be configured to execute the program in the storage device, which includes but is not limited to a program for executing the traffic light perception method or vehicle control method of the above-mentioned method embodiment. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of the present application.

[0161] In the embodiment of the present application, the computer device may be a control device device formed by various electronic devices. In some possible implementations, the computer device may include multiple storage devices and multiple processors. The program for executing the traffic light perception method or vehicle control method of the above method embodiment may be divided into multiple subroutines, and each subroutine may be loaded and run by the processor to execute different steps of the traffic light perception method or vehicle control method of the above method embodiment. Specifically, each subroutine may be stored in different storage devices respectively, and each processor may be configured to execute the program in one or more storage devices to jointly implement the traffic light perception method or vehicle control method of the above method embodiment, that is, each processor executes different steps of the traffic light perception method or vehicle control method of the above method embodiment respectively to jointly implement the traffic light perception method or vehicle control method of the above method embodiment.

[0162] The aforementioned multiple processors may be processors deployed on the same device. For example, the aforementioned computer device may be a high-performance device composed of multiple processors, and the aforementioned multiple processors may be processors configured on the high-performance device. Furthermore, the aforementioned multiple processors may also be processors deployed on different devices. For example, the aforementioned computer device may be a server cluster, and the aforementioned multiple processors may be processors on different servers in the server cluster.

[0163] Furthermore, the present application also provides a computer-readable storage medium.

[0164] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium can be configured to store a program for executing the traffic light perception method or vehicle control method of the above-mentioned method embodiment. The program can be loaded and executed by a processor to implement the above-mentioned traffic light perception or vehicle control method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of the present application. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-transitory computer-readable storage medium.

[0165] Furthermore, the present application also provides a vehicle.

[0166] In a vehicle embodiment according to the present application, the vehicle may include the computer device described in the aforementioned computer device embodiment. In this embodiment, the vehicle may be an autonomous vehicle, an unmanned vehicle, or other similar vehicle. Furthermore, based on the type of power source, the vehicle in this embodiment may be a fuel vehicle, an electric vehicle, a hybrid vehicle using a combination of electric and fuel, or a vehicle using other new energy sources.

[0167] Thus far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present application.

Claims

1. A method for sensing a traffic light, characterized in that: The method comprises: Perceiving and identifying a current image frame of a traffic light to obtain a lamp head shape, color, and 3D position of each single lamp currently lit in the traffic light; Grouping the single lights according to the 3D positions of the single lights, so that the single lights located at the same intersection form a single light group; Obtaining single lamps of the same shape and having the same lamp holder shape in each single lamp group; The color of each single lamp in the single lamp of the same shape in each single lamp group is respectively corrected to the same color.

2. The method for sensing traffic lights according to claim 1, characterized in that: The step of "grouping the single lights according to the 3D positions of the single lights so as to form a single light group of the single lights located at the same intersection" specifically includes: Traverse the 3D position of each single light and group the single lights; Get multiple single light groups formed after traversing the 3D position of each single light; The plurality of single lamp groups are merged in pairs to form a final single lamp group from the single lamps located at the same intersection.

3. The traffic light perception method according to claim 2, characterized in that: The step of "traversing the 3D position of each single light and grouping the single lights" specifically includes: Determining whether to add the single lamp to the formed single lamp group according to the 3D position of the single lamp and the center position of the formed single lamp group; If yes, then adding the single lamp to the formed single lamp group and updating the center position of the formed single lamp group; If not, create a new single lamp group, add the single lamp to the new single lamp group, and update the center position of the new single lamp group.

4. The method for sensing traffic lights according to claim 2, characterized in that: The step of "merging the plurality of single light groups in pairs to form a final single light group from the single lights at the same intersection" specifically includes: According to the preset arrangement order of the single lamp group numbers, the plurality of single lamp groups are combined in pairs. and processed to obtain a preliminary merged single light group; According to the preset arrangement order of the single lamp group numbers, the single lamp groups that have been initially merged are merged again in pairs until the number of the single lamp groups no longer changes, so as to obtain the final single lamp groups.

5. The method for sensing a traffic light according to claim 2, characterized in that: The step of "merging the plurality of single light groups in pairs to form a final single light group from the single lights at the same intersection" further includes merging two single light groups in the following manner: Get the center distance between the center positions of two single light groups; Get the radius of the two single light groups respectively; Determine whether the center distance is less than the maximum value of the radius; If yes, then the two single light groups are merged; If not, the two single light groups are not merged.

6. The method for sensing a traffic light according to any one of claims 2 to 5, characterized in that: The method further includes updating the radius of the single lamp group by: Obtaining a maximum distance between a single lamp in the single lamp group and a center position of the single lamp group; According to the maximum distance, the radius of the single lamp group is updated.

7. The traffic light sensing method according to claim 1, characterized in that: The step of "respectively correcting the color of each single lamp in the single lamp of the same shape in each single lamp group to the same color" specifically includes: For each of the single lamps of the same shape, obtain the confidence level of each different color displayed by the single lamp; Selecting the color with the highest confidence from the confidences of each different color displayed by all the single lights in the same shape; The color of each single lamp among the single lamps of the same shape is corrected to the color with the highest confidence.

8. The method for sensing a traffic light according to claim 7, characterized in that: The step of "selecting the color with the highest confidence from the confidences of each different color displayed by all the single lights in the same shape" specifically includes: For each color, obtain the confidence of each single light displaying the color and The confidences are summed up to obtain the summed confidence of the color; Based on the summed confidence of each color, select the color with the highest confidence.

9. The method for sensing a traffic light according to claim 8, characterized in that: The steps of "selecting the color with the highest confidence based on the summed confidence of each color" include: Normalize the summed confidence of each color separately to obtain the normalized confidence of each color; Based on the normalized confidence of each color, pick the color with the highest confidence.

10. The method for sensing a traffic light according to claim 1, characterized in that: After the step of "correcting the color of each single lamp in the single lamps of the same shape in each single lamp group to the same color", the method further includes tracking and smoothing the color of the single lamp obtained through the current image frame in the following manner: Acquire a plurality of continuous historical image frames before the current image frame; Respectively obtain the color of the single light obtained through each of the historical image frames; Voting is performed on the colors of the single light obtained through the current image frame and the historical image frame, and a color with the largest number is selected as the final color of the single light obtained through the current image frame.

11. A method for sensing a traffic light, characterized in that: The method comprises: Using the traffic light perception method described in any one of claims 1 to 10, the shape, color and single light group of a currently lit single light in the traffic light are obtained; Determine the intersection where the single light is located according to the single light group where the single light is located; Determine the traffic indication direction of the virtual light corresponding to the traffic light at the intersection according to the shape of the lamp head of the single lamp and the intersection where it is located; The color of the traffic indication direction is determined according to the color of the single light to form a virtual light.

12. A vehicle control method, characterized in that: The method comprises: Acquire an image frame of a traffic light located in a forward direction of the vehicle; Adopting the traffic light perception method of claim 11, and acquiring a virtual light corresponding to the traffic light according to the image frame; Determine the intersection where the virtual light is located; According to the color of each traffic indication direction of the virtual light, the vehicle is automatically controlled at the intersection.

13. A computer device comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute the traffic signal light perception method described in any one of claims 1 to 10, or the traffic signal light perception method described in claim 11, or the vehicle control method described in claim 12.

14. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the traffic signal light perception method described in any one of claims 1 to 10, or the traffic signal light perception method described in claim 11, or the vehicle control method described in claim 12.

15. A vehicle, characterized in that: The vehicle comprises the computer device of claim 13.

Citation Information

Patent Citations

  • Traffic light identification method and device

    CN110543814A

  • Traffic signal lamp identification method and device, vehicle-mounted control terminal and motor vehicle

    CN111582189A

  • Traffic signal lamp identification method and device, computer equipment and storage medium

    CN114639085A

  • Traffic signal lamp sensing method, vehicle control method, equipment, medium and vehicle

    CN115984826A

  • Traffic signal recognition method and traffic signal recognition device

    JP2018063680A