ShaoqingRen / faster_rcnn

Faster R-CNN
Other
2.68k stars 1.22k forks source link

How to change the size of anchor? #173

Closed zhongpc closed 6 years ago

zhongpc commented 6 years ago

I want to use anchor of size 128^2 256^2 512^2 1024^2, I have changed 2.^[3:5] to 2.^[3:6] in proposal_generate_anchors.m and other settings in model/rpn_prototxts as follows:

input_dim: 12 # 9(anchors)
input_dim: 48 # 4 * 9(anchors) num_output: 48 # 4 * 9(anchors) num_output: 24 # 2(bg/fg) * 9(anchors)

But it still goes wrong with my code by reporting image

I have tried the way in

https://github.com/rbgirshick/py-faster-rcnn/issues/161

, but cannot find the corrsponding setting in Matlab version. @ShaoqingRen

zhongpc commented 6 years ago

I have figured out why it dosen't work. There's global input assigned to the scale parameter, and the change in generate_anchor exerts nothing on the network. And the scale parameter is to be changed in experiments/script_faster_rcnn_VOC2007_ZF.m image