-
Notifications
You must be signed in to change notification settings - Fork 2k
Add support to NonMaxSuppressionV5 #2524
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
Conversation
nsthorat
left a comment
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.
Great work on this Na! I don't have any major comments, this fits very well in line with our style :)
Just want to double check: you've made sure this matches TensorFlow python by testing in a colab or something of that sort?
Reviewed 8 of 8 files at r1.
Reviewable status:complete! 1 of 1 approvals obtained (waiting on @lina128, @nsthorat, and @pyu10055)
tfjs-core/src/backends/array_util.ts, line 3 at r1 (raw file):
/** * @license * Copyright 2018 Google LLC. All Rights Reserved.
2019
tfjs-core/src/backends/array_util_test.ts, line 3 at r1 (raw file):
/** * @license * Copyright 2018 Google LLC. All Rights Reserved.
2019
tfjs-core/src/ops/image_ops.ts, line 148 at r1 (raw file):
/** * Performs non maximum suppression of bounding boxes based on * iou (intersection over union). This op also supports a Soft-NMS mode (c.f.
nit: put a break line before the new sentence
|
Thank you for the review Nikhil! I only made sure it matches with TensorFlow c++ code. I will test the python version and let you know. Good catch :) |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
pyu10055
left a comment
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.
Great work Na! Are there any TF tests for NMSV5 we can include here?
Reviewable status:
complete! 2 of 1 approvals obtained (waiting on @lina128 and @pyu10055)
tfjs-core/src/ops/image_ops.ts, line 237 at r1 (raw file):
scoreThreshold = Number.NEGATIVE_INFINITY; } if (softNmsSigma == null) {
make sure softNmsSigma is between 0 and 1?
Thank you for the review, Ping! Added the check. |
9f17f4e to
c23800e
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Done |
|
@nsthorat and @pyu10055 , the python version outputs the same result as the added test in image_ops_test.ts > 'select from three clusters with SoftNMS', here is the Colab link for the Python result: https://colab.research.google.com/drive/1ivLrOjw70UccrM6ENszizE1mb1mGB7RF |
|
@lina128 Thanks! |

FEATURE Add support to NonMaxSuppressionV5: add arg softNmsSigma and implementation to nonMaxSuppression op.
This change is