Skip to content

about bbox regression #35

@foralliance

Description

@foralliance

@louis-she HI
在利用anchors坐标网络预测的偏移量得到最终box坐标时,都会引入一个参数variances.但在您的代码中,并未看到此参数.

x = (predictions[:, 0] * anchors[:, 2] + anchors[:, 0])
y = (predictions[:, 1] * anchors[:, 3] + anchors[:, 1])
w = (torch.exp(predictions[:, 2]) * anchors[:, 2])
h = (torch.exp(predictions[:, 3]) * anchors[:, 3])

bounding_boxes = torch.stack((x, y, w, h), dim=1).cpu().data.numpy()  #(200,4)
bounding_boxes = change_coordinate_inv(bounding_boxes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions