# Implementation of Pavement Defect Detection System on Edge Computing Platform
## 3 Pavement Defect Detection Scheme  
In this study, YOLOv3 was employed as the primary DL model to detect road defects. Two lenses with different FoVs, 30\({}^{\circ}\) and 70\({}^{\circ}\), were used for anterior image acquisition. By using the two FoV cameras, minor pavement defects, including tiny potholes or patches, may also be detected completely and accurately at a long distance. Moreover, pavement defects at close proximity are detected based on the results of a large-angle lens, which will not lead to misjudgment, as the small-angle lens is unable to capture the full image of a pavement defect when it is too close. Particularly, the 30\({}^{\circ}\) FoV lens is used for identifying long-distance pavement defects, whereas the 70\({}^{\circ}\) FoV lens is used primarily to locate medium and proximal defects in road pavement. Consequently, in the proposed model, the application of both recognition results not only effectively increases the detection accuracy rate but also reduces misjudgments and improves reliability. The structure of the proposed road pavement defect detection model is shown in Figure 1. In addition, a Kalman filter (KF) was integrated to improve system reliability and robustness to ensure continuity and reliability of the detection model. The outcome of the quantitative analysis is presented in the experimental results in Section 5. Further, as the vehicle moves forward, the potholes get closer to the vehicle, and the pavement defect will become larger, which may induce misjudgment, e.g., marking several specific defects within the pavement defect or marking many tiny potholes within the potholes. In this scenario, we use a tracking-via-detection framework [23; 24] (Figure 2). The KF [11; 25] tracking algorithm with intersection over union (IOU) estimation is used to maintain the reliability of the detection model and to lower the miss rate. It primarily tracks the location, length, and width information of the object's prediction frame to improve the recognition rate. The Kalman filter is used to update the estimate of the state variables by using the previous state estimate and the current state observation to obtain the current state estimate. During the approximation process, it is necessary to meet the minimum mean-squared error estimate so that the estimated value will be closer to the actual system state after each iteration. Thus, firstly, the state of the previous time step is used to predict the state of the next time step, which is the state prediction stage. Assume the variation of the prediction frame is linear, so the system state and output equation can be defined as  
\[ \begin{split}&\hat{x}_{k|k-1}=A\hat{x}_{k-1|k-1}+Bu_{k-1},\\ & z_{k}=H\hat{x}_{k|k-1}\end{split}  \tag{1}\]  
Figure 1: YOLOv3-based model for pavement defect detection. where \(\hat{x}_{k|k-1}\) is used to predict the estimate at time step \(k\) from the previous time step \((k-1)\); \(\hat{x}_{k-1|k-1}\) is the best-estimated state at the previous time step \((k-1)\); \(u_{k-1}\) is the state control quantity at the previous time step \((k-1)\), which is assumed to be 0. Moreover, \(z_{k}=\left[ \begin{array}{cc}x&y&h&w\\ \end{array} \right]^{T}\) is the output state of the system measurement at time step \(k\), and it also refers to the result of the current pothole recognition prediction frame. Among them, \(x\) and \(y\) are the upper-left coordinates of the prediction frame, respectively, \(h\) and \(w\) are the length and width of the prediction frame; \(A\) is the state transition matrix; \(B\) is the control matrix. \(A\) is extremely important, characterized in particular by the dynamic relationship between the pavement defect prediction frame identified and the vehicle itself. The prediction of the prediction frame is currently assumed to be a linear relationship between speed and time.