Skip to main content
. 2023 Jul 15;23(14):6423. doi: 10.3390/s23146423
Algorithm 1 Efficient Spatial Pyramid Pooling (ESPP)
Input: The input feature layer, x; The number of input channels of x, Cin; The number of output channels of x, Cout; The parameter that control the size of the model, a.
Output: The output feature layer, out.
  1: Control the number of output feature channels of the convolution process by a.
  2: Cout1 = Cout / a. // In general, the parameter a is set to 4 or 8, which gives excellent control over the number of parameters of the model.
  3: Make an ordinary 1*1 convolution at x, get the output out1.
  4: Make an ordinary 3*3 convolution at x, get the output out2.
  5: The stacking of two 3*3 convolutions gives the same perceptual field as one 5*5 convolution:
  6: Make an ordinary 3*3 convolution at out2, get the output out3.
  7: The stacking of three 3*3 convolutions gives the same perceptual field as one 7*7 convolution:
  8: Make an ordinary 3*3 convolution at out3, get the output out4.
  9: Make a 3*3 atrous convolution with the atrous rate of 1 at out1, get the first branch output out5.
10: Make a 3*3 atrous convolution with the atrous rate of 3 at out2, get the second branch output out6.
11: Make a 3*3 atrous convolution with the atrous rate of 5 at out3, get the third branch output out7.
12: Make a 3*3 atrous convolution with the atrous rate of 7 at out4, get the third branch output out8.
13: Unify the four branch outputs into the same dimension:
14: Concat ([out5, out6, out7, out8], dimension), get out9.
15: Integrate feature information:
16: Make an ordinary 1*1 convolution at out1, get the shortcut.
17: net = out9*0.8 + shortcut.
18: Get the final output:
19: out = RELU (net). // add the non-linearity.
20: return out.