-
Notifications
You must be signed in to change notification settings - Fork 966
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
sam bad result #510
Comments
I am going to work on this today in the https://github.com/YavorGIvanov/sam.cpp repository. This is the reason the ggml version in my repository is not updated to the latest. There is a problem when using the latest ggml version. Will update the example once I fix the problem in sam.cpp. Meanwhile you can test it by going back a couple of commits (e.g. 7b5fcf5), but I expect to fix it today. |
I see so you mean there is an incompatibility issue between sam-cpp and ggml latest version. okay I will try it with the old ggml the one you used in your repo. Thank you for your reply |
with old version it works well. Looking forward to your update in this version. |
I am still trying to figure out exactly the reason why my change actually fixes the wrong output, but I still decided to fix it until I figure it out, so now the example output should be fine. May need some pointers by @slaren on this for where to look. I am trying to debug the library and allocator. It is interesting that removing other inplace operations in the mask decoder doesn't fix the issue, but only removing this one - does fix it. More details in the commit. |
After ggerganov/llama.cpp#2874, |
Ok. Thanks. I can remove the not needed inplaces as I added them initially only to boost the inference speed a bit. I will bench after I remove them though. Removing them all will surely fix the problem. Currently I remove only 1 add_inplace and it got fixed, but it was probably random. |
Hi, @YavorGIvanov I am looking forward to gpu implementation of sam. Do you have a plan to implement it in near future. Thanks |
Yes. I do. Will do first some attempts to optimize the inference as is, then quantizaiton and then CUDA/Metal support. I will try to finish these things by the end of this month. |
Hi thank you for your wonderful implementation.
The command I used:
main.exe -t 16 -i img.jpg
I am getting following problem when executing sam on windows:
It yields no result image and when I lowered the iou threshold, the result image is generated but the detected mask is no good.
The text was updated successfully, but these errors were encountered: