Detection Method, System, Device, Medium and Vehicle for Traffic Signal Lights
By using the object detection network model and the classification network model to detect traffic lights, the problems of low detection accuracy and limited application scope in the prior art are solved, and traffic light detection with high accuracy and wide application scope are achieved, which enhances the safety and reliability of intelligent driving.
Patent Information
- Application Number
- CN202310387288.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2043-04-12
AI Technical Summary
In the prior art, the accuracy of the traffic lights for intelligent driving of vehicles is not high and the scope of application is limited, especially when the vehicle enters the tunnel, which cannot be accurately positioned, which affects the detection accuracy.
The object detection network model and classification network model are used to detect traffic lights. By collecting and processing the image information of traffic lights, building a priori frame, training the object detection network model and classification network model, obtaining the areas of interest and classifying them, and achieving accurate detection of traffic lights.
It improves the accuracy and scope of application of traffic light detection, reduces detection costs, does not require the need to transform traffic lights or vehicles, and enhances the safety and reliability of intelligent driving.
Smart Images

Figure CN116403193B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent driving, and particularly to a method, system, device, medium and vehicle for detecting traffic lights. Background Art
[0002] Intelligent driving refers to the technology that machines help people with intelligent driving and completely replace people to achieve driverless driving in special cases. Traffic lights are a kind of indication devices commonly used on roads, which are signal lights for directing traffic operation. Generally, they include motor vehicle signal lights and direction indication signal lights. Motor vehicle signal lights generally consist of red lights, green lights and yellow lights. The red light indicates no passage, the green light indicates permission to pass, and the yellow light indicates warning; The direction indication signal light is a group of lights composed of red, yellow and green with arrow patterns inside, which is used to guide motor vehicles to pass in the indicated direction. The arrow directions to the left, up and right indicate left turn, straight ahead and right turn respectively. To achieve intelligent driving, it is necessary to accurately and quickly detect and identify traffic lights on the road, and control the driving state of the vehicle according to the results of detection and identification. How to improve the accuracy of traffic light detection has always been a challenging problem in the field of intelligent driving.
[0003] Currently, by installing a gateway on the traffic light, when a vehicle drives into the network coverage area corresponding to the traffic light, the current status signal of the traffic light will be automatically transmitted to the vehicles in this network coverage area. This method not only requires the transformation of traffic lights, but also requires the installation of signal receiving devices on the vehicles to obtain the detection information of traffic lights. The transformation cost is high, and the signal transmission through the gateway is vulnerable to external signal interference, affecting the detection accuracy.
[0004] In order to improve the accuracy, the position information of the current vehicle is also obtained, the visual detection information set and the set of interaction information groups are obtained according to the current position information, the visual detection information set and the interaction information set are matched with each other to generate the detection information of the traffic light. This method combines positioning information and map information to detect traffic lights, and has a high accuracy rate. However, it increases the maintenance cost. In addition, this method needs to combine positioning information. If the vehicle is walking in a tunnel and accurate GPS positioning of the vehicle cannot be carried out, the traffic lights cannot be detected, the user experience is poor, and the applicable range is not wide. Summary of the Invention
[0005] The technical problem to be solved by the present invention is: to solve the technical problems of low accuracy rate of traffic light detection for vehicle intelligent driving and narrow applicable range in the prior art, the present invention provides a method for detecting traffic lights, which improves the detection accuracy rate and has a wide applicable range when detecting traffic lights.
[0006] The technical solution adopted by the present invention to solve its technical problems is: a detection method for traffic lights, specifically including the following steps:
[0007] S1, collect and process the first image information of various traffic lights, obtain the prior boxes of each of the first image information, and construct all the prior boxes into a sample information set;
[0008] S2, construct an object detection network model suitable for traffic light detection, input all the sample information sets into the object detection network model for training, obtain a sample model and save it;
[0009] S3, construct a classification network model suitable for traffic light detection, input the sample information set into the classification network model for training, obtain the classification result of the traffic light and save it;
[0010] S4, obtain the second image information containing traffic lights on the real road, and input it into the trained object detection network model to obtain a first detection box, extract the size information of the first detection box, and obtain the region of interest based on the size information of the first detection box;
[0011] S5, transmit the region of interest to the trained classification network model for classification, obtain the state of the traffic light, and realize the detection of the traffic light.
[0012] Further, specifically, in step S1, various traffic lights are single-round traffic lights or triple-unit traffic lights. The first image information is clustered by the k_means clustering algorithm to obtain the prior box, and the aspect ratio of the width to the height of the prior box depends on the type of the traffic light;
[0013] If the traffic light is a single-round traffic light, the aspect ratio of the width to the height of the prior box is 1;
[0014] If the traffic light is a horizontally installed triple-unit traffic light, the aspect ratio of the width to the height of the prior box is 1 / 3;
[0015] If the traffic light is a vertically installed triple-unit traffic light, the aspect ratio of the width to the height of the prior box is 3.
[0016] Further, specifically, in step S3, the classification network model includes two classification network units, namely the first classification unit and the second classification unit. The first classification unit is used to classify the color state of the traffic light, and the second classification unit is used to classify the pointing state of the traffic light.
[0017] Further, specifically, in step S4, the target detection network model extracts the size information of the first detection frame according to the sample model, calculates the aspect ratio of the width to the height of the first detection frame, and the acquisition of the region of interest includes the following steps:
[0018] If the aspect ratio of the width to the height of the first detection frame is 1, the first detection frame is copied and spliced, and after splicing, a second detection frame is formed. The aspect ratio of the width to the height of the second detection frame is 1 / 3 or 3, and the second detection frame is the region of interest;
[0019] If the aspect ratio of the width to the height of the first detection frame is 1 / 3 or 3, then the first detection frame is the region of interest.
[0020] Further, specifically, if the aspect ratio of the width to the height of the first detection frame is 1, after the classification network model classifies the region of interest, it will also vote on the output result, and the one with the higher voting result is the state of the traffic signal;
[0021] If the aspect ratio of the width to the height of the first detection frame is 1 / 3 or 3, the output result after the classification network model classifies the region of interest is the state of the traffic signal.
[0022] A detection system adopting the detection method of the traffic signal as described above, the detection system includes:
[0023] An acquisition module, which acquires and processes the first image information of various traffic signals, obtains the prior frame of each piece of the first image information, and constructs all the prior frames into a sample information set;
[0024] A first training and learning module, which constructs a target detection network model suitable for traffic signal detection, inputs all the sample information sets into the target detection network model for training, obtains a sample model and saves it;
[0025] A second training and learning module, which constructs a classification network model suitable for traffic signal detection, inputs the sample information set into the classification network model for training, obtains the classification result of the traffic signal and saves it;
[0026] An acquisition and detection module, which acquires the second image information containing traffic signals on the real road and inputs it into the trained target detection network model, obtains a first detection frame, extracts the size information of the first detection frame, and acquires the region of interest based on the size information of the first detection frame;
[0027] A classification module, which transmits the region of interest to the trained classification network model for classification, obtains the state of the traffic signal, and realizes the detection of the traffic signal.
[0028] A computer device, comprising: a processor; a memory for storing executable instructions; wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the traffic signal detection method as described above.
[0029] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the traffic signal detection method as described above.
[0030] A vehicle includes the traffic signal detection system as described above.
[0031] The beneficial effects of the present invention are that the traffic signal detection method of the present invention uses an object detection network model and a classification network model applicable to traffic signal detection, and trains the object detection network model and the classification network model to improve the generalization of the traffic signal detection and classification capabilities. The trained object detection network model and classification network model can detect various different traffic signals with high detection accuracy, improve the safety and reliability of intelligent vehicles, have a wide range of applications, and compared with the prior art, do not require modification of traffic signals and vehicles, have low implementation costs, and are easy to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present invention will be further described below with reference to the drawings and embodiments.
[0033] Figure 1 FIG. is a schematic structural diagram of Embodiment 1 of the present invention.
[0034] Figure 2 FIG. is a schematic diagram of a traffic signal in Embodiment 1 of the present invention.
[0035] Figure 3 FIG. is a schematic diagram after copying and splicing the first detection frame with a width-to-height ratio of 1 in Embodiment 1 of the present invention.
[0036] Figure 4 FIG. is a schematic diagram of the classification network model in Embodiment 1 of the present invention.
[0037] Figure 5 FIG. is a schematic hardware structure diagram of Embodiment 3 of the present invention.
[0038] In the figure, 10 is an electronic device; 1002 is a processor; 1004 is a memory; 1006 is a transmission device. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only showing the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0040] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. are based on the orientation or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, the meaning of "a plurality" is two or more.
[0041] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "mounted", "connected", and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0042] Embodiment 1
[0043] As Figure 1 shown, the embodiment of the present application provides a detection method for traffic lights, specifically including the following steps:
[0044] S1, collect and process the first image information of various traffic lights, obtain the prior boxes of each first image information, and construct all the prior boxes into a sample information set;
[0045] In this embodiment, the first image information is the status image of various traffic lights, and various traffic lights are single-round traffic lights or triple-traffic lights. The first image information is clustered by the k_means clustering algorithm to obtain the prior boxes, and the aspect ratio of the width to the height of the prior boxes depends on the type of traffic lights; if the traffic light is a single-round traffic light, as Figure 2 shown in (b), then the aspect ratio of the width to the height of the prior box is 1; if the traffic light is a horizontally installed triple-traffic light as Figure 2As shown in (a), the width-to-height ratio of the prior box is 1 / 3; if the traffic signal is a vertical triple traffic signal, the width-to-height ratio of the prior box is 3; this facilitates obtaining the size information of the target detection box by adjusting the feature parameters output from the sample information set constructed through the prior box in subsequent steps.
[0046] S2. Construct a target detection network model suitable for traffic signal detection, input all the sample information sets into the target detection network model for training, obtain a sample model and save it.
[0047] In this embodiment, the target detection network model uses but is not limited to the yolov3 network structure. Without changing its loss function and network structure, the sample information set is fed into the target detection network model for training to obtain a sample model file, which is used to detect traffic signals on real roads to obtain detection results.
[0048] S3. Construct a classification network model suitable for traffic signal detection, input the sample information set into the classification network model for training, obtain the classification result of the traffic signal and save it.
[0049] In step S3, as Figure 4 shown, the classification network model includes two classification network units, namely the first classification unit and the second classification unit. The first classification unit is used to classify the color state of the traffic signal, such as red, yellow, and green. The second classification unit is used to classify the pointing state of the traffic signal, such as turning left, going straight, and turning right. Specifically, the classification network model is an improved VGG16 model. Its network backbone for feature extraction is the backbone network, and it uses the same loss function. The classification network model has three classification heads. Each classification head contains a head and a neck structure and is followed by a loss function. The sum of the three loss functions is used as the total loss. The weights of the three loss functions in the total loss function are the same, and the results are used for backpropagation. The first classification unit is preset, and then the sample information set results are fed into the network for training to obtain the first model file. The second classification unit is preset, and then the sample information set results are fed into the network for training to obtain the second model file. The constructed classification network model is used for classifying traffic signals on real roads in subsequent steps.
[0050] S4. Obtain the second image information containing traffic signals on the real road, input it into the trained target detection network model to obtain a first detection box, extract the size information of the first detection box, and obtain the region of interest based on the size information of the first detection box.
[0051] In step S4, the target detection network model extracts the size information of the first detection frame according to the sample model, calculates the width-to-height ratio of the first detection frame. Specifically, an image coordinate system is established, the position coordinates of the first detection frame in the image coordinate system are obtained, the size information of the first detection frame is calculated. The size information of the first detection frame includes the frame width and frame height of the first detection frame, and then the width-to-height ratio of the first detection frame is calculated. Obtaining the region of interest based on the size information of the first detection frame includes the following steps:
[0052] If the width-to-height ratio of the first detection frame is 1, the first detection frame is copied and spliced. After splicing, a second detection frame is formed. The width-to-height ratio of the second detection frame is 1 / 3 or 3. The second detection frame is the region of interest, as Figure 3 shown; copy and splice through the position coordinates of the first detection frame to form a second detection frame, and then transmit it to the classification network model to judge the detection status of the traffic signal, which is convenient for identifying single-round traffic lights and forming corresponding regions of interest, further improving the generalization of the method and facilitating the detection of single-round traffic lights. To judge the lighting and information of the traffic lights, it is necessary to use a classification network for recognition. The purpose of splicing is to ensure that the traffic lights sent to the classification network contain three target classification information.
[0053] If the width-to-height ratio of the first detection frame is 1 / 3 or 3, the first detection frame is the region of interest, which is convenient for identifying vertically or horizontally installed triple traffic lights and forming corresponding regions of interest, further improving the generalization of the method and facilitating the detection of triple traffic signals.
[0054] It should be noted that the formation of the second detection frame includes the following steps: the upper right and lower right coordinates of the first first detection frame coincide with the upper left and lower left coordinates of the second first detection frame, and the upper right and lower right coordinates of the second first detection frame coincide with the upper left and lower left coordinates of the third first detection frame, and the second detection frame is formed by splicing.
[0055] S5. Transmit the region of interest to the trained classification network model for classification, obtain the status of the traffic signal, and realize the detection of the traffic signal.
[0056] If the width-to-height ratio of the first detection frame is 1, after the classification network model classifies the region of interest, the region of interest obtains the output results of the status of three traffic lights after being classified by the classification network model. In order to improve the accuracy of the status detection of the single-round traffic light, a vote will also be conducted on the output results, and the one with the highest vote result is the status of the traffic light. Specifically, if the three output results of the status of the single-round traffic signal are: red light, red light and green light, and the number of times the detection result is red light is more than the number of times the detection result is green light, that is, the current status of the traffic signal is red light and passage is prohibited.
[0057] When the aspect ratio of the width to the height of the first detection box is 1 / 3 or 3, the output result of the classification network model after classifying the region of interest is the state of the traffic signal, and the accuracy of detecting the state of the vertical or horizontal triple traffic signal is high.
[0058] It should be noted that the backbone network (neural network) model used to extract image features in the classification network model only needs to increase the original one-channel neck and head to three channels, and then add a classification head after the classification network backbone, so as to classify each region of interest, output the classification result, and obtain the detection state of the traffic signal.
[0059] The traffic signal detection method of the present invention uses an object detection network model and a classification network model suitable for traffic signal detection, and trains the object detection network model and the classification network model to improve the generalization of the traffic signal detection and classification capabilities. The trained object detection network model and classification network model can detect various different traffic signals with high detection accuracy, improve the safety and reliability of intelligent teachers, have a wide range of applications, and do not require modification of traffic signals and vehicles compared with the prior art, with low implementation cost and easy implementation.
[0060] Embodiment 2
[0061] The embodiment of the present application provides a detection system adopting the above traffic signal detection method, and the detection system includes:
[0062] An acquisition module, which acquires and processes the first image information of various traffic signals, obtains the prior boxes of each first image information, and constructs all the prior boxes into a sample information set;
[0063] A first training and learning module, which constructs an object detection network model suitable for traffic signal detection, inputs all the sample information sets into the object detection network model for training, obtains a sample model and saves it;
[0064] A second training and learning module, which constructs a classification network model suitable for traffic signal detection, inputs the sample information set into the classification network model for training, obtains the classification result of the traffic signal and saves it;
[0065] An acquisition and detection module, which acquires the second image information containing traffic signals on the real road, inputs it into the trained object detection network model, obtains the first detection box, extracts the size information of the first detection box, and obtains the region of interest based on the size information of the first detection box;
[0066] A classification module that transfers the region of interest to a trained classification network model for classification to obtain the status of traffic lights, thereby realizing the detection of traffic lights.
[0067] It should be noted that when the above-described detection system realizes its functions, only the division of the above-mentioned functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept. For the specific implementation process, please refer to the method embodiment and will not be elaborated here.
[0068] Embodiment 3
[0069] The embodiment of the present application provides a computer device, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement a traffic light detection method as provided in the above method embodiment.
[0070] Figure 5 The figure shows a schematic hardware structure diagram of a device for implementing a traffic light detection method provided by the embodiment of the present application. The device may participate in forming or include the device or system provided by the embodiment of the present application. As Figure 5 shown, the computer device 10 may include one or more processors 1002 (the processor may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 5 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer device 10 may further include more or fewer components than Figure 5 shown, or have a different configuration from Figure 5 shown.
[0071] It should be noted that one or more of the above-mentioned processors and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit can be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit can be a single independent processing module, or be incorporated in whole or in part into any one of other elements in the computer device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (for example, the selection of a variable resistance terminal path connected to an interface).
[0072] The memory 1004 can be used to store software programs and modules of application software, such as the program instructions / data storage devices corresponding to a traffic signal detection method in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, to implement the above-mentioned method. The memory 1004 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 1004 can further include a memory remotely set relative to the processor, and these remote memories can be connected to the computer device 10 through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0073] The transmission device 1006 is used to receive or send data via a network. Specific examples of the above-mentioned network can include the wireless network provided by the communication provider of the computer device 10. In one instance, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 1006 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0074] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer device 10 (or mobile device).
[0075] Embodiment 4
[0076] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be disposed in the server to store at least one instruction or at least one segment of program related to implementing a traffic signal detection method in the method embodiments. The at least one instruction or the at least one segment of program is loaded and executed by the processor to implement the traffic signal detection method provided by the above-mentioned method embodiments.
[0077] Optionally, in this embodiment, the above storage medium may be located in at least one of multiple network servers of a computer network. Optionally, in this embodiment, the above storage medium may include, but is not limited to: various media that can store program codes such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0078] Embodiment 5
[0079] The embodiment of the present invention further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a traffic signal detection method provided in the above various optional embodiments.
[0080] Embodiment 6
[0081] The embodiment of the present invention further provides a vehicle, and the vehicle includes a traffic signal detection system as above.
[0082] It should be noted that: the above sequence of the embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of the present application have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be executed in a different order from that in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0083] Each embodiment in the present application is described in a progressive manner. For the parts that are the same or similar among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiments.
[0084] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a kind of computer. Based on the ideal embodiments of the present invention as inspiration, through the above description, relevant workers can completely make various changes and modifications without departing from the technical idea of this invention. The technical scope of this invention is not limited to the content in the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A detection method for traffic signal lights, characterized in that, it specifically includes the following steps: S1, Collect and process the first image information of various traffic signal lights, obtain the prior boxes of each of the first image information, and construct all the prior boxes into a sample information set; Among them, the various traffic signal lights are single-round traffic signal lights or triple-unit traffic signal lights. The first image information is clustered by the k_means clustering algorithm to obtain the prior boxes. The aspect ratio of the width to the height of the prior boxes depends on the type of the traffic signal lights; If the traffic signal light is a single-round traffic signal light, the aspect ratio of the width to the height of the prior box is 1; If the traffic signal light is a horizontally installed triple-unit traffic signal light, the aspect ratio of the width to the height of the prior box is 1 / 3; If the traffic signal light is a vertically installed triple-unit traffic signal light, the aspect ratio of the width to the height of the prior box is 3; S2, Construct a target detection network model suitable for traffic signal light detection, input all the sample information sets into the target detection network model for training, obtain a sample model and save it; S3, Construct a classification network model suitable for traffic signal light detection, input the sample information set into the classification network model for training, obtain the classification result of the traffic signal light and save it; S4, Obtain the second image information containing traffic signal lights on the real road, and input it into the trained target detection network model to obtain a first detection box, extract the size information of the first detection box, and obtain the region of interest based on the size information of the first detection box; S5, Transmit the region of interest to the trained classification network model for classification, obtain the state of the traffic signal light, and realize the detection of the traffic signal light; In step S4, the target detection network model extracts the size information of the first detection box according to the sample model, calculates the aspect ratio of the width to the height of the first detection box, and the obtaining of the region of interest includes the following steps: If the aspect ratio of the width to the height of the first detection box is 1, copy and splice the first detection box. After splicing, a second detection box is formed. The aspect ratio of the width to the height of the second detection box is 1 / 3 or 3. The second detection box is the region of interest; If the aspect ratio of the width to the height of the first detection box is 1 / 3 or 3, the first detection box is the region of interest.
2. The detection method for traffic signal lights according to claim 1, characterized in that, In step S3, the classification network model includes two classification network units, namely a first classification unit and a second classification unit. The first classification unit is used to classify the color state of the traffic signal light, and the second classification unit is used to classify the pointing state of the traffic signal light.
3. The detection method for traffic signal lights according to claim 1, characterized in that, If the aspect ratio of the width to the height of the first detection box is 1, after the classification network model classifies the region of interest, it will also vote on the output results, and the one with the higher voting result is the state of the traffic signal light; When the aspect ratio of the width to the height of the first detection box is 1 / 3 or 3, the output result after the classification network model classifies the region of interest is the state of the traffic signal.
4. A detection system using the traffic signal detection method according to any one of claims 1-3, characterized in that the detection system includes: An acquisition module that acquires and processes the first image information of various traffic signals, obtains the prior boxes of each piece of the first image information, and constructs all the prior boxes into a sample information set; A first training and learning module that constructs an object detection network model suitable for traffic signal detection, inputs all the sample information sets into the object detection network model for training, obtains a sample model and saves it; A second training and learning module that constructs a classification network model suitable for traffic signal detection, inputs the sample information set into the classification network model for training, obtains the classification result of the traffic signal and saves it; An acquisition and detection module that acquires the second image information containing traffic signals on the real road, inputs it into the trained object detection network model, obtains the first detection box, extracts the size information of the first detection box, and obtains the region of interest based on the size information of the first detection box; A classification module that transmits the region of interest to the trained classification network model for classification, obtains the state of the traffic signal, and realizes the detection of the traffic signal.
5. A computer device, characterized in that it includes: a processor; a memory for storing executable instructions; wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the traffic signal detection method according to any one of claims 1-3.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the traffic signal detection method according to any one of claims 1-5.
7. A vehicle, characterized in that it includes the traffic signal detection system according to claim 4.
Citation Information
Patent Citations
Traffic signal lamp detection and identification method, device and equipment
CN109657622A
Target detection model training method and device, storage medium and computer equipment
CN111241947A