Éanna Ó Catháin | 919c14e | 2020-09-14 17:36:49 +0100 | [diff] [blame] | 1 | // |
| 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 | |
| 12 | namespace 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 | */ |
| 26 | std::vector<int> NonMaxSuppression(DetectedObjects& inputDetections, float iouThresh); |
| 27 | |
| 28 | }// namespace od |