You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/04/19 20:50:52 UTC

[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #20190: [v1.x] ONNX: add faster_rcnn_fpn models

Zha0q1 commented on a change in pull request #20190:
URL: https://github.com/apache/incubator-mxnet/pull/20190#discussion_r616168547



##########
File path: tests/python-pytest/onnx/test_onnxruntime_cv.py
##########
@@ -315,6 +317,11 @@ def normalize_image(imgfile):
                     assert_obj_detetion_result(mx_class_ids[0], mx_scores[0], mx_boxes[0],
                                                onnx_class_ids[0], onnx_scores[0], onnx_boxes[0],
                                                score_thresh=0.8, score_tol=0.05, box_tol=15)
+                elif model.startswith('faster_rcnn_fpn'):
+                    onnx_class_ids, onnx_scores, onnx_boxes = session.run([], {input_name: img_data.asnumpy()})
+                    assert_obj_detetion_result(mx_class_ids[0], mx_scores[0], mx_boxes[0],
+                                               onnx_class_ids[0], onnx_scores[0], onnx_boxes[0],
+                                               score_thresh=0.8, score_tol=0.05, box_tol=30)

Review comment:
       I think the onnx model can predict the same objects with very similar scores. It's just with a few boxes one of the four values (xstart, xend, ystart, yend) can differ by quit a bit (refer to the bbox of the boy in red). I am not sure about the cause, but it must be related to the fpn structure.
   
   
   ![soccer_onnx](https://user-images.githubusercontent.com/16669457/115301423-06c72900-a116-11eb-86c5-2ed362d0a3cd.png))
   
   ![soccer_mx](https://user-images.githubusercontent.com/16669457/115301411-029b0b80-a116-11eb-84ee-aa8a81dd54f0.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org