Skip to content
DeepForgeby svx
All problems
HardComputer Visioncv-214

NMS 3D Count

Problem

Run greedy non-maximum suppression with 3D IoU and return how many boxes survive.

Process boxes in descending score order (ties by index) and suppress a box when its 3D IoU with a kept box is strictly greater than iou_threshold.

Test cases

case 1
in: [[[0,0,0,2,2,2],[0,0,0,2,2,2],[5,5,5,7,7,7]],[0.9,0.8,0.7],0.5]
expected: 2
case 2
in: [[[0,0,0,2,2,2],[1,1,1,3,3,3],[5,5,5,7,7,7]],[0.9,0.8,0.7],0.1]
expected: 3
case 3
in: [[[0,0,0,2,2,2],[1,1,1,3,3,3]],[0.9,0.8],0.9]
expected: 2
case 4
in: [[],[],0.5]
expected: 0
Starter codePython
def nms_3d_count(boxes, scores, iou_threshold):
    # Your code here
    pass

4 test cases · run your code against them in the editor