CN118262323A - Method, system, equipment and readable storage medium for identifying traffic road indicator lamp - Google Patents

Method, system, equipment and readable storage medium for identifying traffic road indicator lamp Download PDF

Info

Publication number
CN118262323A
CN118262323A CN202211688226.6A CN202211688226A CN118262323A CN 118262323 A CN118262323 A CN 118262323A CN 202211688226 A CN202211688226 A CN 202211688226A CN 118262323 A CN118262323 A CN 118262323A
Authority
CN
China
Prior art keywords
traffic road
filling
identified
pattern
prompt lamp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211688226.6A
Other languages
Chinese (zh)
Inventor
高江江
黄超
李恬
鲍永
李娟娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wanji Technology Co Ltd
Original Assignee
Beijing Wanji Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wanji Technology Co Ltd filed Critical Beijing Wanji Technology Co Ltd
Priority to CN202211688226.6A priority Critical patent/CN118262323A/en
Publication of CN118262323A publication Critical patent/CN118262323A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application provides a method, a system, equipment and a readable storage medium for identifying traffic road prompting lamps, which are characterized in that firstly, according to the size of a traffic road prompting lamp pattern to be identified, the traffic road prompting lamp pattern to be identified is filled to obtain a filling image, a pattern with uniform size is obtained, then the filling image is input into a neural network identification model of a preset traffic road prompting lamp, the problem that information is changed due to image size difference, so that the multi-form traffic light cannot be accurately identified can be effectively avoided, and when the neural network model is adopted for training, the model can be converged due to the fact that the input pattern size is the same.

Description

Method, system, equipment and readable storage medium for identifying traffic road indicator lamp
Technical Field
The application belongs to the field of road identification, and particularly relates to a method, a system, equipment and a readable storage medium for identifying traffic road indicator lamps.
Background
With the rapid development of society and economy, automatic driving has become one of the current fields of research. In the automatic driving field, real-time correct identification of the state of a road traffic light is one of key links, at present, the detection and identification of the traffic light based on deep learning are a current common and effective method, the form of an actual road traffic light is not completely unified, a transverse traffic light and a longitudinal traffic light exist, even if the road is the same road section, arrangement differences caused by different demands can exist, therefore, when a neural network model is adopted for training, the model can not be converged due to the differences, and the prior art can not accurately identify by adopting a deep learning model, so that a plurality of defects exist.
Disclosure of Invention
The embodiment of the application provides a method, a system, equipment and a readable storage medium for identifying traffic road prompt lamps, which can solve the problem that the models can not be converged due to the difference when training is performed by adopting a neural network model because the traffic lights of the actual roads are not completely unified in the prior art and have both transverse traffic lights and longitudinal traffic lights.
In one aspect of the present application, a method for identifying traffic road indicator lights includes:
Acquiring a shooting image of a traffic road prompt lamp to be identified, wherein the shooting image comprises a pattern of the traffic road prompt lamp to be identified;
Filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified, so as to obtain a filling image;
And inputting the filling image into a neural network recognition model of a preset traffic road prompt lamp, wherein the traffic road prompt lamp recognition model outputs the display state of the traffic road prompt lamp.
In an alternative embodiment, the traffic road indicator light pattern to be identified is rectangular; the step of filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified to obtain a filling image comprises the following steps:
determining the long side length and the short side length of the traffic road indicator light pattern to be identified;
According to the length of the side length, the ends of the two short sides of the traffic road prompt lamp pattern to be identified are respectively extended outwards to form extended side parts;
and filling the area limited by the extension edge part and the long edge to obtain the filling image.
In an alternative embodiment, the filling the area defined by the extension edge and the long edge to obtain the filled image includes:
and filling the pixel points with a preset color value in the area limited by the extending edge and the long edge.
In an alternative embodiment, the filling the area defined by the extension edge and the long edge to obtain the filled image includes:
Setting the color value of the filling area according to the color value of the pixel point at the edge of the long side and a preset difference value;
and filling the pixel points with the set color values in the area defined by the extending edge and the long edge.
In an alternative embodiment, the filling the area defined by the extension edge and the long edge to obtain the filled image includes:
generating a first color value according to the color value of the pixel point at the edge of the long side and the first set difference value;
generating a second color value according to the first color value and a second set difference value;
And filling the pixel points of the first color value into a part of the limited area close to the long side in the limited area of the extending side part and the long side, and filling the pixel points of the second color value into a part of the limited area away from the long side.
In an alternative embodiment, the filling the area defined by the extension edge and the long edge to obtain the filled image includes:
Determining color values of all pixel points in the pixel rows adjacent to the long side by combining preset difference values and color values of all pixel points in the pixel rows adjacent to the long side;
For any two adjacent pixel rows, determining the color value of each pixel point in the pixel row far from the long side by combining a preset difference value and the color value of each pixel point in the pixel row near to the long side;
And filling the areas defined by the extending edge and the long edge according to the determined color value of each pixel point in each pixel row.
In an alternative embodiment, each extension is the same length and is half the difference between the long side length and the short side length.
In an alternative embodiment, before filling the traffic road indicator pattern to be identified according to the size of the traffic road indicator pattern to be identified, the method further comprises:
And inputting the shot image into a target detection model, and outputting the traffic road prompt lamp pattern to be identified by the target detection model.
In an alternative embodiment, the method further comprises:
marking the display states of a plurality of historical traffic road prompt lamp patterns;
And inputting each historical traffic road prompt lamp pattern marked with the display state into a neural network model, and setting the output of the neural network model as a corresponding marked result until the neural network model converges to obtain the neural network identification model.
In an alternative embodiment, the method further comprises:
Marking out traffic road prompt lamp patterns to be identified in a plurality of historical shooting images;
And inputting the historical shooting image of each marked traffic road prompt lamp pattern to be identified into a neural network model, and setting the output of the neural network model as the traffic road prompt lamp pattern to be identified until the neural network model converges to obtain the target detection model.
In an alternative embodiment, the object detection model is selected from yolo network models, CNN network models, or PNN network models.
In an alternative embodiment, the neural network identification model is selected from the classical CNN neural network model, and the network architecture of the neural network identification model is resnet network architecture.
Another aspect of the present application provides an identification system for a traffic road indicator, including:
The acquisition module is used for acquiring a shooting image of the traffic road prompt lamp to be identified, wherein the shooting image comprises a pattern of the traffic road prompt lamp to be identified;
The filling module is used for filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified, so as to obtain a filling image;
And the identification module inputs the filling image into a neural network identification model of a preset traffic road indicator lamp, wherein the traffic road indicator lamp identification model outputs the display state of the traffic road indicator lamp.
In another aspect, an embodiment of the present application provides a terminal device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the identification method of the traffic road indicator lamp when executing the computer program.
In yet another aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of identifying traffic road indicator lights as described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: firstly, according to the size of the traffic road prompt lamp pattern to be identified, filling the traffic road prompt lamp pattern to be identified to obtain a filling image, obtaining a pattern with uniform size, and then inputting the filling image into a neural network identification model of a preset traffic road prompt lamp, so that the problem that information is changed due to image size difference, and thus the polymorphic traffic light cannot be accurately identified can be effectively avoided, and when the neural network model is adopted for training, the model can be converged due to the fact that the sizes of the input patterns are the same.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for identifying traffic lights according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of the substeps of the method for identifying traffic lights according to an embodiment of the present application;
FIG. 3 is a second schematic flow chart of the sub-steps of the method for identifying traffic lights according to an embodiment of the present application;
FIG. 4 is a third flow chart of the sub-steps of the method for identifying traffic lights according to an embodiment of the present application;
FIG. 5 is a schematic illustration of pattern filling provided by an embodiment of the present application;
fig. 6 is a schematic structural diagram of an identification system of a traffic road indicator light according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in various places throughout this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
At present, the detection and identification of the traffic lights based on deep learning are a current common and effective method, the shapes of the traffic lights of actual roads are not completely unified, the traffic lights of the actual roads are not only horizontal traffic lights but also vertical traffic lights, even though the traffic lights of the actual roads are on the same road section, the traffic lights of the actual roads may have arrangement differences caused by different demands, so when the neural network model is used for training, the model cannot be converged due to the differences, and therefore the prior art cannot accurately identify by adopting a deep learning model, and a plurality of defects exist.
In view of the above, the present application provides a method, a system, an apparatus and a readable storage medium for identifying traffic lights, which firstly fill the traffic light pattern to be identified according to the size of the traffic light pattern to be identified, obtain a filling image, obtain a uniform size pattern, and then input the filling image into a neural network identification model of a preset traffic light, so as to effectively avoid the problem that information is changed due to the difference of image sizes, and thus, the polymorphic traffic lights cannot be identified accurately.
The method, the device, the terminal equipment, the storage medium and the computer program for identifying the traffic road indicator lamp provided by the application are described in detail below with reference to the accompanying drawings.
The following describes the recognition method of the traffic road indicator lamp according to the present application in detail with reference to other drawings.
Fig. 1 shows a flow chart of a method for identifying traffic road indicator lights according to an embodiment of the present application, including:
S1: acquiring a shooting image of a traffic road prompt lamp to be identified, wherein the shooting image comprises a pattern of the traffic road prompt lamp to be identified;
S2: filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified, so as to obtain a filling image;
S3: and inputting the filling image into a neural network recognition model of a preset traffic road prompt lamp, wherein the traffic road prompt lamp recognition model outputs the display state of the traffic road prompt lamp.
According to the vehicle tracking method provided by the application, firstly, the traffic road prompt lamp pattern to be identified is filled according to the size of the traffic road prompt lamp pattern to be identified, so that a filling image is obtained, a pattern with uniform size is obtained, then the filling image is input into a neural network identification model of a preset traffic road prompt lamp, the problem that information is changed due to image size difference, so that the traffic light with multiple forms cannot be accurately identified can be effectively avoided, and when the neural network model is adopted for training, the model can be converged due to the fact that the input pattern size is the same.
The method for identifying the traffic light according to the embodiment of the present application may be executed by the server or the terminal device according to the embodiment of the present application, or in other embodiments, the method for identifying the traffic light according to the embodiment of the present application may be executed by any terminal device. For example, the present application may be configured in a monitoring terminal of an identification system of a traffic light, and the embodiment of the present application is not limited thereto.
In the embodiment of the present application, the size of the traffic light pattern to be recognized may include various types, such as 32×96, 96×32, 48×48, etc., which is not limited by the present application.
When inputting a network, conventionally, a sample size is set to be a specific size, such as 32×96 (or 96×32), which has no influence on a transverse traffic light sample basically, but can cause erroneous recognition on a longitudinal traffic light.
The captured image includes a traffic road indicator light pattern to be identified, and further, the captured image includes other non-indicator light patterns, such as a background pattern, for example, a support bar image of an indicator light, a vehicle image, and the like.
In the embodiment of the application, before specific filling, the traffic road indicator pattern to be identified needs to be extracted, specifically, a target detection model may be used to extract the size of the traffic road indicator pattern to be identified, such as a fast R-CNN, SSD and YOLO model.
The size of the traffic road indicator pattern to be identified can also be determined by the edge feature of the traffic road indicator by an edge detection technique, which is not limited by the present application.
In an alternative embodiment, the traffic road indicator light pattern to be identified is rectangular; the step of filling the traffic road indicator pattern to be identified according to the size of the traffic road indicator pattern to be identified, to obtain a filling image, as shown in fig. 2, includes:
S21: determining the long side length and the short side length of the traffic road indicator light pattern to be identified;
s22: according to the length of the side length, the ends of the two short sides of the traffic road prompt lamp pattern to be identified are respectively extended outwards to form extended side parts;
S23: and filling the area limited by the extension edge part and the long edge to obtain the filling image.
In this embodiment, whether the traffic road indicator pattern to be identified is disposed transversely or longitudinally, the long side length and the short side length of the traffic road indicator pattern to be identified are first determined, and then the ends of the two short sides of the traffic road indicator pattern to be identified are respectively extended outwards to form an extended side portion, that is, the short sides are compensated to the length of the long sides, so as to form a square filling area with long sides x.
Specifically, for example, the size of the traffic road indicator pattern to be identified is 32x96, the long side length is 96, the short side length is 32 according to the method, the short side length is supplemented, and because of (96-32)/2=32, the short side of the traffic road indicator pattern to be identified is supplemented with the length 32, so that a filling image with the square size of 96 x96 is formed.
The specific operation of pattern filling is described in detail below, and in some possible embodiments, the filling the area defined by the extension edge and the long edge to obtain the filled image includes:
and filling the pixel points with a preset color value in the area limited by the extending edge and the long edge.
Specifically, for example, pixels with color values with relatively obvious contrast, such as black, white, and the like, are filled in the area defined by the extension edge and the long edge.
In an alternative embodiment, the present application may adaptively fill color values, specifically, the filling the area defined by the extension edge and the long edge, to obtain the filled image, as shown in fig. 3, including:
S211: setting the color value of the filling area according to the color value of the pixel point at the edge of the long side and a preset difference value;
s212: and filling the pixel points with the set color values in the area defined by the extending edge and the long edge.
As shown in fig. 5, for example, the size of the traffic road indicator pattern to be identified is 32x96, the long side length is determined to be 96 according to the method, the short side length is determined to be 32, the short side length is supplemented, and because of (96-32)/2=32, the short side of the traffic road indicator pattern to be identified is supplemented with the length 32, a filling image with a square size of 96 x96 is formed, wherein the color value of a pixel point at the edge of the long side is 20, the preset difference value is 10, the color value of the filling area is set to be 10, and the color value of the filling area is based on the color value at the edge of the long side, so that the edge characteristics of the traffic road indicator pattern to be identified can be amplified, and the identification accuracy of the traffic road indicator pattern to be identified is improved.
In addition, in other alternative embodiments, another filling scheme is provided, where the filling of the area defined by the extension edge and the long edge, to obtain the filled image, as shown in fig. 4, includes:
s221: generating a first color value according to the color value of the pixel point at the edge of the long side and the first set difference value;
s222: generating a second color value according to the first color value and a second set difference value;
S223: and filling the pixel points of the first color value into a part of the limited area close to the long side in the limited area of the extending side part and the long side, and filling the pixel points of the second color value into a part of the limited area away from the long side.
Specifically, for example, the size of the traffic road indicator pattern to be identified is 32x96, the long side length is 96, the short side length is 32, the short side length is supplemented, because (96-32)/2=32, the short side of the traffic road indicator pattern to be identified is supplemented with the length 32, a filling image with the square size of 96 x96 is formed, the color value of a pixel point at the edge of the long side is 30, the preset difference value is 10, the first color value of the filling area is set to be 20, and the color value of the filling area is based on the color value at the edge of the long side, so that the edge characteristic of the traffic road indicator pattern to be identified can be amplified, the identification accuracy of the traffic road indicator pattern to be identified is improved, and because two layers of color value filling are arranged, two paths of edge characteristics can be formed, the amplification of the edge characteristics of the traffic road indicator pattern to be identified is facilitated, and the identification accuracy of the traffic road indicator pattern to be identified is improved.
In an alternative embodiment, the present application provides a solution for adaptively forming a filling color, specifically, filling a region defined by the extension edge and the long edge to obtain the filling image, including:
S231: determining color values of all pixel points in the pixel rows adjacent to the long side by combining preset difference values and color values of all pixel points in the pixel rows adjacent to the long side;
S232: for any two adjacent pixel rows, determining the color value of each pixel point in the pixel row far from the long side by combining a preset difference value and the color value of each pixel point in the pixel row near to the long side;
s233: and filling the areas defined by the extending edge and the long edge according to the determined color value of each pixel point in each pixel row.
Specifically, for example, the size of the traffic road indicator pattern to be identified is 32x96, the long side length is 96, the short side length is 32 according to the method, the short side length is supplemented, because (96-32)/2=32, the short side of the traffic road indicator pattern to be identified is supplemented with the length 32, a filling image with a square size of 96 x96 is formed, when filling, accumulation or subtraction can be performed gradually according to the pixel of the outermost layer, for example, the color value of each pixel in the pixel row where the long side is located is 10, 15, 20, 13, 12 (assume values, for convenience of understanding), the pixel filling of the first row can be increased by 2 on the basis of 10, 15, 20, 13, 12, so as to form a pixel row with a row of color values of 12, 17, 22, 15, 14, and then a new pixel row is formed by increasing 2 on the basis of 12, 17, 22, 15, 14, so as to form: 14. 19, 24, 17, 16, and so on, for each row of pixels, the color features of the edges can be continuously displayed, which is more beneficial to feature expression on the one hand, and on the other hand, the contrast can be improved by increasing the color values.
It will be appreciated that traffic lights are typically traffic lights, and thus the color values are divided into red, green and yellow color values, which vary from 0 to 255, and that in embodiments of the present application the color values are single color values, e.g., red values for red lights are selected from the range of 0 to 255, so it can be seen that the greater the value, the darker the color, and the more pronounced the contrast.
In addition, in the embodiment of the application, a pattern with a color value of 0 can be simply filled in a filling area, for example, the size of a traffic road indicator pattern to be identified is 32x96, if the long side length is 96 and the short side length is 32 according to the method, the short side length is supplemented, and because of (96-32)/2=32, the short side of the traffic road indicator pattern to be identified is supplemented with the length 32, so that a filling image with a square size of 96 x96 is formed, and when the pattern is filled, no matter the color value and the color condition of the long side, all zero filling is defaults.
In the embodiment of the application, the display state of the traffic prompt lamp can be indicated by three colors of red, green and yellow, or can be indicated by special shapes such as an arrow, and the like, if the display state is indicated by the arrow, the colors are generally only two colors, namely black and green, or black and red, the black represents the prompt to be closed, and the other colors represent the prompt to be opened.
In an alternative embodiment, in order to improve the contrast, the pattern of the indicator light is placed in the center and filled on two long sides symmetrically, and at this time, the length of each extension part is set to be the same and half of the difference value between the long side length and the short side length, so that the two long sides can be filled symmetrically row by row during specific filling.
The method for extracting the traffic road indicator pattern to be identified according to the present application further includes:
And inputting the shot image into a target detection model, and outputting the traffic road prompt lamp pattern to be identified by the target detection model.
Specifically, firstly, a traffic light image on a road is acquired according to an image acquisition device, wherein the traffic light image comprises a transverse traffic light and a longitudinal traffic light, the traffic lights in the image are marked in a manual or semi-automatic mode, and a corresponding traffic light data set is manufactured. And detecting the traffic lights by using an image target detection network (such as an R-CNN model and yolo model) to obtain a detection frame, storing the detection targets therein, and classifying the detection targets by using a manual or semi-automatic mode to obtain a data set corresponding to the traffic light classification and identification network, wherein the data set comprises five types of red lights, green lights, yellow lights, black lights and other negative samples, and each type comprises transverse and longitudinal traffic light data samples. The method is characterized in that the traffic light classification data set sample is self-adaptively pixel-filled to be of a fixed size N multiplied by N, then subsequent convolution, pooling and other operations are carried out, so that the problem that information is changed due to image size difference, and thus the multi-form traffic light can not be accurately identified can be effectively avoided.
Taking the R-CNN model as an example, firstly, a candidate region (region proposal) where a target may exist in a picture is found, then the candidate region is adjusted to be suitable for the size 227×227 of an input image of a AlexNet network, feature vectors are extracted from the candidate region through CNN, and the CNN features of 2000 suggestion frames are combined into a network AlexNet to be finally output: 2000×4096 dimensional matrix, training the SVM classifier (20 classes of classification, 20 SVMs for SVM) with 2000×4096 dimensional features to obtain 2000×20 class matrix, eliminating overlapped suggestion frames from 2000×20 dimensional matrix by non-maximum suppression (NMS: non-maximum suppression) to obtain some suggestion frames highest to the target object, correcting bbox, and performing regression fine tuning on bbox.
In other embodiments of the present application, a YOLO model may be adopted, specifically, according to the present application, a neural network is used in YOLO, coordinates of a bounding box and confidence and category probabilities of objects contained in the box may be predicted from a whole image, and YOLO can see information of a whole image during training and testing, so that the YOLO can well use context information during detecting objects, and thus it is difficult to predict incorrect object information on the background, compared with Fast-R-CNN, background errors of YOLO are less than half of Fast-R-CNN, and simultaneously YOLO can learn more abstract features of objects than DPM, R-CNN and other object detection systems, the present application uses YOLO to detect objects, and its flow is very simple and clear, and is mainly divided into three parts: convolution layer, target detection layer, NMS screening layer: the following are provided:
1. taking images resize to 448 x 448 as inputs to the neural network;
2. The neural network is operated to obtain some coordinates of the bounding box, confidence of the objects contained in the box and class probabilities
3. Non-maximal suppression was performed and Boxes were screened.
In the embodiment of the application, the YOLO network structure is composed of 24 convolution layers and 2 full connection layers, the network entry is 448x448 (v 2 is 416x 416), the picture enters the network and passes through the resolution first, and the output result of the network is a tensor, which is not described in detail herein.
In the embodiment of the application, since the target detection model is also a neural network model, after model training is converged, a traffic light target can be rapidly extracted, then an NxN image is obtained by matching with the self-adaptive filling pattern, and the image is used as the input of the neural network model, so that all the inputs are of uniform size, and the traffic light recognition model can be converged.
In addition, based on the filling scheme of the color values, the characteristic contrast can be greatly improved, so that the characteristics are more obvious, and the accuracy of neural network identification can be improved.
In an alternative embodiment, the embodiment of the present application provides a training step of a model, specifically, the method further includes:
S01: marking the display states of a plurality of historical traffic road prompt lamp patterns;
S02: and inputting each historical traffic road prompt lamp pattern marked with the display state into a neural network model, and setting the output of the neural network model as a corresponding marked result until the neural network model converges to obtain the neural network identification model.
In an alternative embodiment, the method further comprises:
s03: marking out traffic road prompt lamp patterns to be identified in a plurality of historical shooting images;
S04: and inputting the historical shooting image of each marked traffic road prompt lamp pattern to be identified into a neural network model, and setting the output of the neural network model as the traffic road prompt lamp pattern to be identified until the neural network model converges to obtain the target detection model.
The present application will be described in detail with reference to specific scenarios.
The specific flow of the application is as follows:
1. Firstly, acquiring transverse and longitudinal traffic light image data through data acquisition equipment, and then marking traffic lights in the images manually or semi-automatically to obtain a traffic light image detection data set
2. Training by using yolo network model according to the image detection data set to obtain a two-dimensional image target detection model capable of detecting transverse and longitudinal traffic lights
3. According to the detection result, an image of the detection frame area is obtained, and is classified manually or semi-automatically to obtain five types of data including red light, green light, yellow light, black light and other negative samples, wherein each type comprises a transverse traffic light data sample and a longitudinal traffic light data sample
4. According to the corresponding image size, performing adaptive pixel filling on the data sample in 3, namely expanding the data sample to NxN according to the size of the longest side, and obtaining a preprocessed result
5. And carrying out classified prediction on the preprocessed image by using resnet network architecture to obtain a corresponding traffic light state identification result.
In an alternative embodiment, the object detection model is selected from yolo network models, CNN network models, or PNN network models.
In an alternative embodiment, the neural network identification model is selected from the classical CNN neural network model, and the network architecture of the neural network identification model is resnet network architecture.
It can be seen that the present application firstly fills the traffic road indicator pattern to be identified according to the size of the traffic road indicator pattern to be identified to obtain a filling image, obtains a pattern with uniform size, then inputs the filling image into a neural network identification model of a preset traffic road indicator, the problem that information is changed due to image size difference, so that the polymorphic traffic lights cannot be accurately identified can be effectively avoided, and when the neural network model is adopted for training, the model can be converged due to the fact that the input pattern sizes are the same.
Based on the same inventive concept, the embodiment of the present application further provides an identification system 10 of a traffic road indicator lamp, as shown in fig. 6, including:
The method comprises the steps that an acquisition module 1 acquires a shooting image of a traffic road prompt lamp to be identified, wherein the shooting image comprises a pattern of the traffic road prompt lamp to be identified;
the filling module 2 is used for filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified to obtain a filling image;
the recognition module 3 inputs the filling image into a neural network recognition model of a preset traffic road prompt lamp, wherein the traffic road prompt lamp recognition model outputs the display state of the traffic road prompt lamp.
According to the recognition system provided by the application, firstly, the traffic road prompt lamp pattern to be recognized is filled according to the size of the traffic road prompt lamp pattern to be recognized, so that a filling image is obtained, a pattern with uniform size is obtained, then the filling image is input into the neural network recognition model of the preset traffic road prompt lamp, the problem that information is changed due to image size difference, so that the polymorphic traffic light cannot be recognized accurately can be effectively avoided, and when the neural network model is adopted for training, the model can be converged due to the fact that the input pattern size is the same.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, and will not be described herein again.
In order to realize the embodiment, the application further provides terminal equipment. Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 7, the terminal apparatus 600 includes:
A memory 610 and at least one processor 620, a bus 630 connecting the different components (including the memory 610 and the processor 620), the memory 610 stores a computer program, and the processor 620 executes the program to implement the method for identifying traffic lights according to the embodiment of the present application.
Bus 630 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Terminal device 600 typically includes a variety of electronic device readable media. Such media can be any available media that is accessible by terminal device 600 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 610 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 640 and/or cache memory 650. The terminal device 600 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 660 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard disk drive"). Although not shown in fig. 7, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 630 through one or more data medium interfaces. Memory 610 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the application.
A program/utility 680 having a set (at least one) of program modules 670 may be stored in, for example, memory 610, such program modules 670 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 670 generally perform the functions and/or methods of the embodiments described herein.
The terminal device 600 can also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, etc.), one or more devices that enable a user to interact with the terminal device 600, and/or any device (e.g., network card, modem, etc.) that enables the terminal device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 692. Also, terminal device 600 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 693. As shown, network adapter 693 communicates with other modules of terminal device 600 over bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with terminal device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 620 executes various functional applications and data processing by running programs stored in the memory 610.
It should be noted that, the implementation process and the technical principle of the terminal device in this embodiment refer to the foregoing explanation of the method for identifying the traffic road indicator lamp in this embodiment of the present application, and are not repeated herein.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a terminal device, causes the terminal device to perform steps enabling the implementation of the respective method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may be implemented by implementing all or part of the flow of the method of the above embodiment, and may be implemented by instructing relevant hardware by a computer program, where the computer program may be stored on a computer readable storage medium, and the computer program may be implemented by implementing the steps of each of the method embodiments described above when executed by a processor. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the details or descriptions of other embodiments may be referred to for those parts of an embodiment that are not described in detail or are described in detail.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limited thereto; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and they should be included in the protection scope of the present application.

