multiclass_nms

    • multiclass_nms(bboxes, scores, score_threshold, nms_top_k, keep_top_k, nms_threshold=0.3, normalized=True, nms_eta=1.0, background_label=0, name=None)[源代码]

    该OP用于对边界框(bounding box)和评分(scores)执行多类非极大值抑制(NMS)。

    在NMS步骤后,如果keep_top_k大于-1,则每个图像最多保留keep_top_k个框(bounding box)。

    • 计算示例:
      • bboxes (Variable) – 支持两种类型的边界框(bounding box):
    • scores (Variable) – 支持两种类型的分数:
    • background_label (int) – 背景标签(类别)的索引,如果设置为 0 ,则忽略背景标签(类别)。如果设置为 -1 ,则考虑所有类别。默认值:0
    • nms_top_k (int) – 基于 score_threshold 的过滤检测后,根据置信度保留的最大检测次数。
    • nms_threshold (float) – 在NMS中用于剔除检测框IOU的阈值,默认值:0.3 。
    • nms_eta (float) – 在NMS中用于调整 nms_threshold 的参数,设为1时表示nms_threshold不变。默认值:1.0 。
    • keep_top_k (int) – NMS步骤后每个图像要保留的总bbox数。 -1表示在NMS步骤之后保留所有bbox。
    • name (str|None) – 具体用法请参见 cn_api_guide_Name ,一般无需设置,默认值为None。

    返回类型:Variable,数据类型与输入一致。