NMSBoxesAsync function

Future<List<int>> NMSBoxesAsync(
  1. VecRect bboxes,
  2. VecF32 scores,
  3. double scoreThreshold,
  4. double nmsThreshold, {
  5. double eta = 1.0,
  6. int topK = 0,
})

Implementation

Future<List<int>> NMSBoxesAsync(
  VecRect bboxes,
  VecF32 scores,
  double scoreThreshold,
  double nmsThreshold, {
  double eta = 1.0,
  int topK = 0,
}) async {
  final indices = calloc<cvg.VecI32>();
  return cvRunAsync0(
    (callback) => cdnn.cv_dnn_NMSBoxes_1(
      bboxes.ref,
      scores.ref,
      scoreThreshold,
      nmsThreshold,
      indices,
      eta,
      topK,
      callback,
    ),
    (c) {
      return c.complete(VecI32.fromPointer(indices).toList());
    },
  );
}