552b0ecf2f7dbafeccb7fe7fa4965b122ad24e9e
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / api / C / prior_box.h
1 /*
2 // Copyright (c) 2016 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
18 #pragma once
19 #include "cldnn.h"
20 /// @addtogroup c_api C API
21 /// @{
22 /// @addtogroup c_topology Network Topology
23 /// @{
24 /// @addtogroup c_primitives Primitives
25 /// @{
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /// @brief Generates a set of default bounding boxes with different sizes and aspect ratios.
32 /// @details The prior-boxes are shared across all the images in a batch (since they have the same width and height).
33 /// First feature stores the mean of each prior coordinate.
34 /// Second feature stores the variance of each prior coordinate.
35 CLDNN_BEGIN_PRIMITIVE_DESC(prior_box)
36 /// @brief Image width and height.
37 cldnn_tensor img_size;
38 /// @brief Minimum box sizes in pixels.
39 cldnn_float_arr min_sizes;
40 /// @brief Maximum box sizes in pixels.
41 cldnn_float_arr max_sizes;
42 /// @brief Various of aspect ratios. Duplicate ratios will be ignored.
43 cldnn_float_arr aspect_ratios;
44 /// @brief If not 0, will flip each aspect ratio. For example, if there is aspect ratio "r", aspect ratio "1.0/r" we will generated as well.
45 uint32_t flip;
46 /// @brief If not 0, will clip the prior so that it is within [0, 1].
47 uint32_t clip;
48 /// @brief Variance for adjusting the prior boxes.
49 cldnn_float_arr variance;
50 /// @brief Step width.
51 float step_width;
52 /// @brief Step height.
53 float step_height;
54 /// @brief Offset to the top left corner of each cell.
55 float offset;
56 /// @broef If false, only first min_size is scaled by aspect_ratios
57 uint32_t scale_all_sizes;
58 CLDNN_END_PRIMITIVE_DESC(prior_box)
59
60 CLDNN_DECLARE_PRIMITIVE_TYPE_ID(prior_box);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 /// @}
67 /// @}
68 /// @}
69