Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / api / C / detection_output_sort.h
1 /*
2 // Copyright (c) 2018 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 #ifndef DETECTION_OUTPUT_SORT_H
19 #define DETECTION_OUTPUT_SORT_H
20
21 #include "cldnn.h"
22 /// @addtogroup c_api C API
23 /// @{
24 /// @addtogroup c_topology Network Topology
25 /// @{
26 /// @addtogroup c_primitives Primitives
27 /// @{
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33     /// @brief Generates a list of detections based on location and confidence predictions by doing non maximum suppression.
34     /// @details Each row is a 7 dimension vector, which stores: [image_id, label, confidence, xmin, ymin, xmax, ymax].
35     /// If number of detections per image is lower than keep_top_k, will write dummy results at the end with image_id=-1. 
36     CLDNN_BEGIN_PRIMITIVE_DESC(detection_output_sort)
37         /// @brief Number of classes to be predicted.
38         uint32_t num_classes;
39     /// @brief Number of classes to be predicted.
40     uint32_t num_images;
41     /// @brief Number of total bounding boxes to be kept per image after NMS step.
42     uint32_t keep_top_k;
43     /// @brief If true, bounding box are shared among different classes.
44     uint32_t share_location;
45     /// @brief Maximum number of results to be kept in NMS.
46     int top_k;
47     /// @brief Background label id (-1 if there is no background class).
48     int background_label_id;
49     CLDNN_END_PRIMITIVE_DESC(detection_output_sort)
50
51     CLDNN_DECLARE_PRIMITIVE_TYPE_ID(detection_output_sort);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 /// @}
58 /// @}
59 /// @}
60 #endif /* DETECTION_OUTPUT_SORT_H */