Keywords

1 Introduction

With the continuous progress of the global economy, transportation, which is an important channel for global liaison, has also developed at a high speed, and it has also brought some transportation difficulties. To cope with these difficulties, related researchers have become extremely interested in solving transportation problems through machine learning methods. After years of continuous research and development, many vehicles have added new functions that assist vehicle owners to better understand traffic conditions [1], of which intelligent transportation systems [2] have a good effect on many difficulties in this field, So more and more people are researching it. Intelligent transportation systems generally consist of only three parts: intelligent roads, intelligent vehicles, and intelligent auxiliary facilities [3]. If you want to improve the safety and reliability of vehicles, you need to combine related applications with machine learning technology. This can solve a series of hidden safety problems such as traffic jams caused by unknown road conditions. In recent years, many researchers feel that the use of machine learning methods in the following areas can better improve traffic performance: they are interactions between drivers and vehicles, interactions between different individuals, and access to traffic data Networks, and performance modification of the car itself [4]. Among them, the researchers found that combining the driver’s state, the specific conditions of nearby roads, and the recognition of traffic sign information can better improve traffic performance. In terms of providing traffic information to drivers, traffic signs can be described as the top priority. Better recognition of traffic signs is also an issue that requires further research. The detection and recognition system of traffic signs is to extract the information of traffic signs through related technologies, and then feed it back to the driver. The driver can obtain the required traffic information through the recognition system. More advanced traffic assistance systems can even help the driver directly Vehicles, which can better control the vehicle to improve the safety of drivers and passengers. Research in this area is not only one of the hot topics today, but also one of the difficulties to be overcome in the field of machine learning.

Automatically providing road information to drivers and alerting drivers in specific situations can help drivers deal with problems in a timely and correct manner, and also have a positive impact on the entire road network that includes other driving vehicles. This is a new concept in the field of machine learning [5]. There are many problems to be solved in this field, and the detection of traffic signs is one of them. Many current researchers have used machine learning to extract and identify some signs in traffic, but it will take a long time to apply them. These methods should also incorporate more knowledge, such as data extraction, image processing, big data technology, etc., continuously improve the accuracy of recognition, and shorten the recognition time to achieve high efficiency and speed.

2 Related Work

Some countries have greatly improved their economic levels compared to their relatively backward economic levels, and some of their related technologies have also developed very high. This has laid a good foundation for the research and development of transportation-related technologies. For example, some countries have researched related fields 30 years ago [6], Europe and the United States have in the past few years made AI vehicle road systems and “Prometheus” related topics; German warning pattern extraction and recognition technologies have achieved With very effective progress, the logo can be determined within 0.2s, and the timeliness is very high. With the continuous development of the times, everyone’s enthusiasm for this technology is continuously increasing, attracting more and more people to study in this field, so its related technology has also continued to become proficient and has made rapid progress. At the beginning of this century, researchers at the University of Wisconsin completed a model for detecting traffic signs. The sample they have is 540 collected images, and the recognition accuracy rate is 95%. [7]; A multi-traffic sign recognition system was developed together. Its accuracy rate is 95%, but its real-time performance is not up to standard. [8]: In 2009, Australia’s National Information and Communication Technology Laboratory also achieved many improvements. Traffic sign shapes are detected and identified, but they are susceptible to light and weather conditions [9]. Although our country started a bit late in this direction, as the economy and overall national strength recovered and improved, research and development in this area have become faster and faster, and Baidu has also developed its undeveloped unmanned car. Our researchers are also investing more and more energy in this field. As more and more high-level technical personnel join the research of this technology and carry out continuous innovative applications, many institutes now apply machine learning. Technology makes a great product. Many of these projects have provided new ideas for researchers, such as the unmanned driving system developed by Baidu. Baidu has incorporated many new technologies into it through its resource advantages, reflecting the innovativeness of the era [8], and in 2016 Baidu’s self-driving car products were exhibited at the World Intel Conference in 2015, and received a lot of praise from experts at home and abroad. Recently, related research institutions in China also released some of their achievements-accurate identification of some speed signs [10].

3 Preliminaries

3.1 Common Traffic Sign Detection Methods

In recent times, scholars at home and abroad have continuously improved the technology, achieved a lot of output of traffic recognition products, each has its characteristics in the use of the product, and has achieved the establishment of many algorithm models. For example, the area to be detected in the instruction information in a traffic sign. You can extract information from it, and then you can identify why it is a type of sign and what it means. These processes can be handled step by step, but all need to provide some useful information [9]. The detection part mainly starts from two aspects: one is to classify the colors and classify the markers to be detected by a certain method; on the other hand, to extract the features of the shape. Because it is not under external pressure, its shape Generally, it does not change, so you can classify the detection results, but we need to get the target area where the detected object is located so that it will not be affected by other areas to have a better recognition effect. From the above, this paper proposes a scheme that combines color and shape features to complete the detection process.

Detection Method Based on Color Features

Humans have a unique ability to classify and distinguish colors. According to many theories and experiments, people’s ability to transform colors into various spaces is getting better and better [10]. Besides, with the continuous development of science and technology, the quality of image acquisition equipment often used in research has also been improved, and it can better meet the needs of today. Therefore, image processing gradually changes from gray to color. After the color space conversion of the image in daily life, the corresponding feature extraction method should be used first, and then the corresponding color information unique to the traffic sign should be changed in the corresponding transformation mode to make the recognition difficult. During the color conversion, some features are made more obvious through different methods, and their information can be better explained [11]. Generally, the color is composed of 3 pixels. We call it 3 primary colors, and get more effective feature information after conversion, which is convenient for us to identify.

Detection Method Based on Shape Features

Recognition of shape information is an important link in the detection process, but a large part is identified by the shape of the grayscale image, regardless of its color attributes. By performing edge detection on it, the amount of calculation can be greatly reduced. This method can remove some irrelevant information, thereby retaining those content that is important to the image. The canny operator is currently a popular method for shape detection. He can outline the edge area of the target so that it can accurately determine its shape. There are currently other detection algorithms.

3.2 Common Algorithms for Traffic Recognition

SVM

SVM was proposed by Vapnik et al. Based on many years of statistical theory. Its advantage is that it can perform supervised learning on labeled data, and find the optimal hyperplane among different types of data sets, and has good speed performance [12].

In SVM, the most important thing is to first calibrate the labeled training samples. The features of the samples can be obtained according to the feature extractor, and the obtained features and labels are sent to the training model. Finally, the appropriate segmentation is found by the machine itself. line. If the input data is linear, then we can easily find a straight line to divide it. If the input data is non-linear, then the feature vector must be mapped to a high dimension for classification.

Adaboost Weak Classifier

Adaboost is an iterative classifier. Its main working principle is to make multiple types of classifiers for a sample database so that it can be combined into a better classifier after being carefully divided. His implementation is to change the distribution of samples, get the correct rate of the results after this training, and then assign weights to them according to the correct rate. This can determine its weight and send samples that have changed weight A similar operation is performed here for the next classifier, and then the obtained classifiers are combined to obtain a final classification model. Through this algorithm, some features with little correlation can be discarded, and important features can be left, so that better results can be obtained.

Its essential feature is that it constantly changes the weights and continuously strengthens the weak classification. It can continuously improve its ability to classify through continuous training. This step of it is as follows:

  1. 1.

    Training the obtained data to obtain a weak classification model;

  2. 2.

    Combine the data that has been identified incorrectly with the data that has not yet been identified and then train to obtain a new classifier;

  3. 3.

    Reorganize the data that was identified incorrectly twice and other data for new training, so that you can get another weak classifier;

  4. 4.

    In the end, you will get a strong classifier. Which classifier each sample is assigned to is determined by the weight of each model.

KNN

The main principle of KNN is that distance calculation is performed between the sample and the training sample, and the obtained distances are arranged. Within k ranks, which category has the largest number determines which category this sample belongs to. This algorithm only relies on the nearest few sample points for category judgment when identifying. Therefore, it has a relationship with a small number of samples when discriminating. Because this algorithm relies on its recent data, and is not distinguished by class domain, this method is very useful for samples with many categories.

3.3 Transportation Sample Library

