11-08-2023, 09:42 AM
(This post was last modified: 11-08-2023, 09:57 AM by LeafAtWood.)
(11-07-2023, 03:49 AM)LeafAtWood Wrote: Thanks khemadeva for the plugin, though I am having trouble registering it with my GIMP 2.10 on macOS 10.15.7. I have run your install validation script (/path/to/python3/python ./seganybridge.py vit_h /path/to/checkpoint/model/sam_vit_h_4b8939.pth) and got a Success. I have put the seganybridge.py and seganyplugin.py in the /Users/me/Library/Application Support/GIMP/2.10/plug-ins repository. I also changed the mode so that these files are executable (chmod 777). Made sure I restarted GIMP. I also made sure SAM was properly installled by running the script amg.py from the SAM github and generated the segmentation masks. So seems my only trouble is registering your plugin with GIMP. Do you have any idea why it is not registering with GIMP and would you know of any way to check/debug the registration process ?
I have relayed the news on my Deep_in_Depth twitter channel : https://twitter.com/Deep_In_Depth/status...9651147837
Fixed the "registration issue" by just adding the following line to the top of each file seganybridge.py and seganyplugin.py
#!/usr/bin/env python
There also seem to be a problem with the default plug-ins path on macOS: /Users/me/Library/Application Support/GIMP/2.10/plug-ins due to the space in the path
When the seganyplugin.py calls the seganybridge.py it looks like this:
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /Users/efe/Library/Application Support/GIMP/2.10/plug-ins/seganybridge.py vit_h /Users/me/DeepInDepth/SAM/sam_vit_h_4b8939.pth /var/folders/38/hws16c9j0qbfm9_r3t900slw0000gn/T/__seg__7Szrd4.png Auto Multiple /var/folders/38/hws16c9j0qbfm9_r3t900slw0000gn/T/__seg__mask__ True
should be:
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3[i] "/Users/efe/Library/Application Support/GIMP/2.10/plug-ins/seganybridge.py" [/i]vit_h /Users/me/DeepInDepth/SAM/sam_vit_h_4b8939.pth /var/folders/38/hws16c9j0qbfm9_r3t900slw0000gn/T/__seg__7Szrd4.png Auto Multiple /var/folders/38/hws16c9j0qbfm9_r3t900slw0000gn/T/__seg__mask__ True
Even with that change the seganybridge.py does not start. Bizarre!