# Detection of Logos of Moving Vehicles under Complex Lighting Conditions
## 3 Methodology
### Improved YoloF Algorithm  
Logo detection not only encounters the challenge of complex lighting but also meets the problem with different logo scale sizes. Feature pyramids networks (FPNs) make a great contribution to two-stage object detection. FPNs have two core benefits: first, FPNs \begin{table}
\begin{tabular}{c c c} \hline \hline
**Contrast Category** & **Intensity Mean (\(\lambda\))** & **Image Category** \\ \hline \multirow{2}{*}{\(I_{L}\)} & \(\geq\)0.5 & Low contrast and high brightness \\  & \(<\)0.5 & Low contrast and low brightness \\ \hline \multirow{2}{*}{\(I_{H}\)} & \(\geq\)0.5 & High contrast and high brightness \\  & \(<\)0.5 & High contrast and low brightness \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Image classification. can perform multi-scale feature fusion, i.e., to fuse feature maps at multiple scales to obtain a better representation; second, as a partitioning strategy, FPNs detect targets at different levels of feature maps based on different scales of objects. The YOLO algorithm is derived from the original YOLOv3 object detection architecture by improving data processing, backbone network, network training, activation function, loss function, and other aspects. It grants the model the optimal performance in matching detection, speed, and accuracy so far [35]. YOLO algorithm firstly extracts the features of an input image through a feature extraction network (also known as the backbone network) and then divides the input image into an \(S^{*}S\) grid, and the grid where the object center is located is responsible for object detection. To perform object detection in Category \(C\), each grid needs to predict B bounding boxes and conditional probabilities belonging to \(C\) categories, respectively, and then output the confidence level _Conf(Object)_, which indicates the existence of an object in a bounding box and the accuracy of the output bounding box. \[IoU=\frac{area(box(Pred)\cap box(Truth))}{area(box(Pred)\cup box(Truth))} \tag{5}\]  
\[Conf(object)=Pr(Object)\times IoU \tag{6}\]  
_Pr(Object)_ signifies whether there is an object falling into the candidate grid. If so, the value of _Pr(Object)_ is 1; if not so, the value is 0. \(IoU\) indicates the intersection ratio between the prediction box and the truth box (Equation (5)), while box (Pred) represents the prediction box and box (Truth) represents the truth box. Each prediction bounding box contains five parameters: \(x\), \(y\), \(w\), \(h\), and _Conf(Object)_ (Equation (6)). (\(x\), \(y\)) represents the offset between the prediction box center and the truth box center, while (\(w\), \(h\)) represents the width and height of the prediction box. YOLOF (Figure 1) shows that the most successful aspect of FPN is the strategy of partitioning the optimization problem, rather than multi-scale feature fusion. For optimization, YOLOF introduces an alternative solution without using a complex feature pyramid, but only using a single-level feature map. Based on this simple and efficient solution, a YOLOF detection framework is designed. Experiments on the COCO dataset demonstrate the effectiveness of YOLOF: it can achieve results comparable to the feature pyramid version but 2.5 times faster. In addition, without the Transformer layer, YOLOF is comparable to DETR: YOLOF also uses a single-layer feature map but with seven times fewer training rounds. In Figure 1, '_C5/DC5_' represents the output feature of the backbone at a downsample rate of [8,16,32], and '_Cout_' means the number of channels of the feature. This study sets the number of channels to 512 for feature maps in the encoder and decoder. \(H\times W\) refers to the height and width of feature maps. Those who proposed YOLOF believed that the design of loss function is one of the optimization techniques, which can boost the accuracy without increasing the inference time.