Skip to content

Commit

Permalink
revert changes to original
Browse files Browse the repository at this point in the history
Signed-off-by: wep21 <daisuke.nishimatsu1021@gmail.com>
  • Loading branch information
wep21 committed Jun 1, 2023
1 parent 2567997 commit 2ad5e4a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions projects/BEVFusion/bevfusion/transfusion_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ def __init__(

def create_2D_grid(self, x_size, y_size):
meshgrid = [[0, x_size - 1, x_size], [0, y_size - 1, y_size]]
# NOTE: modified
batch_x, batch_y = torch.meshgrid(
batch_y, batch_x = torch.meshgrid(
*[torch.linspace(it[0], it[1], it[2]) for it in meshgrid])
batch_x = batch_x + 0.5
batch_y = batch_y + 0.5
Expand Down Expand Up @@ -725,10 +724,10 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx):
center_int = center.to(torch.int32)

# original
# draw_heatmap_gaussian(heatmap[gt_labels_3d[idx]], center_int, radius) # noqa: E501
draw_heatmap_gaussian(heatmap[gt_labels_3d[idx]], center_int, radius) # noqa: E501
# NOTE: fix
draw_heatmap_gaussian(heatmap[gt_labels_3d[idx]],
center_int[[1, 0]], radius)
# draw_heatmap_gaussian(heatmap[gt_labels_3d[idx]],
# center_int[[1, 0]], radius)

mean_iou = ious[pos_inds].sum() / max(len(pos_inds), 1)
return (
Expand Down

0 comments on commit 2ad5e4a

Please sign in to comment.