In testing an object detection algorithm in large images, we check our detected bounding boxes against the coordinates given for the ground truth rectangles.
Accordi
how about this approach? Could be extended to any number of unioned shapes
surface = np.zeros([1024,1024]) surface[1:1+10, 1:1+10] += 1 surface[100:100+500, 100:100+100] += 1 unionArea = (surface==2).sum() print(unionArea)