def iou_width_height(box, center):
    """
    Returns iou of two boxes (one of them is the centroid of course) based on their width and height.

    :param box: A box from our dataset.
    :param center: Our centroid.
    :return: Intersection Over Union of these two boxes.
    """
    intersection = min(box[0], center[0]) * min(box[1], center[1])
    union = box[0] * box[1] + center[0] * center[1] - intersection
    return intersection / union