## 5 Tests and Results Analysis
### Experiment and Analysis  
The hardware environment of the experiment was Intel Core i7-9900K CPU, NVIDIA Titan RTX GPU. In the training stage of this paper, 50,000 iterations were carried out, momentum configuration was 0.9, weight attenuation configuration was 0.0005, batch size was set as 16, learning rate was initially 0.001, and learning rate was reduced to 0.0001 when the network iteration was 35,000. The learning rate was reduced 0.00001 when the network iteration was 45,000. In order to facilitate the comparison of experimental results and other algorithm results in this paper, the commonly used calculation formulas of accuracy is as follows. \[\text{precision}= \frac{\text{TP}}{\text{TP}+\text{FP}} \tag{5}\] \[\text{recall}= \frac{\text{TP}}{\text{TP}+\text{FN}} \tag{6}\]  
where TP is the number of correctly divided positive samples; FP is the number of wrongly divided into positive samples; FN is the number of samples wrongly divided into negative samples; TN is the number of correctly divided negative samples. The P-R (Precision-Recall) curve takes recall rate and precision rate as horizontal and vertical coordinates, and the area enclosed by the P-R curve is the Average Precision (AP). AP\({}_{50}\) is the AP measurement at IOU threshold of 0.5; AP\({}_{75}\) is the AP measurement at IOU threshold of 0.75; AP\({}_{5}\) is the AP measurement value of target frame with pixel area less than 32\({}^{2}\); AP\({}_{\text{M}}\) is the AP measurement of  
Figure 4: The training curve of loss function based on weight attenuation. target frame with pixel area between 32\({}^{2}\) and 96\({}^{2}\); AP\({}_{\rm L}\) is the AP measurement value of target frame with pixel area greater than 96\({}^{2}\); and the mAP is the average AP of all classes. The calculation formula of detection speed is as follows:  
\[\text{FPS}=\frac{\text{frame}}{\text{second}} \tag{7}\]  
where frame is the number of video frames and second is the unit of time. In this paper, the pre-training model yolov3.conv.137 was as the initial parameter of the network during training, which can greatly shorten the training time. Figure 4 shows a comparison of the downward trend of the improved loss function as the number of iterations increased on traffic monitoring datasets with the method proposed in this paper. As can be seen from Figure 4, with increasing training times when the iteration exceeds 30,000, the loss value tends to be stable and finally drops to about 0.1. Figures 5-7 show the comparison diagram of the detection effect of the proposed method and the original algorithm in different traffic monitoring environments. As can be seen from Figure 5, both algorithms can accurately detect the target vehicles on the highway, since there are only vehicles such as cars and trucks and no interference from other vehicles. Slight differences detected by the two methods are indicated by arrows in the figure. In Figure 6, the environment became more complex on the urban environment, and all kinds of traffic signs may have affected vehicle monitoring. In Figure 6a, the model identified the traffic sign as the car, resulting in vehicle wrong detection. In Figure 6b, the proposed one-stage algorithm successfully detected the road vehicle to solve the problem of partial wrong detection of non-vehicle targets. The detection differences in the figure are directly pointed out by arrows. As shown in Figure 7, there were many vehicles on rural roads, which made it more difficult to detect vehicles. In Figure 7a, due to the occlusion between vehicles and some pedestrians riding motorcycles or battery vehicles, there was interference with vehicle detection, leading to the detection of these non-vehicle targets. The model regarded pedestrians riding electric vehicles in the figure as vehicles, leading to wrong detection, and the model could not detect some vehicles in the surveillance video in the corner or far away from the surveillance perspective.