# A Military Object Detection Model of UAV Reconnaissance Image and Feature Visualization
## 3 UAVT-YOLOv5 Model  
### Structure of UAVT-YOLOv5  
YOLOv5 is a regional regression-based one-stage object detection model, which models object detection as a regression problem and predicts the object location by regression. It predicts the object bounding box and category by regression, which only looks at the image one time with a single network. The basic idea of YOLOv5 is to divide the image into \(S\times S\) grids, and the cell that the object center is located in is responsible for detection. It takes three scales of the feature map to make a multi-scale prediction. The image is divided into a different number of cells according to the feature map scale, and three bounding boxes will be predicted for each cell. The bounding box is expressed as (\(x\), \(y\), \(w\), \(h\), \(c\)), where (\(x\), \(y\)) represents the coordinate of the object center relative to the left upper corner of the cell to which the object belongs, (\(w\), \(h\)) represents the ratio of the object width and height to the image, and \(c\) indicates the confidence of the bounding box containing an object. Meanwhile, the class probabilities of the object are also predicted for each bounding box. Therefore, there are \(3\times(5+m)\) values that need to be regressed by the model for each cell, where \(m\) is the total number of classes for detection.  
Figure 4 shows the flowchart of the proposed UAVT-YOLOv5 being kept the same as that of YOLOv5, which consists of input, including data augmentation, backbone, neck, prediction head, and output, including post-processing. In the input, several data augmentation techniques have been used in the original model, such as mosaic, copy-paste, mix-up, and so on. The backbone is designed to extract visual features, which incorporated the Cross Stage Partial (CSP) [12] block and the Spatial Pyramid Pooling Fast (SPPF) [10] block into the DarkNet53. The neck takes the Feature Pyramid Network (FPN) [13] and Path Aggregation Network (PAN) [14] to realize the information sharing from both bottom-up and up-bottom. The head is to regress the bounding box and class probabilities. In the post-processing of the output, the bounding box with a confidence lower than the threshold will be removed, and Non-Maximum Suppression (NMS) is then used to filter the remaining bounding boxes to obtain the final predicting box. In order to detect object detection of UAV reconnaissance image, the proposed UAVT-YOLOv5 was improved from YOLOv5 as follows.  
1. In the input part, data augmentation of blurred images is adopted to improve the accuracy of fog blur and motion blur images, which will be detailed in Section 3.2.
2. In the neck part, to improve the recognition ability of small objects, a larger scale feature map is added to mine more features from the small target, and the multi-scale feedback mechanism is introduced to combine the global context information, which will be detailed in Section 3.3.
3. The box confidence loss function and anchor priors are optimized by increasing the penalty of small objects and by re-clustering the object boxes of UAVT-3 with a k-means algorithm, which will be Sections 3.4 and 3.5, respectively.