7 #include "ngraph/op/op.hpp"
20 enum class BoxEncodingType
26 static constexpr
NodeTypeInfo type_info{
"NonMaxSuppression", 1};
44 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
45 const bool sort_result_descending =
true);
58 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
59 const bool sort_result_descending =
true);
65 clone_with_new_inputs(
const OutputVector& new_args)
const override;
67 BoxEncodingType get_box_encoding()
const {
return m_box_encoding; }
68 void set_box_encoding(
const BoxEncodingType box_encoding)
70 m_box_encoding = box_encoding;
72 bool get_sort_result_descending()
const {
return m_sort_result_descending; }
73 void set_sort_result_descending(
const bool sort_result_descending)
75 m_sort_result_descending = sort_result_descending;
79 BoxEncodingType m_box_encoding = BoxEncodingType::CORNER;
80 bool m_sort_result_descending =
true;
83 int64_t max_boxes_output_from_input()
const;
94 enum class BoxEncodingType
100 static constexpr
NodeTypeInfo type_info{
"NonMaxSuppression", 3};
121 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
122 const bool sort_result_descending =
true,
136 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
137 const bool sort_result_descending =
true,
143 std::shared_ptr<Node>
144 clone_with_new_inputs(
const OutputVector& new_args)
const override;
146 BoxEncodingType get_box_encoding()
const {
return m_box_encoding; }
147 void set_box_encoding(
const BoxEncodingType box_encoding)
149 m_box_encoding = box_encoding;
151 bool get_sort_result_descending()
const {
return m_sort_result_descending; }
152 void set_sort_result_descending(
const bool sort_result_descending)
154 m_sort_result_descending = sort_result_descending;
157 element::Type get_output_type()
const {
return m_output_type; }
158 void set_output_type(
const element::Type& output_type)
160 m_output_type = output_type;
162 using Node::set_output_type;
165 BoxEncodingType m_box_encoding = BoxEncodingType::CORNER;
166 bool m_sort_result_descending =
true;
169 int64_t max_boxes_output_from_input()
const;
180 static constexpr
NodeTypeInfo type_info{
"NonMaxSuppression", 4};
201 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
202 const bool sort_result_descending =
true,
216 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
217 const bool sort_result_descending =
true,
222 std::shared_ptr<Node>
223 clone_with_new_inputs(
const OutputVector& new_args)
const override;
234 NGRAPH_RTTI_DECLARATION;
235 enum class BoxEncodingType
254 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
255 const bool sort_result_descending =
true,
272 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
273 const bool sort_result_descending =
true,
292 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
293 const bool sort_result_descending =
true,
314 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
315 const bool sort_result_descending =
true,
337 const BoxEncodingType box_encoding = BoxEncodingType::CORNER,
338 const bool sort_result_descending =
true,
344 std::shared_ptr<Node>
345 clone_with_new_inputs(
const OutputVector& new_args)
const override;
347 BoxEncodingType get_box_encoding()
const {
return m_box_encoding; }
348 void set_box_encoding(
const BoxEncodingType box_encoding)
350 m_box_encoding = box_encoding;
352 bool get_sort_result_descending()
const {
return m_sort_result_descending; }
353 void set_sort_result_descending(
const bool sort_result_descending)
355 m_sort_result_descending = sort_result_descending;
358 element::Type get_output_type()
const {
return m_output_type; }
359 void set_output_type(
const element::Type& output_type)
361 m_output_type = output_type;
363 using Node::set_output_type;
365 int64_t max_boxes_output_from_input()
const;
366 float iou_threshold_from_input()
const;
367 float score_threshold_from_input()
const;
368 float soft_nms_sigma_from_input()
const;
369 bool is_soft_nms_sigma_constant_and_default()
const;
372 BoxEncodingType m_box_encoding = BoxEncodingType::CORNER;
373 bool m_sort_result_descending =
true;
381 std::ostream& operator<<(std::ostream& s,
382 const op::v1::NonMaxSuppression::BoxEncodingType& type);
395 "AttributeAdapter<op::v1::NonMaxSuppression::BoxEncodingType>", 1};
396 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
400 std::ostream& operator<<(std::ostream& s,
401 const op::v3::NonMaxSuppression::BoxEncodingType& type);
414 "AttributeAdapter<op::v3::NonMaxSuppression::BoxEncodingType>", 1};
415 const DiscreteTypeInfo& get_type_info()
const override {
return type_info; }
419 std::ostream& operator<<(std::ostream& s,
420 const op::v5::NonMaxSuppression::BoxEncodingType& type);
433 "AttributeAdapter<op::v5::NonMaxSuppression::BoxEncodingType>", 1};
434 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:161
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
Access an enum via a string.
Definition: attribute_adapter.hpp:168
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Definition: element_type.hpp:51
Root of all actual ops.
Definition: op.hpp:17
Elementwise addition operation.
Definition: non_max_suppression.hpp:18
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:27
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:92
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:101
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:178
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:181
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:232
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:16