ie_simpler_nms_layer.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @file
7  */
8 
9 #pragma once
10 
12 #include <ie_network.hpp>
13 #include <string>
14 #include <vector>
15 
16 namespace InferenceEngine {
17 namespace Builder {
18 
19 /**
20  * @deprecated Use ngraph API instead.
21  * @brief The class represents a builder for SimplerNMS layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(SimplerNMSLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit SimplerNMSLayer(const std::string& name = "");
31  /**
32  * @brief The constructor creates a builder from generic builder
33  * @param layer pointer to generic builder
34  */
35  explicit SimplerNMSLayer(const Layer::Ptr& layer);
36  /**
37  * @brief The constructor creates a builder from generic builder
38  * @param layer constant pointer to generic builder
39  */
40  explicit SimplerNMSLayer(const Layer::CPtr& layer);
41  /**
42  * @brief Sets the name for the layer
43  * @param name Layer name
44  * @return reference to layer builder
45  */
46  SimplerNMSLayer& setName(const std::string& name);
47 
48  /**
49  * @brief Returns input ports
50  * @return Vector of input ports
51  */
52  const std::vector<Port>& getInputPorts() const;
53  /**
54  * @brief Sets input ports
55  * @param ports Vector of input ports
56  */
57  SimplerNMSLayer& setInputPorts(const std::vector<Port>& ports);
58  /**
59  * @brief Returns output port
60  * @return Output port
61  */
62  const Port& getOutputPort() const;
63  /**
64  * @brief Sets output port
65  * @param port Output port
66  * @return reference to layer builder
67  */
68  SimplerNMSLayer& setOutputPort(const Port& port);
69  /**
70  * @brief Returns the quantity of bounding boxes before applying NMS
71  * @return Quantity of bounding boxes
72  */
73  size_t getPreNMSTopN() const;
74  /**
75  * @brief Sets the quantity of bounding boxes before applying NMS
76  * @param topN Quantity of bounding boxes
77  * @return reference to layer builder
78  */
79  SimplerNMSLayer& setPreNMSTopN(size_t topN);
80  /**
81  * @brief Returns the quantity of bounding boxes after applying NMS
82  * @return Quantity of bounding boxes
83  */
84  size_t getPostNMSTopN() const;
85  /**
86  * @brief Sets the quantity of bounding boxes after applying NMS
87  * @param topN Quantity of bounding boxes
88  * @return reference to layer builder
89  */
90  SimplerNMSLayer& setPostNMSTopN(size_t topN);
91  /**
92  * @brief Returns the step size to slide over boxes in pixels
93  * @return Step size
94  */
95  size_t getFeatStride() const;
96  /**
97  * @brief Sets the step size to slide over boxes in pixels
98  * @param featStride Step size
99  * @return reference to layer builder
100  */
101  SimplerNMSLayer& setFeatStride(size_t featStride);
102  /**
103  * @brief Returns the minimum size of box to be taken into consideration
104  * @return Minimum size
105  */
106  size_t getMinBoxSize() const;
107  /**
108  * @brief Sets the minimum size of box to be taken into consideration
109  * @param minSize Minimum size
110  * @return reference to layer builder
111  */
112  SimplerNMSLayer& setMinBoxSize(size_t minSize);
113  /**
114  * @brief Returns scale for anchor boxes generating
115  * @return Scale for anchor boxes
116  */
117  size_t getScale() const;
118  /**
119  * @brief Sets scale for anchor boxes generating
120  * @param scale Scale for anchor boxes
121  * @return reference to layer builder
122  */
123  SimplerNMSLayer& setScale(size_t scale);
124 
125  /**
126  * @brief Returns the minimum value of the proposal to be taken into consideration
127  * @return Threshold
128  */
129  float getCLSThreshold() const;
130  /**
131  * @brief Sets the minimum value of the proposal to be taken into consideration
132  * @param threshold Minimum value
133  * @return reference to layer builder
134  */
135  SimplerNMSLayer& setCLSThreshold(float threshold);
136  /**
137  * @brief Returns the minimum ratio of boxes overlapping to be taken into consideration
138  * @return Threshold
139  */
140  float getIOUThreshold() const;
141  /**
142  * @brief Sets the minimum ratio of boxes overlapping to be taken into consideration
143  * @param threshold Minimum value
144  * @return reference to layer builder
145  */
146  SimplerNMSLayer& setIOUThreshold(float threshold);
147 };
148 IE_SUPPRESS_DEPRECATED_END
149 
150 } // namespace Builder
151 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:15
std::shared_ptr< const Layer > CPtr
A shared pointer to the constant Layer builder.
Definition: ie_layer_builder.hpp:52
This class defines the basic functional for layer builders.
Definition: ie_layer_decorator.hpp:26
std::shared_ptr< Layer > Ptr
A shared pointer to the Layer builder.
Definition: ie_layer_builder.hpp:48
The class represents a builder for SimplerNMS layer.
Definition: ie_simpler_nms_layer.hpp:24
a header file for the Inference Engine Network interface
This class is the main object to describe the Inference Engine port.
Definition: ie_network.hpp:230