blob: 204af0b528d45f98e1504332021345ee3944a63a [file] [log] [blame]
Éanna Ó Catháin919c14e2020-09-14 17:36:49 +01001//
2// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include "DetectedObject.hpp"
8
9#include <numeric>
10#include <vector>
11
12namespace od
13{
14
15/**
16* @brief Returns a vector of indices corresponding to input detections kept after NMS.
17*
18* Perform non max suppression on input detections. Any detections with iou greater than
19* given threshold are suppressed. Different detection labels are considered independently.
20*
21* @param[in] Vector of decoded detections.
22* @param[in] Detects with IOU larger than this threshold are suppressed.
23* @return Vector of indices corresponding to input detections kept after NMS.
24*
25*/
26std::vector<int> NonMaxSuppression(DetectedObjects& inputDetections, float iouThresh);
27
28}// namespace od