Claims (15)

1. A method of identifying traffic road indicator lights, comprising:
Acquiring a shooting image of a traffic road prompt lamp to be identified, wherein the shooting image comprises a pattern of the traffic road prompt lamp to be identified;
Filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified, so as to obtain a filling image;
And inputting the filling image into a neural network recognition model of a preset traffic road prompt lamp, wherein the traffic road prompt lamp recognition model outputs the display state of the traffic road prompt lamp.
2. The recognition method according to claim 1, wherein the traffic road indicator light pattern to be recognized is rectangular; the step of filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified to obtain a filling image comprises the following steps:
determining the long side length and the short side length of the traffic road indicator light pattern to be identified;
According to the length of the side length, the ends of the two short sides of the traffic road prompt lamp pattern to be identified are respectively extended outwards to form extended side parts;
and filling the area limited by the extension edge part and the long edge to obtain the filling image.
3. The method of identifying of claim 2, wherein said filling the area defined by the extended edge portion and the long edge to obtain the filled image includes:
and filling the pixel points with a preset color value in the area limited by the extending edge and the long edge.
4. The method of identifying of claim 2, wherein said filling the area defined by the extended edge portion and the long edge to obtain the filled image includes:
Setting the color value of the filling area according to the color value of the pixel point at the edge of the long side and a preset difference value;
and filling the pixel points with the set color values in the area defined by the extending edge and the long edge.
5. The method of claim 1, wherein said filling the area defined by the extended edge portion and the long edge to obtain the filled image comprises:
generating a first color value according to the color value of the pixel point at the edge of the long side and the first set difference value;
generating a second color value according to the first color value and a second set difference value;
And filling the pixel points of the first color value into a part of the limited area close to the long side in the limited area of the extending side part and the long side, and filling the pixel points of the second color value into a part of the limited area away from the long side.
6. The method of claim 1, wherein said filling the area defined by the extended edge portion and the long edge to obtain the filled image comprises:
Determining color values of all pixel points in the pixel rows adjacent to the long side by combining preset difference values and color values of all pixel points in the pixel rows adjacent to the long side;
For any two adjacent pixel rows, determining the color value of each pixel point in the pixel row far from the long side by combining a preset difference value and the color value of each pixel point in the pixel row near to the long side;
And filling the areas defined by the extending edge and the long edge according to the determined color value of each pixel point in each pixel row.
7. The method of claim 1, wherein each extension is the same length and is one half of the difference between the long side length and the short side length.
8. The method of identifying of claim 1, wherein prior to populating the traffic-road-indicator pattern to be identified according to the size of the traffic-road-indicator pattern to be identified, the method further comprises:
And inputting the shot image into a target detection model, and outputting the traffic road prompt lamp pattern to be identified by the target detection model.
9. The identification method of claim 1, wherein the method further comprises:
marking the display states of a plurality of historical traffic road prompt lamp patterns;
And inputting each historical traffic road prompt lamp pattern marked with the display state into a neural network model, and setting the output of the neural network model as a corresponding marked result until the neural network model converges to obtain the neural network identification model.
10. The identification method of claim 8, wherein the method further comprises:
Marking out traffic road prompt lamp patterns to be identified in a plurality of historical shooting images;
And inputting the historical shooting image of each marked traffic road prompt lamp pattern to be identified into a neural network model, and setting the output of the neural network model as the traffic road prompt lamp pattern to be identified until the neural network model converges to obtain the target detection model.
11. The identification method of claim 1, wherein the object detection model is selected from yolo network models, CNN network models, or PNN network models.
12. The identification method according to claim 1, characterized in that the neural network identification model is selected from the classical CNN neural network model, and the network architecture of the neural network identification model is resnet network architecture.
13. A traffic road indicator light identification system comprising:
The acquisition module is used for acquiring a shooting image of the traffic road prompt lamp to be identified, wherein the shooting image comprises a pattern of the traffic road prompt lamp to be identified;
The filling module is used for filling the traffic road prompt lamp pattern to be identified according to the size of the traffic road prompt lamp pattern to be identified, so as to obtain a filling image;
And the identification module inputs the filling image into a neural network identification model of a preset traffic road indicator lamp, wherein the traffic road indicator lamp identification model outputs the display state of the traffic road indicator lamp.
14. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-12 when executing the computer program.
15. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1-12.
CN202211688226.6A 2022-12-27 2022-12-27 Method, system, equipment and readable storage medium for identifying traffic road indicator lamp Pending CN118262323A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211688226.6A CN118262323A (en) 2022-12-27 2022-12-27 Method, system, equipment and readable storage medium for identifying traffic road indicator lamp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211688226.6A CN118262323A (en) 2022-12-27 2022-12-27 Method, system, equipment and readable storage medium for identifying traffic road indicator lamp

