如何计算深度学习网络中的感受野(Receptive Field)(以DenseBox中的网络为例)

版权声明:原创博客未经允许请勿转载! https://blog.csdn.net/holmes_MX/article/details/89295250

1. Receptive Field 计算方法

当前层的stride: 历史所有层的stride的乘机

当前层的Receptive Field:  RF = last_RF + (ksize - 1) * history_stride, 其中, last_RF为上一层的Receptive Field, ksize为当前层的kernel size, history_stride为历史积累的stride(不包括当前层的stride).

 

2. 以DenseBox目标检测中的为例进行说明

DenseBox是百度发表的一篇针对Object Detection的paper, 网络的backbone是VGG19.

这里以paper中描述的conv3_4为例进行说明, 论文中指出conv3_4的感受野为48 * 48.

计算过程如下:

Conv Name ksize stride history_stride last_RF RF
Input -- -- -- -- 1
conv1_1 3 1 1 1 3
conv1_2 3 1 1 3 5
pool1 2 2 1 5 6
conv2_1 3 1 2 6 10
conv2_2 3 1 2 10 14
pool2 2 2 2 14 16
conv3_1 3 1 4 16 24
conv3_2 3 1 4 24 32
conv3_3 3 1 4 32 40
conv3_4 3 1 4 40 48
pool3 2 2 4 48 52
conv4_1 3 1 8 52 68
conv4_2 3 1 8 68 84
conv4_3 3 1 8 84

100

conv4_4 3 1 8 100 116

DenseBox中给出conv4_4的感受野是大概是118 * 118, 与本文计算的差不多.

 

[Reference]

[1] http://shawnleezx.github.io/blog/2017/02/11/calculating-receptive-field-of-cnn/

猜你喜欢

转载自blog.csdn.net/holmes_MX/article/details/89295250