CN116486369A - Traffic sign detection method and device, electronic equipment and storage medium - Google Patents
Traffic sign detection method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116486369A CN116486369A CN202310363959.0A CN202310363959A CN116486369A CN 116486369 A CN116486369 A CN 116486369A CN 202310363959 A CN202310363959 A CN 202310363959A CN 116486369 A CN116486369 A CN 116486369A
- Authority
- CN
- China
- Prior art keywords
- traffic sign
- processed
- image
- target
- road
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 52
- 238000000034 method Methods 0.000 claims abstract description 37
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 24
- 238000012545 processing Methods 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 16
- 239000011159 matrix material Substances 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 6
- 230000009467 reduction Effects 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 238000010008 shearing Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 6
- 239000003086 colorant Substances 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000000513 principal component analysis Methods 0.000 description 2
- 238000012952 Resampling Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000704 physical effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
- G06V20/582—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of traffic signs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/42—Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements 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)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a traffic sign detection method, a traffic sign detection device, electronic equipment and a storage medium. The method comprises the following steps: acquiring road traffic sign images; extracting traffic signs in the road traffic sign image based on a preset convolutional neural network model to obtain traffic signs to be processed; and identifying the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign. According to the technical scheme, the pixels which are possibly traffic signs are effectively extracted through the convolutional neural network model, color features which do not belong to traffic sign categories at all are removed, and then the traffic signs are confirmed by adopting the local templates, so that the traffic sign detection efficiency and the traffic sign detection result can be improved.
Description
Technical Field
The present invention relates to the field of traffic sign detection and identification technologies, and in particular, to a traffic sign detection method, a device, an electronic apparatus, and a storage medium.
Background
The road traffic sign is an important road traffic safety accessory facility, various guiding and constraint information can be provided for a driver, the driver can accurately acquire traffic sign information in real time, and driving safety can be guaranteed.
The automobile safety auxiliary driving system can realize detection and confirmation of the traffic sign by utilizing the color characteristics of the traffic sign through an image recognition technology.
Traditional traffic sign recognition algorithms rely on a single convolutional neural network model, and practical detection effects are limited.
Disclosure of Invention
The invention provides a traffic sign detection method, a device, electronic equipment and a storage medium, which can improve traffic sign detection efficiency and detection results.
According to an aspect of the present invention, there is provided a traffic sign detection method, the method comprising:
acquiring road traffic sign images;
extracting traffic signs in the road traffic sign image based on a preset convolutional neural network model to obtain traffic signs to be processed;
and identifying the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign.
According to another aspect of the present invention, there is provided a traffic sign detection apparatus comprising:
the road traffic sign image acquisition module is used for acquiring road traffic sign images;
the convolutional neural network model processing module is used for extracting traffic signs in the road traffic sign image based on a preset convolutional neural network model to obtain traffic signs to be processed;
and the traffic sign recognition module is used for recognizing the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a traffic sign detection method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement a traffic sign detection method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the traffic sign in the road traffic sign image is extracted based on the preset convolutional neural network model to obtain the traffic sign to be processed, and the traffic sign to be processed is identified based on the gray information of the traffic sign to be processed to obtain the target traffic sign. According to the technical scheme, the pixels which are possibly traffic signs are effectively extracted through the convolutional neural network model, color features which do not belong to traffic sign categories at all are removed, and then the traffic signs are confirmed by adopting the local templates, so that the traffic sign detection efficiency and the traffic sign detection result can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a traffic sign detection method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a traffic sign extraction and labeling process according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a traffic sign detection device and a data flow according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a traffic sign detection method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "target," "to be processed," and the like in the description and claims of the present invention and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a traffic sign detection method according to a first embodiment of the present invention, where the method may be applied to detect and identify traffic signs, and the method may be performed by a traffic sign detection device, which may be implemented in hardware and/or software, and the traffic sign detection device may be configured in an electronic device. As shown in fig. 1, the method includes:
s110, acquiring road traffic sign images.
The road traffic sign is a facility for transmitting specific information to traffic participants by using graphics, colors and characters for managing traffic and guaranteeing safety.
In the present embodiment, the road traffic sign image may be acquired based on a photographing device pre-installed on the road. For example, the road traffic sign image may be captured based on a camera, or the road traffic sign image may be captured based on a CCD (charge coupled device camera) camera.
In the scheme, the obtained road traffic sign images are subjected to unified marking processing, and each image generates a text file containing the traffic sign position for training and verification of a subsequent neural network algorithm. The road traffic sign image can be marked by adopting a common detection frame. The subsequent detection algorithms will also differ according to the labeling method. Each pixel point is marked more carefully, a lot of noise is introduced in common square frame marking, a lot of traffic marks in a real scene are triangles and circles, and in order to reduce errors caused by square frame identification marks, more accurate polygons or closed arcs can be adopted for marking.
And S120, extracting the traffic sign in the road traffic sign image based on a preset convolutional neural network model to obtain the traffic sign to be processed.
In this embodiment, the color of the traffic sign is the most dominant feature for distinguishing the surrounding environment, and the existence of the traffic sign can be perceived from the color feature, so that the traffic sign in the road traffic sign image can be extracted based on the convolutional neural network model.
In this scheme, the convolutional neural network model includes an HSV color model, a classification neural network model, binarization, and the like. In various color models, the calculated amount of the binarized HSV color model is small and can meet the requirement of real-time property. Preferably, the HSV color model may be used to extract traffic signs in road traffic sign images.
Optionally, extracting the traffic sign in the road traffic sign image based on a preset convolutional neural network model to obtain a traffic sign to be processed, including the steps of A1-A3:
a1, performing color space conversion on the road traffic sign image to obtain an HSV image under the condition that the road traffic sign image is not the HSV image;
in this scheme, in the case where the road traffic sign image is not an HSV image, the color space conversion of the road traffic sign image is required. I.e. converting road traffic sign images into HSV images. In the case where the road traffic sign image is an HSV image, the road traffic sign image may be directly processed.
Further, the three-dimensional representation of colors in the HSV color system coordinate system includes three parameters, hue (Hue), saturation (Saturation), and Value (Value). H represents the color, S represents the shade of the color, and V represents the darkness of the color. Unlike the RGB color model, the HSV color model is better able to describe perceptual features of colors rather than relying solely on the values of pixels. However, because of the strong brightness contrast in the traffic sign image, in order to reduce the complexity of the subsequent neural network operation as much as possible, the three types of coordinates of the colors are normalized, that is, the color coordinate transformation is adopted. Before normalization, a specific adjustment algorithm can be adopted to enhance the HSV pixel information with traffic signs:
wherein ρ is 0 、ρ 1 、ρ 2 Representing the weight coefficient.
And A2, processing the HSV image according to preset weights to obtain a target HSV image.
Specifically, hue, saturation and brightness in an HSV image are used as three dimensions, a three-dimensional statistical function is constructed, each pixel point in the traffic sign is given higher weight, a function value of each color in a two-dimensional interval is generated, and pixels which do not appear in the traffic sign are given lower weight.
In this scheme, the probability of the pixel occurring is denoted as p= (H) under the condition that the traffic sign is known 1 ,S 1 ,V 1 |sign i ) The specific form obeying the two-dimensional gaussian distribution is:
the formula takes the calculation result of the three-dimensional quantity of the image pixels as the occurrence probability of the traffic sign of the two-dimensional space position, and the calculation result is obtained through unbiased parameter estimation. According to Bayes' rule, for any point (X i ,Y i ) The existence probability of one possible traffic sign can be derived as follows:wherein p (sign) represents the probability that a certain point is a traffic sign, p (X) i ,Y i ) Representation (X) i ,Y i ) The point is the probability of a traffic sign. Since in the determined image p (sign) and (X i ,Y i ) Are deterministic and therefore can be directly approximated as follows: p (sign|X) i ,Y i )=p(X i ,Y i |sign)。
And A3, extracting traffic signs in the target HSV image based on color threshold values of all pixel points in the target HSV image to obtain traffic signs to be processed.
In the scheme, the traffic sign in the HSV image can be extracted based on the color threshold value of each pixel point to obtain the traffic sign to be processed, namely, the pixels which are possibly the traffic sign in the HSV image are effectively extracted, and the color features which do not belong to the traffic sign category at all are removed.
Optionally, extracting the traffic sign in the target HSV image based on the color threshold value of each pixel point in the target HSV image to obtain a traffic sign to be processed, including the steps of:
step B1, comparing a color threshold value of each pixel point in the target HSV image with a color threshold value in a predetermined traffic sign detection frame, and determining a confidence coefficient weight corresponding to each color;
and B2, performing binarization processing on the target HSV image based on the confidence weight to obtain a traffic sign to be processed.
The color threshold may be set according to traffic sign extraction requirements.
In the scheme, each pixel point can be compared with a color threshold value in a calibrated detection frame. If the color threshold value of each pixel point is larger than or equal to the color threshold value in the traffic sign detection frame, extracting; and if the color threshold value of each pixel point is smaller than the color threshold value in the traffic sign detection frame, eliminating so as to extract the traffic sign from the HSV image.
In this embodiment, the probability database of each H, S, V value belonging to the representative color may also be established, so as to facilitate classification of the convolutional neural network model.
The convolutional neural network model is utilized to process the road traffic sign image, so that the confidence of the existence of the traffic sign can be given to the pixels which are possibly the traffic sign, and the color features which do not belong to the traffic sign category at all can be removed.
And S130, identifying the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign.
In the scheme, the traffic sign to be processed can be identified by adopting a gray information template matching method, so that the target traffic sign is obtained.
Optionally, identifying the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign, including the steps of C1-C3:
step C1, determining gray information of the traffic sign to be processed; the gray information comprises a gray matrix, a gray mean value and a mean square error;
step C2, calculating the similarity between the gray information of the traffic sign to be processed and the gray information of the preset traffic sign to obtain a similarity value;
and C3, identifying the traffic sign to be processed based on the similarity value to obtain a target traffic sign.
Specifically, when the templates are matched, a neural network classifier of two-dimensional data can be adopted to calculate the similarity degree of the two. Let the gray matrix of traffic sign be T [ M ]][N]The gray average value is mu T Mean square error is sigma T The gray matrix of the image window in the traffic sign to be processed is R M][N]The gray average value is mu R Mean square error is sigma R The correlation coefficient r between them is:
further, in the template matching process, the matching process based on the original scale is too time-consuming and is more time-consuming for the global template, so that the detection efficiency can be improved under the condition of considering multiple scales. The scheme continuously carries out three times of resampling under the original scale so as to obtain images with different resolutions. Firstly, performing rough matching in the image with the lowest resolution, and eliminating obvious non-traffic sign targets according to the similarity between the images. After the first rough matching, some suspected traffic sign targets are obtained. Similar to the first rough matching process, three times of matching are continuously performed, and finally, the target of the segmentation is confirmed to be the required target traffic sign.
Optionally, identifying the traffic sign to be processed based on the similarity value to obtain a target traffic sign, including step D1:
and D1, if the similarity value is greater than or equal to a preset similarity threshold value, taking the traffic sign to be processed as a target traffic sign.
Wherein the similarity threshold may be set based on traffic sign extraction requirements.
In the scheme, when the similarity value is greater than or equal to a preset similarity threshold value, the traffic sign to be processed is taken as a target traffic sign; and when the similarity value is smaller than the preset similarity threshold value, not processing the traffic sign to be processed.
According to the technical scheme, the traffic sign in the road traffic sign image is extracted based on the preset convolutional neural network model to obtain the traffic sign to be processed, and the traffic sign to be processed is identified based on the gray information of the traffic sign to be processed to obtain the target traffic sign. According to the technical scheme, firstly, pixels which are possibly traffic signs are effectively extracted through a convolutional neural network model, color features which do not belong to traffic sign categories at all are removed, and then, the traffic signs are confirmed by adopting a local template, so that the traffic sign detection efficiency and the traffic sign detection result can be improved.
Example two
Fig. 2 is a schematic diagram of a traffic sign extraction process according to a second embodiment of the present invention, and the relationship between the present embodiment and the above embodiments is a detailed description of a process for processing road traffic sign images. As shown in fig. 2, the method includes:
s210, determining a road traffic sign image to be processed based on the pre-acquired original image.
In the present embodiment, an original image is acquired based on a photographing apparatus pre-installed on a road, and a road traffic sign image to be processed is extracted from the original image. Preferably, the original image may be acquired based on a CCD camera.
S220, preprocessing the road traffic sign image to be processed to obtain a road traffic sign image.
In the scheme, in the actual acquisition process of the image, a plurality of factors in the scene, such as illumination condition, geometric property and physical property of an object in the scene, spatial relationship between the object and an imaging system and the like, and tools and means for acquiring the image can not fully reflect all information of the original image. Therefore, it is necessary to pre-process the road traffic sign image to be processed.
In this embodiment, the road traffic sign image to be processed may be preprocessed using a conventional image processing technique. For example, the road traffic sign image to be processed may be preprocessed using a binarization technique, an image segmentation technique, or the like.
Optionally, preprocessing the road traffic sign image to be processed to obtain a road traffic sign image, including step E1:
and E1, performing shearing processing and dimension reduction processing on the road traffic sign image to be processed to obtain the road traffic sign image.
In this embodiment, the erection position of the traffic sign is generally set on the right side of the road, and the height is relatively fixed, and the manual information similar to the traffic sign has a certain position from the traffic sign. After the road traffic sign image to be processed is acquired, the interference information on the traffic sign in the road traffic sign image to be processed can be reduced through cutting of the image, the information quantity required to be processed in the subsequent links is also greatly reduced, and the time cost is saved for the subsequent algorithm processing.
Furthermore, considering the degradation of the image color and the association of the characteristic components of the HSV color model, the pixel color components with high correlation are subjected to decorrelation stretching treatment by a decorrelation stretching method, the correlation between the pixel color components is weakened, and then stretching is performed, so that the image boundary is clearer. Specifically, the PCA (Principal Component Analysis) dimension reduction mode can be adopted to eliminate the correlation among the vectors of the correlation matrix so as to achieve the purpose of the correlation of the primary color components. The multiple variables are described as a few principal components that are uncorrelated, i.e., the sample is described by using a small number of features to achieve a reduced dimension in feature space.
The detection time of the traffic sign is reduced by preprocessing the road traffic sign image to be processed, the traffic sign display is clearer and more visible by dimension reduction processing, and the detection efficiency and the detection result of the traffic sign are greatly improved.
And S230, extracting the traffic sign in the road traffic sign image based on a preset convolutional neural network model to obtain the traffic sign to be processed.
S240, identifying the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign.
According to the technical scheme, the road traffic sign image to be processed is determined based on the pre-acquired original image, the road traffic sign image to be processed is preprocessed to obtain the road traffic sign image, then the traffic sign in the road traffic sign image is extracted based on the preset convolutional neural network model to obtain the traffic sign to be processed, and the traffic sign to be processed is identified based on the gray information of the traffic sign to be processed to obtain the target traffic sign. According to the technical scheme, firstly, pixels which are possibly traffic signs are effectively extracted through manual marking, color features which do not belong to traffic sign categories at all are removed, and then, the traffic signs are confirmed through the local templates, so that the traffic sign detection efficiency and the traffic sign detection result can be improved.
Example III
Fig. 3 is a schematic structural diagram of a traffic sign detection device according to a third embodiment of the present invention.
As shown in fig. 3, the apparatus includes:
a road traffic sign image acquisition module 310 for acquiring a road traffic sign image;
the convolutional neural network model processing module 320 is configured to extract a traffic sign in the road traffic sign image based on a preset marked traffic sign image, so as to obtain a traffic sign to be processed;
the traffic sign recognition module 330 is configured to recognize the traffic sign to be processed based on the gray information of the traffic sign to be processed, so as to obtain a target traffic sign.
Optionally, the convolutional neural network model processing module 320 includes:
the HSV image obtaining unit is used for carrying out color space conversion on the road traffic sign image to obtain an HSV image under the condition that the road traffic sign image is not the HSV image;
the target HSV image obtaining unit is used for processing the HSV image according to preset weights to obtain a target HSV image;
the traffic sign obtaining unit is used for extracting the traffic sign in the target HSV image based on the color threshold value of each pixel point in the target HSV image to obtain the traffic sign to be processed.
Optionally, the traffic sign obtaining unit to be processed is specifically configured to:
comparing the color threshold value of each pixel point in the target HSV image with the color threshold value in a predetermined traffic sign detection frame, and determining the confidence coefficient weight corresponding to each color;
and carrying out binarization processing on the target HSV image based on the confidence weight to obtain a traffic sign to be processed.
Optionally, the traffic sign recognition module 330 includes:
the gray information determining unit is used for determining gray information of the traffic sign to be processed; the gray information comprises a gray matrix, a gray mean value and a mean square error;
the similarity value calculation convolution kernel is used for calculating the similarity between the gray information of the traffic sign to be processed and the gray information of the preset traffic sign to obtain a similarity value;
and the traffic sign character recognition unit is used for carrying out finer recognition on the traffic sign to be processed based on the similarity value to obtain information such as characters and patterns of the target traffic sign.
Optionally, the traffic sign recognition unit is specifically configured to:
and if the similarity value is greater than or equal to a preset similarity threshold value, taking the traffic sign to be processed as a target traffic sign.
Optionally, the road traffic sign image acquisition module 310 includes:
the road traffic sign image determining unit is used for determining a road traffic sign image to be processed based on the pre-acquired original image;
the road traffic sign image obtaining unit is used for preprocessing the road traffic sign image to be processed to obtain a road traffic sign image.
Optionally, the road traffic sign image obtaining unit is specifically configured to:
and performing shearing processing and dimension reduction processing on the road traffic sign image to be processed to obtain the road traffic sign image.
The traffic sign detection device provided by the embodiment of the invention can execute the traffic sign detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a traffic sign detection method.
In some embodiments, a traffic sign detection method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of a traffic sign detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a traffic sign detection method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A traffic sign detection method, comprising:
acquiring road traffic sign images;
extracting traffic signs in the road traffic sign image based on a preset convolutional neural network model to obtain traffic signs to be processed;
and identifying the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign.
2. The method of claim 1, wherein extracting traffic signs in the road traffic sign image based on a preset convolutional neural network model to obtain traffic signs to be processed comprises:
under the condition that the road traffic sign image is not an HSV image, performing color space conversion on the road traffic sign image to obtain the HSV image;
processing the HSV image according to preset weights to obtain a target HSV image;
and extracting traffic signs in the target HSV image based on the color threshold value of each pixel point in the target HSV image to obtain traffic signs to be processed.
3. The method of claim 2, wherein extracting traffic signs in the target HSV image based on color thresholds of pixels in the target HSV image to obtain traffic signs to be processed comprises:
comparing the color threshold value of each pixel point in the target HSV image with the color threshold value in a predetermined traffic sign detection frame, and determining the confidence coefficient weight corresponding to each color;
and carrying out binarization processing on the target HSV image based on the confidence weight to obtain a traffic sign to be processed.
4. The method of claim 1, wherein identifying the traffic sign to be processed based on the grayscale information of the traffic sign to be processed to obtain a target traffic sign comprises:
determining gray information of the traffic sign to be processed; the gray information comprises a gray matrix, a gray mean value and a mean square error;
calculating the similarity between the gray information of the traffic sign to be processed and the gray information of the preset traffic sign to obtain a similarity value;
and identifying the traffic sign to be processed based on the similarity value to obtain a target traffic sign.
5. The method of claim 4, wherein identifying the traffic sign to be processed based on the similarity value results in a target traffic sign, comprising:
and if the similarity value is greater than or equal to a preset similarity threshold value, taking the traffic sign to be processed as a target traffic sign.
6. The method of claim 1, wherein acquiring the road traffic sign image comprises:
determining a road traffic sign image to be processed based on a pre-acquired original image;
and preprocessing the road traffic sign image to be processed to obtain the road traffic sign image.
7. The method of claim 6, wherein preprocessing the road traffic sign image to be processed to obtain a road traffic sign image comprises:
and performing shearing processing and dimension reduction processing on the road traffic sign image to be processed to obtain the road traffic sign image.
8. A traffic sign detection device, comprising:
the road traffic sign image acquisition module is used for acquiring road traffic sign images;
the convolutional neural network model processing module is used for extracting traffic signs in the road traffic sign image based on a preset convolutional neural network model to obtain traffic signs to be processed;
and the traffic sign recognition module is used for recognizing the traffic sign to be processed based on the gray information of the traffic sign to be processed to obtain a target traffic sign.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a traffic sign detection method as claimed in any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform a traffic sign detection method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310363959.0A CN116486369A (en) | 2023-04-06 | 2023-04-06 | Traffic sign detection method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310363959.0A CN116486369A (en) | 2023-04-06 | 2023-04-06 | Traffic sign detection method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116486369A true CN116486369A (en) | 2023-07-25 |
Family
ID=87220563
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310363959.0A Pending CN116486369A (en) | 2023-04-06 | 2023-04-06 | Traffic sign detection method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116486369A (en) |
-
2023
- 2023-04-06 CN CN202310363959.0A patent/CN116486369A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10319096B2 (en) | Automated tattoo recognition techniques | |
CN108229509B (en) | Method and device for identifying object class and electronic equipment | |
US20190362193A1 (en) | Eyeglass positioning method, apparatus and storage medium | |
CN113592886B (en) | Drawing examining method and device for building drawing, electronic equipment and medium | |
CN114463586A (en) | Training and image recognition method, device, equipment and medium of image recognition model | |
CN112949767B (en) | Sample image increment, image detection model training and image detection method | |
CN113343826A (en) | Training method of human face living body detection model, human face living body detection method and device | |
CN109598298B (en) | Image object recognition method and system | |
CN112989995B (en) | Text detection method and device and electronic equipment | |
CN113869449A (en) | Model training method, image processing method, device, equipment and storage medium | |
CN110473181A (en) | Screen content image based on edge feature information without ginseng quality evaluating method | |
CN113643260A (en) | Method, apparatus, device, medium and product for detecting image quality | |
CN115471476A (en) | Method, device, equipment and medium for detecting component defects | |
CN114005095A (en) | Vehicle attribute identification method and device, electronic equipment and medium | |
CN113378837A (en) | License plate shielding identification method and device, electronic equipment and storage medium | |
CN113421223A (en) | Industrial product surface defect detection method based on deep learning and Gaussian mixture | |
Bala et al. | Image simulation for automatic license plate recognition | |
CN110598702A (en) | Preparation method, system, equipment and medium of ship target detection data set | |
CN116486369A (en) | Traffic sign detection method and device, electronic equipment and storage medium | |
Budda et al. | Automatic number plate recognition system using Raspberry Pi | |
Yang et al. | A novel binarization approach for license plate | |
CN111242047A (en) | Image processing method and apparatus, electronic device, and computer-readable storage medium | |
CN116071625B (en) | Training method of deep learning model, target detection method and device | |
CN118038515B (en) | Face recognition method | |
CN114037865B (en) | Image processing method, apparatus, device, storage medium, and program product |
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 |