def calculate_iou(rect1, rect2):
    """
    Calculate the Intersection over Union (IoU) of two rectangles using numpy.

    Parameters:
    rect1, rect2: Tuples containing the coordinates of the rectangles in the form (x_min, y_min, x_max, y_max)

    Returns:
    IoU: Intersection over Union value
    """
    # Convert the coordinates to tensors
    box1 = np.array([rect1], dtype=np.float32)
    box2 = np.array([rect2], dtype=np.float32)

    # Calculate IoU using numpy
    iou = box_iou(box1, box2)

    return iou

    Calculate the Intersection over Union (IoU) of two rectangles using numpy.

    Parameters:
    rect1, rect2: Tuples containing the coordinates of the rectangles in the form (x_min, y_min, x_max, y_max)

    Returns:
    IoU: Intersection over Union value
    
gui_agents/s1/utils/common_utils.py