Skip to content

Too small IoU #82

@June-Jo

Description

@June-Jo

I tried to calculate the IoU of two 3d bounding boxes using the box.py and the iou.py.

But I got the too small IoU.

I think that the estimation of intersection goes wrong.

Maybe in extracting the intersection points.

What should I do for correct calculation?

def cal_3d_box_iou(self, box1, box2):
    vert1 = get_oriented_3d_bbox(box1)
    vert2 = get_oriented_3d_bbox(box2)
    
    bbox1 = Box(vertices=vert1)
    bbox2 = Box(vertices=vert2)
    
    iou = IoU(bbox1, bbox2)
    _iou = iou.iou()
    
    return _iou

def get_oriented_3d_bbox(oriented_3d_bbox):
    center = oriented_3d_bbox.get_center() # (3,)
    corners = oriented_3d_bbox.get_box_points() # (8, 3)

    vertices = np.concatenate([np.asarray(center)[None, :], np.asarray(corners)])
    # reorder
    vertices = vertices[open3d2objectron]

    return vertices

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions