1
// Copyright (C) 2018-2019 Intel Corporation
2
// SPDX-License-Identifier: Apache-2.0
7
#include <builders/ie_layer_decorator.hpp>
8
#include <ie_network.hpp>
12
namespace InferenceEngine {
16
* @brief The class represents a builder for SimplerNMS layer
18
class INFERENCE_ENGINE_API_CLASS(SimplerNMSLayer): public LayerDecorator {
21
* @brief The constructor creates a builder with the name
22
* @param name Layer name
24
explicit SimplerNMSLayer(const std::string& name = "");
26
* @brief The constructor creates a builder from generic builder
27
* @param layer pointer to generic builder
29
explicit SimplerNMSLayer(const Layer::Ptr& layer);
31
* @brief The constructor creates a builder from generic builder
32
* @param layer constant pointer to generic builder
34
explicit SimplerNMSLayer(const Layer::CPtr& layer);
36
* @brief Sets the name for the layer
37
* @param name Layer name
38
* @return reference to layer builder
40
SimplerNMSLayer& setName(const std::string& name);
43
* @brief Returns input ports
44
* @return Vector of input ports
46
const std::vector<Port>& getInputPorts() const;
48
* @brief Sets input ports
49
* @param ports Vector of input ports
51
SimplerNMSLayer& setInputPorts(const std::vector<Port>& ports);
53
* @brief Returns output port
56
const Port& getOutputPort() const;
58
* @brief Sets output port
59
* @param port Output port
60
* @return reference to layer builder
62
SimplerNMSLayer& setOutputPort(const Port& port);
64
* @brief Returns the quantity of bounding boxes before applying NMS
65
* @return Quantity of bounding boxes
67
size_t getPreNMSTopN() const;
69
* @brief Sets the quantity of bounding boxes before applying NMS
70
* @param topN Quantity of bounding boxes
71
* @return reference to layer builder
73
SimplerNMSLayer& setPreNMSTopN(size_t topN);
75
* @brief Returns the quantity of bounding boxes after applying NMS
76
* @return Quantity of bounding boxes
78
size_t getPostNMSTopN() const;
80
* @brief Sets the quantity of bounding boxes after applying NMS
81
* @param topN Quantity of bounding boxes
82
* @return reference to layer builder
84
SimplerNMSLayer& setPostNMSTopN(size_t topN);
86
* @brief Returns the step size to slide over boxes in pixels
89
size_t getFeatStride() const;
91
* @brief Sets the step size to slide over boxes in pixels
92
* @param featStride Step size
93
* @return reference to layer builder
95
SimplerNMSLayer& setFeatStride(size_t featStride);
97
* @brief Returns the minimum size of box to be taken into consideration
98
* @return Minimum size
100
size_t getMinBoxSize() const;
102
* @brief Sets the minimum size of box to be taken into consideration
103
* @param minSize Minimum size
104
* @return reference to layer builder
106
SimplerNMSLayer& setMinBoxSize(size_t minSize);
108
* @brief Returns scale for anchor boxes generating
109
* @return Scale for anchor boxes
111
size_t getScale() const;
113
* @brief Sets scale for anchor boxes generating
114
* @param scale Scale for anchor boxes
115
* @return reference to layer builder
117
SimplerNMSLayer& setScale(size_t scale);
120
* @brief Returns the minimum value of the proposal to be taken into consideration
123
float getCLSThreshold() const;
125
* @brief Sets the minimum value of the proposal to be taken into consideration
126
* @param threshold Minimum value
127
* @return reference to layer builder
129
SimplerNMSLayer& setCLSThreshold(float threshold);
131
* @brief Returns the minimum ratio of boxes overlapping to be taken into consideration
134
float getIOUThreshold() const;
136
* @brief Sets the minimum ratio of boxes overlapping to be taken into consideration
137
* @param threshold Minimum value
138
* @return reference to layer builder
140
SimplerNMSLayer& setIOUThreshold(float threshold);
143
} // namespace Builder
144
} // namespace InferenceEngine