segment-anything-models-java / SAMJ-IJ

An ImageJ/Fiji plugin designed to effortlessly integrate Segment-Anything models (SAMs) without code.
Apache License 2.0
56 stars 6 forks source link

Fail to install SAM2 small #28

Open aroskoth opened 1 week ago

aroskoth commented 1 week ago

Hello everyone,

I wanted to install the SAM2 Small on my work laptop. For some reason it fails with the error:


java.lang.RuntimeException: Error executing the following command: [cmd.exe, /c, C:\Users\myUserName\fiji-win64\Fiji.app\appose_x86_64\envs\sam2\python.exe, -m, pip, install, mkl==2024.0.0, samv2==0.0.4, pytest] at io.bioimage.modelrunner.apposed.appose.Mamba.runPythonIn(Mamba.java:1057) at ai.nets.samj.install.Sam2EnvManager.installSAMDeps(Sam2EnvManager.java:336) at ai.nets.samj.install.Sam2EnvManager.installSAMDeps(Sam2EnvManager.java:296) at ai.nets.samj.install.Sam2EnvManager.installEverything(Sam2EnvManager.java:364) at ai.nets.samj.gui.SAMModelPanel.lambda$createInstallationThread$7(SAMModelPanel.java:280) at java.lang.Thread.run(Thread.java:750)

I then installed it on my private laptop and there it seems to work. Can anyone tell me what the issue is and how I could correct it?

Thank you very much in advance!

carlosuc3m commented 1 week ago

are you using the latest available version of samj? Is that the whole error? Regards, Carlos

aroskoth commented 6 days ago

Hey Carlos,

Thank you for your answer. Yes. I downloaded the latest SAMJ version through the update manager of Fiji. I also just tried uninstalling and installing it again but it is still the same error. Could I try to manually install the model somehow, or are there any dependencies that I could reinstall?

Best, Aurelius

aroskoth commented 6 days ago

Hey Carlos,

I just tried installing other models and the EfficientViTSAM-I2 and EfficientViTSAM-xI0 both can be installed but give the error that the image is not a 2D image, which it in fact is. I guess this is some issue due to my computer being regulated by my organisation, since my private one does not give those errors. I will just be doing my analysis on my private laptop with SAMJ then.

Thank you for your suggestions.

Best, Aurelius

carlosuc3m commented 5 days ago

HEllo @aroskoth , SAMJ indeed executes some commands by itself. I will tell you the commands that are executed by SAMJ to see if you can install it by yourself. Also I will soon update the version to one that gives more verbose errors so we can understand what is happening. Sorry for the errors and thanks for trying!