Vectorize RetinaNet's postprocessing#2828
Merged
fmassa merged 8 commits intopytorch:masterfrom Oct 20, 2020
Merged
Conversation
f131bbe to
42d2661
Compare
Co-authored-by: Francisco Massa <[email protected]>
hgaiser
reviewed
Oct 20, 2020
Contributor
hgaiser
left a comment
There was a problem hiding this comment.
Nice speedup, very impressive! Wouldn't expect it to make that much of a difference ^^
Member
|
@hgaiser I think we could re-introduce it in a follow-up PR, but it would be good to have some more strict approaches for this. |
bryant1410
pushed a commit
to bryant1410/vision-1
that referenced
this pull request
Nov 22, 2020
* Vectorize operations, across all feaure levels. * Remove unnecessary other_outputs variable. * Split per feature level. * Perform batched_nms across feature levels. * Add extra parameter for limiting detections before and after nms. * Restoring default threshold. * Apply suggestions from code review Co-authored-by: Francisco Massa <[email protected]> * Renaming variable. Co-authored-by: Francisco Massa <[email protected]>
vfdev-5
pushed a commit
to Quansight/vision
that referenced
this pull request
Dec 4, 2020
* Vectorize operations, across all feaure levels. * Remove unnecessary other_outputs variable. * Split per feature level. * Perform batched_nms across feature levels. * Add extra parameter for limiting detections before and after nms. * Restoring default threshold. * Apply suggestions from code review Co-authored-by: Francisco Massa <[email protected]> * Renaming variable. Co-authored-by: Francisco Massa <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We speed up the RetinaNet's
postprocess_detections()method by vectorizing its operations (#2799). The implementation is based on @ppwwyyxx's great work at detectron2 and was possible thanks to @fmassa's guidance. Please note that there are breaking changes on the behaviour of the post-processing because of the way we clip the candidates before NMS.Benchmark (100 iterations) across different images:
To measure the speed we follow the same approach as in #2819.
To examine any effects on the accuracy and performance of the model, we compared master vs branch on the COCO dataset.
Click here for the complete output of the two runs
Important Notes: