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

输入尺寸问题 #35

Closed
CodeGod-J opened this issue Jan 18, 2021 · 4 comments
Closed

输入尺寸问题 #35

CodeGod-J opened this issue Jan 18, 2021 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@CodeGod-J
Copy link

你好,我在centernet.py line153下面打印up_fmap的尺寸(使用test_net.py)

  up_fmap = self.upsample(features)

  print(up_fmap.size())

,发现输出为
torch.Size([1, 64, 128, 168])
torch.Size([1, 64, 128, 168])
torch.Size([1, 64, 112, 168])
torch.Size([1, 64, 128, 168])
torch.Size([1, 64, 168, 96])
torch.Size([1, 64, 168, 160])
torch.Size([1, 64, 168, 128])
torch.Size([1, 64, 112, 168])
torch.Size([1, 64, 136, 168])
torch.Size([1, 64, 168, 112])
torch.Size([1, 64, 168, 112])

这部分尺寸输出不应该是128吗,我没有找到输入resize为512那部分代码?请问这个复现不是基于固定尺寸(输入512,输出128)的吗?

@FateScript
Copy link
Owner

这个复现是固定尺寸(512, 512)的,改变size的code在这里

@CodeGod-J
Copy link
Author

CodeGod-J commented Jan 18, 2021

非常感谢你的及时回复,但是我追踪output_size为centernet.py inference函数中的new_h, new_w = (h | 31) + 1, (w | 31) + 1
计算得到的,其中的h和w是 batch input images的尺寸,我又看了代码,训练时候是从512到128,测试时候是否是原图进行测试的呢?

@FateScript
Copy link
Owner

here

@CodeGod-J
Copy link
Author

谢谢,我发现是测试的时候没有transform(因为我的图片比较大,所以inference time过长,所以才产生了困惑)。麻烦了,新年快乐。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants