ie_prior_box_clustered_layer.hpp
1 // Copyright (C) 2018 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <builders/ie_layer_fragment.hpp>
8 #include <ie_inetwork.hpp>
9 #include <string>
10 #include <vector>
11 
12 namespace InferenceEngine {
13 namespace Builder {
14 
15 /**
16  * @brief The class represents a builder for PriorBoxClustered layer
17  */
18 class INFERENCE_ENGINE_API_CLASS(PriorBoxClusteredLayer): public LayerFragment {
19 public:
20  /**
21  * @brief The constructor creates a builder with the name
22  * @param name Layer name
23  */
24  explicit PriorBoxClusteredLayer(const std::string& name = "");
25  /**
26  * @brief The constructor creates a builder from generic builder
27  * @param genLayer generic builder
28  */
29  explicit PriorBoxClusteredLayer(Layer& genLayer);
30  /**
31  * @brief Sets the name for the layer
32  * @param name Layer name
33  * @return reference to layer builder
34  */
35  PriorBoxClusteredLayer& setName(const std::string& name);
36 
37  /**
38  * @brief Returns output port
39  * @return Output port
40  */
41  const Port& getOutputPort() const;
42  /**
43  * @brief Sets output port
44  * @param port Output port
45  * @return reference to layer builder
46  */
47  PriorBoxClusteredLayer& setOutputPort(const Port& port);
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 port Vector of input ports
56  * @return reference to layer builder
57  */
58  PriorBoxClusteredLayer& setInputPorts(const std::vector<Port>& port);
59  /**
60  * @brief Returns height and width of input image
61  * @return input image sizes
62  */
63  const std::vector<float> getImgSizes() const;
64  /**
65  * @brief Sets height and width sizes
66  * @param sizes Height and width sizes
67  * @return reference to layer builder
68  */
69  PriorBoxClusteredLayer& setImgSizes(const std::vector<float> sizes);
70  /**
71  * @brief returns distances between (height and width) box centers
72  * @return distances
73  */
74  const std::vector<float> getSteps() const;
75  /**
76  * @brief Sets distances between box centers for height and width
77  * @param steps Distances between box centers
78  * @return reference to layer builder
79  */
80  PriorBoxClusteredLayer& setSteps(const std::vector<float> steps);
81  /**
82  * @brief returns a distance between box centers
83  * @return distance
84  */
85  float getStep() const;
86  /**
87  * @brief Sets a distance between box centers
88  * @param steps A distance between box centers
89  * @return reference to layer builder
90  */
91  PriorBoxClusteredLayer& setStep(float step);
92  /**
93  * @brief Returns shift of box respectively to top left corner
94  * @return Shift
95  */
96  float getOffset() const;
97  /**
98  * @brief Sets shift of box respectively to top left corner
99  * @param offset Shift
100  * @return reference to layer builder
101  */
102  PriorBoxClusteredLayer& setOffset(float offset);
103  /**
104  * @brief Returns a variance of adjusting bounding boxes
105  * @return Variance
106  */
107  float getVariance() const;
108  /**
109  * @brief Sets a variance of adjusting bounding boxes
110  * @param variance Variance
111  * @return reference to layer builder
112  */
113  PriorBoxClusteredLayer& setVariance(float variance);
114  /**
115  * @brief Returns desired boxes width in pixels
116  * @return width of desired boxes
117  */
118  float getWidth() const;
119  /**
120  * @brief Sets desired boxes width in pixels
121  * @param width Width of desired boxes
122  * @return reference to layer builder
123  */
124  PriorBoxClusteredLayer& setWidth(float width);
125  /**
126  * @brief Returns desired boxes height in pixels
127  * @return height of desired boxes
128  */
129  float getHeight() const;
130  /**
131  * @brief Sets desired boxes height in pixels
132  * @param height Height of desired boxes
133  * @return reference to layer builder
134  */
135  PriorBoxClusteredLayer& setHeight(float height);
136  /**
137  * @brief Returns clip flag
138  * @return true if each value in the output blob is within [0,1]
139  */
140  bool getClip() const;
141  /**
142  * @brief sets clip flag
143  * @param flag true if each value in the output blob is within [0,1]
144  * @return reference to layer builder
145  */
146  PriorBoxClusteredLayer& setClip(bool flag);
147  /**
148  * @brief Returns flip flag
149  * @return list of boxes is augmented with the flipped ones if true
150  */
151  bool getFlip() const;
152  /**
153  * @brief Sets flip flag
154  * @param flag true if list of boxes is augmented with the flipped ones
155  * @return reference to layer builder
156  */
157  PriorBoxClusteredLayer& setFlip(bool flag);
158 };
159 
160 } // namespace Builder
161 } // namespace InferenceEngine
Definition: ie_argmax_layer.hpp:11
a header file for the Inference Engine Network interface