顯著性檢測之SAC-Net: Spatial Attenuation Contextfor Salient Object Detection

SAC-Net: Spatial Attenuation Contextfor Salient Object Detection


image.png

原始文檔:https://www.yuque.com/lart/papers/sacnet

主要工作

這是arxiv上的一篇文章。

總體來看,想法有些類似於PiCANet,嘗試集成各個方向的不同距離的依賴關係從而實現對於上下文信息的利用。這裏有一點,就是對於各個方向的遠距離特徵信息的利用,這裏設置了一個參數,配合着一個可學習的注意力權重實現了對於不同距離信息利用的自適應計算。

至於架構本身而言,創新也不是太大,依舊走的是FPN的路子,不過這個一般確實不好有新的變化。雖然掛着attention的名頭,但是看上去也只是個簡單的softmax歸一化處理後的針對分支的預測權重。

主要結構

image.png

總體框圖很直接,主要講解其中的SAC Module。

image.png

這裏單獨看圖其實大體可以瞭解其中的構思。這裏對於特徵的傳播採取了兩個重複的階段的設置。同時一條並行的支路預測了注意力作爲下面的傳播支路中的各個分支的權重。所有的傳播分支乘以各自的權重W的結果拼接後送入1x1卷積進一步融合。對於各個傳播分支,則是各自使用了四個方向的傳播機制,同時可以看出來,這其中會涉及到一個因子alpha,具體有什麼關係,接下來進一步解釋。

首先,對於通過1x1卷積後的特徵通過n個支路進行處理。之後對於各個分支中的特徵使用四個方向的依次處理從而傳播融合特徵。這裏給出了up方向的計算過程,其他三個方向可以進行類比。

image.png

  • fijup表示對於up分支中,(i,j)位置處更新後的特徵矢量,其與rjup有關係
  • rijup表示加上了特定權重加權(1-alphak)的來自上一位置(i-1,j)更新後的特徵fijup後,對於位置(i,j)而言的混合特徵,注意,這裏的fij始終表示原始的輸入的特徵圖上的(i,j)位置上的特徵矢量,四個方向計算使用的都是相同的fij
  • 這裏的beta是一個權重,用來提供一定的非線性(reduce the feature magnitude when it is negative)(使得正負數據的對應的結果有差異,感覺這裏是在模仿Leaky ReLU和PReLU的計算),試驗中這個參數初始化爲0.1,設置爲可學習的參數,對於各個通道而言是不同的(learn the value of β for each feature channel)
  • 這裏的alpha從圖中可以看出來,是一個分數,對於第k個分支(一共是n個),其對應的alphak=(n-k)/n,也就是說,隨着k的增大,(1-alphak)=(k/n)會逐漸增大,趨於1,也就是對於過去的信息進行了完全的保留,實現了超長距離的信息的記憶與傳播

這裏通過使用對於之前的結果的一個加權的“記憶”實現了特徵在不同方向上的傳播。(有點類似於滑動平均,但是這裏對於f和fup兩類不同的數據的滑動過程,而非一般的,針對自身數據序列的滑動窗口)

關於這裏的注意力的計算,使用的如下的softmax計算過程:
image.png
這裏表示的是:

  1. 初始輸入特徵F
  2. 通過一個結構爲Conv3x3-GroupNorm-ReLU-C``onv3x3-GroupNorm-ReLU-Conv1x1的注意力計算模塊Fattention
  3. 得到未歸一化的注意力輸出{A}
  4. 通過softmax沿着所有的A的同一位置(i,j)進行歸一化,使得對於(i,j)這個位置而言,歸一化後的權重集合{W}加和爲1

image.png

對於得到的每個分支中,各個方向處理後的特徵,通過這裏的\oplus操作,也就是按照通道拼接的計算方式進行組合後,乘以權重,再拼接所有分支的結果,從而得到了最終的該階段的輸出特徵。

第一階段結束之後,通過使用一個1x1卷積減小通道數,之後再重複進行一次上面提到的計算過程。這裏會使用另一組attention weight,但是按照圖上的展示,似乎是用的始終是同一個特徵計算出來的。可能實際實現有所不同。因爲文中提到:Then, we repeat the same process in the second round of recurrent translation using another set of attention weight。

最後接一個 Conv1x1-GroupNorm-ReLU 的結構進行特徵的集成,產生最終的SAC module的輸出,即所謂的“spatial attenuation context”(空間衰減上下文信息)。

實驗細節

  • Backbone:由於saliency detection在深度學習中的發展的原因,很多模型仍然使用的是vgg16、resnet50來進行模型的比較與試驗,所以爲了更公平的比較,實際上在實驗中也應該保證backbone的一致性。但是本文使用的竟然是resnet101來作爲backbone,這就有點不厚道了
  • The number of layers:we set the channel number of each FPN or SAC layer as 256 and did not use the feature maps at the first layer in both the FPN or SAC module due to the large memory footprint
  • 損失函數使用的依然是交叉熵函數,這裏使用加和的形式
  • 使用水平翻轉作爲訓練時的數據增強策略
  • 使用了梯度累加的策略進行訓練,mini-batch爲1,每迭代10次更新一次權重參數
  • 使用的是DUTS-TR訓練模型
  • We trained and tested our network on a single GPU (TITAN Xp) using input images of size 400×400

image.png

image.png

image.png

一些討論

文中關於一些方法的討論總結的蠻好的,這裏記錄下:

There has been a lot of works on exploiting spatial context in deep CNNs for image analysis.

  1. Dilated convolution [71], [72] takes context from larger regions by inserting holes into the convolution kernels, but the context information in use still has a fixed range in a local region.
  2. ASPP [73], [74] and PSPNet [75] adopt multiple convolution kernels with different dilated rates or multiple pooling operations with different scales to aggregate spatial context using different region sizes; however, their designed kernel or pooling sizes are fixed, less flexible, and not adaptable to different inputs.
  3. DSC [76], [77] adopts the attention weights to indicate the importance of context features aggregated from different directions, but it only obtains the global context with a fixed influence range over the spatial domain.
  4. The non-local network [32] computes correlations between every pixel pair on the feature map to encode the global image semantics, but this method ignores the spatial relationship between pixels in the aggregation; for salient object detection, features of opposite semantics may, however, be important; see Figure 1.
  5. PSANet [78] adaptively learns attention weights for each pixel to aggregate the information from different positions; however, it is unable to capture the context on lower-level feature maps in high resolutions due to the huge time and memory overhead.

Compared to these methods, our SAC-Net explores and adaptively aggregates context features implicitly with variable influence ranges; it is flexible, fast, and computationally friendly for efficient salient object detection.

Lastly, we also analyzed the failure cases, for which we found to be highly challenging, also for the other state-of-theart methods. For instance, our method may fail for

  • multiple salient objects in very different scales (see Figure 7 (top)), where the network may regard the small objects as non-salient background;
  • dark salient objects (see Figure 7 (middle)), where there are insufficient context to determine whether the regions are salient or not;
  • salient objects over a complex background (see Figure 7 (bottom)), where high-level scene knowledge is required to understand the image.

參考鏈接

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章