The establishment of a traffic sign sample database is related to the final recognition result. A good database should contain many different categories, each of which has a large amount of data, and samples under various conditions and environments are included. Try to ensure the diversity of the samples, to provide effective training samples for identification. Rich data is extremely important for the robustness of the training model so that the model is more universal. Since our country started late in this regard, there is no systematic database yet, but other countries have accumulated several relatively large data sets that can be used publicly. The following categories are listed:

  1. (1)

    Sample of German road signs;

  2. (2)

    A sample of Belgian road signs;

  3. (3)

    Samples of Swedish road signs;

  4. (4)

    Sample of RUG road signs;

Each of the above datasets has spent a lot of time and experience of the researchers. They constantly collect data to build and update the database. The amount of data in the RUG dataset is a little less than the others. However, these data sets still occupy a small part of actual use. The library used in this design is GTSBR. Samples from the library are as Fig. 1:

Fig. 1.
figure 1

Samples

This paper is the feature extraction of the graphs in this sample library.

4 Traffic Sign Recognition

4.1 Traffic Sign Recognition Algorithm Framework

The concept of image recognition is the basic concept of road sign detection, and it is the actual detected object. These samples also have many characteristics such as their color, structure, and so on. Therefore, when performing marker detection, it can make better use of its characteristics. This simplifies the design of the additional measurement model, and can greatly improve the detection efficiency and accuracy. As can be known from the concept of image recognition, the basic image recognition structure is shown in Fig. 2 below, which mainly includes the following main parts [13].

Fig. 2.
figure 2

Identification process

At the beginning of recognition, the ROI area where traffic signs may exist can be detected by distinguishing their colors. After the traffic signs are detected, they need to be classified and understood. Each type of traffic sign has a specific shape, so it can make full use of the shape feature information to train the classifier, and finally use the trained classifier to classify and understand the traffic sign. If these points are fully considered in the design of the traffic sign recognition system, the design of the additional test model can be simplified, and the detection efficiency and accuracy can be greatly improved. The detection system process studied in this paper is shown in Fig. 3.

Fig. 3.
figure 3

Detection system process

4.2 Traffic Sign Recognition Based on Color Features

Image Segmentation Based on Local Color Features

The colors of the indicator signs are as follows: they consist of two bright colors, red or blue, which are relatively rare in the natural environment. Each type of sign has a unique background color. We choose the color segmentation technology to achieve the preliminary positioning of the possible areas of traffic signs. To ensure the real-time nature of the algorithm. The original design is to convert the RGB color space to the HSV color space [14]. It is easier to represent a specific color in the HSV color space than in the BGR space. If we want to extract a blue object. Here are the steps we need to take: first get a frame of the image from the video, convert the image to HSV space, then set the HSV threshold to the blue range.

Figure 4, Fig. 5 and Fig. 6 is the detection effect.

Morphological Processing

Morphological processing can remove the interference in the image by performing morphological processing on the image. To process the above Fig. 5, we only need to open the image, corroding the interference part, and then expanding the required features. Figure 7 below is the effect map.

It can be seen from the above figure that the interference factors in the picture have been completely dealt with, and only the expansion operation on the image can be performed to display the features we need. Through the above two steps of processing, a binary image obtained by segmenting the real traffic scene image for red and blue is obtained. It can be seen from the above results that although some parts are not taken out perfectly, the overall effect is still good. This method lays a good foundation for subsequent traffic detection.

Fig. 4.
figure 4

original image

Fig. 5.
figure 5

Mask map

Recognition Area Extraction

The area to be identified can be extracted in the form of a multi-directional moving window. The sliding window detection scheme can use a fixed window to extract the feature of the detection position of the image to be detected [15] so that a matching sample can be obtained. It can be seen that only samples of the same size can be obtained in this way. To be able to detect more target areas, a multi-scale detection scheme is used, that is, the image to be detected is scaled. Usually, a multi-scale Sliding window strategy to ensure that the target to be inspected at a certain size is similar to the window size.

4.3 SVM

Classification Process

The Fig. 8 below is the overall flowchart of traffic sign recognition.

Fig. 6.
figure 6

Extracted feature map

Fig. 7.
figure 7

Morphological processing

The most important process of traffic sign detection is to classify it as a whole, extract the features of the obtained recognition area, and then send it to the classification module. The traffic sign classification module determines the types of signs contained in the area, and then the Provide auxiliary information for the driving environment [16]. Exploring a robust and reliable traffic sign classification algorithm has great application significance for promoting a machine vision-based traffic sign recognition assisted driving system. However, there are dozens or even hundreds of types of traffic signs, and the process of classifying and identifying them is cumbersome. In this way, it is a difficult task to effectively extract them. The entire classification process is divided into two processes: first, the coarse-grained feature vector of the region of interest is extracted and sent to the first-class classifier of the SVM to distinguish large categories; then, the image of the region of interest of each large category is extracted The color HOG feature is input to the corresponding SVM fine classifier, and the fine classification of traffic sign subclasses is performed to obtain the final classification result.

HOG Feature Extraction

The sample image obtained is subjected to HOG feature extraction, and then the extracted information is sent to the SVM classification training model, and then the sample to be detected is identified using the trained model. The specific operation method of how to obtain its hog feature is shown below:

  1. 1)

    Grayscale, regard RGB of the image as equal value;

  2. 2)

    The Gamma correction method is used to normalize the incoming sample image so that its contrast can be changed, which can reduce the negative effects caused by small areas of shadow and light, and also protect against noise.

  3. 3)

    Gradient calculation is performed on each adjacent pixel of the image, to obtain the characteristic data of its outline, and it can also reduce the interference of light again.

  4. 4)

    Split the image into small units, which can make an \(8\times 8\) pixel area;

  5. 5)

    After performing statistics on the histogram data of different units, the characteristic data of each unit can be obtained;

  6. 6)

    Make several units into one block, and combine the features of all the units in a single block to get the hog features of this sample;

  7. 7)

    Combine the features of all the units in all blocks in the sample to obtain the hog feature data of this sample.

Fig. 8.
figure 8

Classification flowchart

SVM Classification

  1. 1)

    Based on color and basic shape, extract HOG features for coarse classification and send them to SVM for training model.

  2. 2)

    According to the detailed HOG features of each category, the details are classified and sent to the SVM to train the model.

  3. 3)

    According to the obtained model, the region of interest can be identified.

5 Experiment

The sample selected this time was downloaded on the GTSRP platform, and the HOG features it has already modeled were used to select the eight categories in the sample for classification testing, the result of test are as Fig. 9.

Fig. 9.
figure 9

Result of SVM

Because the sample data of category 0 is too small, the established model has poor recognition ability, but the recognition effect of other categories belongs to the normal range, and even some sample recognition rates can reach 100%. It reached 100%, and the recognition rate of the third and seventh samples was also 99%. The lowest recognition rate was also 67% for the fifth sample, and the average recognition rate was 83%. With more and more classifiers, the actual effect will be closer to the real situation.

The following figure Fig. 10 is the classification result obtained by the KNN algorithm.

Fig. 10.
figure 10

Result of KNN

By comparison, it can be seen that the classification result of SVM is better than that of knn. Among the categories identified by the knn algorithm, there is no 100% recognition sample data. The highest sample recognition categories are category 6 and category 7. The sample recognition rate reached 99%, but in practical applications, knn calculation takes a lot of time, need to use test samples to compare the information of each sample, the real-time performance is not good, and SVM can establish the model directly next time Use, the time required is very short at the level of 10ms, and the real-time performance is very strong, so SVM has a huge advantage in this regard. The experimental results show that the SVM plus hog traffic sign detection and classification method can obtain higher recognition accuracy than the knn algorithm, and can also meet the real-time requirements in actual work.

6 Conclusion

This paper conducts research on traffic sign recognition technology. Compared with other people’s use of image matching technology, it is proposed to use the distinctive color characteristics of traffic signs to distinguish them from other objects in the traffic scene at the stage of traffic sign detection, to extract potentially interesting areas of traffic signs in the image; At the stage of traffic sign classification, the local shape features of traffic signs were further used, and the long time-consuming Knn algorithm commonly used in general research was abandoned, and the SVM classifier was used to classify traffic signs. The experimental results show that the above-mentioned traffic sign detection and classification method can obtain higher recognition accuracy and higher real-time performance (re-use time is about 10 ms), so it can be basically in terms of real-time performance and accuracy. Meet the requirements of practical applications.