sanghoon / pva-faster-rcnn

Demo code for PVANet
https://arxiv.org/abs/1611.08588
Other
651 stars 241 forks source link

why there is scale for both height and width in proposal_layer.cpp #12

Closed Maofei closed 7 years ago

Maofei commented 7 years ago

the "im_info" toped from python implemented data layer only has one scale for both height and width, but the proposal layer implemented in C++ use two scale for height and width separately.

I'm wondering whether it's a mistake or do i missed something? @sanghoon

kyehyeon commented 7 years ago

@Maofei

Due to the multi-scale feature concatenation, both of the height and the weight of an input tensor for our network should be multiple of 32, which leads to different values of scale factors in general.

kyehyeon commented 7 years ago

@Maofei

Please see 1) 'def _get_image_blob(im)' in lib/fast-rcnn/test.py that computes the scale factors for the original height and the original width, respectively, and 2) 'def im_detect(net, im, _t, boxes=None)' in the same file that assigns those values to blobs['im_info'], so that our 'im_info' blob has two scale factors.

Maofei commented 7 years ago

@kyehyeon So at the training phase, there is only one scale ?

sanghoon commented 7 years ago

The training was done in a multi-scale way. However, as @kyehyeon has mentioned, due to the network structures, we had to keep the shape of training images to be multiples of 32. So scale factor along x-axis can be different from the one along y-axis.

baiyancheng20 commented 7 years ago

No matter I met with this problem: top_shape[j] == bottom[i]->shape(j) (40 vs. 39) All inputs must have the same shape, except at concat_axis.