def vectorized_iou(boxes1, boxes2):
    '''
        this is not a standard implementation, but to incorporate with the main function
    '''
    x11, y11, x12, y12 = boxes1
    x21, y21, x22, y22 = boxes2

    xA = np.maximum(x11, np.transpose(x21))
    yA = np.maximum(y11, np.transpose(y21))
    xB = np.maximum(x12, np.transpose(x22))
    yB = np.maximum(y12, np.transpose(y22))

    interArea = np.maximum((xB-xA+1), 0) * np.maximum((yB-yA+1), 0)

    boxAArea = (x12-x11+1) * (y12-y11+1)
    boxBArea = (x22-x21+1) * (y22-y21+1)

    iou = interArea / (boxAArea + np.transpose(boxBArea) - interArea)
    return iou

        this is not a standard implementation, but to incorporate with the main function
    
utils/utils.py