(decode_boxes, scores, iou_threshold, max_output_size,
               use_angle_condition=False, angle_threshold=0, use_gpu=True, gpu_id=0)
return keep
:param boxes: format [x_c, y_c, w, h, theta]
    :param scores: scores of boxes
    :param threshold: iou threshold (0.7 or 0.5)
    :param max_output_size: max number of output
    :return: the remaining index of boxes
:param boxes: format [x_c, y_c, w, h, theta]
    :param scores: scores of boxes
    :param threshold: iou threshold (0.7 or 0.5)
    :param max_output_size: max number of output
    :return: the remaining index of boxes
: param boxes : format [ x_c y_c w h theta ] : param scores : scores of boxes : param threshold : iou threshold ( 0 . 7 or 0 . 5 ) : param max_output_size : max number of output : return : the remaining index of boxes
def nms_rotate(decode_boxes, scores, iou_threshold, max_output_size,
               use_angle_condition=False, angle_threshold=0, use_gpu=True, gpu_id=0):
    """
    :param boxes: format [x_c, y_c, w, h, theta]
    :param scores: scores of boxes
    :param threshold: iou threshold (0.7 or 0.5)
    :param max_output_size: max number of output
    :return: the remaining index of boxes
    """

    if use_gpu:
        keep = nms_rotate_gpu(boxes_list=decode_boxes,
                              scores=scores,
                              iou_threshold=iou_threshold,
                              angle_gap_threshold=angle_threshold,
                              use_angle_condition=use_angle_condition,
                              device_id=gpu_id)

        keep = tf.cond(
            tf.greater(tf.shape(keep)[0], max_output_size),
            true_fn=lambda: tf.slice(keep, [0], [max_output_size]),
            false_fn=lambda: keep)

    else:
        keep = tf.py_func(nms_rotate_cpu,
                          inp=[decode_boxes, scores, iou_threshold, max_output_size],
                          Tout=tf.int64)
    return keep
def nms_rotate ( decode_boxes , scores , iou_threshold , max_output_size , use_angle_condition = False , angle_threshold = 0 , use_gpu = True , gpu_id = 0 ) : if use_gpu : keep = nms_rotate_gpu ( boxes_list = decode_boxes , scores = scores , iou_threshold = iou_threshold , angle_gap_threshold = angle_threshold , use_angle_condition = use_angle_condition , device_id = gpu_id ) keep = tf . cond ( tf . greater ( tf . shape ( keep ) [ 0 ] , max_output_size ) , true_fn = lambda : tf . slice ( keep , [ 0 ] , [ max_output_size ] ) , false_fn = lambda : keep ) else : keep = tf . py_func ( nms_rotate_cpu , inp = [ decode_boxes , scores , iou_threshold , max_output_size ] , Tout = tf . int64 ) return keep