## 3 Two-Stream UDN for Pedestrian Detection
### Improved UDN  
The UDN process images in YUV color space. The three channels fed to UDN include two images and one feature image, which is shown in the upper row of Figure 2. The first channel is the Y channel of an input image. The second channel consists of 4 small images and each is one-fourth of the original image; three of them are the Y, U and V channels of the original image, and the fourth part is blank image. The third channel also consists of 4 small images, and each is one-fourth of the original image, three of them are Sobel edge features computed with the Y, U, and V channel of the original image, the fourth part is achieved by maximizing the three edge images on pixel-wise. It can be seen that for some images, the UV channels may be too plain to provide enough information for recognition, and corresponding edge maps are nearly zeros, which is not benefit for feature extractions. In this paper, we employ HSV color space for feature extraction and provide more shape information for the network. The lower row of Figure 2 shows new input for networks. The three channels are as follows: (1) The first channel is the V channel extracted from the original image after HSV color space conversion; (2) The second channel is divided into four blocks, which are the HOG features of the HSV image, GrabCut regions of the HSV image, HOG features of the RGB image, and GrabCut regions of the RGB image. (3) The third channel consists of four blocks. The first three blocks are HSV edges, which are calculated by the \(5\times 5\) Sobel operator for the three channels of the HSV image, respectively. The fourth block is achieved by maximizing the three above edge images on pixel-wise. Compared with UDN, our proposed feature combination provides more shape information. Figure 3 shows improved UDN, which has same structure with UDN but adopts different input features and different activation functions. The details are as follows:  
1. Convolution layer 1: The input of the first convolution layer has three components \(X_{i}\in R^{84\times 28},\ i=1,2,3\), which are corresponding to channels in Figure 2. There are 64 convolution  
Figure 3: Improved UDN. Figure 2: Input channels for Unified Deep Networks (UDN) and improved UDN. (**a**) The Y channel in YUV color space. (**b**) Concatenation of the Y channel, U channel, and V channel with zero padding. (**c**) Concatenation of four Sobel edge maps. The former three are obtained from three channel images in YUV color space, the fourth edge map is obtained by choosing the maximum magnitudes from the first three edge maps. (**d**) V channel in HSV color space. (**e**) Concatenation of two HOG feature maps and two Grabcut feature maps. (**f**) Concatenation of four Sobel edge maps. The former three are obtained from three channel image in HSV color space, the fourth edge map is obtained by choosing the maximum magnitudes from the first three edge maps. kernels \(\left\{W_{j}|W_{j}\in R^{9\times 9\times 3},\text{ j}=1,\ldots,64\right\}\), which are utilized for extracting features. With each convolution kernel \(W_{j}\), a filtered data map \(A_{j}\in R^{76\times 20}\) is computed as follows: \[A_{j}\ =\ \textit{Swish}\ (b_{j}\ +\ \sum_{i=1}^{3}\left[W_{j}\right]_{:,i,j}\ *\ X_{i})\] (1) where \(\left[W_{j}\right]_{:,i,j}\) represents the \(i\)th slice of three-order tensor \(W_{j}\), \(\ *\) represents the convolution operator, and \(b_{j}\) represents bias parameters obtained by random initialization. Before training, \(W_{j}\) is initialized with the Gabor filter. 2. Pooling layer: Calculate the average value of pixels in each \(4\times 4\) neighborhood on each filtered data map and obtain the extracted feature maps \(\left\{B_{k}|B_{k}\in R^{19\times 5},\text{ k}=1,\ldots,64\right\}\), which is computed as follows: \[B_{k}\ =\ \textit{AveragePool}(A_{k},4,\ 4)\] (2) where \(k\) represents the number of the extracted feature maps. 3.