szq0214/DSOD

Sixth_norm_mbox_priorbox step parameter is wrong

Juggernaut93 opened this issue · 1 comments

Hi, with your changes to the SSD model, the last layer has 2x2 spatial size, not 1x1 anymore. This stems from the fact that the last 3×3×128 conv layer has padding 1 and also the parallel pooling branch, having kernel size 2, will output a 2x2 feature, instead of 1x1. You can double check this by reading Caffe's code of conv_layer.cpp:

const int output_dim = (input_dim + 2 * pad_data[i] - kernel_extent) / stride_data[i] + 1;

output_dim = (3 + 2 * 1 - 3) / 2 + 1 = 2 / 2 + 1 = 1 + 1 = 2

Also, Caffe's output reflects this:

I1023 13:46:00.587738    43 net.cpp:100] Creating Layer Sixth
I1023 13:46:00.587746    43 net.cpp:434] Sixth <- Convolution77
I1023 13:46:00.587751    43 net.cpp:434] Sixth <- Convolution79
I1023 13:46:00.587757    43 net.cpp:408] Sixth -> Sixth
I1023 13:46:00.587786    43 net.cpp:150] Setting up Sixth
I1023 13:46:00.587792    43 net.cpp:157] Top shape: 2 256 2 2 (2048)

Given this, I think the step size in the Sixth_norm_mbox_priorbox should be 150 (= 300/2) instead of 300 (=300/1).

EDIT: I should also point out that I have made NO modification whatsoever to the source code.

Hi @Juggernaut93, You are right. Someone has also pointed out this at: #23. I have updated the relevant comments in the source code and the figure. I will also update the figure in our extended paper soon. Thanks!