Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何修改anchor大小? #5

Open
liuboss1992 opened this issue Oct 4, 2018 · 3 comments
Open

请问如何修改anchor大小? #5

liuboss1992 opened this issue Oct 4, 2018 · 3 comments

Comments

@liuboss1992
Copy link

我想只使用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
Copy link
Author

@yangze0930

@yangze0930
Copy link
Owner

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

@liuboss1992
Copy link
Author

Thank you for your reply~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants