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

关于对query_bbox作inverse_sigmoid #85

Open
kingofstu opened this issue Oct 10, 2024 · 1 comment
Open

关于对query_bbox作inverse_sigmoid #85

kingofstu opened this issue Oct 10, 2024 · 1 comment

Comments

@kingofstu
Copy link

query_bbox初始化时xy坐标是做了归一化:

grid_size = int(math.sqrt(self.num_query)) # 900
assert grid_size * grid_size == self.num_query
x = y = torch.arange(grid_size) # 30,30
xx, yy = torch.meshgrid(x, y, indexing='ij') # [0, grid_size - 1]
xy = torch.cat([xx[..., None], yy[..., None]], dim=-1)
xy = (xy + 0.5) / grid_size # [0.5, grid_size - 0.5] / grid_size ~= (0, 1)
with torch.no_grad():
self.init_query_bbox.weight[:, :2] = xy.reshape(-1, 2) # [Q, 2]

但为啥在refine_bbox时要inverse_sigmoid(bbox_proposal[..., 0:3]) ?

@afterthat97
Copy link
Collaborator

你总得回到真实坐标吧。。

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