Your question is 3D Bounding Box IoU. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given two axis-aligned 3D bounding boxes, implement a function that returns their Intersection over Union (IoU) as a floating-point number. Each box is represented as [x1, y1, z1, x2, y2, z2], where (x1, y1, z1) is the minimum corner and (x2, y2, z2) is the maximum corner.
def iou_3d(box1, box2):