public class NMSUtils extends Object
| 构造器和说明 |
|---|
NMSUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ai.djl.ndarray.NDArray |
batchedNms(ai.djl.ndarray.NDArray boxes,
ai.djl.ndarray.NDArray scores,
ai.djl.ndarray.NDArray idxs,
float iouThreshold,
ai.djl.ndarray.NDManager manager)
批量执行 NMS,输入 NDArray 形式的 boxes、scores 和 idxs,返回保留的索引列表
|
static int[] |
mtcnnNms(ai.djl.ndarray.NDArray boxes,
ai.djl.ndarray.NDArray scores,
float iouThreshold) |
static int[] |
nms(ai.djl.ndarray.NDArray boxes,
ai.djl.ndarray.NDArray scores,
float iouThreshold)
通用 NMS 方法,输入 NDArray 形式的 boxes 和 scores,返回保留的索引列表
|
public static int[] nms(ai.djl.ndarray.NDArray boxes,
ai.djl.ndarray.NDArray scores,
float iouThreshold)
boxes - NDArray 形状为 (N, 4),格式为 [x1, y1, x2, y2]scores - NDArray 形状为 (N,) 或 (N,1),每个 box 的置信度iouThreshold - IOU 阈值,超过该阈值则认为有重叠public static ai.djl.ndarray.NDArray batchedNms(ai.djl.ndarray.NDArray boxes,
ai.djl.ndarray.NDArray scores,
ai.djl.ndarray.NDArray idxs,
float iouThreshold,
ai.djl.ndarray.NDManager manager)
boxes - NDArray 形状为 (N, 4),格式为 [x1, y1, x2, y2]scores - NDArray 形状为 (N,) 或 (N,1),每个 box 的置信度idxs - NDArray 形状为 (N,),每个 box 对应的 batch idiouThreshold - IOU 阈值,超过该阈值则认为有public static int[] mtcnnNms(ai.djl.ndarray.NDArray boxes,
ai.djl.ndarray.NDArray scores,
float iouThreshold)
Copyright © 2025. All rights reserved.