Thank you for your reply! 
Do you know how to measure this for bounding boxes and classes? If I only have labels it is enough to just pass that to the function, but now I have to consider both bounding boxes and classes