(scores, bboxes, nms_threshold=0.5, keep_top_k=200,
                     scope=None)
Apply non-maximum selection to bounding boxes. In comparison to TF
    implementation, use classes information for matching.
    Use only on batched-inputs. Use zero-padding in order to batch output
    results.

    Args:
      scores: Batch x N Tensor/Dictionary containing float scores.
      bboxes: Batch x N x 4 Tensor/Dictionary containing boxes coordinates.
      nms_threshold: Matching threshold in NMS algorithm;
      keep_top_k: Number of total object to keep after NMS.
    Return:
      scores, bboxes Tensors/Dictionaries, sorted by score.
        Padded with zero if necessary.
Apply non-maximum selection to bounding boxes. In comparison to TF
    implementation, use classes information for matching.
    Use only on batched-inputs. Use zero-padding in order to batch output
    results.
Apply non - maximum selection to bounding boxes . In comparison to TF implementation use classes information for matching . Use only on batched - inputs . Use zero - padding in order to batch output results .
def bboxes_nms_batch(scores, bboxes, nms_threshold=0.5, keep_top_k=200,
                     scope=None):
    """Apply non-maximum selection to bounding boxes. In comparison to TF
    implementation, use classes information for matching.
    Use only on batched-inputs. Use zero-padding in order to batch output
    results.

    Args:
      scores: Batch x N Tensor/Dictionary containing float scores.
      bboxes: Batch x N x 4 Tensor/Dictionary containing boxes coordinates.
      nms_threshold: Matching threshold in NMS algorithm;
      keep_top_k: Number of total object to keep after NMS.
    Return:
      scores, bboxes Tensors/Dictionaries, sorted by score.
        Padded with zero if necessary.
    """
    # Dictionaries as inputs.
    if isinstance(scores, dict) or isinstance(bboxes, dict):
        with tf.name_scope(scope, 'bboxes_nms_batch_dict'):
            d_scores = {}
            d_bboxes = {}
            for c in scores.keys():
                s, b = bboxes_nms_batch(scores[c], bboxes[c],
                                        nms_threshold=nms_threshold,
                                        keep_top_k=keep_top_k)
                d_scores[c] = s
                d_bboxes[c] = b
            return d_scores, d_bboxes

    # Tensors inputs.
    with tf.name_scope(scope, 'bboxes_nms_batch'):
        return bboxes_nms(scores, bboxes, nms_threshold, keep_top_k)
def bboxes_nms_batch ( scores , bboxes , nms_threshold = 0.5 , keep_top_k = 200 , scope = None ) : # Dictionaries as inputs. if isinstance ( scores , dict ) or isinstance ( bboxes , dict ) : with tf . name_scope ( scope , 'bboxes_nms_batch_dict' ) : d_scores = { } d_bboxes = { } for c in scores . keys ( ) : s , b = bboxes_nms_batch ( scores [ c ] , bboxes [ c ] , nms_threshold = nms_threshold , keep_top_k = keep_top_k ) d_scores [ c ] = s d_bboxes [ c ] = b return d_scores , d_bboxes # Tensors inputs. with tf . name_scope ( scope , 'bboxes_nms_batch' ) : return bboxes_nms ( scores , bboxes , nms_threshold , keep_top_k )