# Detection of Logos of Moving Vehicles under Complex Lighting Conditions
## 4 Experiment and Analysis
### Results and Analysis
#### 4.2.2 Vehicle Logo Detection  
The hardware device used in the experiments is installed with a 32G memory, a 2080 TI independent graphics card, and a cuda10.2 acceleration framework. Both the original and improved YOLOF networks are used to train the dataset before and after image enhancement with the Ubuntu16.04 operating system and the mmdetection library [42]. The resolution of input images is 128 \(\times\) 128 \(\times\) 3. Each experiment is trained for 100 epochs, with a batch size of 64 and a weight decay of 0.0001. Additionally, the learning rate is 0.001. The backbone used for the experiment is resnet 50.  
Figure 2: Example of CTSD data [38].  
Figure 3: Image enhancement in typical scenarios [38]. (**a**) shows the comparison before and after image enhancement in normal lighting conditions, dark lighting conditions and strong lighting conditions, respectively; (**b**) shows the comparison before and after image RGB histogram enhancement in normal lighting conditions, dark lighting conditions, and strong lighting conditions, respectively. (I) is images under normal lighting conditions; (II) is images under dark lighting conditions; (III) is images under strong lighting conditions.  
To demonstrate the performance of the improved YOLOF model in vehicle logo detection, this study compares it with the original YOLOF. The experiments use 70% of the image data as the training dataset, 10% as the testing dataset, and 20% as the testing dataset. During the training process, two metrics, i.e., the average precision (AP) and the loss, are obtained from the validation dataset [4].  
As shown in Figure 4, the classification accuracy of the improved YOLOF model is boosted by more than 10% compared to the original YOLOF model. As shown in Figure 5, the loss function of the improved YOLOF model is lower and more stable than the original YOLOF model.  
To verify the accuracy of the improved YOLOF model for vehicle logo image recognition under complex lighting conditions, we compare its detection results with those of the original YOLOF and Faster R-CNN. As shown in Table 2, YOLOF outperforms the Faster R-CNN model for multi-scale vehicle logo image detection [26; 43]; compared with the original YOLOF algorithm, the accuracy of the improved YOLOF algorithm is improved by about 3%, therefore effectively improving the accuracy of logo recognition. In addition, the model achieves an increase in detection rate by about 5%.  
Overall, by enhancing the loss function model, the improved YOLOF model proposed in this study can boost the detection efficiency and accuracy in vehicle logo detection compared with the original YOLOF model. As shown in Figure 6, the road images acquired under complex lighting conditions are first processed using image enhancement techniques, and then the images are detected using the improved YOLOF network, and finally, the moving vehicle logo results are obtained. The experimental results show that our proposed method can effectively accomplish the recognition of car markers under complex lighting conditions.  
Figure 4: Ap of the detection networks.  
Figure 5: Loss of the detection networks.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Data** & **Algorithm** & **Number of Pictures** & **FPS** & **AP(\%)** \\ \hline \multirow{3}{*}{Original data} & Faster R-CNN & & 38.3 & 80.2 \\  & Original YOLOF & 3067 & 40.5 & 89.27 \\  & Improved YOLOF & & 45.05 & 92.43 \\ \hline \multirow{3}{*}{Corrected data} & Faster R-CNN & & 38.4 & 83.5 \\  & Original YOLOF & 3067 & 40.5 & 93.7 \\ \cline{1-1}  & Improved YOLOF & & 45.07 & 95.86 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of detection results between the original YOLOF and improved YOLOF.  
Figure 6: Results of moving vehicles’ logo detection [38]. (I) is images under normal lighting conditions; (II) is images under dark lighting conditions; (III) is images under strong lighting conditions.