Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
SPP_net 是一個2014年的文章, 也是 Object Detection 領域逐漸發展的重要一步。
R-CNN 做Object Detection的時候,是在 image 階段是根據bounding boxes對原來的image 進行 crop,然后對cropped image進行classification。
這樣做遵從Object Detection兩部曲,BBox Detect & Object Classification。 但是這種方法有一個缺點: Conv層大量的重復計算。
同時,對於傳統的CNN, 輸入都需要固定大小的image size, 但是由於CNN的網絡特點,在Conv層是不需要考慮image size 的, 只有后面的FC層才需要考慮。
所以,可以將conv 層提前。
那么, 經過改進的算法就是 SPP_net.
SPP_net 的三個優點是:
(1) Can generate a fixed-length representation regardless of image scale/size
(2) SPP uses multi-level spatial bins;
(3) SPP can pool features extracted at variable scales thanks to the flexibility of input scales
對feature map的分析:
每一個 feature map 都會反應該feature map的反應強度和空間位置。 經過訓練,每一個feature map都反應 the most activated by some shape.
比如: 有些feature map 對圓形反饋,有些對V型反饋。
這些feature map就做到一個提取特征的作用。(這個特征不僅僅包含形狀,顏色,而且有空間特征)
SPP_net 新加入的一種layer: spatial pyramid pooling layer
對 Conv5 層的feature maps 進行spatial pyramid pooling, 對於任意size的feature maps(width, height, channel=256), 得到典型的三種:pooling 成 (4 x 4 x channel), (2 x 2 x channel), (1 x 1 x channel), 然后將這三個maps concatenate into vector, 那么這個 vector就是 (4 x 4 + 2 x 2 + 1 x 1) x channel 維度的。
總結: 看完Faster RCNN 之后再回過頭來看這些文章。發現:方法就是這樣一步一步試出來,每次小小的改動,最后成為一個很實用很有效的東西。