-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Vectorize RetinaNet's postprocessing #2828
Vectorize RetinaNet's postprocessing #2828
Conversation
f131bbe
to
42d2661
Compare
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.
PR looks great, thanks a lot @datumbox !
I've left a few comments which are mostly aesthetic, let me know what you think
Co-authored-by: Francisco Massa <[email protected]>
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.
Looks great, thanks a lot!
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.
Nice speedup, very impressive! Wouldn't expect it to make that much of a difference ^^
@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. |
* 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]>
* 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]>
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: