# Automobile Fine-Grained Detection Algorithm Based on Multi-Improved YOLOv3 in Smart Streetlights
## 4 Experiment and Results
### Experimental Results  
#### 4.2.1 Improved Experimental Results Based on Results of Scale Optimization  
In this section, dataset UA-DETRAC-LITE-NEW is used to conduct an experiment with the original YOLOv3 algorithm and the algorithm proposed in this section, respectively. In the experiment, the following data are preprocessed: randomly regulate the brightness, contrast, hue and saturation; by ensuring that there is bounding box, randomly crop the image; randomly turn the image; conduct other operations. During training, set the batch size at 4, and in order to realize faster convergence of the network, conduct continuous training based on the trained pre-training weight by the author of YOLOv3 on ImageNet. Use the gradient descent method with momentum to optimize the model. Set the momentum as 0.9 and the learning rate as 0.001. The average precision (AP) of each class and the mean average precision (mAP) of all classes are obtained in the experiment. See Table 1 for specific data; a more intuitive diagram comparison is shown in Figure 7. The comparison diagram of the omission ratio is presented in Figure 8; the confusion matrix is shown in Table 2. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Type** & **Original YOLO (\%)** & **YOLO with Scale Optimization (\%)** \\ \hline Suv & 71.80 & 76.42 \\ Sedan & 88.55 & 89.41 \\ Taxi & 89.55 & 91.45 \\ Van & 82.15 & 84.67 \\ Truck-Box & 76.94 & 84.16 \\ Bus & 82.94 & 90.94 \\ MiniVan & 74.48 & 78.08 \\ Truck-Util & 40.82 & 67.80 \\ Pickup & 35.54 & 52.08 \\ mAP & 71.42 & 79.45 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of accuracy between the original YOLO algorithm and its improved algorithm. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Type** & **Suv** & **Sedan** & **Taxi** & **Van** & **Truck-Box** & **Bus** & **MiniVan** & **Truck-Util** & **Pickup** \\ \hline Suv & 88.35 & 9.36 & 0.25 & 0.17 & 0 & 0 & 1.87 & 0 & 0 \\ Sedan & 0.21 & 99.48 & 0.22 & 0.05 & 0 & 0 & 0.05 & 0 & 0 \\ Taxi & 0 & 0.42 & 99.52 & 0 & 0 & 0 & 0.05 & 0 & 0 \\ Van & 0.45 & 0.57 & 0.11 & 95.69 & 0 & 0 & 3.17 & 0 & 0 \\ Truck-Box & 0 & 1.55 & 0 & 1.55 & 96.37 & 0 & 0 & 0.52 & 0 \\ Bus & 0 & 0.17 & 0 & 0 & 0 & 99.83 & 0 & 0 & 0 \\ MiniVan & 1.94 & 2.53 & 0.17 & 1.6 & 0 & 0 & 93.76 & 0 & 0 \\ Truck-Util & 0 & 0 & 0 & 1.27 & 0 & 0 & 0 & 98.73 & 0 \\ Pickup & 0 & 8.33 & 0 & 2.08 & 0 & 0 & 0 & 2.08 & 87.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The confusion matrix of the improved YOLO algorithm (unit %). According to the experimental results, it can be seen that the improved YOLO algorithm proposed in this section can significantly improve the detection performance for the two classes of trucks and pick-ups. In precision, the detection precisions for the classes of trucks and pick-ups are increased by 26.98% and 16.54%, respectively; through further analysis of the omission ratio, it can be seen that the main reason for the low precisions of the two classes of trucks and pick-ups is that they have low omission ratios, which further lowers the index of precision. Although the detection precisions for trucks and pick-ups are significantly increased after improvement, their precisions are still lower than the average level. Next, the improved model proposed in this section will be continuously analyzed through confusion matrix. The row vector of confusion matrix represents the true value, while the column vector represents the predicted value. Therefore, the confusion matrix can only be used to analyze the distribution and accuracy of detected targets by the model. The diagonal from upper left to lower right represents the prediction accuracy for detected targets, and other positions indicate false class detections of detected targets. Through the confusion matrix, it can be seen that the detection accuracies for trucks and pick-ups by the improved model in this section are not low, so we can conclude that the main cause for the low precisions for these two classes is that they involve high omission ratios.