# Hybrid Local and Global Deep-Learning Architecture for Salient-Object Detection
## 3 Proposed Approach
### Prediction Module  
In this work, the prediction module was based on fully convolutional layers. To this end, the entire model network was based on a convolution operation and a deconvolution layer with varying output dimensions. This enabled our model to capture global and local features from different resolutions, as shown in Figure 1.  
An input image is passed to five convolutional blocks to produce five feature maps \(F_{1}\), \(F_{2}\), \(F_{3}\), \(F_{4}\), and \(F_{5}\). Every convolutional block has kernel size of 3 \(\times\) 3, followed by a max-pooling operation with stride 2 in order to reduce spatial resolution to 13 \(\times\) 13 from 208 \(\times\) 208. Pooling decreases the number of parameters and computations. Max pooling is obtained by using a max filter that captures the maximum of the selected region and produces a new one. After that, five global convolutional blocks are added into the network that allow for dense connection in the features and convolutional layers, which enables features to acquire diverse neural information and be immune to local disruptions. We also added boundary-refinement blocks (BRBs) for the feature maps to keep boundary information. These BRBs are based on a residual structure in which input to this block is directly added to the output of the deeper layer, which helps to maintain information present in the initial layers, and this information is needed by the upsampling layers. This structure also helps in avoiding information loss due to a multilayer network architecture. To generate local feature maps \(F_{L}\), five more convolutional blocks were added to the network, which processes the output of first five convolutional blocks as shown in Figure 2. These convolutional layers also have a kernel of 3 \(\times\) 3 with 128 channels. The resulting diverse-scale local feature maps were \(F_{6}\), \(F_{7}\), \(F_{8}\), \(F_{9}\), \(F_{1}0\). To further capture contrast feature \(F_{i}^{c}\) (\(i=6,...,10\)) for each feature map, which is essential, especially for low-contrast images, we calculated the difference between feature map \(F_{i}\) and its local average \(F_{i}^{*}\). In order to calculate the value of \(F_{i}^{*}\). We employed average pooling with a kernel size of 3 \(\times\) 3. The contrast feature was thus calculated as  
\[F_{i}^{c}=F_{i}-F_{i}^{*} \tag{1}\]  
Since pooling operations were performed after convolutional layers, the spatial size of the image was decreased (to reduce computational cost). However, in the deconvolutional layer, we employed upsampling in order to attain the original image size. The final feature map was generated by the concatenation of contrast feature \(F_{i}^{c}\), local feature \(F_{i}\), and upsampled feature map \(F_{i+1}^{u}\) using the equation below:  
\[F_{i}^{u}=\lambda\big{[}\Gamma(F_{i},F_{i}^{c},F_{i+1}^{u})\big{]}, \tag{2}\]  
where \(\Gamma\) is the concatenation function and \(\lambda\) is the upsampling function. To calculate final local map \(F_{L}\), local contrast feature \(F_{6}^{c}\), local feature \(F_{6}\), and upsampled feature map \(F_{7}^{u}\) are concatenated and passed to convolution layer \(\Xi\) with kernel size set to \(1\times 1\). \[F^{L}=\Xi(\Gamma(F_{6},F_{6}^{c},F_{7}^{u})). \tag{3}\]  
For the computation of global feature map \(F_{G}\), global features were extracted before allocating the saliency information of small regions. For this purpose, three convolutional layers with kernel size 3 \(\times\) 3 and dilation with scale factor 2 is applied. Dilated convolutions reduces the loss of resolution. Figure 3 shows the structure of global convolutional block. Each convolutional layer was accompanied by an RELU activation function and a boundary-refinement block. Figure 4b,c shows the local and global feature maps of an input image. To produce the predicted saliency map, global \(F_{G}\) and local feature maps \(F_{L}\) were combined, and the resulting saliency map \(S_{P}\) was passed as input to the refinement module.