xref: /aosp_15_r20/external/armnn/samples/ObjectDetection/include/SSDResultDecoder.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "Types.hpp"
8 #include "DetectedObject.hpp"
9 #include "IDetectionResultDecoder.hpp"
10 
11 namespace od
12 {
13 
14 class SSDResultDecoder : public IDetectionResultDecoder
15 {
16 public:
17     /**
18      * Constructs MobileNet ssd v1 inference results decoder.
19      *
20      * @param ObjectThreshold object score threshold
21      */
22     SSDResultDecoder(float ObjectThreshold);
23 
24     DetectedObjects Decode(const common::InferenceResults<float>& results,
25                            const common::Size& outputFrameSize,
26                            const common::Size& resizedFrameSize,
27                            const std::vector<std::string>& labels) override;
28 
29 private:
30     float m_objectThreshold;
31 };
32 }// namespace od