I have a list of ground truth and a list of corresponding prediction for object detection for a given picture in the following form:
ground_truth = [[0,6,234,45,362],
[1,1,156,103,336],
[1,36,111,198,416],
[1,91,42,338,500]]
prediction = [[0,6,234,39,128],
[0,3,244,39,128]
[1,1,156,102,180],
[1,36,111,162,305]]
where the individual objects are descripted as (sub)lists of class, min_x, min_y, max_x, max_y values for the bounding boxes for each recognized objects.
Now, I would like to have an evaluation of the correctness of the predictions against the ground truth. I know about intersection over union and F1 computed from it, but only for one class and one object. I wonder how to generalize this over multiple possible objects of multiple possible classes?
Should I iterate over each ground truth objects and iterate over all prediction objects and see which prediction is the closest? But what if a prediction partly overlaps two ground truth objects? It's confusing...