0. Calculating Receptive Field of CNN

CNN 感受野计算公式
感受野指的是一个特定的 CNN 特征(特征图上的某个点)在输入空间所受影响的区域。一个感受野可以用中信位置和打表来表征。然而,对于一个 CNN 特征来说,感受野中的每一个像素值并不是同等重要。一个像素点越接近感受野中心,它对输出特征的计算所起作用越大。这意味着某一个特征不仅仅是受限在输入图片中某个特定的区域(感受野),并且呈指数级聚焦在区域的中心。

感受野的计算公式如下:

lk=lk1+[(fk1)i=1k1si]

其中 lk1 为第 k1 层对应的感受野大小,fk 为第 k 层的卷积核大小,或者是池化层的池化尺寸大小。

更为细致的解释如下:

The receptive field (RF) lk of layer k is:

lk=lk1+[(fk1)i=1k1si]

where lk1 is the receptive field of layer k1, fk is the filter size (height or width, but assuming they are the same here), and si is the stride of layer i.
The formula above calculates receptive field from bottom up (from layer 1). Intuitively, RF in layer k covers (fk1)sk1 more pixels relative with layer k1. However, the increment needs to be translated to the first layer, so the increments is a factorial — a stride in layer k1 is exponentially more strides in the lower layers.

1. 举个例子

感受野的计算是逐层进行的,以下表中的网络结构为例。

No. Layers Kernel Size Stride
1 Conv1 3*3 1
2 Pool1 2*2 2
3 Conv2 3*3 1
4 Pool2 2*2 2
5 Conv3 3*3 1
6 Conv4 3*3 1
7 Pool3 2*2 2

感受野初始值 l0=1,每层的感受野计算过程如下:
l0=1
l1=1+(31)=3
l2=3+(21)1=4
l3=4+(31)12=8
l4=8+(21)121=10
l5=10+(31)1212=18
l6=18+(31)12121=26
l7=26+(21)121211=30

参考文献

相关文章:

  • 2021-05-06
  • 2021-09-13
  • 2021-08-04
  • 2021-05-08
猜你喜欢
  • 2021-07-18
  • 2021-06-24
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案