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

bbox_to_activ in metrics.py #69

Open
mbuttery-ghd opened this issue Feb 29, 2024 · 0 comments
Open

bbox_to_activ in metrics.py #69

mbuttery-ghd opened this issue Feb 29, 2024 · 0 comments

Comments

@mbuttery-ghd
Copy link

def bbox_to_activ(bboxes, anchors, flatten=True):
"Return the target of the model on `anchors` for the `bboxes`."
if flatten:
t_centers = (bboxes[...,:2] - anchors[...,:2]) / anchors[...,2:]
t_sizes = torch.log(bboxes[...,2:] / anchors[...,2:] + 1e-8)
return torch.cat([t_centers, t_sizes], -1).div_(bboxes.new_tensor([[0.1, 0.1, 0.2, 0.2]]))
else: return [activ_to_bbox(act,anc) for act,anc in zip(acts, anchors)]
return res

Shouldn't line 23 be

else: return [bbox_to_activ(bbox, anc) for bbox, anc in zip(bboxes, anchors)]
@mbuttery-ghd mbuttery-ghd changed the title bbox_to_active in metric.py bbox_to_activ in metric.py Feb 29, 2024
@mbuttery-ghd mbuttery-ghd changed the title bbox_to_activ in metric.py bbox_to_activ in metrics.py Feb 29, 2024
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

1 participant