Closed mohdsinad closed 1 month ago
Thanks for watching my YouTube tutorials :) Regarding your issue, did you try sam2_hiera_s.yaml or sam2_hiera_t.yaml? If so, did they work? I did not test the base plus model. I wonder if the issue is with the + sign in the yaml file name. Can you change it to sam2_hiera_b_plus.yaml and see if it works?
I just tested with sam2_hiera_b+.yaml and accompanying sam2_hiera_base_plus.pt, it worked perfectly fine. Did you download the model and place it locally? Can you tell more about the system you are using, is it a mac, Windows or Linux?
Hi,
Thank you for the quick reply. I use an Ubuntu 22.04 based linux distro.
I have got the config and weight files in my local system (both of them reside in a folder in Downloads). The SAM2 as well as the digitalsreeni-image-annotator (editable version) installation are in a conda environment where pytorch is also installed.
initially, I thought it was a path issue (load_sam2_model function; before the try block) and checked it out; no issues there. Narrowed it down to the build_sam2 function call. I think the code breaks there and returns the error message.
I just managed to recreate the issue, on mac and Linux. It works fine on Windows. Must be the way the path is assigned. I will have a look at it this weekend. Thanks for letting me know.
Can you please check if the latest version fixed the issue. I completely reworked the SAM tool as mac and Ubuntu seem to have issues with my original approach. Now, I am using Ultralytics library so no more manual loading of models and config files.
I tried out the latest version as you suggested.
Yes, the Ultralytics approach seems cleaner too (i took a look at the code) . However, I face a new error as shown below.
Since this is a new issue, I will close the current issue to keep these topics separate. Based on the error, it seems to be a system-specific issue to your system and possibly to Ubuntu showing "xcb" plugin for X11-based systems. In summary, it could be how Qt is interacting with the X11 windowing system on your particular setup making it a bit challenging to troubleshoot. I hope someone can test it on other Linux installations and report the issue, if reproducible or better yet help fix it :)
Closing the current issue of SAM on non-Windows systems.
I get the above error when I try to load in the SAM2 .yaml config and .pt checkpoint files.
P.S. I follow your videos online. Really informative! and Thank you for creating this annotation tool.