# Ground Target Detection and Damage Assessment by Patrol Missiles Based on YOLO-VGGNet
## 3 Target Detection and Damage Level Assessment Based on YOLO-VGGNet
### Target Detection Based on YOLO v3  
Considering the movement of ground targets, the YOLO v3 network is utilized to detect, classify, and localize them online. Compared to YOLO v1 and YOLO v2, YOLO v3 features significant changes in some functions: Multiscale detection logic is introduced to meet the needs of detection for targets of different scales. The concept of multilabel classification is applied to meet the requirements for detecting multiple types of targets. The loss function is optimized to make the prior bounding box more accurate for target positioning. Although YOLO v4, YOLO v5, and other subsequent versions have also emerged more recently, the essential functions needed, such as detection, classification, and localization, have remained unchanged. In addition, YOLO v3 is widely used in engineering, and its stability has been verified. Let \(G\) be the input image, then the YOLO v3 network can be described by:  
\[\phi_{1}(G,\theta_{pre})=\big{\{}G_{b_{0}},G_{b_{1}},\cdots,G_{b_{n}}\big{\}}, \quad G_{b_{m}}=\big{\{}P_{m},C_{m},Q_{m}|\quad m=0,1,\cdots,n,\big{\}}, \tag{1}\]  
where \(\phi_{1}(\cdot,\theta_{pre})\) indicates the YOLO v3 network and \(\theta_{pre}\) is its weights. There are \(n\) detected targets in the original image and \(G_{b_{m}}\) describes the image block of the \(m\)th detected target. It consists of three parts: the parameters of the bounding box \(P_{m}=[x_{m},y_{m},w_{m},h_{m}]\), the target's class \(C_{m}\), and the target's confidence \(Q_{m}\). Another critical setting in the training process is the loss function, as shown in (2).  
\[L_{1}=L_{coord}+L_{conf}+L_{class} \tag{2}\]  
The loss function consists of three parts: the coordinate prediction error \(L_{coord}\), the confidence error \(L_{conf}\), and the classification error \(L_{class}\). They are built for the location, detection, and classification, respectively. Specifically, the \(L_{coord}\) is defined as follows:  
\[\begin{split} L_{coord}=\lambda_{coord}\sum_{g=0}^{S^{2}}\sum_{a =0}^{A}I_{ga}^{obj}[(x_{g}-\hat{x_{g}})^{2}+(y_{g}-\hat{y_{g}})^{2}]\\ +\lambda_{coord}\sum_{g=0}^{S^{2}}\sum_{a=0}^{A}I_{ga}^{obj}[(w_{ g}-\hat{w_{g}})^{2}+(h_{g}-\hat{h_{g}})^{2}],\end{split} \tag{3}\]  
where \(\lambda_{coord}\) is the weight of the coordinate error, \(S_{2}\) is the number of grids in the input image, and \(A\) is the number of bounding boxes generated by each grid. If the \(a\)th anchor box of the \(g\)th grid is responsible for this target, the value of \(I_{ga}^{obj}\) is 1. Otherwise, the value of \(I_{ga}^{obj}\) is 0. The hat above the parameters is used to distinguish the predicted bounding box from the labeled box, including \(x_{g}\), \(y_{g}\), \(w_{g}\), and \(h_{g}\) as the x-coordinate, y-coordinate, width, and height, respectively. Obviously, the smaller the \(Error_{coord}\), the more accurate the prediction.  
In our implementation, four types of mobile ground targets, including tanks, radars, supply vehicles, and tents, are selected and a total of 1250 images of them are collected in the simulation system. Note that these images are of different damage levels. Besides, to speed up the training process, the Darknet53 pre-training model is used in the initialization of the YOLO v3 network. In the training process, the epoch of the training dataset is 100, the batch size is 8, and the learning rate is 0.001.