Publications (1)

Publication Number Publication Date
CN118262323A true CN118262323A (en) 2024-06-28

Family

ID=91606119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211688226.6A Pending CN118262323A (en) 2022-12-27 2022-12-27 Method, system, equipment and readable storage medium for identifying traffic road indicator lamp

Country Status (1)

Country Link
CN (1) CN118262323A (en)

Similar Documents

Publication Publication Date Title
CN107545239B (en) Fake plate detection method based on license plate recognition and vehicle characteristic matching
CN109993056B (en) Method, server and storage medium for identifying vehicle illegal behaviors
CN113160192B (en) Visual sense-based snow pressing vehicle appearance defect detection method and device under complex background
CN112686812B (en) Bank card inclination correction detection method and device, readable storage medium and terminal
CN106599792B (en) Method for detecting hand driving violation behavior
CN112307989B (en) Road surface object identification method, device, computer equipment and storage medium
JP5357331B2 (en) Semantic scene segmentation using random multinomial logit
CN108875600A (en) A kind of information of vehicles detection and tracking method, apparatus and computer storage medium based on YOLO
CN104318225B (en) Detection method of license plate and device
CN111767878B (en) Deep learning-based traffic sign detection method and system in embedded device
CN110956169A (en) License plate recognition method and device and electronic equipment
CN110852316A (en) Image tampering detection and positioning method adopting convolution network with dense structure
CN111325769A (en) Target object detection method and device
CN110659550A (en) Traffic sign recognition method, traffic sign recognition device, computer equipment and storage medium
CN113269267B (en) Training method of target detection model, target detection method and device
CN105184291B (en) A kind of polymorphic type detection method of license plate and system
CN110599453A (en) Panel defect detection method and device based on image fusion and equipment terminal
Azad et al. New method for optimization of license plate recognition system with use of edge detection and connected component
CN114387591A (en) License plate recognition method, system, equipment and storage medium
CN114444565B (en) Image tampering detection method, terminal equipment and storage medium
CN110245673A (en) Method for detecting parking stalls and device
CN109977941A (en) Licence plate recognition method and device
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN116245882A (en) Circuit board electronic element detection method and device and computer equipment
CN111178359A (en) License plate number recognition method, device and equipment and computer storage medium

Legal Events

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