-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MatrixNMS-8 spec. #5948
MatrixNMS-8 spec. #5948
Conversation
@openvinotoolkit/openvino-docs-maintainers , please, review this PR. |
@zhangYiIntel welcome to review this spec, especially the operation algorithm description. |
04d204b
to
b7ce937
Compare
|
||
* *sort_result_across_batch* | ||
|
||
* **Description**: *sort_result_across_batch* is a flag that specifies whenever it is necessary to sort selected boxes across batches or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PaddlePaddle has an attribute called normalized to specify whether the bounding boxes are normalized by the image width/height. Do we need to add this attribute ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't have to be in OV Op. We will handle it in our PDPD->OV conversion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know the image size if you want to handle it in PDPD->OV conversion? So I suggest to add this attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During op conversion, it gets the attribute value True/False, but during calculation, they have different IOU calculation methods depends on the normalized value. how can we handle this during the Ops conversion ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "normalize" attribute is PDPD specific, no need to use image size. It simply add a const offset to the original bbox. And as discussed with ZhangYi, we can handle this with a decomposition.
Please refer to Paddle2ONNX, which solve this by adding 2 Add operation before NMS.
https://github.com/PaddlePaddle/Paddle2ONNX/blob/e95695af98f1cf417d3ba2c0e81abf7b59948ab6/paddle2onnx/op_mapper/detection/multiclass_nms.py#L106
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lazarevevgeny I am so sorry I have to reopen this discussion. During test I found it cannot be solved in decomposition. Extra substract operation is required after NMS. It looks awkward. What's more, the extra substracts won't success as they are dynamic shape input.
This Op functionally equivalent to NonMaxSuppression-5, with an non max suppression algorithm called matrix_nms, and perform more post-processing phases, and lay out the detection outputs in the way of PaddlePaddle detection.
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
Co-authored-by: Anastasiya Ageeva <[email protected]>
* Specification of a new operator called MatrixNMS. This Op functionally equivalent to NonMaxSuppression-5, with an non max suppression algorithm called matrix_nms, and perform more post-processing phases, and lay out the detection outputs in the way of PaddlePaddle detection. * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update docs/ops/sort/MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]> * Update MatrixNMS_8.md * Update MatrixNMS_8.md Co-authored-by: Anastasiya Ageeva <[email protected]>
Details:
Tickets: