(boxes1, boxes2, use_gpu=True, gpu_id=0)
return iou_matrix
:param boxes_list1:[N, 8] tensor
    :param boxes_list2: [M, 8] tensor
    :return:
def iou_rotate_calculate(boxes1, boxes2, use_gpu=True, gpu_id=0):
    '''

    :param boxes_list1:[N, 8] tensor
    :param boxes_list2: [M, 8] tensor
    :return:
    '''

    boxes1 = tf.cast(boxes1, tf.float32)
    boxes2 = tf.cast(boxes2, tf.float32)
    if use_gpu:

        iou_matrix = tf.py_func(rbbx_overlaps,
                                inp=[boxes1, boxes2, gpu_id],
                                Tout=tf.float32)
    else:
        iou_matrix = tf.py_func(get_iou_matrix, inp=[boxes1, boxes2],
                                Tout=tf.float32)

    iou_matrix = tf.reshape(iou_matrix, [tf.shape(boxes1)[0], tf.shape(boxes2)[0]])

    return iou_matrix
def iou_rotate_calculate ( boxes1 , boxes2 , use_gpu = True , gpu_id = 0 ) : boxes1 = tf . cast ( boxes1 , tf . float32 ) boxes2 = tf . cast ( boxes2 , tf . float32 ) if use_gpu : iou_matrix = tf . py_func ( rbbx_overlaps , inp = [ boxes1 , boxes2 , gpu_id ] , Tout = tf . float32 ) else : iou_matrix = tf . py_func ( get_iou_matrix , inp = [ boxes1 , boxes2 ] , Tout = tf . float32 ) iou_matrix = tf . reshape ( iou_matrix , [ tf . shape ( boxes1 ) [ 0 ] , tf . shape ( boxes2 ) [ 0 ] ] ) return iou_matrix