Skip to content

Issue of some operations with columns in fpn_roi_target.py #3

@vietth-bka

Description

@vietth-bka

There is a big issue with computing ctr_x and ctr_y in line126 and line127.

ctr_x = all_rois[gt_assignment, 0] + 0.5 * (all_rois[gt_assignment, 2] - all_rois[gt_assignment, 0] + 1)
ctr_y = all_rois[gt_assignment, 1] + 0.5 * (all_rois[gt_assignment, 3] - all_rois[gt_assignment, 1] + 1)

But it is clear that in the line 87, that all_rois is concatenated by rpn_rois and gt_rois which are matrices added with batch_id at their first columns.
all_rois = torch.cat([rpn_rois[batch_roi_inds], gt_rois], axis=0)

So I think it should be skipping the first column of all_rois:
ctr_x = all_rois[gt_assignment, 1] + 0.5 * (all_rois[gt_assignment, 3] - all_rois[gt_assignment, 1] + 1)
ctr_y = all_rois[gt_assignment, 2] + 0.5 * (all_rois[gt_assignment, 4] - all_rois[gt_assignment, 2] + 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions