Salient object detection (SOD) aims to estimate visual significance of image regions and then segment salient targets out. It has been widely used in many fields,e.g.classification], visual tracking [tracking], person re-identification [Reid], foreground maps evaluation [S-m], content-aware image editing [image_editing], light field image segmentation [LFSD_CNNs]
and image captioning[Imagecaption], etc.
With the development of deep convolutional neural networks (CNNs), a large number of CNN-based methods[RFCN, Amulet, SRM, DGRL, BMPM, RAS, PAGRN, HRS, PASE, BASNet, CTBIN, MINet, GateNet] have been proposed for RGB salient object detection and they achieve satisfactory performance. However, some complex scenarios are still unresolved, such as salient objects share similar appearances to the background or the contrast among different objects is extremely low. Under these circumstances, only using the information provided by the RGB image is not sufficient to predict saliency map well. Recently, benefiting from Microsoft Kinect and Intel RealSense devices, depth information can be conveniently obtained. Moreover, the stable geometric structures depicted in the depth map are robust against the changes of illumination and texture, which can provide important supplement information for handling complex environments, as shown in Fig. 1. These examples in the RGB-D dataset have more stereoscopic viewing angles and more severe interference from the background than ones in the RGB dataset.
For the RGB-D SOD task, many CNN-based methods [PCA, MMCI, TANet, CPFP, DMRA, HDFNet] are proposed, but more efforts need be paid to achieve a robust, real-time and small-scale model. We analyze their restrictions here: (1) Most methods [CTMF, PDNet, PCA, AF_RGBD, MMCI, DMRA] use the two-stream structure to separately extract features from RGB and depth, which greatly increases the number of parameters in the network. In addition, due to small scale of existing RGB-D datasets and great difference between RGB and depth modalities, the deep network (e.g., VGG, ResNet) is very difficult to be trained from scratch if the RGB and depth channels are concatenated and fed into the network. To this end, we construct a single stream encoder, which can borrow the generalization ability of ImageNet pre-trained backbone to extract discriminative features from the RGB-D input and achieve SOD-oriented RGB-depth early fusion. (2) The depth map can naturally depict contrast cues at different positions, which provides important guidance for the fore-/back-ground segmentation. However, this observation has never been investigated in the existing literature. In this work, we introduce a spatial filtering mechanism between the encoder and the decoder, which explicitly utilizes the depth map to guide the computation of dual attention, thereby promoting feature discrimination in the fore-/back-ground decoding branches. (3) Since the size of objects is various, the effective utilization of multi-scale contextual information is very key to accurately localize objects. Previous methods [SRM, R3Net, BMPM, PFA, DMRA] do not explore the internal relationships between the parallel features of different receptive fields in the multi-scale feature extraction module (e.g. ASPP [Deeplab]). We think that each position in the feature map responds differently to objects and a strong activation area can better perceive the semantic cues of objects.
To address these above problems, we propose a single stream network with the novel depth-enhanced attention (DANet) for RGB-D saliency detection. First, we design a single stream encoder with a 4-channel input. It can not only save many parameters compared to previous two-stream methods, but also promote the regional discrimination of the low-level features because this encoder can effectively utilize the ImageNet pre-trained model to extract powerful features with the help of the proposed initialization strategy. Second, we build a depth-enhanced dual attention module (DEDA) between the encoder and the decoder. This module sequentially leverages both the mask-guided strategy and the depth-guided strategy to filter the mutual interference between depth prior and appearance prior, thereby enhancing the overall contrast between foreground and background. In addition, we present a pyramidal attention mechanism to promote the representation ability of the top-layer features. It calculates the spatial correlation among different scales and obtains efficient context guidance for the decoder.
Our main contributions are summarized as follows.
We propose a single stream network to achieve both early fusion and middle fusion, which implicitly formulates the cross-modal information interaction in the encoder and further explicitly enhances this effect in the decoder.
We design a novel depth-enhanced dual attention mechanism, which exploits the depth map to strengthen the mask-guided attention and computes fore-/back-ground attended features for the encoder.
Through using a self-attention mechanism, we propose a pyramidally attended feature extraction module, which can depict spatial dependencies between any two positions in feature map.
We compare the proposed model with ten state-of-the-art RGB-D SOD methods on six challenging datasets. The results show that our method performs much better than other competitors. Meanwhile, the proposed model is much lighter than others and achieves a real-time speed of 32 FPS.
2 Related Work
Generally speaking, the depth map can be utilized in three ways: early fusion [early_fusion_1, early_fusion_2], middle fusion [Middle_fusion] and late fusion [late_fusion]
. It is worth noting that the early fusion technique has not been explored in existing deep learning based saliency methods. Most of them use two streams to respectively handle RGB and depth information. They achieve the cross-modal fusion only at a specific stage, which limits the usage of the depth-related prior knowledge. This issue motivates some efforts[PCA, MMCI] to examine the multi-level fusion between the two streams. However, the two-stream design significantly increases the number of parameters in the network [CTMF, PCA, MMCI, AF_RGBD]. And, restricted by the scale of existing RGB-D datasets, the depth stream is hardly effectively trained and does not comprehensively capture depth cues to guide salient object detection. To this end, Zhao et al. [CPFP] propose a trade-off method, which only feeds the RGB images into the encoder network and inserts a shallow convolutional subnet between adjacent encoder blocks to extract the guidance information from the depth map. In this work, we integrate the depth map and the RGB image from starting to build a real single-stream network. This network can fully use the advantage of the ImageNet pre-trained model to extract color and depth features and remedy the deficiencies of individual grouping cues in color space and depth space. And we also show the effectiveness of the proposed early fusion strategy in the encoder through quantitative and qualitative analysis. Recently, Zhao et al. [CPFP] exploit the depth map to compute a contrast prior and then use this prior to enhance the encoder features. Their contrast loss actually enforces the network to learn saliency cues from the depth map in a brute-force manner. Although the resulted attention map can coarsely distinguish the foreground from the background, it greatly reduces the ability of providing accurate depth prior for some easily-confused regions, thereby weakening the discrimination of the encoder feature in these regions. We think that the depth map is more suitable to play a guiding role because the grouping cues in depth space are very incompatible with those in color space. In this work, we combine the depth guidance and the mask guidance to explicitly formulate their complementary relation. Thus, we can effectively take advantage of the useful depth cues to assist in segmenting salient objects and weaken their incompatibility.
3 Proposed Method
We adopt the feature pyramid network [FPN] (FPN) as the basic structure and the overall architecture is shown in Fig. 2, in which encoder blocks, transition layers, saliency layers and background layers are denoted as , , and , respectively. Here, indexes different levels. And their output feature maps are denoted as , , and , respectively. Each transition layer uses a convolution operation to process the features maps from each encoder block for matching the number of channels. The saliency layers and background layers compose the decoder. The final output is generated by integrating the predictions of the two branches using a residual connection. In this section, we first describe the encoder network in Sec. 3.1, then give the details of the proposed modules, including depth-enhanced dual attention module (DEDA) in Sec. 3.2 and pyramidally attended feature extraction module (PAFE) in Sec. 3.3.
3.1 Single Stream Encoder Network
In our model, the encoder is a single stream with a FCN structure. We take the VGG-16 [VGG] network as the backbone, which contains Conv layers, max-pooling layers and fully connected layers. First, we concatenate the depth map with the RGB image as the 4-channel RGB-D input. We initialize the parameters of the first convolutional layer in block using the He’s method [PRelu] and output a 64-channel feature. The other layers adopt the ImageNet pre-trained parameters. In this way, the two-modality information can be fused in the input stage and make the low-level features have a more powerful discriminant ability, which is conducive to extracting effective features for salient regions. Moreover, because four input channels are parallel in the channel direction, the network can easily learn to suppress the feature response of the depth channel when the quality of the depth map is poor and does not affect feature computation of the color channels. To demonstrate the effectiveness of this design, we compare two other schemes. Both of them combine the color channels with the depth channel by element-wise addition. One is to directly load the pre-trained parameters. The other is to use the above-mentioned parameter setting. When the depth map has a negative impact, the first layer simultaneously suppresses the color response and the depth response. The quantitative results in Tab. LABEL:tab:ablation show that our early fusion strategy performs better than other schemes. Similar to most previous methods [PDNet, PCA, CPFP, TANet, AF_RGBD, DMRA], we cast away all the fully-connected layers of the VGG-16 net and remove the last pooling layer to retain the details of the top-layer features.
3.2 Depth-enhanced Dual Attention Module
Considering that the depth map can naturally describe contrast information in different depth positions, we utilize it to generate contrasted features for the decoder, thereby strengthening the detection ability for hard examples. In particular, we propose a depth-enhanced attention module and its detailed structure is shown in Fig. 3. When the region of object has a large span at depth or the background and foreground areas are at the same depth, only depending on the depth map does not provide accurate grouping cues for saliency detection. Therefore, we adopt the mask supervision and depth guidance mechanism to filter the misleading information. We first combine the features from the current transition layer and the previous decoder block with the depth map to compute a mask-guided attention , which is supervised by the saliency ground truth. The whole process is written as follows:
is an element-wise sigmoid function,refers to the convolution layer and denotes the depth map. Although the resulted
shows high contrast between the foreground and the background under binary supervision, it inevitably exists two drawbacks: (1) Some background regions are wrongly classified to be salient. (2) Some salient regions are mislabelled as the background. To solve the first issue, we introduce the depth information to refine:
where denotes the depth-enhanced attention of the saliency branch. It can provide additional contrast guidance for the misjudged regions in and maintain high contrast between foreground and background, thereby enhancing mask-guided attention. To resolve the second issue, we design the depth-enhanced attention for the background branch as follows:
We combine and by the above formulas to construct foreground attention and background attention . There are three benefits: (1) When the depth value is very small or even zero, the attention still work because the first terms in Equ. (2) and Equ. (3) are independent of . (2) The depth map does not have the semantic distinction between foreground and background, which may introduce noise and interference when segmenting salient object. However, the DEDA can still preserve high contrast between the foreground and the background while introducing depth information in Equ. (2) and Equ. (3). Becasue, the usually shows high contrast between the foreground and the background under binary supervision. or can limit to only optimize the foreground or the background. (3) During the back-propagation process of gradient, and can obtain dynamic gradients, which help the network learn the optimal parameters. Taking for example, its derivation with respect to is calculated as:
from where it can be seen that the gradient changes with although the depth is fixed.
3.3 Pyramidally Attended Feature Extraction
The scale of objects is various in images. The single-scale features can not capture the multi-scale context for different objects. Benefiting from the ASPP in semantic segmentation [Deeplab], some SOD networks [R3Net, BMPM, PFA] also equip it. However, directly aggregating features at different scales may weaken the representation ability for salient areas because of the distraction of non-salient regions. Instead of equally treating all spatial positions, we respectively apply spatial attention to the features of different scales in order to focus more on the visually important regions. By integrating the attention-enhanced multi-scale features, we build a pyramidally attended feature extraction module (PAFE). Its detailed structure is shown in Fig. 4.
We first load in parallel several dilated convolutional layers with different dilation rates on the top-layer to extract high-level and multi-scale features. Then, an attention module is followed in individual branch. Our attention design is inspired by the non-local idea [Nonlocal]. We consider the pairwise relationship at any point in feature map to calculate the attention weight. Let and represent the input and the output of the attention module, respectively. The attention map is computed as follows:
where is an element-wise softmax function and reshapes the input feature to . is the number of features.
Next, we combine with to yield the attention-enhanced feature map and then add the input to obtain the output as follows:
where reshapes the input feature to . In particular, the convolution branch and the global average pooling branch aim to maintaining the inherent properties of the input by respectively using the minimal and maximum receptive field. Therefore, we do not apply the attention module to the two branches.
We evaluate the proposed model on six public RGB-D SOD datasets which are NJUD [NJU2000], RGBD135 [RGBD135] NLPR [early_fusion_1], SSD [SSD], DUTLF-D [DMRA] and SIP [SIP]. On the DUTLF-D, we adopt the same way as the DMRA [DMRA] to use images for training and the rest for testing. Following most state-of-the-art methods [PCA, MMCI, CTMF, CPFP], we randomly select samples from the NJUD dataset and samples from the NLPR dataset for training. Their remaining images and other three datasets are used for testing.
4.2 Evaluation Metrics
We adopt several widely used metrics for quantitative evaluation: precision-recall (PR) curves, F-measure score, mean absolute error (MAE, ), the recently released S-measure () and E-measure () scores. The lower value is better for the MAE and higher is better for others. Precision-Recall curveto . F-measure: It is a metric that comprehensively considers both precision and recall:
where is set to 0.3 as suggested in [colorcontrast_Fm] to emphasize the precision. In this paper, we report the maximum F-measure () score across the binary maps of different thresholds, the mean F-measure () socre across an adaptive threshold and the weighted F-measure () [Fwb]. Mean Absolute Error: It is a complement to the PR curve and measures the average absolute difference between the prediction and the ground truth pixel by pixel. S-measure: It evaluates the spatial structure similarity by combining the region-aware structural similarity and the object-aware structural similarity :
where is set to 0.5 [S-m].
E-measure: The enhanced alignment measure [Em] can jointly capture image level statistics and local pixel matching information.
4.3 Implementation Details
Our model is implemented based on the Pytorch toolbox and trained on a PC with GTX 1080Ti GPU forepochs with mini-batch size . The input RGB image and depth map are both resized to
. For the RGB image, we use some data augmentation techniques to avoid overfitting: random horizontally flip, random rotate, random brightness, saturation and contrast. For the optimizer, we adopt the stochastic gradient descent (SGD) with a momentum ofand a weight decay of . The learning rate is set to and later use the “poly” policy [poly] with the power of as a mean of adjustment. In this paper, we use the binary cross-entropy loss as supervision.
4.4 Comparison with State-of-the-art Results
The performance of the proposed model is compared with ten state-of-the-art approaches on six benchmark datasets, including the DES [RGBD135], DCMC [DCMC], CDCP [CDCP], DF [DF], CTMF [CTMF], PCA [PCA], MMCI [MMCI], TANet [TANet], CPFP [CPFP] and DMRA [DMRA]. For fair comparisons, all the saliency maps of these methods are directly provided by authors or computed by their released codes.
Quantitative Evaluation. 1) Tab. 1 shows performance comparisons in terms of the maximum F-measure, mean F-measure, weighted F-measure, S-measure, E-measure and MAE scores. It can be seen that our DANet achieves the best results on all six datasets under all six metrics. 2) Tab. 2 lists the model sizes and average speed of different methods in detail. Our model is the smallest and the fastest among these state-of-art methods and saves of the parameters compared to the second lightest method DMRA [DMRA] .
3) Fig. 5 shows the PR curves of different algorithms. We can see that the curves of the proposed method are significantly higher than those of other methods, especially on the NJUD, NLPR and RGBD135 datasets which contain plenty of relatively complex images. Through detailed quantitative comparisons, it can be seen that our method has significant advantages in accuracy and model size, which indicates it is necessary to further explore how to better utilize depth information.
Qualitative Evaluation. Fig. 6 illustrates the visual comparison with other approaches. Our method yields the results more close to the ground truth in various challenging scenarios. For example, for the images having multiple objects or the objects having slender parts, our method can accurately locate objects and capture more details (see the - rows). In complex environments, with the guidance of the depth maps, the proposed method can precisely identify the whole object, while other methods fail (see the - rows). Even when the depth information performs badly in separating the foreground from the background, our network still significantly outperforms other methods (see the - rows).
4.5 Ablation Studies
We take the FPN network of the VGG-16 backbone as the baseline to analyze the contribution of each component. To verify their generalization abilities, we demonstrate the experimental results on five datasets.
Effectiveness of Depth Fusion in Encoder Network. We evaluate three early fusion strategies. The results are shown in Tab. LABEL:tab:ablation. Add denotes the fusion by using element-wise addition and the ImageNet pre-trained first-layer convolution. Add and Cat use the He’s initialization [PRelu] instead of the pre-trained parameters in the first layer, and the latter adopts the 4-channel concatenation rather than element-wise addition. We can see that Cat is significantly better than the baseline and other early fusion methods across five datasets. In particular, it respectively achieves the gain of , , and in terms of the , , and MAE on the RGBD135 dataset. Furthermore, we visualize the features of different levels in Fig. 7. With the aid of the contrast prior provided the depth map, salient objects and their surrounding backgrounds can be clearly distinguished starting from the lowest level (). At the highest level (), the encoder feature is more concentrated on the salient regions, thereby providing the decoder with effective contextual guidance.
Effectiveness of Depth-Enhanced Dual Attention Module. We compare three attention modules based on the ‘Cat’ model. The results are shown in Tab. LABEL:tab:ablation. We try to directly use the depth map as the attention between the encoder and decoder. Since the depth value often varies widely inside the foreground or the background, it easily misleads salient object segmentation and performs badly, even worse than the Cat model. To this end, we use the mask-guided attention (MGA) and the performance is indeed improved. Based on it, we further introduce the depth guidance and build two attended branches to form the depth-enhanced dual attention module (DEDA). It can be seen that the DEFA and DEDA achieve significant performance improvement compared to the MGA. And, the gap between the DEFA and DEDA indicates that the background branch has important supplement to the final prediction. I should note is that we do not deeply consider the two-branch fusion. Since the output of each branch is only a single-channel map, it might not produce too much performance improvement no matter what fusion is used. In addition, we qualitatively show the benefits of the DEDA in Fig 8. It can be seen that the mask-guided attention wrongly classifies some salient regions as the background (see the - columns) and some background regions to be salient (see the - columns). By introducing extra contrast cues provided by the depth map for these regions, the decoder can very well correct some mistakes in the final predictions.
Effectiveness of Pyramidally Attended Feature Extraction. To be fair, we compare the PAFE with the ASPP which also uses the same convolution operations. That is, both the two modules equip a convolution, three atrous convolution with dilation rates of and a global average pooling. The results in Tab. LABEL:tab:ablation indicate that the proposed PAFE is more competitive than the ASPP. In addition, we also compare them in terms of Flops (G vs. G) and Params (M vs. M). Our PAFE does not increase much more computation cost.
In this paper, a more efficient way of using depth information is proposed. We build a single-stream network with the novel depth-enhanced dual attention for real-time and robust salient object detection. We first abandon the routines of the two-stream cross-modal fusion and design a single stream encoder to make full use of the representation ability of the pre-trained network. Next, we use the depth-enhanced dual attention module to make the decoder jointly optimize the fore-/back-ground predictions. Benefiting from the above two ingenious designs, the saliency detection performance is greatly improved while almost no parameters are increased. In addition, we introduce the self-attention mechanism to pyramidally weight multi-scale features, thereby obtaining accurate contextual information to guide salient object segmentation.
Extensive experimental results demonstrate that the proposed model notably outperforms ten state-of-the-art methods under different evaluation metrics. Moreover, our model size is only 106.7 MB with the VGG-16 backbone and runs a real-time speed of 32 FPS.
Acknowledgements. This work was supported in part by the National Key R&D Program of China #2018AAA0102003, National Natural Science Foundation of China #61876202, #61725202, #61751212 and #61829102, the Dalian Science and Technology Innovation Foundation #2019J12GX039, and the Fundamental Research Funds for the Central Universities # DUT20ZD212.