[ONNX] Return NMS-5 generation (#3003)
authorAndrew Bakalin <andrew.bakalin@intel.com>
Tue, 10 Nov 2020 06:45:14 +0000 (09:45 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 06:45:14 +0000 (09:45 +0300)
* [ONNX] Return NMS-5 generation

* Disable failed models

ngraph/frontend/onnx_import/src/op/non_max_suppression.cpp
ngraph/python/tests/__init__.py
ngraph/python/tests/test_onnx/test_zoo_models.py

index fde5702..b41b409 100644 (file)
@@ -86,11 +86,10 @@ namespace ngraph
 
                     const auto box_encoding =
                         center_point_box == 0
-                            ? ngraph::op::v4::NonMaxSuppression::BoxEncodingType::CORNER
-                            : ngraph::op::v4::NonMaxSuppression::BoxEncodingType::CENTER;
+                            ? default_opset::NonMaxSuppression::BoxEncodingType::CORNER
+                            : default_opset::NonMaxSuppression::BoxEncodingType::CENTER;
 
-                    // Since NMS-5 currently does not work on CPU plugin v4 version have to be used.
-                    return {std::make_shared<ngraph::op::v4::NonMaxSuppression>(
+                    return {std::make_shared<default_opset::NonMaxSuppression>(
                         boxes,
                         scores,
                         max_output_boxes_per_class,
index 3f290f9..b039758 100644 (file)
@@ -176,6 +176,30 @@ xfail_issue_38735 = xfail_test(reason="RuntimeError: nGraph does not support the
 xfail_issue_38736 = xfail_test(reason="RuntimeError: nGraph does not support the following ONNX operations:"
                                       "NegativeLogLikelihoodLoss")
 
+xfail_issue_42779 = xfail_test(reason="Unsupported dynamic ops:"
+                                      "v1::TopKIE TopK_6774 (Gather_706[0]:f32{16000}, Unsqueeze_7522[0]:"
+                                      "i32{1}) -> (f32{?}, i32{?})"
+                                      "v0::Convert TopK_718.1 (TopK_6774[1]:i32{?}) -> (i32{?})"
+                                      "v0::GatherIE Gather_733 (Gather_706[0]:f32{16000}, TopK_718.1[0]:"
+                                      "i32{?}) -> (f32{?})"
+                                      "v1::Reshape scores (Gather_733[0]:f32{?}, Constant_6852[0]:i32{2})"
+                                      " -> (f32{1,?})"
+                                      "v0::Result scores (scores[0]:f32{1,?}) -> (f32{1,?})"
+                                      "v0::GatherIE Gather_729 (Gather_690[0]:i32{16000}, TopK_718.1[0]:"
+                                      "i32{?}) -> (i32{?})"
+                                      "v1::Reshape Unsqueeze_730 (Gather_729[0]:i32{?}, Constant_6854[0]:"
+                                      "i32{2}) -> (i32{1,?})"
+                                      "v1::Eltwise labels (Unsqueeze_730[0]:i32{1,?}, Constant_6855[0]:"
+                                      "i32{}) -> (i32{1,?})"
+                                      "v0::Result labels (labels[0]:i32{1,?}) -> (i32{1,?})"
+                                      "v0::GatherIE Gather_720 (Gather_697[0]:i32{16000}, TopK_718.1[0]:"
+                                      "i32{?}) -> (i32{?})"
+                                      "v0::GatherIE Gather_727 (Squeeze_719[0]:f32{15130,4}, Gather_720[0]:"
+                                      "i32{?}) -> (f32{?,4})"
+                                      "v1::Reshape bboxes (Gather_727[0]:f32{?,4}, Constant_6859[0]:i32{3})"
+                                      " -> (f32{1,?,4})"
+                                      "v0::Result bboxes (bboxes[0]:f32{1,?,4}) -> (f32{1,?,4}))")
+
 # Model ONNX Zoo issues:
 xfail_issue_36533 = xfail_test(reason="AssertionError: zoo models results mismatch")
 xfail_issue_39684 = xfail_test(reason="ngraph.exceptions.UserInputError:"
index 87e3c23..ec2a7ad 100644 (file)
@@ -37,7 +37,8 @@ from tests import (
     xfail_issue_38084,
     xfail_issue_39669,
     xfail_issue_38726,
-    xfail_issue_40686)
+    xfail_issue_40686,
+    xfail_issue_42779)
 
 MODELS_ROOT_DIR = tests.MODEL_ZOO_DIR
 
@@ -155,6 +156,7 @@ if len(zoo_models) > 0:
             (xfail_issue_36533, "test_onnx_model_zoo_vision_classification_resnet_model_resnet18_v2_7_resnet18v2_resnet18_v2_7_cpu"),
             (xfail_issue_36533, "test_onnx_model_zoo_vision_classification_resnet_model_resnet101_v1_7_resnet101v1_resnet101_v1_7_cpu"),
             (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_mask_rcnn_model_MaskRCNN_10_mask_rcnn_R_50_FPN_1x_cpu"),
+            (xfail_issue_42779, "test_onnx_model_zoo_vision_object_detection_segmentation_ssd_model_ssd_10_model_cpu"),
             (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_faster_rcnn_model_FasterRCNN_10_faster_rcnn_R_50_FPN_1x_cpu"),
             (xfail_issue_41815, "test_onnx_model_zoo_vision_object_detection_segmentation_yolov3_model_yolov3_10_yolov3_yolov3_cpu"),
             (xfail_issue_41815, "test_onnx_model_zoo_vision_object_detection_segmentation_tiny_yolov3_model_tiny_yolov3_11_yolov3_tiny_cpu"),