Particle Swarm Optimization-Based SVM for Classification of Cable Surface Defects of the Cable-Stayed Bridges

The machine vision system was employed to inspect the surface defects of bridge cables of cable-stayed bridges. After the acquisition and preprocessing of the defect images, it is necessary to classify and identify the defects of the cables to meet the requirements of non-destructive testing and evaluation. In this paper, feature extraction for defect images was performed using mathematical statistical methods. After that, 10 feature parameters including shape features, grayscale features and texture features of the defect images were obtained and selected for a classification model of support vector machine (SVM). To improve the SVM classification performance, the particle swarm optimization algorithm (PSO) was adopted to obtain the punish factor $c$ and the kernel parameter $g$ of the SVM model, namely the PSO-SVM algorithm. Finally, our PSO-SVM classification model was employed to implement the classification of real surface defect images of the bridge cables. Longitudinal crack, transverse crack, surface corrosion, and pothole defect can be automatically identified and the classification accuracy reached 96.25%. The experimental results showed that the PSO-SVM model can improve the classification performance of the surface defects. Based on the effective classification, we can find the distribution characteristics of the surface defects of the cable. It is very important to analyze the relationship between the type of surface defects and the material of the protective layer, so as to adopt appropriate materials and reasonable maintenance measures. Thus, it has a great significance in the structural health monitoring of bridge cables.


I. INTRODUCTION
Long-span and super long-span cable-stayed bridges and suspension bridges have been widely used in recent years for the traffic construction [1], [2]. Cables are the main components of such bridges and directly affect the safety [3]. So the structural health diagnosis for the cables of the cablestayed bridges becomes an important issue. The cable surface is located at severe natural environment and withstands the deformation due to the change of heavy loads. Thus, the corrosion defect is prone to be produced on the surface of the cable. Common surface defects include potholes, longitudinal The associate editor coordinating the review of this manuscript and approving it for publication was Dapeng Wu . cracking, and transverse cracking. The surface defects may result in the rapid deterioration of the bridge cables. So it is very important to conduct structural health monitoring (SHM) for the cables of the cable-stayed bridges [4], [5]. As shown in Figure 1, a bridge worker inspected and repaired cables of Chongqing ShiMen Bridge, which located in Chongqing, China. The human vision inspection and the laser scanning method are currently employed to find the surface flaws of the cables. The human vision inspection method is time-consuming, low efficient and laborious. Moreover, the inspectors are very dangerous for working in the extreme environments. While the laser scanning method can automatically perform the defect inspection, there are many blind spots due to the spiral scan lines. Therefore, the detection results of the cable surface are not effective to be observed and processed. In addition, the inspection system is comparatively large and expensive [6]- [8].
In order to achieve the effective, fast and robust detection for surface defects of bridge cables, we developed an inspection system using machine vision techniques [7]. The system can automatically acquire and store the surface images of the bridge cables [9]- [11]. Moreover, the defect images can be identified by image processing. In order to find out the relationship between the type of surface defects and materials as well as the environment to determine the maintenance plan for bridge cables, the classification of defect images should be implemented. The most commonly used methods of defect classification are artificial neural network (ANN) and SVM [12]- [14]. For large samples of classification, ANN can achieve high classification performance [15]- [17]. However, SVM is more popularized in the situations with small samples [18]. Considering our limited defect samples, we applied SVM model to classify the defects of the cables. The punish factor c and the kernel parameter g should be preset in the standard SVM model [19], [20]. These parameters are crucial to the SVM classification performance. However, the choice of the parameters is based on experience which has a great effect on its classification performance. Some parameter optimization algorithms such as PSO and genetic algorithm (GA) were used to adaptively determine the optimal key parameters in SVM [21]- [24].
Due to the illumination factor and motion blur during the acquisition process, the images acquired by our vision inspection system are not very clear. It is necessary to extract effective features from the defect images for classification. In this study, the features included the texture, grayscale and shape. Moreover, we used PSO-based SVM (PSO-SVM) to adaptively optimize the penalty factor c and the kernel parameter g. The experimental results showed that the classification performance has great significance of the nondestructive evaluation of bridge cables. The PSO-SVM algorithm can effectively classify and identify the various types of cable surface defects which collected by our machine vision system. It can provide a basis for further analysis of the distribution  characteristics of the surface defects of the cable and the relationship between the material and the environment of the cable. Thus, it might help us choose the appropriate materials of protective layer and the reasonable maintenance measures.

A. THE MACHINE VISION SYSTEM FOR CABLE DAMAGE DETECTION OF THE BRIDGES
In order to improve the accuracy and efficiency for cable damage detection of cable-stayed bridges, the machine-vision inspection device using an embedded system was developed. The inspection system consisted of a climbing robot, four CCD cameras, embedded computer system based on a DSP microprocessor chip, the data memory, and the light sources. The climbing robot loading the whole inspection system can climb the bridge cables. Four CCD cameras were put on the identical plane at four directions with the approximate same angle interval around the cylindrical cable. Thus, four surface images of a circle of the cable can be collected at one time. As is shown in Fig.2. The core microprocessor of the embedded computer system was the TMS320DM642 chip of Texas Instruments (TI) Company. Other image processing hardwares comprised four video decoders (TVP5150, TI) and the data memory. They work together to complete image acquisition, processing and storage [25]- [27]. The schematic of the acquisition, processing and storage of defect images of the cable surface is shown in Figure 3.

B. THE CATEGORIES OF CABLE SURFACE DEFECTS
The damage images were obtained and identified through our computer-vision-based detection system. There were many categories of the surface defects. However, the longitudinal crack, transverse crack, surface corrosion, and pothole defect accounted for the majority. They have an important impact on the degradation of the bridge cables. Figure 4-7 display the defect samples which are list for each category of the defects respectively. In this study, we adopted the classification algorithms to identify the four types of defects of the bridge cables.

C. THE SHAPE AND GRAYSCALE FEATURES OF THE DEFECTS
In this study, the defect images of the cable surface were preprocessed to be favourable to the feature extraction. Then, the effective features were selected to be applied for the PSO-SVM method. Finally, longitudinal crack, transverse crack, surface corrosion, and pothole defect can be classified. These feature parameters of the defect images not only can describe the differences between the four types, but also should remain relative stabilization if the size and the illumination of the defect images are changed. In this study, the shape features, grayscale features, and texture features of surface defects were extracted from the 4 categories of the defect images.
The category of the defect can be identified by the shapebased features [28], [29]. As can be described by the parameters such as the area of the defect and the ratio of long diameter to short diameter.
(1) The defect area. In the segmented defect images, boundary detection is used to find several independent defect areas, and the numbers of pixels in the regions of the defects are separately computed. The area of the defect can be denoted: In Eq. (1), G(i, j) indicates the grayscale value for the pixel (i, j), and R is the region of the defect. The amount of the pixels of the defect region can be denoted by A R which can be computed as: (2) The the ratio of long diameter to short diameter. To some extent, it denotes the shape characteristics, which is an effectvie measure of the shape of the defect. Let the longest distance on the boundary of the target area be expressed by the defect long diameter S 1 , and let the shortest distance in the above vertical direction be expressed by the short diameter S 2 . Therefore, the ratio of the long diameter S 1 and the short diameter S 2 of the defect area is: An image f (x, y) is considered as a two-dimensional sample of the random process which can be represented by a joint probability distribution [30], [31]. The probability distribution is obtained by the statistical grayscale amplitudes of the pixels of the image. A histogram feature of the image can be formed, and the first-order histogram is denoted as: In Eq. (4), L indicates the amount of the total pixels in a defect image. l(n) denotes the amount of the total pixels whose graylevel is n. N represents the number of the gray-levels of a defect image. From the p(n), we get the following grayscale features of the defect images.
(3) The average gray-level in the defect image. It reflects the overall gray-level of the defect image. Different categories of defect images have different overall gray-level. It can be denoted as: (4) The variance of a defect image. It describes the degree of dispersion of the grayscale distribution of the defect images VOLUME 8, 2020 which can be computed as: (5) The slope of a defect image. It represents the degree of asymmetry of the gray histogram between different defects which can be denoted as:

D. THE TEXTURE FEATURES OF THE DEFECT IMAGES
The texture features can describe the characteristics of cable surface image. They are the global features which do not describe the characteristics of the pixel. However, the features can represent the nature of the region. The textures can be extracted by gray level cooccurrence matrix (GLCM) that adapts to the characteristics of human visuality [32], [33].
Many scholars used the GLCM as the effective feature for the classification recognition, which has been very successful and widely used in image processing. Assuming that the gray-level of one pixel is m and another pixel's gray-level is n. The distance between them is (Dx, Dy). Mathematically, the probability that these two grays appear on the whole image is = n; x, y = 0, 1, 2, · · · , L − 1} (8) In Eq.(8), m, n = 0, 1, 2 . . . N − 1, (x, y) is the image coordinate. N denotes the number of gray-levels. λ indicates the amount of pixels between the adjacent intervals. ϕ represents the direction. A (x, y) spatial coordinate can be converted into a (m, n) ''grayscale pair'' by the probability of occurrence of the two pixel gray levels. Thus, the GLCM can be obtained. In order to classify the surface defect images of the bridge cables, we adopted five common GLCM factors of the texture features which are described as follows: (1) Angular second moment (ASM) (5) Inverse different moment (IDM)

III. PSO-SVM ALGORITHM FOR CLASSIFICATION
In this study, the surface defects of the cable were classified and identified by the support vector machine algorithm. Moreover, we developed the PSO-SVM model in which the particle swarm optimization algorithm is adopted to optimize the SVM parameters. The classification accuracy can be improved significantly.

A. THE SUPPORT VECTOR MACHINE ALGORITHM
The SVM is a two-class tool for solving machine learning problems by means of optimization methods in data mining. It has been widely employed in classification. There are many merits when the classified samples are small, nonlinear and high-dimensional. The SVM model is used to search the effective classification plane for two categories of samples. The SVM method is proposed based on the optimal classification plane in the case of linear separability. The linear estimation function can be denoted as: where, ω denotes a weight vector and b represents a constant of the offset. If the classification samples are linear and integrable, then f (x) = 0 can denote the classification line equation. In the classification and identification, the optimal separating hyper-plane should be searched and found the optimal ω and b. Assume that the optimized values are ω 0 and b 0 , then the optimal hyper-plane can be written as ω 0 · x + b 0 = 0. It can be used for the classification.
Obtaining the maximum classification interval is equivalent to the minimum value of 1 2 · ω 2 . For linear and inseparable data, the relaxation variable ξ i and the penalty coefficient c are introduced. The optimization problem can be denoted as: 44488 VOLUME 8, 2020 The optimal classification hyperplane represented by Eq. (15) can solve the dual problem: where, α i denotes the Lagrange multiplier corresponding to each training sample. In the case of nonlinear separability, curves (surfaces) in low-dimensional space should be converted into lines (planes) in high-dimensional space. Satisfying the Mercer's condition, the introduction of the kernel function is shown in the following expression where, ψ(x i ) denotes the non-linear mapping. As can be seen from Eq. (17), the kernel function can map x to the high dimensional linear space. Moreover, computing the inner product of two training samples in the high-dimensional space, the calculated amount is as small as x i ·x j . In this study, the radial basis kernel function is selected: In Eq. (18), γ denotes the parameter of the kernel function, expressed by g. Its value is usually chosen based on experience. The cross-validation algorithm can be employed to optimize the parameter on a limited data set.

B. PSO-SVM ALGORITHM
The particle swarm optimization (PSO) algorithm is a bionic algorithm proposed by Kennedy and Ebethart in the United States in 1995 [18]. The main idea was derived from the herd behavior of the birds. Because of its simple process, the easy implementation, a small number of parameters, no need of gradient information, and the good performance, the particle swarm optimization algorithm is suitable for dealing with various complex optimization problems. The PSO has been successfully used in many fields such as pattern recognition and data classification. For SVM algorithm, the penalty coefficient c and the kernel function parameter g are vital to the classification performance. Compared to manual selection, the classification performance of the SVM model can be enhanced significantly with the optimization of the parameters being performed by the PSO algorithm. The flow chart of PSO-SVM algorithm is illustrated in Figure 8. The procedure of the PSO-SVM classification algorithm can be described as follows: Step 1: The particle swarm is initialized and the parameters are set in conjunction with the needs of the SVM model. Initialize the size of population and search variables. In this study, two vital parameters (c, g) are searched. Specifically, the inertia weight parameter is set as ω = 1 and the acceleration factor is c 1 = c 2 = 2. The position and the travel velocity of each particle are defined in the limitative range [13], [34].
Step 2: Calculate the fitness function. The learning model of the support vector machine is established  by using two key parameters (c, g) corresponding to the individual particles. The training samples are taken into determining the fitness value corresponding to each particle.
Step 3: Update the extreme values of the position and velocity. The fitness value in new particle swarm is compared with the local and global optimum values, respectively. If the local and global optimum values is less than the fitness value in new particle swarm, the previous particle swarm will be replaced. The position and velocity also can be updated by the newly generated extreme value.
Step 4: Determine new extreme values and evolve. The new velocity and position are continued to be searched by the new particle swarm. The updated fitness value is subjected to the operation of Step 3.
Step 5: Iterative completion. If the stop condition is met (the error is small enough or the maximum fitness value is achieved), the whole cycle process can be terminated and the key parameters (c, g) are output for the SVM classifier. Therefore, the optimal PSO-SVM model can be used for the classification.

IV. THE EXPERIMENTAL RESULTS OF THE CLASSIFICATION
During the classification experiment, we selected 160 surface defect images including longitudinal crack, transverse crack, surface corrosion, and pothole defect. Each category had 40 defect images. The defect images were preprocessed and uniformly selected to be 256 * 256. Some defect images were illustrated with Figure 4-7. Ten features (i.e. the area of the defect, long and short diameter ratio, the average gray-level of the defect image, the variance, the slope, the angular second moment, the contrast, the correlation, the entropy, and the inverse different moment) are extracted from the defect images. The model can output the category labels 1, 2, 3, and 4 which represented the longitudinal crack, transverse crack, surface corrosion, and pothole defect, respectively. 20 defect images were taken from each category as training data. The labels of the training data were illustrated in Table 1. The remaining 20 defect images of each type were used as the test data which were classified and predicted by the PSO-SVM model. The classification results were demonstrated with Figure 9.  In Figure 9, we can see that the classification prediction values of the transverse cracking and the longitudinal cracking were exactly the same as the target label values, and two surface erosion defects were misclassified into the pothole defect, and one pothole defect is mistakenly divided into surfaces erosion. Table 2 listed the classification results for the four categories of defects by the PSO-SVM model. Determining the SVM model parameters is very important for the classification. In this study, the PSO algorithm was employed to optimize the key coefficients of of SVM model. The optimal parameters c = 5.28 and g = 0.87 were assigned to the support vector machine classifier. The experimental results showed that the PSO-SVM model had achieved the excellent classification performance. With regards to accuracy and generalization performance, SVM is more suitable for a small amount of data samples than other classifiers [13]. Moreover, we adopted the PSO optimization algorithm to improve the performance of the classification in this study. We compared the PSO algorithm with the manual selection and genetic algorithm (GA) in Table 3. The results demonstrated the PSO algorithm had the best classification performance by adaptively optimizing the penalty factor c and the kernel parameter g.

V. CONCLUSION
In this work, the machine vision system was employed to detect the surface defects of bridge cables of cable-stayed bridges. There were mainly four types of defects (i.e. longitudinal cracking, transverse cracking, surface corrosion, and pothole defect) on the surface of the cable. The texture features, grayscale features and shape features of the defect images were extracted and the support vector machine model was employed to achieve the automatic classification and identification for the four types of defects. Moreover, we adopted the particle swarm optimization algorithm to determine the two key parameters (c, g) of the SVM model. Conducting experiments on the classification and recognition for the cable surface defects, the classification accuracy reached 96.25%. The experimental results showed that the PSO-based SVM method is suitable and effective for automatic classification of different types of the surface defects of the bridge cables. The application of the classification algorithm can effectively find the distribution characteristics of the surface defects of the cable. It has a great significance of non-destructive testing and evaluation for the bridge cables of the long-span cable-stayed bridges.