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

gnerate all mask spend 20s, it is too long #25

Closed
dahaiwugui opened this issue Jun 29, 2023 · 6 comments
Closed

gnerate all mask spend 20s, it is too long #25

dahaiwugui opened this issue Jun 29, 2023 · 6 comments

Comments

@dahaiwugui
Copy link

dahaiwugui commented Jun 29, 2023

Thanks for your interest in our work. Note that MobileSAM makes the image encoder lightweight without changing the decoder (like 8ms on the encoder and 4ms on the decoder). Since we mainly target the anything mode (1 times image encoder and 1 times decoder) instead of everything mode (1 times image encoder and 32x32 times decoder), see the paper for definition difference (Anything mode is the foundation task while everything mode is just a downstream task as indicated in the original SAM paper). "gnerate all mask" seems to suggest that you are using everything mode. For everything mode, even though our encoder is much faster than that of the original SAM(roughly 8ms vs 450ms), it cannot save too much time for the whole pipeline since most of the time is spent on the 32x32 times decoder. One way to mitigate this is to use smaller number of grids (like 10x10 or 5x5) to make the decoder consume less time, since many redundant masks are generated in the case of 32x32 grids. I hope this addresses your issues, otherwise, please kindly let us know. We are also currently trying to make the image decoder more lightweight by distilling it with smaller one as we did for image encoder. Stayed tuned for our progress. If you have more issues, please kindly let us know and we might not be able to respond in a timely manner, but will try our best.

@jimmyflycv
Copy link

same to me on my mac.
much longer than original sam on my mac.
any tips here?

@ChaoningZhang
Copy link
Owner

ChaoningZhang commented Jun 30, 2023

same to me on my mac. much longer than original sam on my mac. any tips here?

Thanks for your interest in our work. It seems that there is either bug in the code or you have not used it improperly. At this moment, we cannot help debug in a timely manner. If you provide more details, we will try to help as soon as possible. See the demo of running MobileSAM on CPU is available here for checking the speed: https://huggingface.co/spaces/dhkim2810/MobileSAM

@jimmyflycv
Copy link

same to me on my mac. much longer than original sam on my mac. any tips here?

Thanks for your interest in our work. It seems that there is either bug in the code or you have not used it improperly. At this moment, we cannot help debug in a timely manner. If you provide more details, we will try to help as soon as possible. See the demo of running MobileSAM on CPU is available here for checking the speed: https://huggingface.co/spaces/dhkim2810/MobileSAM

ok
thank u.

@ChaoningZhang
Copy link
Owner

same to me on my mac. much longer than original sam on my mac. any tips here?

Thanks for your interest in our work. It seems that there is either bug in the code or you have not used it improperly. At this moment, we cannot help debug in a timely manner. If you provide more details, we will try to help as soon as possible. See the demo of running MobileSAM on CPU is available here for checking the speed: https://huggingface.co/spaces/dhkim2810/MobileSAM

ok thank u.

Yet another demo is available at https://mobilesam.glitch.me/ to run everything on your own browser. Enjoy it~~

@Vanessaaui
Copy link

Vanessaaui commented Jul 1, 2023 via email

@dahaiwugui
Copy link
Author

dahaiwugui commented Jul 2, 2023 via email

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

No branches or pull requests

4 participants