19 #include "ngraph/op/op.hpp"
32 enum class BoxEncodingType
38 static constexpr
NodeTypeInfo type_info{
"NonMaxSuppression", 1};
56 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
57 const bool sort_result_descending =
true);
70 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
71 const bool sort_result_descending =
true);
77 clone_with_new_inputs(
const OutputVector& new_args)
const override;
79 BoxEncodingType get_box_encoding()
const {
return m_box_encoding; }
80 void set_box_encoding(
const BoxEncodingType box_encoding)
82 m_box_encoding = box_encoding;
84 bool get_sort_result_descending()
const {
return m_sort_result_descending; }
85 void set_sort_result_descending(
const bool sort_result_descending)
87 m_sort_result_descending = sort_result_descending;
91 BoxEncodingType m_box_encoding = BoxEncodingType::CORNER;
92 bool m_sort_result_descending =
true;
95 int64_t max_boxes_output_from_input()
const;
106 enum class BoxEncodingType
112 static constexpr
NodeTypeInfo type_info{
"NonMaxSuppression", 3};
133 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
134 const bool sort_result_descending =
true,
148 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
149 const bool sort_result_descending =
true,
155 std::shared_ptr<Node>
156 clone_with_new_inputs(
const OutputVector& new_args)
const override;
158 BoxEncodingType get_box_encoding()
const {
return m_box_encoding; }
159 void set_box_encoding(
const BoxEncodingType box_encoding)
161 m_box_encoding = box_encoding;
163 bool get_sort_result_descending()
const {
return m_sort_result_descending; }
164 void set_sort_result_descending(
const bool sort_result_descending)
166 m_sort_result_descending = sort_result_descending;
169 element::Type get_output_type()
const {
return m_output_type; }
170 void set_output_type(
const element::Type& output_type)
172 m_output_type = output_type;
174 using Node::set_output_type;
177 BoxEncodingType m_box_encoding = BoxEncodingType::CORNER;
178 bool m_sort_result_descending =
true;
181 int64_t max_boxes_output_from_input()
const;
192 static constexpr
NodeTypeInfo type_info{
"NonMaxSuppression", 4};
213 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
214 const bool sort_result_descending =
true,
228 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
229 const bool sort_result_descending =
true,
234 std::shared_ptr<Node>
235 clone_with_new_inputs(
const OutputVector& new_args)
const override;
246 NGRAPH_RTTI_DECLARATION;
247 enum class BoxEncodingType
266 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
267 const bool sort_result_descending =
true,
284 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
285 const bool sort_result_descending =
true,
304 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
305 const bool sort_result_descending =
true,
326 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
327 const bool sort_result_descending =
true,
349 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
350 const bool sort_result_descending =
true,
356 std::shared_ptr<Node>
357 clone_with_new_inputs(
const OutputVector& new_args)
const override;
359 BoxEncodingType get_box_encoding()
const {
return m_box_encoding; }
360 void set_box_encoding(
const BoxEncodingType box_encoding)
362 m_box_encoding = box_encoding;
364 bool get_sort_result_descending()
const {
return m_sort_result_descending; }
365 void set_sort_result_descending(
const bool sort_result_descending)
367 m_sort_result_descending = sort_result_descending;
370 element::Type get_output_type()
const {
return m_output_type; }
371 void set_output_type(
const element::Type& output_type)
373 m_output_type = output_type;
375 using Node::set_output_type;
377 int64_t max_boxes_output_from_input()
const;
378 float iou_threshold_from_input()
const;
379 float score_threshold_from_input()
const;
380 float soft_nms_sigma_from_input()
const;
381 bool is_soft_nms_sigma_constant_and_default()
const;
384 BoxEncodingType m_box_encoding = BoxEncodingType::CORNER;
385 bool m_sort_result_descending =
true;
393 std::ostream& operator<<(std::ostream& s,
394 const op::v1::NonMaxSuppression::BoxEncodingType& type);
407 "AttributeAdapter<op::v1::NonMaxSuppression::BoxEncodingType>", 1};
408 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
412 std::ostream& operator<<(std::ostream& s,
413 const op::v3::NonMaxSuppression::BoxEncodingType& type);
426 "AttributeAdapter<op::v3::NonMaxSuppression::BoxEncodingType>", 1};
427 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
431 std::ostream& operator<<(std::ostream& s,
432 const op::v5::NonMaxSuppression::BoxEncodingType& type);
445 "AttributeAdapter<op::v5::NonMaxSuppression::BoxEncodingType>", 1};
446 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
An AttributeAdapter "captures" an attribute as an AT& and makes it available as a ValueAccessor<VAT>.
Definition: attribute_adapter.hpp:171
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:71
Access an enum via a string.
Definition: attribute_adapter.hpp:178
A handle for one of a node's outputs.
Definition: node_output.hpp:42
Definition: element_type.hpp:61
Root of all actual ops.
Definition: op.hpp:29
Elementwise addition operation.
Definition: non_max_suppression.hpp:30
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true)
Constructs a NonMaxSuppression operation with default values for the last 3 inputs.
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const Output< Node > &iou_threshold, const Output< Node > &score_threshold, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true)
Constructs a NonMaxSuppression operation.
const NodeTypeInfo & get_type_info() const override
Definition: non_max_suppression.hpp:39
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
NonMaxSuppression operation.
Definition: non_max_suppression.hpp:104
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation with default values for the last 3 inputs.
const NodeTypeInfo & get_type_info() const override
Definition: non_max_suppression.hpp:113
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const Output< Node > &iou_threshold, const Output< Node > &score_threshold, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation.
NonMaxSuppression operation.
Definition: non_max_suppression.hpp:190
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
const NodeTypeInfo & get_type_info() const override
Definition: non_max_suppression.hpp:193
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation with default values for the last 3 inputs.
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const Output< Node > &iou_threshold, const Output< Node > &score_threshold, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation.
NonMaxSuppression operation.
Definition: non_max_suppression.hpp:244
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const Output< Node > &iou_threshold, const Output< Node > &score_threshold, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation with default value in the last. input.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const Output< Node > &iou_threshold, const Output< Node > &score_threshold, const Output< Node > &soft_nms_sigma, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation.
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const Output< Node > &iou_threshold, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation with default values in the last. 2 inputs.
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation with default values in the last 4 inputs.
NonMaxSuppression(const Output< Node > &boxes, const Output< Node > &scores, const Output< Node > &max_output_boxes_per_class, const BoxEncodingType box_encoding=BoxEncodingType::CORNER, const bool sort_result_descending=true, const ngraph::element::Type &output_type=ngraph::element::i64)
Constructs a NonMaxSuppression operation with default values in the last. 3 inputs.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28