Narumol Prangnawarat | bc67cef | 2019-01-31 15:31:54 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #pragma once |
| 6 | |
| 7 | #include "armnn/Tensor.hpp" |
| 8 | #include "armnn/Descriptors.hpp" |
| 9 | |
Aron Virginas-Tar | 6331f91 | 2019-06-03 17:10:02 +0100 | [diff] [blame] | 10 | #include "Decoders.hpp" |
| 11 | |
| 12 | #include <vector> |
| 13 | |
Narumol Prangnawarat | bc67cef | 2019-01-31 15:31:54 +0000 | [diff] [blame] | 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | void DetectionPostProcess(const TensorInfo& boxEncodingsInfo, |
| 18 | const TensorInfo& scoresInfo, |
| 19 | const TensorInfo& anchorsInfo, |
| 20 | const TensorInfo& detectionBoxesInfo, |
| 21 | const TensorInfo& detectionClassesInfo, |
| 22 | const TensorInfo& detectionScoresInfo, |
| 23 | const TensorInfo& numDetectionsInfo, |
| 24 | const DetectionPostProcessDescriptor& desc, |
Aron Virginas-Tar | 6331f91 | 2019-06-03 17:10:02 +0100 | [diff] [blame] | 25 | Decoder<float>& boxEncodings, |
| 26 | Decoder<float>& scores, |
| 27 | Decoder<float>& anchors, |
Narumol Prangnawarat | bc67cef | 2019-01-31 15:31:54 +0000 | [diff] [blame] | 28 | float* detectionBoxes, |
| 29 | float* detectionClasses, |
| 30 | float* detectionScores, |
| 31 | float* numDetections); |
| 32 | |
Aron Virginas-Tar | 6331f91 | 2019-06-03 17:10:02 +0100 | [diff] [blame] | 33 | void TopKSort(unsigned int k, |
| 34 | unsigned int* indices, |
| 35 | const float* values, |
| 36 | unsigned int numElement); |
| 37 | |
| 38 | float IntersectionOverUnion(const float* boxI, const float* boxJ); |
| 39 | |
| 40 | std::vector<unsigned int> NonMaxSuppression(unsigned int numBoxes, |
| 41 | const std::vector<float>& boxCorners, |
| 42 | const std::vector<float>& scores, |
| 43 | float nmsScoreThreshold, |
| 44 | unsigned int maxDetection, |
| 45 | float nmsIouThreshold); |
| 46 | |
Narumol Prangnawarat | bc67cef | 2019-01-31 15:31:54 +0000 | [diff] [blame] | 47 | } // namespace armnn |