ie_prior_box_clustered_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 PriorBoxClustered layer
22  */
23 IE_SUPPRESS_DEPRECATED_START
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(PriorBoxClusteredLayer): public LayerDecorator {
25 public:
26  /**
27  * @brief The constructor creates a builder with the name
28  * @param name Layer name
29  */
30  explicit PriorBoxClusteredLayer(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 PriorBoxClusteredLayer(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 PriorBoxClusteredLayer(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  PriorBoxClusteredLayer& setName(const std::string& name);
47 
48  /**
49  * @brief Returns output port
50  * @return Output port
51  */
52  const Port& getOutputPort() const;
53  /**
54  * @brief Sets output port
55  * @param port Output port
56  * @return reference to layer builder
57  */
58  PriorBoxClusteredLayer& setOutputPort(const Port& port);
59  /**
60  * @brief Returns input ports
61  * @return Vector of input ports
62  */
63  const std::vector<Port>& getInputPorts() const;
64  /**
65  * @brief Sets input ports
66  * @param port Vector of input ports
67  * @return reference to layer builder
68  */
69  PriorBoxClusteredLayer& setInputPorts(const std::vector<Port>& port);
70  /**
71  * @brief Returns height and width of input image
72  * @return input image sizes
73  */
74  const std::vector<float> getImgSizes() const;
75  /**
76  * @brief Sets height and width sizes
77  * @param sizes Height and width sizes
78  * @return reference to layer builder
79  */
80  PriorBoxClusteredLayer& setImgSizes(const std::vector<float> sizes);
81  /**
82  * @brief returns distances between (height and width) box centers
83  * @return distances
84  */
85  const std::vector<float> getSteps() const;
86  /**
87  * @brief Sets distances between box centers for height and width
88  * @param steps Distances between box centers
89  * @return reference to layer builder
90  */
91  PriorBoxClusteredLayer& setSteps(const std::vector<float> steps);
92  /**
93  * @brief returns a distance between box centers
94  * @return distance
95  */
96  float getStep() const;
97  /**
98  * @brief Sets a distance between box centers
99  * @param step A distance between box centers
100  * @return reference to layer builder
101  */
102  PriorBoxClusteredLayer& setStep(float step);
103  /**
104  * @brief Returns shift of box respectively to top left corner
105  * @return Shift
106  */
107  float getOffset() const;
108  /**
109  * @brief Sets shift of box respectively to top left corner
110  * @param offset Shift
111  * @return reference to layer builder
112  */
113  PriorBoxClusteredLayer& setOffset(float offset);
114  /**
115  * @brief Returns a variance of adjusting bounding boxes
116  * @return Variance
117  */
118  float getVariance() const;
119  /**
120  * @brief Sets a variance of adjusting bounding boxes
121  * @param variance Variance
122  * @return reference to layer builder
123  */
124  PriorBoxClusteredLayer& setVariance(float variance);
125  /**
126  * @brief Returns desired boxes width in pixels
127  * @return width of desired boxes
128  */
129  float getWidth() const;
130  /**
131  * @brief Sets desired boxes width in pixels
132  * @param width Width of desired boxes
133  * @return reference to layer builder
134  */
135  PriorBoxClusteredLayer& setWidth(float width);
136  /**
137  * @brief Returns desired boxes height in pixels
138  * @return height of desired boxes
139  */
140  float getHeight() const;
141  /**
142  * @brief Sets desired boxes height in pixels
143  * @param height Height of desired boxes
144  * @return reference to layer builder
145  */
146  PriorBoxClusteredLayer& setHeight(float height);
147  /**
148  * @brief Returns clip flag
149  * @return true if each value in the output blob is within [0,1]
150  */
151  bool getClip() const;
152  /**
153  * @brief sets clip flag
154  * @param flag true if each value in the output blob is within [0,1]
155  * @return reference to layer builder
156  */
157  PriorBoxClusteredLayer& setClip(bool flag);
158  /**
159  * @brief Returns flip flag
160  * @return list of boxes is augmented with the flipped ones if true
161  */
162  bool getFlip() const;
163  /**
164  * @brief Sets flip flag
165  * @param flag true if list of boxes is augmented with the flipped ones
166  * @return reference to layer builder
167  */
168  PriorBoxClusteredLayer& setFlip(bool flag);
169 };
170 IE_SUPPRESS_DEPRECATED_END
171 
172 } // namespace Builder
173 } // namespace InferenceEngine
std::vector< int > offset
A vector of offsets for each dimension.
Definition: ie_layers.h:1016
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
std::string name
Layer name.
Definition: ie_layers.h:42
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 PriorBoxClustered layer.
Definition: ie_prior_box_clustered_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