def NonMaxSuppressionV5(context, node):
    """
    Different from NonMaxSuppression/NonMaxSuppressionV3, which only returns the indices of the selected boxes,
    NonMaxSuppressionV5 returns all indices, scores and number of the selected boxes.
    """
    soft_nms_sigma = context[node.inputs[5]].val
    iou_threshold_override = None
    score_threshold_override = None
    if soft_nms_sigma != 0:
        # fallback to "hard" NMS with sensible defaults
        iou_threshold_override = types.fp32(0.5)
        score_threshold_override = types.fp32(float("-inf"))
        logger.warning("NonMaxSuppressionV5 with soft_nms_sigma != 0 not supported. "
                       "Setting soft_nms_sigma to zero.")

    _, valid_scores, valid_indices, valid_outputs = _get_non_maximum_supression(
        context, node, iou_threshold_override=iou_threshold_override, score_threshold_override=score_threshold_override
    )
    res = [valid_indices, valid_scores, valid_outputs]
    context.add(node.name, res)

    Different from NonMaxSuppression/NonMaxSuppressionV3, which only returns the indices of the selected boxes,
    NonMaxSuppressionV5 returns all indices, scores and number of the selected boxes.
    
coremltools/converters/mil/frontend/tensorflow/ops.py