## 2 Vehicle Detection Framework Using Selective Multi-Stage Features
### Selective Multi-Stage Feature Extraction  
In this section, we explain selective feature extraction and fusion using the CNN model designed and trained as described in Section 2.3. The features used for the vehicle detection framework should be robust to geometric transformation and illumination changes and represent the characteristic vehicle image information. The current features used in the vehicle detection frameworks include the HOG and LBP features. To obtain the HOG features, we divided the input image into cells of a given size, calculated a histogram of the gradient magnitude for each cell, and concatenated the histogram bin values into a \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer** & **Conv\_1** & **Conv\_2** & **Max\_1** & **Conv\_3** \\ \hline Size & \(5\times 5\) & \(5\times 5\) & \(2\times 2\) & \(5\times 5\) \\ Stride & 1 & 1 & 2 & 1 \\ \hline
**Layer** & **Conv\_4** & **Conv\_5** & **Max\_2** & **Full\_1, 2** \\ \hline Size & \(5\times 5\) & \(5\times 5\) & \(2\times 2\) & 2500 \\ Stride & 1 & 1 & 2 & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Proposed convolution neural network (CNN) model parameters. Figure 2: Proposed CNN Model. 1D vector. As HOG uses gradient information from edges in the input image, it is robust to brightness and illumination changes. Therefore, it is a suitable feature for identifying objects such as people and cars that have clear contour information, but not complicated internal patterns. However, as the HOG feature mainly includes vehicle contour information, it is difficult to say that it contains the characteristic vehicle image information. The LBP feature is a 1D matrix representing the given-size block histograms of the converted binary index and includes circular texture information, which is robust to illumination changes. However, the original purpose of the LBP feature was to classify image texture; hence, it is difficult to say that the LBP feature contains the characteristic vehicle image information. The HOG and LBP features are called handcrafted features. Although these are enhanced middle-level features that provide some degree of detection performance over low-level features, such as edges or corners, various new features are emerging that improve vehicle detection performance. Therefore, we propose a feature that can improve vehicle detection performance using selective multi-stage feature extraction and fusion from a CNN. The proposed features effectively reduce dimensionality while including the characteristic vehicle image information and are robust to noise. To selectively extract and fuse features in the CNN model, we must analyze each CNN layer's feature map. Therefore, we introduced a visualization technique to simplify this task, as shown in Figure 3.  
First, we constructed a validation dataset to be used as the input images for the CNN model to visualize the feature map. The validation dataset must not include any images from the training dataset. We investigated the feature maps learned for each CNN layer. When a validation dataset image was input into the trained CNN model, the trained filters in the first convolution layer performed a convolution operation, producing the feature map. The proposed technique visualized these feature maps. The feature maps from the first convolution layer passed through the Relu layer and then to the next convolution layer that performed further convolutions with the previously trained filters, producing the feature map of the second convolution layer. Thus, we obtained the feature maps for all the layers as the image passed through the final convolution layer. Visualizing these feature maps allowed the verification of what vehicle image information was learned as a feature for each layer's feature map. The visualization technique was essential to selectively extract and fuse features from each layer of the CNN model.