Skip to content
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

Faster postprocessing #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsaric
Copy link

@jsaric jsaric commented Jan 21, 2021

I created a vectorized version of postprocessing for panoptic segmentation.
The changes are mostly in function merge_semantic_and_instance.

My experiments showed that the postprocessing time is reduced around 3 times.

Please check it out, and let me know if you have any ideas on how to make it faster.

@bowenc0221
Copy link
Owner

Thanks for the effort to make post-processing faster!
In our original implementation, we wrote a CUDA kernel (but it was in Tensorflow) to do the post-processing so it is super fast.
Are you interested to give it a try?

For this PR, I will take a look when I have time.

@jsaric
Copy link
Author

jsaric commented Jan 29, 2021

I think I will try to do it, but I can't make any promises.

As far as I understand, you are not allowed to share any details about your Tensorflow implementation?
I was wondering If you can say, which stages of postprocessing were done in native Tensorflow and which were part of the CUDA kernel?
For example, is it possible to do the parts included in functions find_instance_center and group_pixels faster in the CUDA kernel?

@bowenc0221
Copy link
Owner

IC, only the merge_semantic_and_instance function is written in CUDA kernel in the original TF implementation. All other methods (find_instance_center, group_pixels) are implemented with existing TF ops pretty much similar to the current Pytorch version.

@jsaric
Copy link
Author

jsaric commented Feb 3, 2021

I managed to write function merge_semantic_and_instance in CUDA with cupy.
I created new pull request. Check it out.

You can close this one, and we can move the discussion to the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants