NTS-Net icon indicating copy to clipboard operation
NTS-Net copied to clipboard

请问如何修改anchor大小?

Open liuboss1992 opened this issue 6 years ago • 3 comments

我想只使用48*48的尺寸生成anchor,因此将core/anchors.py下第二个和第三个dict注释。 _default_anchors_setting = ( dict(layer='p3', stride=32, size=48, scale=[2 ** (1. / 3.), 2 ** (2. / 3.)], aspect_ratio=[0.667, 1, 1.5]), #dict(layer='p4', stride=64, size=96, scale=[2 ** (1. / 3.), 2 ** (2. / 3.)], aspect_ratio=[0.667, 1, 1.5]), #dict(layer='p5', stride=128, size=192, scale=[1, 2 ** (1. / 3.), 2 ** (2. / 3.)], aspect_ratio=[0.667, 1, 1.5]), ) 结果报错 File "/userhome/task/baa/baa-nts-roi2-48/NTS-Net/core/model.py", line 55, in for x in rpn_score.data.cpu().numpy()] ValueError: all the input array dimensions except for the concatenation axis must match exactly

请问这是什么原因?我如何修改自己的anchor大小? 谢谢!

liuboss1992 avatar Oct 04 '18 12:10 liuboss1992

@yangze0930

liuboss1992 avatar Oct 04 '18 12:10 liuboss1992

I think you need to change the ProposalNet code in core/model.py, which by default generates the proposals in different sizes.

yangze0930 avatar Dec 05 '18 08:12 yangze0930

Thank you for your reply~

liuboss1992 avatar Dec 06 '18 16:12 liuboss1992